summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2011-07-24 20:24:12 +0000
committerShea Levy <shea@shealevy.com>2011-07-24 20:24:12 +0000
commit5db8c885470584789547c2b24544bcd98f758721 (patch)
tree7c79872824c3db3eca08682aad4b2df5b3af3ee9 /pkgs/os-specific
parent1bc8594052a0df817abca2793a6bc4fda6d5458e (diff)
downloadnixlib-5db8c885470584789547c2b24544bcd98f758721.tar
nixlib-5db8c885470584789547c2b24544bcd98f758721.tar.gz
nixlib-5db8c885470584789547c2b24544bcd98f758721.tar.bz2
nixlib-5db8c885470584789547c2b24544bcd98f758721.tar.lz
nixlib-5db8c885470584789547c2b24544bcd98f758721.tar.xz
nixlib-5db8c885470584789547c2b24544bcd98f758721.tar.zst
nixlib-5db8c885470584789547c2b24544bcd98f758721.zip
Fix problem with linux 3.0 trying to install in /nix/store/...
Thanks to MarcWeber on IRC for helping with this

svn path=/nixpkgs/trunk/; revision=27921
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.0.nix2
2 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index ce609f238499..46ebb2b8fff4 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -35,6 +35,7 @@
 , extraMeta ? {}
 , ubootChooser ? null
 , postInstall ? ""
+, setModuleDir ? true
 
 , # After the builder did a 'make all' (kernel + modules)
   # we force building the target asked: bzImage/zImage/uImage/...
@@ -74,7 +75,11 @@ stdenv.mkDerivation {
 
   generateConfig = ./generate-config.pl;
 
-  inherit preConfigure src module_init_tools localVersion postBuild postInstall;
+  inherit preConfigure src module_init_tools localVersion postInstall;
+
+  postBuild = (if setModuleDir then "" else '' 
+    eval "$(type installPhase | sed -e '1d' -e '/export MODULE_DIR/d')";
+  '') + postBuild;
 
   patches = map (p: p.patch) kernelPatches;
 
@@ -140,3 +145,4 @@ stdenv.mkDerivation {
     platforms = lib.platforms.linux;
   } // extraMeta;
 }
+
diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix
index c9bde0eafe9a..169c37dec492 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.0.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix
@@ -200,6 +200,8 @@ import ./generic.nix (
     config = configWithPlatform stdenv.platform;
     configCross = configWithPlatform stdenv.cross.platform;
 
+    setModuleDir = false;
+
     features.iwlwifi = true;
   }