writeJSON: pretty-print output

This commit is contained in:
tv 2017-07-23 09:11:14 +02:00
parent 5762d12265
commit ccc7601a0e

View File

@ -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 [