2023-01-21 08:41:31 +00:00
|
|
|
|
{
|
|
|
|
|
prsJSON,
|
|
|
|
|
nixpkgs,
|
|
|
|
|
}: let
|
|
|
|
|
pkgs = import nixpkgs {};
|
|
|
|
|
prs = builtins.fromJSON (builtins.readFile prsJSON);
|
2023-03-03 09:13:30 +00:00
|
|
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
2023-03-02 11:43:11 +00:00
|
|
|
|
nixpkgs_version = ["master"];
|
2023-01-21 08:41:31 +00:00
|
|
|
|
mkJobsets = system: version:
|
2023-01-21 10:06:21 +00:00
|
|
|
|
(pkgs.lib.mapAttrs' (
|
2023-01-21 08:41:31 +00:00
|
|
|
|
num: info: {
|
2023-01-21 10:06:21 +00:00
|
|
|
|
name = "${system}-${version}-pr${num}";
|
|
|
|
|
value = {
|
|
|
|
|
enabled = 1;
|
|
|
|
|
hidden = false;
|
|
|
|
|
description = "PR ${num} (${system}-${version}): ${info.title}";
|
|
|
|
|
nixexprinput = "nix-packages";
|
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-01-23 14:36:56 +00:00
|
|
|
|
checkinterval =
|
|
|
|
|
if info.head.repo.owner.login == "darkkirb" && info.head.repo.name == "nix-packages" # Don’t need to manually check
|
|
|
|
|
then 0
|
|
|
|
|
else 300;
|
2023-01-21 10:06:21 +00:00
|
|
|
|
schedulingshares = 100;
|
|
|
|
|
enableemail = false;
|
|
|
|
|
emailoverride = "";
|
|
|
|
|
keepnr = 1;
|
|
|
|
|
inputs = {
|
|
|
|
|
nix-packages = {
|
|
|
|
|
type = "git";
|
|
|
|
|
value = "https://github.com/${info.head.repo.owner.login}/${info.head.repo.name}.git ${info.head.ref}";
|
|
|
|
|
emailresponsible = false;
|
|
|
|
|
};
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
type = "git";
|
|
|
|
|
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
|
|
|
|
emailresponsible = false;
|
|
|
|
|
};
|
|
|
|
|
system = {
|
|
|
|
|
type = "string";
|
|
|
|
|
value = system;
|
|
|
|
|
};
|
2023-01-21 08:41:31 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
prs)
|
|
|
|
|
// {
|
2023-01-21 10:06:21 +00:00
|
|
|
|
"${system}-${version}" = {
|
2023-01-21 08:41:31 +00:00
|
|
|
|
enabled = 1;
|
|
|
|
|
hidden = false;
|
|
|
|
|
description = "nix-packages ${system}-${version}";
|
|
|
|
|
nixexprinput = "nix-packages";
|
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-01-23 14:36:56 +00:00
|
|
|
|
checkinterval = 0;
|
2023-01-21 08:41:31 +00:00
|
|
|
|
schedulingshares = 100;
|
|
|
|
|
enableemail = false;
|
|
|
|
|
emailoverride = "";
|
|
|
|
|
keepnr = 1;
|
|
|
|
|
inputs = {
|
|
|
|
|
nix-packages = {
|
|
|
|
|
type = "git";
|
|
|
|
|
value = "https://github.com/DarkKirb/nix-packages.git main";
|
|
|
|
|
emailresponsible = false;
|
|
|
|
|
};
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
type = "git";
|
|
|
|
|
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
|
|
|
|
emailresponsible = false;
|
|
|
|
|
};
|
|
|
|
|
system = {
|
|
|
|
|
type = "string";
|
|
|
|
|
value = system;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-01-21 10:06:21 +00:00
|
|
|
|
concatAttrs = pkgs.lib.foldr (a: b: a // b) {};
|
2023-01-21 08:41:31 +00:00
|
|
|
|
|
2023-01-23 14:36:56 +00:00
|
|
|
|
jobsets =
|
2023-01-24 13:02:07 +00:00
|
|
|
|
(concatAttrs (pkgs.lib.concatMap (system: map (version: mkJobsets system version) nixpkgs_version) systems))
|
2023-01-23 14:36:56 +00:00
|
|
|
|
// {
|
2023-01-26 08:50:42 +00:00
|
|
|
|
nix-packages-flake = {
|
2023-01-23 14:36:56 +00:00
|
|
|
|
enabled = 1;
|
|
|
|
|
hidden = false;
|
|
|
|
|
description = "nix-packages flake";
|
|
|
|
|
nixexprinput = "nix-packages";
|
|
|
|
|
nixexprpath = "hydra/parse-flake.nix";
|
|
|
|
|
checkinterval = 0;
|
|
|
|
|
schedulingshares = 100;
|
|
|
|
|
enableemail = false;
|
|
|
|
|
emailoverride = "";
|
|
|
|
|
keepnr = 1;
|
|
|
|
|
inputs = {
|
|
|
|
|
flake = {
|
|
|
|
|
type = "git";
|
|
|
|
|
value = "https://github.com/DarkKirb/nix-packages.git main";
|
|
|
|
|
emailresponsible = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-01-21 08:41:31 +00:00
|
|
|
|
in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);}
|