Merge pull request #61938 from lostman/make-linux-headers
Expose makeLinuxHeaders function from nixos/kernel-headers
This commit is contained in:
commit
e93dfb26ee
@ -4,13 +4,10 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
|
makeLinuxHeaders = { src, version, patches ? [] }: stdenvNoCC.mkDerivation {
|
||||||
name = "linux-headers-${version}";
|
inherit src;
|
||||||
|
|
||||||
src = fetchurl {
|
name = "linux-headers-${version}";
|
||||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
|
||||||
inherit sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch;
|
ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch;
|
||||||
|
|
||||||
@ -73,13 +70,18 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
inherit makeLinuxHeaders;
|
||||||
|
|
||||||
linuxHeaders = common {
|
linuxHeaders = let version = "4.19.16"; in
|
||||||
version = "4.19.16";
|
makeLinuxHeaders {
|
||||||
sha256 = "1pqvn6dsh0xhdpawz4ag27vkw1abvb6sn3869i4fbrz33ww8i86q";
|
inherit version;
|
||||||
patches = [
|
src = fetchurl {
|
||||||
./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
|
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||||
./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
|
sha256 = "1pqvn6dsh0xhdpawz4ag27vkw1abvb6sn3869i4fbrz33ww8i86q";
|
||||||
];
|
};
|
||||||
};
|
patches = [
|
||||||
|
./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
|
||||||
|
./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user