summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/5pkgs/builders.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix
index dcd49fc10..da7052f38 100644
--- a/krebs/5pkgs/builders.nix
+++ b/krebs/5pkgs/builders.nix
@@ -231,6 +231,17 @@ rec {
'';
};
+ writeJq = name: src: pkgs.runCommand name {} /* sh */ ''
+ name=${assert types.filename.check name; name}
+ src=${shell.escape src}
+
+ # syntax check
+ printf '%s' "$src" > src.jq
+ ${pkgs.jq}/bin/jq -f src.jq < /dev/null
+
+ cp src.jq "$out"
+ '';
+
writeNixFromCabal =
trace (toString [
"The function `writeNixFromCabal` has been deprecated in favour of"