nixos/boot: properly override the kernel in boot.kernelPatches
Previously the code took the kernelPatches of the final derivation, which might or might not be what was passed to the derivation in the original call. The previous behaviour caused various hacks to become neccessary to avoid duplicates in kernelPatches.
This commit is contained in:
parent
339a49503a
commit
436f61c878
@ -38,11 +38,11 @@ in
|
||||
default = pkgs.linuxPackages;
|
||||
type = types.unspecified // { merge = mergeEqualOption; };
|
||||
apply = kernelPackages: kernelPackages.extend (self: super: {
|
||||
kernel = super.kernel.override {
|
||||
kernel = super.kernel.override (originalArgs: {
|
||||
inherit randstructSeed;
|
||||
kernelPatches = super.kernel.kernelPatches ++ kernelPatches;
|
||||
kernelPatches = (originalArgs.kernelPatches or []) ++ kernelPatches;
|
||||
features = lib.recursiveUpdate super.kernel.features features;
|
||||
};
|
||||
});
|
||||
});
|
||||
# We don't want to evaluate all of linuxPackages for the manual
|
||||
# - some of it might not even evaluate correctly.
|
||||
|
@ -27,7 +27,7 @@ in buildLinux (args // {
|
||||
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
|
||||
sha256 = "03gq9y111k4js4cc87yc9y7hyg1wxwbc1bjyjdvb4nrx2wqka79y";
|
||||
};
|
||||
}; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
|
||||
}; in [ rt-patch ] ++ kernelPatches;
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
PREEMPT_RT = yes;
|
||||
|
@ -27,7 +27,7 @@ in buildLinux (args // {
|
||||
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
|
||||
sha256 = "1az6cn9jj3bnjgwzzrjy1adnrnn06p2vzsnc1iib4xhs0sfr27hc";
|
||||
};
|
||||
}; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
|
||||
}; in [ rt-patch ] ++ kernelPatches;
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
PREEMPT_RT = yes;
|
||||
|
@ -23,7 +23,7 @@ in buildLinux (args // {
|
||||
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
|
||||
sha256 = "1xh7xi27q58njhfayi2lnk4id7hnlklkgh2zx012gxv4ari76g0k";
|
||||
};
|
||||
}; in [ rt-patch ] ++ lib.remove rt-patch kernelPatches;
|
||||
}; in [ rt-patch ] ++ kernelPatches;
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
PREEMPT_RT = yes;
|
||||
|
Loading…
Reference in New Issue
Block a user