2021-05-17 18:49:44 +01:00
|
|
|
{ pkgs
|
2021-09-15 21:26:11 +01:00
|
|
|
, linuxKernel
|
2021-05-17 18:49:44 +01:00
|
|
|
, config
|
|
|
|
, buildPackages
|
|
|
|
, callPackage
|
|
|
|
, makeOverridable
|
|
|
|
, recurseIntoAttrs
|
|
|
|
, dontRecurseIntoAttrs
|
|
|
|
, stdenv
|
|
|
|
, stdenvNoCC
|
|
|
|
, newScope
|
|
|
|
, lib
|
2021-10-09 13:48:27 +01:00
|
|
|
, fetchurl
|
2022-04-23 16:21:33 +01:00
|
|
|
, gcc10Stdenv
|
2021-05-17 18:49:44 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
# When adding a kernel:
|
|
|
|
# - Update packageAliases.linux_latest to the latest version
|
|
|
|
# - Update the rev in ../os-specific/linux/kernel/linux-libre.nix to the latest one.
|
|
|
|
# - Update linux_latest_hardened when the patches become available
|
|
|
|
|
2021-09-15 21:26:11 +01:00
|
|
|
with linuxKernel;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2021-09-15 21:26:11 +01:00
|
|
|
let
|
2021-05-17 18:49:44 +01:00
|
|
|
deblobKernel = kernel: callPackage ../os-specific/linux/kernel/linux-libre.nix {
|
|
|
|
linux = kernel;
|
|
|
|
};
|
|
|
|
|
2021-09-15 21:26:11 +01:00
|
|
|
# Hardened Linux
|
|
|
|
hardenedKernelFor = kernel': overrides:
|
2021-10-09 13:48:27 +01:00
|
|
|
let
|
|
|
|
kernel = kernel'.override overrides;
|
|
|
|
version = kernelPatches.hardened.${kernel.meta.branch}.version;
|
|
|
|
major = lib.versions.major version;
|
|
|
|
sha256 = kernelPatches.hardened.${kernel.meta.branch}.sha256;
|
|
|
|
modDirVersion' = builtins.replaceStrings [ kernel.version ] [ version ] kernel.modDirVersion;
|
2021-09-15 21:26:11 +01:00
|
|
|
in kernel.override {
|
|
|
|
structuredExtraConfig = import ../os-specific/linux/kernel/hardened/config.nix {
|
2022-08-19 09:25:05 +01:00
|
|
|
inherit stdenv lib version;
|
2021-10-09 13:48:27 +01:00
|
|
|
};
|
|
|
|
argsOverride = {
|
|
|
|
inherit version;
|
2022-12-21 11:49:37 +00:00
|
|
|
modDirVersion = modDirVersion' + kernelPatches.hardened.${kernel.meta.branch}.extra;
|
2021-10-09 13:48:27 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/kernel/v${major}.x/linux-${version}.tar.xz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2023-02-21 23:41:34 +00:00
|
|
|
extraMeta = {
|
2023-05-31 11:46:35 +01:00
|
|
|
broken = kernel.meta.broken;
|
2023-02-21 23:41:34 +00:00
|
|
|
};
|
2021-09-15 21:26:11 +01:00
|
|
|
};
|
2023-03-13 11:38:06 +00:00
|
|
|
kernelPatches = kernel.kernelPatches ++ [
|
2021-09-15 21:26:11 +01:00
|
|
|
kernelPatches.hardened.${kernel.meta.branch}
|
|
|
|
];
|
|
|
|
isHardened = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
|
|
|
|
|
|
|
|
kernels = recurseIntoAttrs (lib.makeExtensible (self: with self;
|
2021-05-17 18:49:44 +01:00
|
|
|
let callPackage = newScope self; in {
|
|
|
|
|
2022-06-30 09:48:25 +01:00
|
|
|
# NOTE: PLEASE DO NOT ADD NEW VENDOR KERNELS TO NIXPKGS.
|
|
|
|
# New vendor kernels should go to nixos-hardware instead.
|
|
|
|
# e.g. https://github.com/NixOS/nixos-hardware/tree/master/microsoft/surface/kernel
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
linux_rpi1 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
|
|
|
|
kernelPatches = with kernelPatches; [
|
|
|
|
bridge_stp_helper
|
|
|
|
request_key_helper
|
|
|
|
];
|
|
|
|
rpiVersion = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
linux_rpi2 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
|
|
|
|
kernelPatches = with kernelPatches; [
|
|
|
|
bridge_stp_helper
|
|
|
|
request_key_helper
|
|
|
|
];
|
|
|
|
rpiVersion = 2;
|
|
|
|
};
|
|
|
|
|
|
|
|
linux_rpi3 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
|
|
|
|
kernelPatches = with kernelPatches; [
|
|
|
|
bridge_stp_helper
|
|
|
|
request_key_helper
|
|
|
|
];
|
|
|
|
rpiVersion = 3;
|
|
|
|
};
|
|
|
|
|
|
|
|
linux_rpi4 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
|
|
|
|
kernelPatches = with kernelPatches; [
|
|
|
|
bridge_stp_helper
|
|
|
|
request_key_helper
|
|
|
|
];
|
|
|
|
rpiVersion = 4;
|
|
|
|
};
|
|
|
|
|
2023-09-19 13:12:10 +01:00
|
|
|
linux_4_19 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "4.19";
|
2021-05-17 18:49:44 +01:00
|
|
|
kernelPatches =
|
|
|
|
[ kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.modinst_arg_list_too_long
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-19 13:12:10 +01:00
|
|
|
linux_5_4 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "5.4";
|
2021-05-17 18:49:44 +01:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.rtl8761b_support
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
linux_rt_5_4 = callPackage ../os-specific/linux/kernel/linux-rt-5.4.nix {
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-19 13:12:10 +01:00
|
|
|
linux_5_10 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "5.10";
|
2021-05-17 18:49:44 +01:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
linux_rt_5_10 = callPackage ../os-specific/linux/kernel/linux-rt-5.10.nix {
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.export-rt-sched-migrate
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-19 13:12:10 +01:00
|
|
|
linux_5_15 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "5.15";
|
2021-11-01 07:34:59 +00:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-12-05 17:42:11 +00:00
|
|
|
linux_rt_5_15 = callPackage ../os-specific/linux/kernel/linux-rt-5.15.nix {
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.export-rt-sched-migrate
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-19 13:12:10 +01:00
|
|
|
linux_6_1 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "6.1";
|
2022-12-12 07:53:11 +00:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-03-26 02:58:52 +01:00
|
|
|
linux_rt_6_1 = callPackage ../os-specific/linux/kernel/linux-rt-6.1.nix {
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.export-rt-sched-migrate
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-10-30 07:46:11 +00:00
|
|
|
linux_6_6 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "6.6";
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-02-04 05:56:19 +00:00
|
|
|
linux_rt_6_6 = callPackage ../os-specific/linux/kernel/linux-rt-6.6.nix {
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.export-rt-sched-migrate
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-03-11 05:30:15 +00:00
|
|
|
linux_6_8 = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
branch = "6.8";
|
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
kernelPatches.rust_1_75
|
|
|
|
kernelPatches.rust_1_76
|
2024-03-23 10:49:30 +00:00
|
|
|
kernelPatches.rust_1_77-6_8
|
2024-03-11 05:30:15 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-11-07 11:18:12 +00:00
|
|
|
linux_testing = let
|
2023-09-19 13:12:10 +01:00
|
|
|
testing = callPackage ../os-specific/linux/kernel/mainline.nix {
|
|
|
|
# A special branch that tracks the kernel under the release process
|
|
|
|
# i.e. which has at least a public rc1 and is not released yet.
|
|
|
|
branch = "testing";
|
2021-11-07 11:18:12 +00:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
2024-03-23 10:49:30 +00:00
|
|
|
kernelPatches.rust_1_77-6_9
|
2021-11-07 11:18:12 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
latest = packageAliases.linux_latest.kernel;
|
|
|
|
in if latest.kernelAtLeast testing.baseVersion
|
|
|
|
then latest
|
|
|
|
else testing;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-03-28 19:59:12 +01:00
|
|
|
# Using zenKernels like this due lqx&zen came from one source, but may have different base kernel version
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/161773#discussion_r820134708
|
|
|
|
zenKernels = callPackage ../os-specific/linux/kernel/zen-kernels.nix;
|
|
|
|
|
|
|
|
linux_zen = (zenKernels {
|
2021-05-17 18:49:44 +01:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
2022-03-28 19:59:12 +01:00
|
|
|
}).zen;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-03-28 19:59:12 +01:00
|
|
|
linux_lqx = (zenKernels {
|
2021-05-17 18:49:44 +01:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
2022-03-28 19:59:12 +01:00
|
|
|
}).lqx;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-07-21 21:08:10 +01:00
|
|
|
# This contains the variants of the XanMod kernel
|
2022-07-21 22:25:45 +01:00
|
|
|
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix {
|
2022-03-22 11:08:21 +00:00
|
|
|
kernelPatches = [
|
|
|
|
kernelPatches.bridge_stp_helper
|
|
|
|
kernelPatches.request_key_helper
|
|
|
|
];
|
2022-07-21 22:25:45 +01:00
|
|
|
};
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-07-21 22:25:45 +01:00
|
|
|
linux_xanmod = xanmodKernels.lts;
|
2022-11-01 10:10:28 +00:00
|
|
|
linux_xanmod_stable = xanmodKernels.main;
|
2022-10-31 17:57:16 +00:00
|
|
|
linux_xanmod_latest = xanmodKernels.main;
|
2022-07-21 21:08:10 +01:00
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
linux_libre = deblobKernel packageAliases.linux_default.kernel;
|
|
|
|
|
|
|
|
linux_latest_libre = deblobKernel packageAliases.linux_latest.kernel;
|
|
|
|
|
2021-08-18 07:42:23 +01:00
|
|
|
linux_hardened = hardenedKernelFor packageAliases.linux_default.kernel { };
|
|
|
|
|
2023-05-31 11:45:25 +01:00
|
|
|
linux_4_19_hardened = hardenedKernelFor kernels.linux_4_19 {
|
|
|
|
stdenv = gcc10Stdenv;
|
|
|
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc10Stdenv; };
|
|
|
|
};
|
|
|
|
linux_5_4_hardened = hardenedKernelFor kernels.linux_5_4 {
|
|
|
|
stdenv = gcc10Stdenv;
|
|
|
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc10Stdenv; };
|
|
|
|
};
|
2021-08-18 07:42:23 +01:00
|
|
|
linux_5_10_hardened = hardenedKernelFor kernels.linux_5_10 { };
|
2021-11-15 19:10:37 +00:00
|
|
|
linux_5_15_hardened = hardenedKernelFor kernels.linux_5_15 { };
|
2023-02-21 23:45:54 +00:00
|
|
|
linux_6_1_hardened = hardenedKernelFor kernels.linux_6_1 { };
|
2023-12-12 21:51:26 +00:00
|
|
|
linux_6_6_hardened = hardenedKernelFor kernels.linux_6_6 { };
|
2023-02-21 23:45:54 +00:00
|
|
|
|
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
|
|
|
linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
2023-10-11 12:09:41 +01:00
|
|
|
linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
2023-02-21 23:45:54 +00:00
|
|
|
linux_5_18 = throw "linux 5.18 was removed because it has reached its end of life upstream";
|
|
|
|
linux_5_19 = throw "linux 5.19 was removed because it has reached its end of life upstream";
|
|
|
|
linux_6_0 = throw "linux 6.0 was removed because it has reached its end of life upstream";
|
2023-05-26 10:59:54 +01:00
|
|
|
linux_6_2 = throw "linux 6.2 was removed because it has reached its end of life upstream";
|
2023-07-22 19:44:53 +01:00
|
|
|
linux_6_3 = throw "linux 6.3 was removed because it has reached its end of life upstream";
|
2023-10-02 12:37:32 +01:00
|
|
|
linux_6_4 = throw "linux 6.4 was removed because it has reached its end of life upstream";
|
2024-02-28 10:20:00 +00:00
|
|
|
linux_6_5 = throw "linux 6.5 was removed because it has reached its end of life upstream";
|
2024-04-04 20:09:30 +01:00
|
|
|
linux_6_7 = throw "linux 6.7 was removed because it has reached its end of life upstream";
|
2023-02-21 23:45:54 +00:00
|
|
|
|
|
|
|
linux_xanmod_tt = throw "linux_xanmod_tt was removed because upstream no longer offers this option";
|
|
|
|
|
2022-09-17 16:06:58 +01:00
|
|
|
linux_5_18_hardened = throw "linux 5.18 was removed because it has reached its end of life upstream";
|
2022-11-01 15:15:08 +00:00
|
|
|
linux_5_19_hardened = throw "linux 5.19 was removed because it has reached its end of life upstream";
|
2023-01-22 17:47:20 +00:00
|
|
|
linux_6_0_hardened = throw "linux 6.0 was removed because it has reached its end of life upstream";
|
2024-04-04 20:09:30 +01:00
|
|
|
linux_6_7_hardened = throw "linux 6.7 was removed because it has reached its end of life upstream";
|
2021-09-15 21:26:11 +01:00
|
|
|
}));
|
2021-05-17 18:49:44 +01:00
|
|
|
/* Linux kernel modules are inherently tied to a specific kernel. So
|
|
|
|
rather than provide specific instances of those packages for a
|
|
|
|
specific kernel, we have a function that builds those packages
|
|
|
|
for a specific kernel. This function can then be called for
|
|
|
|
whatever kernel you're using. */
|
|
|
|
|
|
|
|
packagesFor = kernel_: lib.makeExtensible (self: with self;
|
|
|
|
let callPackage = newScope self; in {
|
|
|
|
inherit callPackage;
|
|
|
|
kernel = kernel_;
|
|
|
|
inherit (kernel) stdenv; # in particular, use the same compiler by default
|
|
|
|
|
|
|
|
# to help determine module compatibility
|
|
|
|
inherit (kernel) isZen isHardened isLibre;
|
|
|
|
inherit (kernel) kernelOlder kernelAtLeast;
|
|
|
|
# Obsolete aliases (these packages do not depend on the kernel).
|
|
|
|
inherit (pkgs) odp-dpdk pktgen; # added 2018-05
|
2021-12-03 15:12:47 +00:00
|
|
|
inherit (pkgs) bcc bpftrace; # added 2021-12
|
2022-11-05 01:32:08 +00:00
|
|
|
inherit (pkgs) oci-seccomp-bpf-hook; # added 2022-11
|
2024-03-21 14:54:46 +00:00
|
|
|
inherit (pkgs) dpdk; # added 2024-03
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
acpi_call = callPackage ../os-specific/linux/acpi-call {};
|
|
|
|
|
2021-09-01 08:47:01 +01:00
|
|
|
akvcam = callPackage ../os-specific/linux/akvcam { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2024-01-10 09:38:04 +00:00
|
|
|
amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
apfs = callPackage ../os-specific/linux/apfs { };
|
|
|
|
|
2022-06-22 09:00:26 +01:00
|
|
|
ax99100 = callPackage ../os-specific/linux/ax99100 {};
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
batman_adv = callPackage ../os-specific/linux/batman-adv {};
|
|
|
|
|
|
|
|
bbswitch = callPackage ../os-specific/linux/bbswitch {};
|
|
|
|
|
2023-03-06 07:59:57 +00:00
|
|
|
ch9344 = callPackage ../os-specific/linux/ch9344 { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
chipsec = callPackage ../tools/security/chipsec {
|
|
|
|
inherit kernel;
|
|
|
|
withDriver = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
cryptodev = callPackage ../os-specific/linux/cryptodev { };
|
|
|
|
|
|
|
|
cpupower = callPackage ../os-specific/linux/cpupower { };
|
|
|
|
|
|
|
|
ddcci-driver = callPackage ../os-specific/linux/ddcci { };
|
|
|
|
|
2022-02-22 18:25:29 +00:00
|
|
|
dddvb = callPackage ../os-specific/linux/dddvb { };
|
|
|
|
|
2020-11-02 19:24:40 +00:00
|
|
|
decklink = callPackage ../os-specific/linux/decklink { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
digimend = callPackage ../os-specific/linux/digimend { };
|
|
|
|
|
|
|
|
dpdk-kmods = callPackage ../os-specific/linux/dpdk-kmods { };
|
|
|
|
|
2023-02-21 23:45:59 +00:00
|
|
|
exfat-nofuse = if lib.versionOlder kernel.version "5.8" then callPackage ../os-specific/linux/exfat { } else null;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
evdi = callPackage ../os-specific/linux/evdi { };
|
|
|
|
|
2023-07-21 01:58:50 +01:00
|
|
|
fanout = callPackage ../os-specific/linux/fanout { };
|
|
|
|
|
2023-12-04 19:59:33 +00:00
|
|
|
framework-laptop-kmod = callPackage ../os-specific/linux/framework-laptop-kmod { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
fwts-efi-runtime = callPackage ../os-specific/linux/fwts/module.nix { };
|
|
|
|
|
2023-05-16 03:00:32 +01:00
|
|
|
gasket = callPackage ../os-specific/linux/gasket { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
gcadapter-oc-kmod = callPackage ../os-specific/linux/gcadapter-oc-kmod { };
|
|
|
|
|
|
|
|
hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { };
|
|
|
|
|
|
|
|
e1000e = if lib.versionOlder kernel.version "4.10" then callPackage ../os-specific/linux/e1000e {} else null;
|
|
|
|
|
|
|
|
intel-speed-select = if lib.versionAtLeast kernel.version "5.3" then callPackage ../os-specific/linux/intel-speed-select { } else null;
|
|
|
|
|
2023-01-26 15:59:59 +00:00
|
|
|
ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers {};
|
|
|
|
|
2023-02-14 15:33:59 +00:00
|
|
|
ivsc-driver = callPackage ../os-specific/linux/ivsc-driver {};
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
ixgbevf = callPackage ../os-specific/linux/ixgbevf {};
|
|
|
|
|
|
|
|
it87 = callPackage ../os-specific/linux/it87 {};
|
|
|
|
|
2021-12-20 10:48:08 +00:00
|
|
|
asus-ec-sensors = callPackage ../os-specific/linux/asus-ec-sensors {};
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
asus-wmi-sensors = callPackage ../os-specific/linux/asus-wmi-sensors {};
|
|
|
|
|
|
|
|
ena = callPackage ../os-specific/linux/ena {};
|
|
|
|
|
2022-01-14 04:15:03 +00:00
|
|
|
kvdo = callPackage ../os-specific/linux/kvdo {};
|
|
|
|
|
2023-04-26 09:44:15 +01:00
|
|
|
lenovo-legion-module = callPackage ../os-specific/linux/lenovo-legion { };
|
|
|
|
|
2023-07-27 08:40:04 +01:00
|
|
|
linux-gpib = callPackage ../applications/science/electronics/linux-gpib/kernel.nix { };
|
|
|
|
|
2021-12-20 10:47:44 +00:00
|
|
|
liquidtux = callPackage ../os-specific/linux/liquidtux {};
|
|
|
|
|
2022-02-13 12:08:35 +00:00
|
|
|
lkrg = callPackage ../os-specific/linux/lkrg {};
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };
|
|
|
|
|
|
|
|
lttng-modules = callPackage ../os-specific/linux/lttng-modules { };
|
|
|
|
|
2023-10-24 14:40:44 +01:00
|
|
|
mstflint_access = callPackage ../os-specific/linux/mstflint_access { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
broadcom_sta = callPackage ../os-specific/linux/broadcom-sta { };
|
|
|
|
|
|
|
|
tbs = callPackage ../os-specific/linux/tbs { };
|
|
|
|
|
|
|
|
mbp2018-bridge-drv = callPackage ../os-specific/linux/mbp-modules/mbp2018-bridge-drv { };
|
|
|
|
|
2023-10-01 13:56:22 +01:00
|
|
|
nct6687d = callPackage ../os-specific/linux/nct6687d { };
|
|
|
|
|
2022-06-02 07:27:42 +01:00
|
|
|
new-lg4ff = callPackage ../os-specific/linux/new-lg4ff { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
nvidiabl = callPackage ../os-specific/linux/nvidiabl { };
|
|
|
|
|
2023-11-23 00:46:36 +00:00
|
|
|
nvidiaPackages = dontRecurseIntoAttrs (lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { }))
|
|
|
|
// { __attrsFailEvaluation = true; };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-08-15 19:31:14 +01:00
|
|
|
nvidia_x11 = nvidiaPackages.stable;
|
|
|
|
nvidia_x11_beta = nvidiaPackages.beta;
|
2021-05-17 18:49:44 +01:00
|
|
|
nvidia_x11_legacy340 = nvidiaPackages.legacy_340;
|
|
|
|
nvidia_x11_legacy390 = nvidiaPackages.legacy_390;
|
2021-10-28 22:23:00 +01:00
|
|
|
nvidia_x11_legacy470 = nvidiaPackages.legacy_470;
|
2022-08-15 19:31:14 +01:00
|
|
|
nvidia_x11_production = nvidiaPackages.production;
|
2021-05-17 18:49:44 +01:00
|
|
|
nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta;
|
2023-09-11 15:37:26 +01:00
|
|
|
nvidia_dc = nvidiaPackages.dc;
|
|
|
|
nvidia_dc_520 = nvidiaPackages.dc_520;
|
2023-12-15 11:20:42 +00:00
|
|
|
nvidia_dc_535 = nvidiaPackages.dc_535;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-08-24 20:03:34 +01:00
|
|
|
# this is not a replacement for nvidia_x11*
|
2022-05-12 07:09:32 +01:00
|
|
|
# only the opensource kernel driver exposed for hydra to build
|
2022-08-24 20:03:34 +01:00
|
|
|
nvidia_x11_beta_open = nvidiaPackages.beta.open;
|
|
|
|
nvidia_x11_production_open = nvidiaPackages.production.open;
|
|
|
|
nvidia_x11_stable_open = nvidiaPackages.stable.open;
|
|
|
|
nvidia_x11_vulkan_beta_open = nvidiaPackages.vulkan_beta.open;
|
2022-05-12 07:09:32 +01:00
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
openrazer = callPackage ../os-specific/linux/openrazer/driver.nix { };
|
|
|
|
|
|
|
|
ply = callPackage ../os-specific/linux/ply { };
|
|
|
|
|
|
|
|
r8125 = callPackage ../os-specific/linux/r8125 { };
|
|
|
|
|
|
|
|
r8168 = callPackage ../os-specific/linux/r8168 { };
|
|
|
|
|
|
|
|
rtl8188eus-aircrack = callPackage ../os-specific/linux/rtl8188eus-aircrack { };
|
|
|
|
|
|
|
|
rtl8192eu = callPackage ../os-specific/linux/rtl8192eu { };
|
|
|
|
|
2022-01-23 10:57:30 +00:00
|
|
|
rtl8189es = callPackage ../os-specific/linux/rtl8189es { };
|
|
|
|
|
2022-07-10 14:59:28 +01:00
|
|
|
rtl8189fs = callPackage ../os-specific/linux/rtl8189fs { };
|
|
|
|
|
2022-11-03 02:00:00 +00:00
|
|
|
rtl8723ds = callPackage ../os-specific/linux/rtl8723ds { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
rtl8812au = callPackage ../os-specific/linux/rtl8812au { };
|
|
|
|
|
|
|
|
rtl8814au = callPackage ../os-specific/linux/rtl8814au { };
|
|
|
|
|
2024-01-08 22:25:50 +00:00
|
|
|
rtl8852au = callPackage ../os-specific/linux/rtl8852au { };
|
|
|
|
|
2024-04-23 11:14:54 +01:00
|
|
|
rtl8852bu = callPackage ../os-specific/linux/rtl8852bu { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
rtl88xxau-aircrack = callPackage ../os-specific/linux/rtl88xxau-aircrack {};
|
|
|
|
|
|
|
|
rtl8821au = callPackage ../os-specific/linux/rtl8821au { };
|
|
|
|
|
|
|
|
rtl8821ce = callPackage ../os-specific/linux/rtl8821ce { };
|
|
|
|
|
|
|
|
rtl88x2bu = callPackage ../os-specific/linux/rtl88x2bu { };
|
|
|
|
|
|
|
|
rtl8821cu = callPackage ../os-specific/linux/rtl8821cu { };
|
|
|
|
|
|
|
|
rtw88 = callPackage ../os-specific/linux/rtw88 { };
|
|
|
|
|
2022-01-21 15:59:08 +00:00
|
|
|
rtw89 = if lib.versionOlder kernel.version "5.16" then callPackage ../os-specific/linux/rtw89 { } else null;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
openafs_1_8 = callPackage ../servers/openafs/1.8/module.nix { };
|
|
|
|
# Current stable release; don't backport release updates!
|
|
|
|
openafs = openafs_1_8;
|
|
|
|
|
2023-05-03 09:43:17 +01:00
|
|
|
opensnitch-ebpf = if lib.versionAtLeast kernel.version "5.10" then callPackage ../os-specific/linux/opensnitch-ebpf { } else null;
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
facetimehd = callPackage ../os-specific/linux/facetimehd { };
|
|
|
|
|
2023-11-27 13:28:37 +00:00
|
|
|
rust-out-of-tree-module = if lib.versionAtLeast kernel.version "6.7" then callPackage ../os-specific/linux/rust-out-of-tree-module { } else null;
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
tuxedo-keyboard = if lib.versionAtLeast kernel.version "4.14" then callPackage ../os-specific/linux/tuxedo-keyboard { } else null;
|
|
|
|
|
|
|
|
jool = callPackage ../os-specific/linux/jool { };
|
|
|
|
|
|
|
|
kvmfr = callPackage ../os-specific/linux/kvmfr { };
|
|
|
|
|
|
|
|
mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };
|
|
|
|
|
|
|
|
mwprocapture = callPackage ../os-specific/linux/mwprocapture { };
|
|
|
|
|
|
|
|
mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { };
|
|
|
|
|
|
|
|
# compiles but has to be integrated into the kernel somehow
|
|
|
|
# Let's have it uncommented and finish it..
|
|
|
|
ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { };
|
|
|
|
|
|
|
|
netatop = callPackage ../os-specific/linux/netatop { };
|
|
|
|
|
2022-08-14 09:12:16 +01:00
|
|
|
perf = callPackage ../os-specific/linux/kernel/perf { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
phc-intel = if lib.versionAtLeast kernel.version "4.10" then callPackage ../os-specific/linux/phc-intel { } else null;
|
|
|
|
|
2022-07-09 13:43:27 +01:00
|
|
|
prl-tools = callPackage ../os-specific/linux/prl-tools { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
isgx = callPackage ../os-specific/linux/isgx { };
|
|
|
|
|
2021-07-29 15:18:49 +01:00
|
|
|
rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { };
|
|
|
|
|
2023-12-21 11:18:28 +00:00
|
|
|
shufflecake = callPackage ../os-specific/linux/shufflecake {};
|
|
|
|
|
2022-11-05 05:10:51 +00:00
|
|
|
sysdig = callPackage ../os-specific/linux/sysdig {};
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
systemtap = callPackage ../development/tools/profiling/systemtap { };
|
|
|
|
|
|
|
|
system76 = callPackage ../os-specific/linux/system76 { };
|
|
|
|
|
|
|
|
system76-acpi = callPackage ../os-specific/linux/system76-acpi { };
|
|
|
|
|
|
|
|
system76-power = callPackage ../os-specific/linux/system76-power { };
|
|
|
|
|
|
|
|
system76-io = callPackage ../os-specific/linux/system76-io { };
|
|
|
|
|
2023-04-29 11:32:09 +01:00
|
|
|
system76-scheduler = callPackage ../os-specific/linux/system76-scheduler { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
tmon = callPackage ../os-specific/linux/tmon { };
|
|
|
|
|
|
|
|
tp_smapi = callPackage ../os-specific/linux/tp_smapi { };
|
|
|
|
|
|
|
|
turbostat = callPackage ../os-specific/linux/turbostat { };
|
|
|
|
|
2023-07-15 18:15:38 +01:00
|
|
|
trelay = callPackage ../os-specific/linux/trelay { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
usbip = callPackage ../os-specific/linux/usbip { };
|
|
|
|
|
|
|
|
v86d = callPackage ../os-specific/linux/v86d { };
|
|
|
|
|
|
|
|
veikk-linux-driver = callPackage ../os-specific/linux/veikk-linux-driver { };
|
|
|
|
vendor-reset = callPackage ../os-specific/linux/vendor-reset { };
|
|
|
|
|
2022-02-16 02:36:57 +00:00
|
|
|
vhba = callPackage ../applications/emulators/cdemu/vhba.nix { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-01-10 23:48:24 +00:00
|
|
|
virtio_vmmci = callPackage ../os-specific/linux/virtio_vmmci { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
virtualbox = callPackage ../os-specific/linux/virtualbox {
|
|
|
|
virtualbox = pkgs.virtualboxHardened;
|
|
|
|
};
|
|
|
|
|
2024-02-14 09:33:43 +00:00
|
|
|
virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2021-09-20 13:20:17 +01:00
|
|
|
vm-tools = callPackage ../os-specific/linux/vm-tools { };
|
|
|
|
|
2022-01-10 13:05:17 +00:00
|
|
|
vmm_clock = callPackage ../os-specific/linux/vmm_clock { };
|
|
|
|
|
2022-04-23 16:29:00 +01:00
|
|
|
vmware = callPackage ../os-specific/linux/vmware { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
wireguard = if lib.versionOlder kernel.version "5.6" then callPackage ../os-specific/linux/wireguard { } else null;
|
|
|
|
|
|
|
|
x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { };
|
|
|
|
|
2022-02-19 22:21:19 +00:00
|
|
|
xone = if lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/xone { } else null;
|
2022-02-19 22:14:59 +00:00
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
xpadneo = callPackage ../os-specific/linux/xpadneo { };
|
|
|
|
|
2022-07-13 09:17:48 +01:00
|
|
|
ithc = callPackage ../os-specific/linux/ithc { };
|
|
|
|
|
2024-04-11 02:39:09 +01:00
|
|
|
ryzen-smu = callPackage ../os-specific/linux/ryzen-smu { };
|
|
|
|
|
2021-05-17 18:49:44 +01:00
|
|
|
zenpower = callPackage ../os-specific/linux/zenpower { };
|
|
|
|
|
2023-11-23 15:15:18 +00:00
|
|
|
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
|
|
|
|
configFile = "kernel";
|
|
|
|
inherit pkgs kernel;
|
|
|
|
};
|
2024-01-27 16:15:29 +00:00
|
|
|
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
|
2023-05-07 11:55:24 +01:00
|
|
|
configFile = "kernel";
|
|
|
|
inherit pkgs kernel;
|
|
|
|
};
|
2024-02-27 23:27:39 +00:00
|
|
|
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
|
2023-05-07 11:55:24 +01:00
|
|
|
configFile = "kernel";
|
|
|
|
inherit pkgs kernel;
|
|
|
|
};
|
2024-01-27 16:15:29 +00:00
|
|
|
zfs = zfs_2_2;
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
can-isotp = callPackage ../os-specific/linux/can-isotp { };
|
|
|
|
|
2022-07-23 20:37:49 +01:00
|
|
|
qc71_laptop = callPackage ../os-specific/linux/qc71_laptop { };
|
|
|
|
|
2022-07-23 20:49:01 +01:00
|
|
|
hid-ite8291r3 = callPackage ../os-specific/linux/hid-ite8291r3 { };
|
|
|
|
|
2023-09-26 05:10:21 +01:00
|
|
|
hid-tmff2 = callPackage ../os-specific/linux/hid-tmff2 { };
|
|
|
|
|
2024-01-30 19:55:34 +00:00
|
|
|
drbd = callPackage ../os-specific/linux/drbd/driver.nix { };
|
|
|
|
|
2022-04-01 10:33:10 +01:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
2021-05-17 18:49:44 +01:00
|
|
|
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
|
2023-07-08 11:52:38 +01:00
|
|
|
hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30
|
2023-06-14 17:30:25 +01:00
|
|
|
sch_cake = throw "sch_cake was added in mainline kernel version 4.19"; # Added 2023-06-14
|
2023-06-14 17:29:16 +01:00
|
|
|
rtl8723bs = throw "rtl8723bs was added in mainline kernel version 4.12"; # Added 2023-06-14
|
2022-08-01 09:38:50 +01:00
|
|
|
xmm7360-pci = throw "Support for the XMM7360 WWAN card was added to the iosm kmod in mainline kernel version 5.18";
|
2021-05-17 18:49:44 +01:00
|
|
|
});
|
|
|
|
|
2021-08-18 07:42:23 +01:00
|
|
|
hardenedPackagesFor = kernel: overrides: packagesFor (hardenedKernelFor kernel overrides);
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
vanillaPackages = {
|
|
|
|
# recurse to build modules for the kernels
|
|
|
|
linux_4_19 = recurseIntoAttrs (packagesFor kernels.linux_4_19);
|
|
|
|
linux_5_4 = recurseIntoAttrs (packagesFor kernels.linux_5_4);
|
|
|
|
linux_5_10 = recurseIntoAttrs (packagesFor kernels.linux_5_10);
|
2021-11-01 07:34:59 +00:00
|
|
|
linux_5_15 = recurseIntoAttrs (packagesFor kernels.linux_5_15);
|
2023-02-21 23:45:54 +00:00
|
|
|
linux_6_1 = recurseIntoAttrs (packagesFor kernels.linux_6_1);
|
2023-10-30 07:46:11 +00:00
|
|
|
linux_6_6 = recurseIntoAttrs (packagesFor kernels.linux_6_6);
|
2024-03-11 05:30:15 +00:00
|
|
|
linux_6_8 = recurseIntoAttrs (packagesFor kernels.linux_6_8);
|
2023-11-23 00:46:36 +00:00
|
|
|
__attrsFailEvaluation = true;
|
2023-02-21 23:45:54 +00:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
|
|
|
linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11"; # Added 2022-11-08
|
2023-10-11 12:09:41 +01:00
|
|
|
linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11"; # Added 2023-10-11
|
2022-09-17 16:06:58 +01:00
|
|
|
linux_5_18 = throw "linux 5.18 was removed because it reached its end of life upstream"; # Added 2022-09-17
|
2022-11-01 15:15:08 +00:00
|
|
|
linux_5_19 = throw "linux 5.19 was removed because it reached its end of life upstream"; # Added 2022-11-01
|
2023-01-22 17:47:20 +00:00
|
|
|
linux_6_0 = throw "linux 6.0 was removed because it reached its end of life upstream"; # Added 2023-01-20
|
2023-05-26 10:59:54 +01:00
|
|
|
linux_6_2 = throw "linux 6.2 was removed because it reached its end of life upstream"; # Added 2023-05-26
|
2023-07-22 19:44:53 +01:00
|
|
|
linux_6_3 = throw "linux 6.3 was removed because it reached its end of life upstream"; # Added 2023-07-22
|
2023-10-02 12:37:32 +01:00
|
|
|
linux_6_4 = throw "linux 6.4 was removed because it reached its end of life upstream"; # Added 2023-10-02
|
2024-02-28 10:20:00 +00:00
|
|
|
linux_6_5 = throw "linux 6.5 was removed because it reached its end of life upstream"; # Added 2024-02-28
|
2024-04-04 20:09:30 +01:00
|
|
|
linux_6_7 = throw "linux 6.7 was removed because it reached its end of life upstream"; # Added 2024-04-04
|
2021-05-17 18:49:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
rtPackages = {
|
|
|
|
# realtime kernel packages
|
|
|
|
linux_rt_5_4 = packagesFor kernels.linux_rt_5_4;
|
|
|
|
linux_rt_5_10 = packagesFor kernels.linux_rt_5_10;
|
2022-12-05 17:42:11 +00:00
|
|
|
linux_rt_5_15 = packagesFor kernels.linux_rt_5_15;
|
2023-03-26 02:58:52 +01:00
|
|
|
linux_rt_6_1 = packagesFor kernels.linux_rt_6_1;
|
2024-02-04 05:56:19 +00:00
|
|
|
linux_rt_6_6 = packagesFor kernels.linux_rt_6_6;
|
2023-11-23 00:46:36 +00:00
|
|
|
__attrsFailEvaluation = true;
|
2021-05-17 18:49:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
rpiPackages = {
|
|
|
|
linux_rpi1 = packagesFor kernels.linux_rpi1;
|
|
|
|
linux_rpi2 = packagesFor kernels.linux_rpi2;
|
|
|
|
linux_rpi3 = packagesFor kernels.linux_rpi3;
|
|
|
|
linux_rpi4 = packagesFor kernels.linux_rpi4;
|
2023-11-23 00:46:36 +00:00
|
|
|
__attrsFailEvaluation = true;
|
2021-05-17 18:49:44 +01:00
|
|
|
};
|
|
|
|
|
2021-09-15 21:26:11 +01:00
|
|
|
packages = recurseIntoAttrs (vanillaPackages // rtPackages // rpiPackages // {
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
# Intentionally lacks recurseIntoAttrs, as -rc kernels will quite likely break out-of-tree modules and cause failed Hydra builds.
|
|
|
|
linux_testing = packagesFor kernels.linux_testing;
|
|
|
|
|
2023-05-31 11:45:25 +01:00
|
|
|
linux_hardened = recurseIntoAttrs (packagesFor kernels.linux_hardened);
|
2021-08-17 17:52:37 +01:00
|
|
|
|
2023-05-31 11:45:25 +01:00
|
|
|
linux_4_19_hardened = recurseIntoAttrs (packagesFor kernels.linux_4_19_hardened);
|
|
|
|
linux_5_4_hardened = recurseIntoAttrs (packagesFor kernels.linux_5_4_hardened);
|
|
|
|
linux_5_10_hardened = recurseIntoAttrs (packagesFor kernels.linux_5_10_hardened);
|
|
|
|
linux_5_15_hardened = recurseIntoAttrs (packagesFor kernels.linux_5_15_hardened);
|
|
|
|
linux_6_1_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_1_hardened);
|
2023-12-12 21:51:26 +00:00
|
|
|
linux_6_6_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_6_hardened);
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
linux_zen = recurseIntoAttrs (packagesFor kernels.linux_zen);
|
|
|
|
linux_lqx = recurseIntoAttrs (packagesFor kernels.linux_lqx);
|
|
|
|
linux_xanmod = recurseIntoAttrs (packagesFor kernels.linux_xanmod);
|
2022-11-01 10:10:28 +00:00
|
|
|
linux_xanmod_stable = recurseIntoAttrs (packagesFor kernels.linux_xanmod_stable);
|
2022-03-22 11:08:21 +00:00
|
|
|
linux_xanmod_latest = recurseIntoAttrs (packagesFor kernels.linux_xanmod_latest);
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
linux_libre = recurseIntoAttrs (packagesFor kernels.linux_libre);
|
|
|
|
|
|
|
|
linux_latest_libre = recurseIntoAttrs (packagesFor kernels.linux_latest_libre);
|
2023-11-23 00:46:36 +00:00
|
|
|
__recurseIntoDerivationForReleaseJobs = true;
|
2023-02-21 23:45:54 +00:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
|
|
|
linux_5_18_hardened = throw "linux 5.18 was removed because it has reached its end of life upstream";
|
|
|
|
linux_5_19_hardened = throw "linux 5.19 was removed because it has reached its end of life upstream";
|
|
|
|
linux_6_0_hardened = throw "linux 6.0 was removed because it has reached its end of life upstream";
|
2024-04-04 20:09:30 +01:00
|
|
|
linux_6_7_hardened = throw "linux 6.7 was removed because it has reached its end of life upstream";
|
2023-02-21 23:45:54 +00:00
|
|
|
linux_xanmod_tt = throw "linux_xanmod_tt was removed because upstream no longer offers this option";
|
2021-09-15 21:26:11 +01:00
|
|
|
});
|
2021-05-17 18:49:44 +01:00
|
|
|
|
|
|
|
packageAliases = {
|
2024-02-02 17:19:35 +00:00
|
|
|
linux_default = packages.linux_6_6;
|
2021-05-17 18:49:44 +01:00
|
|
|
# Update this when adding the newest kernel major version!
|
2024-03-11 05:30:15 +00:00
|
|
|
linux_latest = packages.linux_6_8;
|
2023-04-05 21:59:11 +01:00
|
|
|
linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake";
|
2021-05-17 18:49:44 +01:00
|
|
|
linux_rt_default = packages.linux_rt_5_4;
|
2024-02-04 05:56:19 +00:00
|
|
|
linux_rt_latest = packages.linux_rt_6_6;
|
2023-11-23 00:46:36 +00:00
|
|
|
} // { __attrsFailEvaluation = true; };
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-12-20 13:42:38 +00:00
|
|
|
manualConfig = callPackage ../os-specific/linux/kernel/manual-config.nix {};
|
2021-05-17 18:49:44 +01:00
|
|
|
|
2022-12-21 11:49:37 +00:00
|
|
|
customPackage = { version, src, modDirVersion ? lib.versions.pad 3 version, configfile, allowImportFromDerivation ? true }:
|
2021-05-17 18:49:44 +01:00
|
|
|
recurseIntoAttrs (packagesFor (manualConfig {
|
2022-12-20 13:42:38 +00:00
|
|
|
inherit version src modDirVersion configfile allowImportFromDerivation;
|
2021-05-17 18:49:44 +01:00
|
|
|
}));
|
|
|
|
|
|
|
|
# Derive one of the default .config files
|
|
|
|
linuxConfig = {
|
|
|
|
src,
|
2023-03-22 17:43:07 +00:00
|
|
|
kernelPatches ? [],
|
2021-05-17 18:49:44 +01:00
|
|
|
version ? (builtins.parseDrvName src.name).version,
|
|
|
|
makeTarget ? "defconfig",
|
|
|
|
name ? "kernel.config",
|
|
|
|
}: stdenvNoCC.mkDerivation {
|
|
|
|
inherit name src;
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ]
|
|
|
|
++ lib.optionals (lib.versionAtLeast version "4.16") [ buildPackages.bison buildPackages.flex ];
|
2023-03-22 17:43:07 +00:00
|
|
|
patches = map (p: p.patch) kernelPatches; # Patches may include new configs.
|
2021-05-17 18:49:44 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts/
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
set -x
|
|
|
|
make \
|
|
|
|
ARCH=${stdenv.hostPlatform.linuxArch} \
|
|
|
|
HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \
|
|
|
|
${makeTarget}
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
cp .config $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-03-16 15:19:44 +00:00
|
|
|
buildLinux = callPackage ../os-specific/linux/kernel/generic.nix {};
|
2021-05-17 18:49:44 +01:00
|
|
|
}
|