From 4677180b0df83e9c2f455733931a66b861025be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 27 Feb 2010 20:37:58 +0000 Subject: [PATCH] Barf. I have to test the expressions before commiting. svn path=/nixpkgs/trunk/; revision=20278 --- pkgs/os-specific/linux/kernel-headers/2.6.32.nix | 14 ++++++++++---- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 11 insertions(+), 5 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 dbc6797934d..36568276d8c 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 ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e08762faee1..e0ce6a3209d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1967,7 +1967,7 @@ let enableMultilib = false; # cross-building for ultrasparc in 4.4.3 will require disabling shared due to a gcc bug. # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818 - enableShared = if (cross.platform.arch == "sparc64") then true false else; + enableShared = if (crossSystem.platform.arch == "sparc64") then false else true; crossStageStatic = false; };