From f82a3ef77e21cac7f426c5bf0928edbdf3e894a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Thu, 26 Dec 2024 17:07:53 +0100 Subject: [PATCH] remove deleted targets --- default.nix | 162 +++++++++++++++++++++++++++------------------------- spec.json | 10 ---- 2 files changed, 84 insertions(+), 88 deletions(-) diff --git a/default.nix b/default.nix index bb6fe60..870e4fa 100644 --- a/default.nix +++ b/default.nix @@ -1,18 +1,20 @@ { nixpkgs, - extra-math-prs, - rand-testsuite-prs, rust-template-prs, -}: let - pkgs = import nixpkgs {}; - prs = with pkgs.lib; - concatLists (map (f: attrValues (builtins.fromJSON (builtins.readFile f))) [ - extra-math-prs - rand-testsuite-prs - rust-template-prs - ]); - prJobsets = with pkgs.lib; - listToAttrs (map (pr: { +}: +let + pkgs = import nixpkgs { }; + prs = + with pkgs.lib; + concatLists ( + map (f: attrValues (builtins.fromJSON (builtins.readFile f))) [ + rust-template-prs + ] + ); + prJobsets = + with pkgs.lib; + listToAttrs ( + map (pr: { name = "${pr.base.repo.name}-pr${toString pr.number}"; value = { enabled = pr.state == "open"; @@ -21,10 +23,7 @@ nixexprinput = "component"; nixexprpath = "default.nix"; checkinterval = 3600; - schedulingshares = - if pr.user.id == 1 - then 100 - else 10; + schedulingshares = if pr.user.id == 1 then 100 else 10; enableemail = false; emailoverride = ""; keepnr = 1; @@ -37,70 +36,77 @@ }; } // ( - if hasPrefix "https://git.chir.rs/" pr.head.repo.clone_url - then { - gitea_status_repo = { - type = "string"; - value = "component"; - emailresponsible = false; - }; - gitea_repo_owner = { - type = "string"; - value = head (splitString "/" pr.head.repo.full_name); - emailresponsible = false; - }; - gitea_repo_name = { - type = "string"; - value = pr.head.repo.name; - emailresponsible = false; - }; - } - else {} + if hasPrefix "https://git.chir.rs/" pr.head.repo.clone_url then + { + gitea_status_repo = { + type = "string"; + value = "component"; + emailresponsible = false; + }; + gitea_repo_owner = { + type = "string"; + value = head (splitString "/" pr.head.repo.full_name); + emailresponsible = false; + }; + gitea_repo_name = { + type = "string"; + value = pr.head.repo.name; + emailresponsible = false; + }; + } + else + { } ); }; - }) - prs); - projectJobsets = with pkgs.lib; - listToAttrs (map (repo: { - name = repo; - value = { - enabled = true; - visible = true; - description = repo; - nixexprinput = "component"; - nixexprpath = "default.nix"; - checkinterval = 3600; - schedulingshares = 100; - enableemail = false; - emailoverride = ""; - keepnr = 1; - inputs = { - component = { - type = "git"; - value = "https://git.chir.rs/ProcyOS/${repo} main"; - emailresponsible = false; - }; - gitea_status_repo = { - type = "string"; - value = "component"; - emailresponsible = false; - }; - gitea_repo_owner = { - type = "string"; - value = "ProcyOS"; - emailresponsible = false; - }; - gitea_repo_name = { - type = "string"; - value = repo; - emailresponsible = false; + }) prs + ); + projectJobsets = + with pkgs.lib; + listToAttrs ( + map + (repo: { + name = repo; + value = { + enabled = true; + visible = true; + description = repo; + nixexprinput = "component"; + nixexprpath = "default.nix"; + checkinterval = 3600; + schedulingshares = 100; + enableemail = false; + emailoverride = ""; + keepnr = 1; + inputs = { + component = { + type = "git"; + value = "https://git.chir.rs/ProcyOS/${repo} main"; + emailresponsible = false; + }; + gitea_status_repo = { + type = "string"; + value = "component"; + emailresponsible = false; + }; + gitea_repo_owner = { + type = "string"; + value = "ProcyOS"; + emailresponsible = false; + }; + gitea_repo_name = { + type = "string"; + value = repo; + emailresponsible = false; + }; }; }; - }; - }) [ - "extra_math" - "rand_testsuite" - "rust-template" - ]); + }) + [ + "rust-template" + ] + ); jobsets = prJobsets // projectJobsets; -in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);} +in +{ + jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets); +} diff --git a/spec.json b/spec.json index c057d55..67be2ab 100644 --- a/spec.json +++ b/spec.json @@ -35,16 +35,6 @@ "value": "ci", "emailresponsible": false }, - "extra-math-prs": { - "type": "giteapulls", - "value": "git.chir.rs ProcyOS extra_math", - "emailresponsible": false - }, - "rand-testsuite-prs": { - "type": "giteapulls", - "value": "git.chir.rs ProcyOS rand_testsuite", - "emailresponsible": false - }, "rust-template-prs": { "type": "giteapulls", "value": "git.chir.rs ProcyOS rust-template",