at 16.09-beta 15 lines 540 B view raw
1# Given a kernel build (with modules in $kernel/lib/modules/VERSION), 2# produce a module tree in $out/lib/modules/VERSION that contains only 3# the modules identified by `rootModules', plus their dependencies. 4# Also generate an appropriate modules.dep. 5 6{ stdenv, kernel, nukeReferences, rootModules 7, kmod, allowMissing ? false }: 8 9stdenv.mkDerivation { 10 name = kernel.name + "-shrunk"; 11 builder = ./modules-closure.sh; 12 buildInputs = [ nukeReferences kmod ]; 13 inherit kernel rootModules allowMissing; 14 allowedReferences = ["out"]; 15}