summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-16 23:21:13 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-16 23:21:13 +0000
commit2c7fa189fb2ac1c4ef689398ab13a4465448856a (patch)
treea20b6c0b65d6516b667ab3709960ae6f3ccfa2ba /pkgs/stdenv
parentd82c7e0a69d186b3c83736fd5c2aed7b12a3f7dc (diff)
downloadnixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar.gz
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar.bz2
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar.lz
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar.xz
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.tar.zst
nixpkgs-2c7fa189fb2ac1c4ef689398ab13a4465448856a.zip
Making the definition of the cross compiling target an attribute set.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18378
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;