maintainers: remove email for amuckstot30 (#360059)
[NixPkgs.git] / pkgs / os-specific / linux / kernel / mainline.nix
blob862ba8e8ddcce3f9c4d9adc710fc6720ae57db9b
1 let
2   allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json);
3 in
5 { branch, lib, fetchurl, fetchzip, buildLinux, ... } @ args:
7 let
8   thisKernel = allKernels.${branch};
9   inherit (thisKernel) version;
11   src =
12     # testing kernels are a special case because they don't have tarballs on the CDN
13     if branch == "testing"
14       then fetchzip {
15         url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
16         inherit (thisKernel) hash;
17       }
18       else fetchurl {
19         url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
20         inherit (thisKernel) hash;
21       };
23   args' = (builtins.removeAttrs args ["branch"]) // {
24     inherit src version;
26     modDirVersion = lib.versions.pad 3 version;
27     extraMeta.branch = branch;
28   } // (args.argsOverride or {});
30 buildLinux args'