factor out pkgsFun as an optional argument

master
Adam Joseph 2 years ago
parent 7fa5116288
commit 5fa23513f9

@ -1,13 +1,15 @@
{ pkgsFun ? import <nixpkgs>
}:
let
lib = import <nixpkgs/lib>;
nixpkgsArgs = { config.allowNonSource = false; };
nixpkgsOnBuildForBuild = import <nixpkgs> nixpkgsArgs;
nixpkgsOnBuildForBuild = pkgsFun nixpkgsArgs;
ownerboot = { hostPlatform?null, overlay }:
(lib.makeScope lib.callPackageWith (self: {
inherit lib nixpkgsOnBuildForBuild;
nixpkgsOnBuildForHost = import <nixpkgs>
nixpkgsOnBuildForHost = pkgsFun
(nixpkgsArgs // (lib.optionalAttrs (hostPlatform!=null) {
crossSystem = hostPlatform; }));

Loading…
Cancel
Save