From 107f6d646622024ac244e939651cfda02eefec59 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 20 Nov 2017 19:39:05 +0100 Subject: pkgs/games: Pass build-support to the top-level We're going to add a test for our buildSandbox function, so we need to have the buildSandbox function available from outside the package scope and thus within the resulting attribute set. Signed-off-by: aszlig --- pkgs/games/default.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'pkgs/games/default.nix') diff --git a/pkgs/games/default.nix b/pkgs/games/default.nix index 555d6b6e..f920089d 100644 --- a/pkgs/games/default.nix +++ b/pkgs/games/default.nix @@ -17,6 +17,13 @@ let } '' else configFilePath; + mkBuildSupport = super: let + self = import ./build-support { + inherit (super) config; + callPackage = pkgs.lib.callPackageWith (super // self); + }; + in self; + baseModule = { lib, ... }: { options = { packages = lib.mkOption { @@ -26,22 +33,17 @@ let }; }; - config._module.args.pkgs = let - mkBuildSupport = super: let - self = import ./build-support { - inherit (super) config; - callPackage = lib.callPackageWith (super // self); - }; - in self; - in pkgs // (mkBuildSupport pkgs) // { + config._module.args.pkgs = pkgs // (mkBuildSupport pkgs) // { pkgsi686Linux = pkgs.pkgsi686Linux // (mkBuildSupport pkgs.pkgsi686Linux); }; }; -in (pkgs.lib.evalModules { - modules = [ - (if config == null then configFilePath else config) - baseModule ./humblebundle ./steam ./itch - ]; -}).config.packages + packages = (pkgs.lib.evalModules { + modules = [ + (if config == null then configFilePath else config) + baseModule ./humblebundle ./steam ./itch + ]; + }).config.packages; + +in packages // mkBuildSupport pkgs -- cgit 1.4.1