45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ fetchFromGitHub, inputs, lib }:
|
|
let
|
|
version = "7.0.10";
|
|
kernelHash = "1w4i705i0nl1xqv7fdhdbhy7j3xrzhl31fabs6vmgiw7nf06szxv";
|
|
kernelPatchHash = "0h7gxqcnww7sj5cdyblzj04775zhavwdylkm2pm91v6xkjbnz1zj";
|
|
|
|
mm = lib.versions.majorMinor version;
|
|
hasPatch = (builtins.length (builtins.splitVersion version)) == 3;
|
|
tkgPatches = [
|
|
"0002-clear-patches"
|
|
"0003-glitched-base"
|
|
"0001-bore"
|
|
"0003-glitched-cfs"
|
|
"0012-misc-additions"
|
|
];
|
|
|
|
patch = path: {
|
|
name = "patch-${path}";
|
|
patch = path;
|
|
};
|
|
kernelPatchSrc = {
|
|
name = "patch";
|
|
patch = builtins.fetchurl {
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/patch-${version}.xz";
|
|
sha256 = kernelPatchHash;
|
|
};
|
|
};
|
|
in {
|
|
inherit version;
|
|
|
|
src = builtins.fetchurl {
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/linux-${mm}.tar.xz";
|
|
sha256 = kernelHash;
|
|
};
|
|
|
|
kernelPatches = lib.optionals hasPatch [
|
|
kernelPatchSrc
|
|
(patch ./bluetooth.patch)
|
|
]
|
|
++ builtins.map (name: {
|
|
inherit name;
|
|
patch = "${inputs.linux-tkg}/linux-tkg-patches/${mm}/${name}.patch";
|
|
}) tkgPatches
|
|
++ [ ];
|
|
}
|