linux-kernels/linuxConfig: add kernelPatches

Kernel patches may contain new Kconfig elements
so they should be applied to src before generating
a config.
This commit is contained in:
Daniel Goertzen 2023-03-22 12:43:07 -05:00
parent 3793d20049
commit 1d31b69cdd

View file

@ -630,6 +630,7 @@ in {
# Derive one of the default .config files
linuxConfig = {
src,
kernelPatches ? [],
version ? (builtins.parseDrvName src.name).version,
makeTarget ? "defconfig",
name ? "kernel.config",
@ -637,6 +638,7 @@ in {
inherit name src;
depsBuildBuild = [ buildPackages.stdenv.cc ]
++ lib.optionals (lib.versionAtLeast version "4.16") [ buildPackages.bison buildPackages.flex ];
patches = map (p: p.patch) kernelPatches; # Patches may include new configs.
postPatch = ''
patchShebangs scripts/
'';