From 4751d9e5ad124284dbd719d3a58f42d56f1b9514 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 30 Nov 2016 18:51:13 -0500 Subject: 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. --- pkgs/stdenv/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkgs/stdenv/default.nix') diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 246e656f33bf..3b49d0de8306 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 -- cgit 1.4.1