33 lines
841 B
Nix
33 lines
841 B
Nix
|
{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)
|