2 allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json);
5 { branch, lib, fetchurl, fetchzip, buildLinux, ... } @ args:
8 thisKernel = allKernels.${branch};
9 inherit (thisKernel) version;
12 # testing kernels are a special case because they don't have tarballs on the CDN
13 if branch == "testing"
15 url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
16 inherit (thisKernel) hash;
19 url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
20 inherit (thisKernel) hash;
23 args' = (builtins.removeAttrs args ["branch"]) // {
26 modDirVersion = lib.versions.pad 3 version;
27 extraMeta.branch = branch;
28 } // (args.argsOverride or {});