git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #124486 from xaverdh/linux-patch-once

nixos/boot: properly override the kernel in boot.kernelPatches

commit34d960aecb709028f2d843b22b04c79935204f42 authorLinus Heckemann <git@sphalerite.org> dateTue 29 Jun 2021, 19:01 (5 years ago) parent8f7a3c6436f61c
4 files changed+6−6
nixos/modules/system/boot/kernel.nix+3−3 pkgs/os-specific/linux/kernel/linux-rt-5.10.nix+1−1 pkgs/os-specific/linux/kernel/linux-rt-5.11.nix+1−1 pkgs/os-specific/linux/kernel/linux-rt-5.4.nix+1−1
nixos/modules/system/boot/kernel.nix+3−3
@@ -38,11 +38,11 @@ in
3838 default = pkgs.linuxPackages;
3939 type = types.unspecified // { merge = mergeEqualOption; };
4040 apply = kernelPackages: kernelPackages.extend (self: super: {
41− kernel = super.kernel.override {
41+ kernel = super.kernel.override (originalArgs: {
4242 inherit randstructSeed;
43− kernelPatches = super.kernel.kernelPatches ++ kernelPatches;
43+ kernelPatches = (originalArgs.kernelPatches or []) ++ kernelPatches;
4444 features = lib.recursiveUpdate super.kernel.features features;
45− };
45+ });
4646 });
4747 # We don't want to evaluate all of linuxPackages for the manual
4848 # - some of it might not even evaluate correctly.
pkgs/os-specific/linux/kernel/linux-rt-5.10.nix+1−1
@@ -27,7 +27,7 @@ in buildLinux (args // {
2727 url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
2828 sha256 = "1z8jgsq5fkg486xxawg4c4wk1l9xra7x1cfqaf4grhw0csbbx883";
2929 };
30− }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
30+ }; in [ rt-patch ] ++ kernelPatches;
3131
3232 structuredExtraConfig = with lib.kernel; {
3333 PREEMPT_RT = yes;
pkgs/os-specific/linux/kernel/linux-rt-5.11.nix+1−1
@@ -27,7 +27,7 @@ in buildLinux (args // {
2727 url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
2828 sha256 = "1az6cn9jj3bnjgwzzrjy1adnrnn06p2vzsnc1iib4xhs0sfr27hc";
2929 };
30− }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
30+ }; in [ rt-patch ] ++ kernelPatches;
3131
3232 structuredExtraConfig = with lib.kernel; {
3333 PREEMPT_RT = yes;
pkgs/os-specific/linux/kernel/linux-rt-5.4.nix+1−1
@@ -23,7 +23,7 @@ in buildLinux (args // {
2323 url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
2424 sha256 = "1m1mnmk7h35p7dv6mg3pla6pw3b645hbbccjmp1jc3fyn6qiy6fq";
2525 };
26− }; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
26+ }; in [ rt-patch ] ++ kernelPatches;
2727
2828 structuredExtraConfig = with lib.kernel; {
2929 PREEMPT_RT = yes;