mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-04 15:03:29 +01:00
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:
6 files changed
+125
-57
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user