summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel-headers
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/os-specific/linux/kernel-headers
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/os-specific/linux/kernel-headers')
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.6.28.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
index 9a2e84cf2a3..69849112d81 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
+++ b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
@@ -14,11 +14,10 @@ stdenv.mkDerivation {
     sha256 = "0hifjh75sinifr5138v22zwbpqln6lhn65k8b57a1dyzlqca7cl9";
   };
 
-  inherit cross;
+  crossConfig = if (cross != null) then cross.config else null;
 
   platform = 
-    if cross == "armv5tel-unknown-linux-gnueabi" then "arm" else
-    assert(cross == null);
+    if cross != null then cross.arch else
     if stdenv.system == "i686-linux" then "i386" else
     if stdenv.system == "x86_64-linux" then "x86_64" else
     if stdenv.system == "powerpc-linux" then "powerpc" else
@@ -29,14 +28,16 @@ stdenv.mkDerivation {
   buildInputs = [perl];
 
   extraIncludeDirs =
-    if stdenv.system == "powerpc-linux" then ["ppc"] else [];
+    if cross != null then
+        (if cross.arch == "powerpc" then ["ppc"] else [])
+    else if stdenv.system == "powerpc-linux" then ["ppc"] else [];
 
   patchPhase = ''
     sed -i '/scsi/d' include/Kbuild
   '';
 
   buildPhase = ''
-    if test -n "$cross"; then
+    if test -n "$crossConfig"; then
        export ARCH=$platform
     fi
     make mrproper headers_check