2008-03-17 11:40:47 +01:00
|
|
|
# Given a kernel build (with modules in $kernel/lib/modules/VERSION),
|
|
|
|
# produce a module tree in $out/lib/modules/VERSION that contains only
|
|
|
|
# the modules identified by `rootModules', plus their dependencies.
|
|
|
|
# Also generate an appropriate modules.dep.
|
|
|
|
|
2008-03-24 20:38:18 +01:00
|
|
|
{stdenv, kernel, rootModules, module_init_tools, allowMissing ? false}:
|
2008-03-17 11:40:47 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = kernel.name + "-shrunk";
|
|
|
|
builder = ./modules-closure.sh;
|
|
|
|
inherit kernel rootModules module_init_tools;
|
|
|
|
allowedReferences = ["out"];
|
2008-03-24 20:38:18 +01:00
|
|
|
allowMissing = if allowMissing then "true" else "";
|
2008-03-17 11:40:47 +01:00
|
|
|
}
|