summary refs log tree commit diff
path: root/pkgs/stdenv/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <jericson@galois.com>2016-11-30 18:51:13 -0500
committerJohn Ericson <jericson@galois.com>2016-12-01 11:24:33 -0500
commit4751d9e5ad124284dbd719d3a58f42d56f1b9514 (patch)
tree60531fd147f913face4de51a78c12ae9cc1dd18a /pkgs/stdenv/default.nix
parenta55d1ecc9050a50904a13e3a34535990b9e61ae3 (diff)
downloadnixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar.gz
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar.bz2
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar.lz
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar.xz
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.tar.zst
nixpkgs-4751d9e5ad124284dbd719d3a58f42d56f1b9514.zip
top-level: turn the screw
 - Non-cross stdenvs are honest and assert that `crossSystem` is null

 - `crossSystem` is a mandatory argument to top-level/stage.nix, just like
   `system` and `platform`

 - Broken default arguments on stdenvs for testing are gone.

 - All stdenvs (but little-used stdenvNix) take the same arguments for easy
   testing.
Diffstat (limited to 'pkgs/stdenv/default.nix')
-rw-r--r--pkgs/stdenv/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index 246e656f33b..3b49d0de830 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -9,7 +9,7 @@
   lib, allPackages
   # Args to pass on to `allPacakges` too
 , system, platform, crossSystem, config
-}:
+} @ args:
 
 let
   # The native (i.e., impure) build environment.  This one uses the
@@ -17,7 +17,7 @@ let
   # i.e., the stuff in /bin, /usr/bin, etc.  This environment should
   # be used with care, since many Nix packages will not build properly
   # with it (e.g., because they require GNU Make).
-  inherit (import ./native { inherit system allPackages config; }) stdenvNative;
+  inherit (import ./native args) stdenvNative;
 
   stdenvNativePkgs = allPackages {
     inherit system platform crossSystem config;
@@ -28,22 +28,22 @@ let
 
 
   # The Nix build environment.
-  stdenvNix = import ./nix {
+  stdenvNix = assert crossSystem == null; import ./nix {
     inherit config lib;
     stdenv = stdenvNative;
     pkgs = stdenvNativePkgs;
   };
 
-  inherit (import ./freebsd { inherit system allPackages platform config; }) stdenvFreeBSD;
+  inherit (import ./freebsd args) stdenvFreeBSD;
 
   # Linux standard environment.
-  inherit (import ./linux { inherit system allPackages platform config lib; }) stdenvLinux;
+  inherit (import ./linux args) stdenvLinux;
 
-  inherit (import ./darwin { inherit system allPackages platform config; }) stdenvDarwin;
+  inherit (import ./darwin args) stdenvDarwin;
 
-  inherit (import ./cross { inherit system allPackages platform crossSystem config lib; }) stdenvCross stdenvCrossiOS;
+  inherit (import ./cross args) stdenvCross stdenvCrossiOS;
 
-  inherit (import ./custom { inherit system allPackages platform crossSystem config lib; }) stdenvCustom;
+  inherit (import ./custom args) stdenvCustom;
 
   # Select the appropriate stdenv for the platform `system'.
 in