diff options
author | tv <tv@krebsco.de> | 2017-07-23 09:11:14 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-07-23 09:11:14 +0200 |
commit | ccc7601a0e95d8adccf3a4a7db837aa9f1b3b3a6 (patch) | |
tree | 2147a9b74963a9fe59150733fb011c9dcc064aae /krebs | |
parent | 5762d122657217f964f4898d9f178ec2f843176a (diff) |
writeJSON: pretty-print output
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/5pkgs/writers.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix index c4fb8cd83..49ca3557e 100644 --- a/krebs/5pkgs/writers.nix +++ b/krebs/5pkgs/writers.nix @@ -262,7 +262,12 @@ with import <stockholm/lib>; }; }; - writeJSON = name: value: pkgs.writeText name (toJSON value); + writeJSON = name: value: pkgs.runCommand name { + json = toJSON value; + passAsFile = [ "json" ]; + } /* sh */ '' + ${pkgs.jq}/bin/jq . "$jsonPath" > "$out" + ''; writeNixFromCabal = trace (toString [ |