2008-01-04 18:02:12 +01:00
|
|
|
args : with args;
|
|
|
|
with builderDefs {
|
|
|
|
addSbinPath = true;
|
|
|
|
src = "";
|
2008-01-13 00:35:23 +01:00
|
|
|
buildInputs = [module_init_tools];
|
2008-01-04 18:02:12 +01:00
|
|
|
configureFlags = [];
|
|
|
|
} null; /* null is a terminator for sumArgs */
|
|
|
|
let
|
|
|
|
|
|
|
|
doCollect = FullDepEntry (''
|
2008-01-13 00:35:23 +01:00
|
|
|
ensureDir $out/lib/modules
|
2008-01-04 18:02:12 +01:00
|
|
|
cd $out/
|
|
|
|
for i in $moduleSources; do
|
2008-01-13 11:33:27 +01:00
|
|
|
cp -rfs $i/* .
|
|
|
|
chmod -R u+w .
|
2008-01-04 18:02:12 +01:00
|
|
|
done
|
2008-01-13 11:49:52 +01:00
|
|
|
rm -rf nix-support
|
2008-01-04 18:02:12 +01:00
|
|
|
cd lib/modules/
|
|
|
|
rm */modules.*
|
|
|
|
MODULE_DIR=$PWD/ depmod -a
|
2008-01-13 11:49:52 +01:00
|
|
|
cd $out/
|
2008-01-04 18:02:12 +01:00
|
|
|
'') [minInit addInputs defEnsureDir];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2008-01-13 00:35:23 +01:00
|
|
|
name = "kernel-modules";
|
2008-01-04 18:02:12 +01:00
|
|
|
inherit moduleSources;
|
|
|
|
builder = writeScript (name + "-builder")
|
|
|
|
(textClosure [doCollect doForceShare doPropagate]);
|
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
A directory to hold all the modules, including those
|
2008-01-13 11:33:27 +01:00
|
|
|
built separately from kernel. Later mentioned directories in
|
2008-01-04 18:02:12 +01:00
|
|
|
moduleSources have higher priority.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
}
|