diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-25 14:22:51 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-07-02 11:07:53 -0400 |
commit | b6b195059468d610309d70db99690111cc4a6714 (patch) | |
tree | 4487cbd5b62a29cec61d4c446edcc91d041edbcc /pkgs/top-level/stage.nix | |
parent | d665e80450efcfeed9b245aecb6218cb82e1a24c (diff) | |
download | nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar.gz nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar.bz2 nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar.lz nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar.xz nixpkgs-b6b195059468d610309d70db99690111cc4a6714.tar.zst nixpkgs-b6b195059468d610309d70db99690111cc4a6714.zip |
top-level: add extraPkgs to stage.nix
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r-- | pkgs/top-level/stage.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index ecb3541cbb3..a9d1988ad5f 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 ++ [ |