From b6b195059468d610309d70db99690111cc4a6714 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 25 Jun 2018 14:22:51 -0400 Subject: [PATCH] top-level: add extraPkgs to stage.nix --- pkgs/top-level/stage.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index ecb3541cbb3d..a9d1988ad5f4 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -117,11 +117,17 @@ let lib.optionalAttrs allowCustomOverrides ((config.packageOverrides or (super: {})) super); - # Convenient way to reference cross - # Used in aliases for now but should not be used in Nixpkgs. - cross = self: super: { pkgsCross = lib.mapAttrs (n: crossSystem: - nixpkgsFun { inherit crossSystem; }) - lib.systems.examples; }; + # Convenience attributes for instantitating nixpkgs. Each of these + # will instantiate a new version of allPackages. They map example + # attributes to their own thing. + extraPkgs = self: super: { + pkgsCross = lib.mapAttrs (n: crossSystem: + nixpkgsFun { inherit crossSystem; }) + lib.systems.examples; + pkgsLocal = lib.mapAttrs (n: localSystem: + nixpkgsFun { inherit localSystem; }) + lib.systems.examples; + }; # The complete chain of package set builders, applied from top to bottom. # stdenvOverlays must be last as it brings package forward from the @@ -133,7 +139,7 @@ let trivialBuilders splice allPackages - cross + extraPkgs aliases configOverrides ] ++ overlays ++ [