python312Packages.publicsuffixlist: 1.0.2.20250124 -> 1.0.2.20250127 (#378379)
[NixPkgs.git] / pkgs / os-specific / linux / kernel / linux-rt-6.6.nix
blob15f738348095941ad5abd1b69969098c2d9f1941
2   lib,
3   buildLinux,
4   fetchurl,
5   kernelPatches ? [ ],
6   structuredExtraConfig ? { },
7   extraMeta ? { },
8   argsOverride ? { },
9   ...
10 }@args:
12 let
13   version = "6.6.65-rt47"; # updated by ./update-rt.sh
14   branch = lib.versions.majorMinor version;
15   kversion = builtins.elemAt (lib.splitString "-" version) 0;
17 buildLinux (
18   args
19   // {
20     inherit version;
21     pname = "linux-rt";
23     # modDirVersion needs a patch number, change X.Y-rtZ to X.Y.0-rtZ.
24     modDirVersion =
25       if (builtins.match "[^.]*[.][^.]*-.*" version) == null then
26         version
27       else
28         lib.replaceStrings [ "-" ] [ ".0-" ] version;
30     src = fetchurl {
31       url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz";
32       sha256 = "1q53xiwnszchl9c4g4yfxyzk4nffzgb4a7aq9rsyg1jcidp4gqbs";
33     };
35     kernelPatches =
36       let
37         rt-patch = {
38           name = "rt";
39           patch = fetchurl {
40             url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
41             sha256 = "1sb6mmbiwh7kijb2bxhlz09dgvd2hpxh6rxghwi1d4cg2151jsr5";
42           };
43         };
44       in
45       [ rt-patch ] ++ kernelPatches;
47     structuredExtraConfig =
48       with lib.kernel;
49       {
50         PREEMPT_RT = yes;
51         # Fix error: unused option: PREEMPT_RT.
52         EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
53         # Fix error: option not set correctly: PREEMPT_VOLUNTARY (wanted 'y', got 'n').
54         PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
55         # Fix error: unused option: RT_GROUP_SCHED.
56         RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
57       }
58       // structuredExtraConfig;
60     extraMeta = extraMeta // {
61       inherit branch;
62     };
63   }
64   // argsOverride