Kernel module aggregator: Use kmod instead of module-init-tools
This commit is contained in:
parent
d9a4706f73
commit
9845e6ec5c
@ -1,4 +1,4 @@
|
||||
{stdenv, module_init_tools, modules, buildEnv}:
|
||||
{ stdenv, kmod, modules, buildEnv }:
|
||||
|
||||
buildEnv {
|
||||
name = "kernel-modules";
|
||||
@ -8,20 +8,20 @@ buildEnv {
|
||||
postBuild =
|
||||
''
|
||||
source ${stdenv}/setup
|
||||
|
||||
|
||||
kernelVersion=$(cd $out/lib/modules && ls -d *)
|
||||
if test "$(echo $kernelVersion | wc -w)" != 1; then
|
||||
echo "inconsistent kernel versions: $kernelVersion"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "kernel version is $kernelVersion"
|
||||
|
||||
# Regenerate the depmod map files. Be sure to pass an explicit
|
||||
# kernel version number, otherwise depmod will use `uname -r'.
|
||||
if test -w $out/lib/modules/$kernelVersion; then
|
||||
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
|
||||
'';
|
||||
}
|
@ -6647,8 +6647,8 @@ let
|
||||
mountall = callPackage ../os-specific/linux/mountall { };
|
||||
|
||||
aggregateModules = modules:
|
||||
import ../os-specific/linux/module-init-tools/aggregator.nix {
|
||||
inherit stdenv module_init_tools modules buildEnv;
|
||||
callPackage ../os-specific/linux/kmod/aggregator.nix {
|
||||
inherit modules;
|
||||
};
|
||||
|
||||
multipath_tools = callPackage ../os-specific/linux/multipath-tools { };
|
||||
|
Loading…
Reference in New Issue
Block a user