add slidenado

This commit is contained in:
Astro 2019-09-12 17:14:55 +02:00
parent 51c3bcb1ca
commit 39471c126e
2 changed files with 62 additions and 0 deletions

View File

@ -91,6 +91,36 @@ let
};
};
slidenado = {
enabled = 1;
hidden = false;
description = "CmS slide generator";
nixexprinput = "hydra-config";
nixexprpath = "slidenado.nix";
checkinterval = 300;
schedulingshares = 100;
enableemail = true;
emailoverride = "astro@spaceboyz.net";
keepnr = 3;
inputs = {
slidenado = {
type = "git";
value = "https://github.com/c3d2/slidenado.git master 1";
emailresponsible = false;
};
hydra-config = {
type = "git";
value = "https://gitea.c3d2.de/C3D2/hydra-config.git master 1";
emailresponsible = false;
};
nixpkgs = {
type = "git";
value = "git://github.com/NixOS/nixpkgs.git release-19.09 1";
emailresponsible = false;
};
};
};
};
jobsetsJson = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets );

32
slidenado.nix Normal file
View File

@ -0,0 +1,32 @@
{pkgs ? import <nixpkgs> {},
}:
with pkgs;
let
presentations =
map (match: builtins.elemAt match 0)
(builtins.filter (match: match != null)
(map (builtins.match "(.+)\.tex")
(builtins.attrNames
(lib.filterAttrs (name: type: type == "regular")
(builtins.readDir <slidenado/presentations>)
))));
presentation = name:
stdenv.mkDerivation {
name = "slidenado-${name}";
buildInputs = [ texlive.combined.scheme-basic ];
makeFlags = [ "${name}.pdf" ];
postInstall = ''
mkdir -p $out/nix-support
cp ${name}.pdf $out/
echo doc-pdf slides $out/${name}.pdf >> $out/nix-support/hydra-build-products
'';
};
in
builtins.listToAttrs
(map (name: {
inherit name;
value = lib.hydraJob (presentation name);
}) presentations)