2023-01-21 09:41:31 +01:00
|
|
|
{
|
|
|
|
prsJSON,
|
|
|
|
nixpkgs,
|
|
|
|
}: let
|
|
|
|
pkgs = import nixpkgs {};
|
|
|
|
prs = builtins.fromJSON (builtins.readFile prsJSON);
|
2023-03-03 10:13:30 +01:00
|
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
2023-03-02 12:43:11 +01:00
|
|
|
nixpkgs_version = ["master"];
|
2023-01-21 09:41:31 +01:00
|
|
|
mkJobsets = system: version:
|
2023-04-08 12:40:09 +01:00
|
|
|
(builtins.listToAttrs (
|
|
|
|
map (
|
|
|
|
info: {
|
2023-04-08 11:31:26 +01:00
|
|
|
name = "${system}-${version}-pr${toString info.number}";
|
2023-01-21 11:06:21 +01:00
|
|
|
value = {
|
2023-04-08 12:40:09 +01:00
|
|
|
enabled = info.state == "open";
|
|
|
|
hidden = info.state != "open";
|
2023-04-08 11:31:26 +01:00
|
|
|
description = "PR ${toString info.number} (${system}-${version}): ${info.title}";
|
2023-01-21 11:06:21 +01:00
|
|
|
nixexprinput = "nix-packages";
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-04-08 13:47:45 +01:00
|
|
|
checkinterval = 3600;
|
2023-01-21 11:06:21 +01:00
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 1;
|
2023-04-08 13:45:49 +01:00
|
|
|
inputs = {
|
|
|
|
nix-packages = {
|
|
|
|
type = "git";
|
2023-04-08 13:50:36 +01:00
|
|
|
value = "${info.head.repo.clone_url} ${info.head.ref}";
|
2023-04-08 13:45:49 +01:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
nixpkgs = {
|
|
|
|
type = "git";
|
|
|
|
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
system = {
|
|
|
|
type = "string";
|
|
|
|
value = system;
|
|
|
|
};
|
|
|
|
gitea_status_repo = {
|
|
|
|
type = "string";
|
|
|
|
value = "nix-packages";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_owner = {
|
|
|
|
type = "string";
|
|
|
|
value = "${info.head.repo.owner.login}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_name = {
|
|
|
|
type = "string";
|
|
|
|
value = "${info.head.repo.name}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2023-01-21 09:41:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2023-04-08 12:40:09 +01:00
|
|
|
)
|
|
|
|
prs
|
|
|
|
))
|
2023-01-21 09:41:31 +01:00
|
|
|
// {
|
2023-01-21 11:06:21 +01:00
|
|
|
"${system}-${version}" = {
|
2023-01-21 09:41:31 +01:00
|
|
|
enabled = 1;
|
|
|
|
hidden = false;
|
|
|
|
description = "nix-packages ${system}-${version}";
|
|
|
|
nixexprinput = "nix-packages";
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-01-23 15:36:56 +01:00
|
|
|
checkinterval = 0;
|
2023-01-21 09:41:31 +01:00
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 1;
|
|
|
|
inputs = {
|
|
|
|
nix-packages = {
|
|
|
|
type = "git";
|
2023-04-08 11:31:26 +01:00
|
|
|
value = "https://git.chir.rs/darkkirb/nix-packages main";
|
2023-01-21 09:41:31 +01:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
nixpkgs = {
|
|
|
|
type = "git";
|
|
|
|
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
system = {
|
|
|
|
type = "string";
|
|
|
|
value = system;
|
|
|
|
};
|
2023-04-08 11:31:26 +01:00
|
|
|
gitea_status_repo = {
|
|
|
|
type = "string";
|
|
|
|
value = "nix-packages";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_owner = {
|
|
|
|
type = "string";
|
|
|
|
value = "darkkirb";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_name = {
|
|
|
|
type = "string";
|
2023-04-08 19:31:00 +01:00
|
|
|
value = "nix-packages";
|
2023-04-08 11:31:26 +01:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2023-01-21 09:41:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-01-21 11:06:21 +01:00
|
|
|
concatAttrs = pkgs.lib.foldr (a: b: a // b) {};
|
2023-01-21 09:41:31 +01:00
|
|
|
|
2023-01-23 15:36:56 +01:00
|
|
|
jobsets =
|
2023-04-08 11:31:26 +01:00
|
|
|
concatAttrs (pkgs.lib.concatMap (system: map (version: mkJobsets system version) nixpkgs_version) systems);
|
2023-01-21 09:41:31 +01:00
|
|
|
in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);}
|