top-level: Inherit system and platform in stage.nix not all-packages.nix

These are not packages, and so its more elegant to do this outside of
all-packages.nix.
This commit is contained in:
John Ericson 2016-12-17 23:51:18 -08:00
parent 0f33b9f7f1
commit 67ebd3161b
2 changed files with 8 additions and 10 deletions

View file

@ -5,9 +5,7 @@
* to merges. Please use the full-text search of your editor. ;)
* Hint: ### starts category names.
*/
{ system, noSysDirs, config, crossSystem, platform, lib
, nixpkgsFun
}:
{ lib, nixpkgsFun, noSysDirs, config}:
self: pkgs:
with pkgs;
@ -18,9 +16,6 @@ in
{
# Make some arguments passed to all-packages.nix available
inherit system platform;
# Allow callPackage to fill in the pkgs argument
inherit pkgs;

View file

@ -47,12 +47,15 @@ let
inherit lib; inherit (self) stdenv stdenvNoCC; inherit (self.xorg) lndir;
};
stdenvDefault = self: super:
{ stdenv = stdenv // { inherit platform; }; };
stdenvBootstappingAndPlatforms = self: super: {
stdenv = stdenv // { inherit platform; };
inherit
system platform crossSystem;
};
allPackages = self: super:
let res = import ./all-packages.nix
{ inherit system noSysDirs config crossSystem platform lib nixpkgsFun; }
{ inherit lib nixpkgsFun noSysDirs config; }
res self;
in res;
@ -77,7 +80,7 @@ let
# The complete chain of package set builders, applied from top to bottom
toFix = lib.foldl' (lib.flip lib.extends) (self: {}) [
stdenvDefault
stdenvBootstappingAndPlatforms
stdenvAdapters
trivialBuilders
allPackages