3
0
Fork 0
forked from mirrors/nixpkgs

nixos/corerad: use passAsFile while converting settings JSON to TOML

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher 2020-06-14 13:30:17 -04:00
parent 13231517a2
commit 562beabff3
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94

View file

@ -6,9 +6,11 @@ let
cfg = config.services.corerad; cfg = config.services.corerad;
writeTOML = name: x: writeTOML = name: x:
pkgs.runCommandNoCCLocal name { } '' pkgs.runCommandNoCCLocal name {
echo '${builtins.toJSON x}' | ${pkgs.go-toml}/bin/jsontoml > $out passAsFile = ["config"];
''; config = builtins.toJSON x;
buildInputs = [ pkgs.go-toml ];
} "jsontoml < $configPath > $out";
in { in {
meta.maintainers = with maintainers; [ mdlayher ]; meta.maintainers = with maintainers; [ mdlayher ];