diff options
author | tv <tv@krebsco.de> | 2016-07-03 20:46:48 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-07-03 20:46:48 +0200 |
commit | 3d0f7724cc102c8ba5a1811e62d4a39eb8be2e41 (patch) | |
tree | 24c0416a753c8088a9f5bb2f6853df64c5dc14bb | |
parent | 7f0ea39a978fb02b4b165e82051f83273093a94c (diff) |
writeJq: init
-rw-r--r-- | krebs/5pkgs/builders.nix | 11 |
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" |