mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
Merge pull request #90380 from mdlayher/mdl-corerad-passasfile
nixos/corerad: use passAsFile while converting settings JSON to TOML
This commit is contained in:
commit
4c67f879f0
@ -6,9 +6,11 @@ let
|
||||
cfg = config.services.corerad;
|
||||
|
||||
writeTOML = name: x:
|
||||
pkgs.runCommandNoCCLocal name { } ''
|
||||
echo '${builtins.toJSON x}' | ${pkgs.go-toml}/bin/jsontoml > $out
|
||||
'';
|
||||
pkgs.runCommandNoCCLocal name {
|
||||
passAsFile = ["config"];
|
||||
config = builtins.toJSON x;
|
||||
buildInputs = [ pkgs.go-toml ];
|
||||
} "jsontoml < $configPath > $out";
|
||||
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ mdlayher ];
|
||||
|
Loading…
Reference in New Issue
Block a user