feat(generator): add Mustache

This commit is contained in:
asimon 2026-01-25 12:10:27 +01:00
parent 7e3efd400c
commit 26e79ede19
6 changed files with 28 additions and 1 deletions

View file

@ -100,6 +100,21 @@
} ''
python ${renderScript} > $out
'';
mustache = {
name,
opts,
data,
}: let
inherit (opts) template;
mustache = opts.mustache or pkgs.mustache-go;
dataJson = writeText "template-data.json" (builtins.toJSON data);
in
runCommand name {
buildInputs = [mustache];
} ''
mustache ${dataJson} ${template} > $out
'';
};
buildAllFiles = files: