about 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>2010-02-27 20:37:58 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-02-27 20:37:58 +0000
commit4677180b0df83e9c2f455733931a66b861025be5 (patch)
tree02c9ee17b2347c66e6c069af79b9c10ba07b5316 /pkgs/os-specific/linux/kernel-headers
parent81b325b33f1b72a0abebe1773412ee9c15a75e60 (diff)
downloadnixlib-4677180b0df83e9c2f455733931a66b861025be5.tar
nixlib-4677180b0df83e9c2f455733931a66b861025be5.tar.gz
nixlib-4677180b0df83e9c2f455733931a66b861025be5.tar.bz2
nixlib-4677180b0df83e9c2f455733931a66b861025be5.tar.lz
nixlib-4677180b0df83e9c2f455733931a66b861025be5.tar.xz
nixlib-4677180b0df83e9c2f455733931a66b861025be5.tar.zst
nixlib-4677180b0df83e9c2f455733931a66b861025be5.zip
Barf. I have to test the expressions before commiting.
svn path=/nixpkgs/trunk/; revision=20278
Diffstat (limited to 'pkgs/os-specific/linux/kernel-headers')
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.6.32.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix b/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
index dbc6797934de..36568276d8c3 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
+++ b/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
@@ -1,8 +1,14 @@
-{stdenv, fetchurl, perl, cross ? null, platform}:
+{stdenv, fetchurl, perl, cross ? null}:
 
 assert cross == null -> stdenv.isLinux;
 
-let version = "2.6.32.9"; in
+let
+  version = "2.6.32.9";
+  kernelHeadersBaseConfig = if (cross != null) then
+      stdenv.platform.kernelHeadersBaseConfig
+    else
+      cross.platform.kernelHeadersBaseConfig;
+in
 
 stdenv.mkDerivation {
   name = "linux-headers-${version}";
@@ -15,7 +21,7 @@ stdenv.mkDerivation {
   targetConfig = if (cross != null) then cross.config else null;
 
   platform =
-    if cross != null then platform.kernelArch else
+    if cross != null then cross.platform.kernelArch 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
@@ -33,7 +39,7 @@ stdenv.mkDerivation {
     if test -n "$targetConfig"; then
        export ARCH=$platform
     fi
-    make ${platform.kernelHeadersBaseConfig}
+    make ${kernelHeadersBaseConfig}
     make mrproper headers_check
   '';