summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/default.nix4
-rw-r--r--pkgs/stdenv/linux/default.nix4
2 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 29cbb0de410..a8eab154db4 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -18,7 +18,7 @@ let
     result =
 
       derivation {
-        inherit system name cross;
+        inherit system name;
 
         builder = shell;
 
@@ -55,7 +55,7 @@ let
               system = result.system;
               # The env variable 'cross' is used in all the crosscompiler
               # bootstrapping in another sense
-              crossTarget = result.cross;
+              crossTarget = if (cross != null) then cross.config else null;
             })
           )
           # The meta attribute is passed in the resulting attribute set,
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 228c626341e..9a90e4b28df 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -206,7 +206,7 @@ rec {
   #    dependency (`nix-store -qR') on bootstrapTools.
   stdenvLinux = import ../generic {
     name = "stdenv-linux" +
-      stdenvLinuxBoot3Pkgs.lib.optionalString (cross != null) "-${cross}";
+      stdenvLinuxBoot3Pkgs.lib.optionalString (cross != null) "-${cross.config}";
     
     inherit system cross;
     
@@ -221,7 +221,7 @@ rec {
 
     postHook = if (cross != null) then
         (builtins.toFile "cross-posthook.sh" ''
-            configureFlags="$configureFlags --build=${system} --host=${cross}"
+            configureFlags="$configureFlags --build=${system} --host=${cross.config}"
             dontStrip=1
         '')
         else null;