diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2016-11-13 10:38:41 -0800 |
---|---|---|
committer | John Ericson <jericson@galois.com> | 2016-11-30 19:03:01 -0500 |
commit | ddeb0d2d6b2e71cf98ab50ab376f802cf29c7c22 (patch) | |
tree | e3c4665afc06a01d00d41486cfa8816dc0a1f4c2 /pkgs | |
parent | b09435ea51caaae1865e667aaa32f7cba4cc4ff2 (diff) |
top-level: Stop exposing all stdenvs
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/custom/default.nix | 4 | ||||
-rw-r--r-- | pkgs/stdenv/default.nix | 7 | ||||
-rw-r--r-- | pkgs/top-level/stdenv.nix | 6 |
4 files changed, 8 insertions, 11 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 0cde6a05943e..4b7d81879b1f 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -8,7 +8,7 @@ rec { }; vanillaStdenv = (import ../. (args // argClobber // { allPackages = args: allPackages (argClobber // args); - })).stdenv // { + })) // { # Needed elsewhere as a hacky way to pass the target cross = crossSystem; }; diff --git a/pkgs/stdenv/custom/default.nix b/pkgs/stdenv/custom/default.nix index 2f2f495b388b..6d2aa8c59b3f 100644 --- a/pkgs/stdenv/custom/default.nix +++ b/pkgs/stdenv/custom/default.nix @@ -1,10 +1,10 @@ { system, allPackages, platform, crossSystem, config, ... } @ args: rec { - vanillaStdenv = (import ../. (args // { + vanillaStdenv = import ../. (args // { # Remove config.replaceStdenv to ensure termination. config = builtins.removeAttrs config [ "replaceStdenv" ]; - })).stdenv; + }); buildPackages = allPackages { # It's OK to change the built-time dependencies diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 4be34a35acb3..ac84ea0f9a0b 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -8,7 +8,7 @@ { system, allPackages ? import ../.., platform, config, crossSystem, lib }: -rec { +let # The native (i.e., impure) build environment. This one uses the @@ -43,7 +43,7 @@ rec { inherit (import ./custom { inherit system allPackages platform crossSystem config lib; }) stdenvCustom; # Select the appropriate stdenv for the platform `system'. - stdenv = +in if crossSystem != null then if crossSystem.useiOSCross or false then stdenvCrossiOS else stdenvCross else @@ -60,5 +60,4 @@ rec { if system == "i686-cygwin" then stdenvNative else if system == "x86_64-cygwin" then stdenvNative else if system == "x86_64-freebsd" then stdenvFreeBSD else - stdenvNative; -} + stdenvNative diff --git a/pkgs/top-level/stdenv.nix b/pkgs/top-level/stdenv.nix index 9f485b8c90ef..adb8bdde6ad0 100644 --- a/pkgs/top-level/stdenv.nix +++ b/pkgs/top-level/stdenv.nix @@ -1,12 +1,10 @@ { system, bootStdenv, crossSystem, config, platform, lib, nixpkgsFun }: rec { - allStdenvs = import ../stdenv { + defaultStdenv = import ../stdenv { inherit system platform config crossSystem lib; allPackages = nixpkgsFun; - }; - - defaultStdenv = allStdenvs.stdenv // { inherit platform; }; + } // { inherit platform; }; stdenv = if bootStdenv != null |