dn42-registry: init

This commit is contained in:
Astro 2019-11-03 22:38:47 +01:00
parent 3243b46104
commit b3937973fe
2 changed files with 39 additions and 0 deletions

31
dn42-registry.nix Normal file
View File

@ -0,0 +1,31 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
check = name: arg: stdenv.mkDerivation {
inherit name;
src = <registry>;
phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
patchPhase = "patchShebangs utils";
installPhase = "touch $out";
buildInputs = [ python3 ];
doCheck = true;
checkPhase = ''
./check-my-stuff ${arg}
'';
};
mntners = builtins.attrNames (
lib.filterAttrs (_: t: t == "regular") (
builtins.readDir (<registry> + "/data/mntner")
)
);
mntnerJobs = builtins.listToAttrs (
map (mntner: rec {
name = "mntner-${mntner}";
value = lib.hydraJob (check name mntner);
}) mntners
);
in
mntnerJobs // {
all = lib.hydraJob (check "all" "--all");
}

View File

@ -101,6 +101,14 @@ let
tracer = "https://github.com/nek0/tracer.git master 1";
};
};
dn42-registry = mkJobset {
description = "dn42 registry checks";
nixexprpath = "dn42-registry.nix";
gitUrls = {
registry = "https://git.dn42.us/dn42/registry.git";
};
};
};
jobsetsJson = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets );