From 67ebd3161b82caf8a1ed30e0cd21dc7bb0177c35 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 17 Dec 2016 23:51:18 -0800 Subject: [PATCH] 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. --- pkgs/top-level/all-packages.nix | 7 +------ pkgs/top-level/stage.nix | 11 +++++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 69192cd6d3a9..a5a1f17d75bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index f6f11b439800..ebc6473e4254 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -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