summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-08-07 06:36:50 -0400
committerShea Levy <shea@shealevy.com>2012-08-07 06:36:50 -0400
commit21a200d6b21e7c28540203306b61c73f63f41ace (patch)
tree5222685c2f4d79465b0fb50d066689c858729bf0 /pkgs/os-specific/linux
parent374886444f4463672c3b7474c9048810c319e8d0 (diff)
downloadnixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar.gz
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar.bz2
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar.lz
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar.xz
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.tar.zst
nixlib-21a200d6b21e7c28540203306b61c73f63f41ace.zip
linux/manual-config: Fix depmod step, remove false comment
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index b64cf786e3eb..f9806c45451a 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -46,10 +46,6 @@ in
   # The kernel version
   version,
   # The version of the kernel module directory
-  # Note that, unlike with the normal kernel builder, it shouldn't be necessary
-  # to specify this for releases with 2 version numbers, e.g. if you're building
-  # Linux 3.5 the modules will happily be installed in $out/lib/modules/3.5/, but
-  # this is provided for compatability.
   modDirVersion ? version,
   # The kernel source (tarball, git checkout, etc.)
   src,
@@ -68,8 +64,8 @@ let
   installkernel = name: writeTextFile { name = "installkernel"; executable=true; text = ''
     #!/bin/sh
     mkdir $4
-    mv -v $2 $4/${name}
-    mv -v $3 $4
+    cp -av $2 $4/${name}
+    cp -av $3 $4
   '';};
 
   isModular = config.isYes "MODULES";
@@ -80,7 +76,7 @@ let
   commonMakeFlags = [
     "O=../build"
     "INSTALL_PATH=$(out)"
-  ] ++ (optional isModular "MODLIB=$(out)/lib/modules/${modDirVersion}")
+  ] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
   ++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware";
 in
 
@@ -102,6 +98,7 @@ stdenv.mkDerivation {
         echo "stripping FHS paths in \`$mf'..."
         sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
     done
+    sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/depmod|'
   '';
 
   configurePhase = ''
@@ -114,7 +111,7 @@ stdenv.mkDerivation {
     runHook postConfigure
   '';
 
-  buildNativeInputs = [ perl nettools ] ++ optional isModular kmod;
+  buildNativeInputs = [ perl nettools ];
 
   makeFlags = commonMakeFlags ++ [
    "INSTALLKERNEL=${installkernel stdenv.platform.kernelTarget}"
@@ -126,7 +123,7 @@ stdenv.mkDerivation {
     ];
   };
 
-  postInstall = stdenv.lib.optionalString installsFirmware ''
+  postInstall = optionalString installsFirmware ''
     mkdir -p $out/lib/firmware
   '' + (if isModular then ''
     make modules_install $makeFlags "''${makeFlagsArray[@]}" \