new: output-template interpolates output values into config file

This commit is contained in:
Daniel Barlow
2024-08-10 23:06:47 +01:00
parent 2480fdef5b
commit ba21384fde
15 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{
fetchurl,
writeFennel,
fennel,
runCommand,
lua,
anoia,
linotify,
lualinux,
stdenv
}:
let name = "output-template";
in stdenv.mkDerivation {
inherit name;
src = ./.;
buildInputs = [lua];
doCheck = true;
buildPhase = ''
cp -p ${writeFennel name {
packages = [
anoia
lualinux
linotify
] ;
mainFunction = "run";
} ./output-template.fnl } ${name}
'';
checkPhase = "make check";
installPhase = ''
install -D ${name} $out/bin/${name}
'';
}