diff options
-rw-r--r-- | nixos/tests/kernel-generic.nix | 24 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-5.15.nix | 18 | ||||
-rw-r--r-- | pkgs/top-level/linux-kernels.nix | 10 |
3 files changed, 35 insertions, 17 deletions
diff --git a/nixos/tests/kernel-generic.nix b/nixos/tests/kernel-generic.nix index 192dc810d7ade..3fdd3995b7aa3 100644 --- a/nixos/tests/kernel-generic.nix +++ b/nixos/tests/kernel-generic.nix @@ -23,22 +23,14 @@ let assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a") ''; }) args); - kernels = { - inherit (pkgs) - linuxPackages_4_4 - linuxPackages_4_9 - linuxPackages_4_14 - linuxPackages_4_19 - linuxPackages_5_4 - linuxPackages_5_10 - linuxPackages_5_14 - - linuxPackages_4_14_hardened - linuxPackages_4_19_hardened - linuxPackages_5_4_hardened - linuxPackages_5_10_hardened - - linuxPackages_testing; + kernels = pkgs.linuxKernel.vanillaPackages // { + inherit (pkgs.linuxKernel.packages) + linux_4_14_hardened + linux_4_19_hardened + linux_5_4_hardened + linux_5_10_hardened + + linux_testing; }; in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // { diff --git a/pkgs/os-specific/linux/kernel/linux-5.15.nix b/pkgs/os-specific/linux/kernel/linux-5.15.nix new file mode 100644 index 0000000000000..739a31f635c67 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -0,0 +1,18 @@ +{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args: + +with lib; + +buildLinux (args // rec { + version = "5.15"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256-V7LPaZGRDjtnobNJACLooGdLaWXHTBLaHpnRONGZHug="; + }; +} // (args.argsOverride or { })) diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index fd230246c49ab..14d809e6948f3 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -174,6 +174,13 @@ in { ]; }; + linux_5_15 = callPackage ../os-specific/linux/kernel/linux-5.15.nix { + kernelPatches = [ + kernelPatches.bridge_stp_helper + kernelPatches.request_key_helper + ]; + }; + linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -468,6 +475,7 @@ in { linux_5_4 = recurseIntoAttrs (packagesFor kernels.linux_5_4); linux_5_10 = recurseIntoAttrs (packagesFor kernels.linux_5_10); linux_5_14 = recurseIntoAttrs (packagesFor kernels.linux_5_14); + linux_5_15 = recurseIntoAttrs (packagesFor kernels.linux_5_15); }; rtPackages = { @@ -513,7 +521,7 @@ in { packageAliases = { linux_default = packages.linux_5_10; # Update this when adding the newest kernel major version! - linux_latest = packages.linux_5_14; + linux_latest = packages.linux_5_15; linux_mptcp = packages.linux_mptcp_95; linux_rt_default = packages.linux_rt_5_4; linux_rt_latest = packages.linux_rt_5_11; |