crane/lib/writeTOML.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
289 B
Nix
Raw Normal View History

2022-06-03 05:49:44 +03:00
{ pkgsBuildBuild
2021-12-30 06:26:55 +03:00
}:
let
inherit (pkgsBuildBuild)
remarshal
runCommand;
in
2022-06-01 18:45:40 +03:00
name: contents: runCommand name
{
contents = builtins.toJSON contents;
passAsFile = [ "contents" ];
nativeBuildInputs = [ remarshal ];
2022-06-01 18:45:40 +03:00
} ''
remarshal -i $contentsPath -if json -of toml -o $out
''