2008-03-17 10:40:47 +00: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.
|
|
|
|
|
2009-09-01 22:56:46 +01:00
|
|
|
{ stdenv, kernel, nukeReferences, rootModules
|
2013-08-07 21:41:51 +01:00
|
|
|
, kmod, allowMissing ? false }:
|
2008-03-17 10:40:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = kernel.name + "-shrunk";
|
|
|
|
builder = ./modules-closure.sh;
|
2009-09-01 22:56:46 +01:00
|
|
|
buildInputs = [nukeReferences];
|
2013-08-07 21:41:51 +01:00
|
|
|
inherit kernel rootModules kmod allowMissing;
|
2008-03-17 10:40:47 +00:00
|
|
|
allowedReferences = ["out"];
|
|
|
|
}
|