From 5fa23513f9045144772b20d19ed6e43c015943bf Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 31 Dec 2022 13:52:29 -0800 Subject: [PATCH] factor out pkgsFun as an optional argument --- src/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/default.nix b/src/default.nix index 67e704d..c05d878 100644 --- a/src/default.nix +++ b/src/default.nix @@ -1,13 +1,15 @@ +{ pkgsFun ? import +}: let lib = import ; nixpkgsArgs = { config.allowNonSource = false; }; - nixpkgsOnBuildForBuild = import nixpkgsArgs; + nixpkgsOnBuildForBuild = pkgsFun nixpkgsArgs; ownerboot = { hostPlatform?null, overlay }: (lib.makeScope lib.callPackageWith (self: { inherit lib nixpkgsOnBuildForBuild; - nixpkgsOnBuildForHost = import + nixpkgsOnBuildForHost = pkgsFun (nixpkgsArgs // (lib.optionalAttrs (hostPlatform!=null) { crossSystem = hostPlatform; }));