apple/t2: pin kernel releases; upgrade version and patches

disconnect kernel versions from nixpkgs, which should avoid breaking users'
config when nixpkgs has a new version and some patches are incompatible,
and when a PR updating the patches are still waiting to be merged, like
in #2027.

Signed-off-by: Sophie Cheung <git@soopy.moe>
This commit is contained in:
Sophie Cheung committed 2026-10-07 20:05:18 +08:00
1 parent 06f9ecaea5
commit 701eb9f269
6 files changed
+125 -57

No files matched your search

+19 -9
View File
@@ -1,13 +1,13 @@
{
lib,
fetchurl, # fetchpatch does unnecessary normalization
buildLinux,
linuxKernel,
...
}@args:
{
kernel,
patchesFile,
}:
patchesFile:
let
inherit (builtins) readFile fromJSON;
@@ -23,10 +23,14 @@ let
}
) patchset.patches;
in
kernel.override (
args
// {
buildLinux (
{
pname = "linux-t2";
version = patchset.kernel.version;
src = fetchurl {
inherit (patchset.kernel) url hash;
};
structuredExtraConfig = with lib.kernel; {
APPLE_BCE = module;
@@ -47,9 +51,15 @@ kernel.override (
STAGING = yes;
};
kernelPatches = t2-patches ++ (args.kernelPatches or [ ]);
kernelPatches = [
# include default patches for good measure
linuxKernel.kernelPatches.request_key_helper
linuxKernel.kernelPatches.bridge_stp_helper
]
++ t2-patches
++ (args.kernelPatches or [ ]);
argsOverride.extraMeta = {
extraMeta = {
description = "The Linux kernel (with patches from the T2 Linux project)";
# take responsibility for the downstream kernel