chore(module): slim down pipeline yaml generation even more

This commit is contained in:
technofab 2025-02-28 12:53:17 +01:00
parent 7a40a68a10
commit 060d8fad47

View file

@ -164,12 +164,7 @@
# NOTE: json is also valid yaml and this removes dependency on jq
# and/or remarshal (used in pkgs.formats.json and pkgs.formats.yaml
# respectively)
toYaml = name: value:
pkgs.runCommand name {} ''
cat <<'EOT' > $out
${builtins.toJSON value}
EOT
'';
toYaml = name: value: builtins.toFile name (builtins.toJSON value);
mapAttrs = cb: set: builtins.listToAttrs (builtins.map (key: cb key (builtins.getAttr key set)) (builtins.attrNames set));
prepend = key: arr: job:
job