Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
43 lines
918 B
Nix
43 lines
918 B
Nix
let
|
|
allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json);
|
|
in
|
|
|
|
{
|
|
branch,
|
|
lib,
|
|
fetchurl,
|
|
fetchzip,
|
|
buildLinux,
|
|
...
|
|
}@args:
|
|
|
|
let
|
|
thisKernel = allKernels.${branch};
|
|
inherit (thisKernel) version;
|
|
|
|
src =
|
|
# testing kernels are a special case because they don't have tarballs on the CDN
|
|
if branch == "testing" then
|
|
fetchzip {
|
|
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
|
|
inherit (thisKernel) hash;
|
|
}
|
|
else
|
|
fetchurl {
|
|
url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
|
|
inherit (thisKernel) hash;
|
|
};
|
|
|
|
args' =
|
|
(removeAttrs args [ "branch" ])
|
|
// {
|
|
inherit src version;
|
|
isLTS = thisKernel.lts;
|
|
|
|
modDirVersion = lib.versions.pad 3 version;
|
|
extraMeta.branch = branch;
|
|
}
|
|
// (args.argsOverride or { });
|
|
in
|
|
buildLinux args'
|