summary refs log tree commit diff
path: root/pkgs/stdenv/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2016-11-06 21:27:38 -0800
committerJohn Ericson <Ericson2314@Yahoo.com>2016-11-06 21:27:38 -0800
commite22346c35ee8cb872d0587320083ba44230bd44b (patch)
tree9a3d7d72b09a13bc195e03389a80e51642f95b65 /pkgs/stdenv/default.nix
parenteed34bd214d6f513a859f3cfc52b266a9d19898b (diff)
downloadnixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar.gz
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar.bz2
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar.lz
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar.xz
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.tar.zst
nixpkgs-e22346c35ee8cb872d0587320083ba44230bd44b.zip
top-level: Make stdenvCross which appears at first glance normal...
...but actually is weird just like the original
Diffstat (limited to 'pkgs/stdenv/default.nix')
-rw-r--r--pkgs/stdenv/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index 3035d87e1fc..59088bfdf3b 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -5,7 +5,7 @@
 # Posix utilities, the GNU C compiler, and so on.  On other systems,
 # we use the native C library.
 
-{ system, allPackages ? import ../.., platform, config, lib }:
+{ system, allPackages ? import ../.., platform, config, crossSystem, lib }:
 
 
 rec {
@@ -36,10 +36,13 @@ rec {
   # Linux standard environment.
   inherit (import ./linux { inherit system allPackages platform config lib; }) stdenvLinux;
 
-  inherit (import ./darwin { inherit system allPackages platform config;}) stdenvDarwin;
+  inherit (import ./darwin { inherit system allPackages platform config; }) stdenvDarwin;
+
+  inherit (import ./cross { inherit system allPackages platform crossSystem config lib; }) stdenvCross;
 
   # Select the appropriate stdenv for the platform `system'.
   stdenv =
+    if crossSystem != null then stdenvCross else
     if system == "i686-linux" then stdenvLinux else
     if system == "x86_64-linux" then stdenvLinux else
     if system == "armv5tel-linux" then stdenvLinux else