summary refs log blame commit diff
path: root/pkgs/os-specific/linux/kernel/mainline.nix
blob: 50053e620e46630f272b457f2b4c16331e63cd68 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                                                    
{ branch, lib, fetchurl, buildLinux, ... } @ args:

let
  allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json);
  thisKernel = allKernels.${branch};

  args' = (builtins.removeAttrs args ["branch"]) // rec {
    inherit (thisKernel) version;
    modDirVersion = lib.versions.pad 3 version;
    extraMeta.branch = branch;

    src = fetchurl {
      url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
      sha256 = thisKernel.hash;
    };
  } // (args.argsOverride or {});
in
buildLinux args'