2016-04-07 11:34:15 +01:00
|
|
|
{ stdenv, kernel, perl }:
|
2014-01-05 01:57:21 +00:00
|
|
|
|
2016-04-18 16:08:53 +01:00
|
|
|
assert (!(kernel.features.grsecurity or false));
|
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
let
|
|
|
|
baseBuildFlags = [ "INSTALL_HDR_PATH=$(out)" "headers_install" ];
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "linux-headers-${kernel.version}";
|
|
|
|
|
|
|
|
inherit (kernel) src patches;
|
|
|
|
|
2016-04-07 11:34:15 +01:00
|
|
|
nativeBuildInputs = [ perl ];
|
2014-01-05 01:57:21 +00:00
|
|
|
|
|
|
|
buildFlags = [ "ARCH=${stdenv.platform.kernelArch}" ] ++ baseBuildFlags;
|
|
|
|
|
|
|
|
crossAttrs = {
|
|
|
|
inherit (kernel.crossDrv) src patches;
|
|
|
|
buildFlags = [ "ARCH=${stdenv.cross.platform.kernelArch}" ] ++ baseBuildFlags;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
find $out \( -name ..install.cmd -o -name .install \) -print0 | xargs -0 rm
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Headers shouldn't reference anything else
|
|
|
|
allowedReferences = [];
|
2016-04-06 12:42:45 +01:00
|
|
|
|
|
|
|
meta.platforms = stdenv.lib.platforms.linux;
|
2014-01-05 01:57:21 +00:00
|
|
|
}
|