diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index af62125eb757..9fe1dedda864 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -38,7 +38,6 @@ , extraMeta ? {} , ubootChooser ? null , postInstall ? "" -, setModuleDir ? true , # After the builder did a 'make all' (kernel + modules) # we force building the target asked: bzImage/zImage/uImage/... @@ -80,15 +79,6 @@ stdenv.mkDerivation { inherit preConfigure src module_init_tools localVersion postInstall; - #Currently, the builder sets $MODULE_DIR during installPhase. This causes - #problems with at least linux 3.0, so we need to conditionally avoid - #setting $MODULE_DIR. This prepend to postBuild accomplishes this with a - #sed/eval trick thanks to MarcWeber - - postBuild = (if setModuleDir then "" else '' - eval "$(type installPhase | sed -e '1d' -e '/export MODULE_DIR/d')"; - '') + postBuild; - patches = map (p: p.patch) kernelPatches; kernelConfig = kernelConfigFun config; diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix index 1b685cd2d943..6f1a32e5c0f1 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.0.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix @@ -202,6 +202,10 @@ import ./generic.nix ( rec { version = "3.0.4"; + preConfigure = '' + substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' "" + ''; + src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.bz2"; sha256 = "1vypjcdii75h5f4zsw9lm8wzxd5ix0mk5p94c96hxv828mqqkmhk"; @@ -210,8 +214,6 @@ import ./generic.nix ( config = configWithPlatform stdenv.platform; configCross = configWithPlatform stdenv.cross.platform; - setModuleDir = false; - features.iwlwifi = true; } diff --git a/pkgs/os-specific/linux/kernel/linux-3.1.nix b/pkgs/os-specific/linux/kernel/linux-3.1.nix index ae78de1e4769..4f8d08340e6a 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.1.nix @@ -203,6 +203,10 @@ import ./generic.nix ( version = "3.1-rc8"; modDirVersion = "3.1.0-rc8"; + + preConfigure = '' + substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' "" + ''; src = fetchurl { url = "https://github.com/torvalds/linux/tarball/v${version}"; @@ -213,8 +217,6 @@ import ./generic.nix ( config = configWithPlatform stdenv.platform; configCross = configWithPlatform stdenv.cross.platform; - setModuleDir = false; - features.iwlwifi = true; }