Kernel module aggregator: Use kmod instead of module-init-tools

This commit is contained in:
Eelco Dolstra 2013-08-09 17:55:45 +02:00
parent d9a4706f73
commit 9845e6ec5c
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{stdenv, module_init_tools, modules, buildEnv}: { stdenv, kmod, modules, buildEnv }:
buildEnv { buildEnv {
name = "kernel-modules"; name = "kernel-modules";
@ -8,20 +8,20 @@ buildEnv {
postBuild = postBuild =
'' ''
source ${stdenv}/setup source ${stdenv}/setup
kernelVersion=$(cd $out/lib/modules && ls -d *) kernelVersion=$(cd $out/lib/modules && ls -d *)
if test "$(echo $kernelVersion | wc -w)" != 1; then if test "$(echo $kernelVersion | wc -w)" != 1; then
echo "inconsistent kernel versions: $kernelVersion" echo "inconsistent kernel versions: $kernelVersion"
exit 1 exit 1
fi fi
echo "kernel version is $kernelVersion" echo "kernel version is $kernelVersion"
# Regenerate the depmod map files. Be sure to pass an explicit # Regenerate the depmod map files. Be sure to pass an explicit
# kernel version number, otherwise depmod will use `uname -r'. # kernel version number, otherwise depmod will use `uname -r'.
if test -w $out/lib/modules/$kernelVersion; then if test -w $out/lib/modules/$kernelVersion; then
rm -f $out/lib/modules/$kernelVersion/modules.* rm -f $out/lib/modules/$kernelVersion/modules.*
MODULE_DIR=$out/lib/modules/ ${module_init_tools}/sbin/depmod -a $kernelVersion ${kmod}/sbin/depmod -b $out -a $kernelVersion
fi fi
''; '';
} }

View File

@ -6647,8 +6647,8 @@ let
mountall = callPackage ../os-specific/linux/mountall { }; mountall = callPackage ../os-specific/linux/mountall { };
aggregateModules = modules: aggregateModules = modules:
import ../os-specific/linux/module-init-tools/aggregator.nix { callPackage ../os-specific/linux/kmod/aggregator.nix {
inherit stdenv module_init_tools modules buildEnv; inherit modules;
}; };
multipath_tools = callPackage ../os-specific/linux/multipath-tools { }; multipath_tools = callPackage ../os-specific/linux/multipath-tools { };