44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ fetchFromGitHub, inputs, lib }:
|
|
let
|
|
version = "6.15.6";
|
|
kernelHash = "0r4ppfd5kwvj24bjig92hxa18lmjgy9gqvh5qknfffw08wjrd1km";
|
|
kernelPatchHash = "1cc7y3llnf50fb0vqa4689hybfgpyzd93s2w3lxyaxbpvll71snv";
|
|
|
|
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
|
|
]
|
|
++ builtins.map (name: {
|
|
inherit name;
|
|
patch = "${inputs.linux-tkg}/linux-tkg-patches/${mm}/${name}.patch";
|
|
}) tkgPatches
|
|
++ [ ];
|
|
}
|