Fix yq yaml conversion

This commit is contained in:
Sridhar Ratnakumar 2023-06-09 16:06:21 -04:00
parent 00389cd1cd
commit 7f624ce916

View File

@ -107,8 +107,8 @@ in
lib.pipe attrs [ f f ];
toYAMLFile =
attrs:
pkgs.runCommand "toYamlFile" { buildInputs = [ pkgs.yq-go ]; } ''
yq -P '.' ${pkgs.writeTextFile { name = "process-compose-${name}.json"; text = (builtins.toJSON attrs); }} > $out
pkgs.runCommand "${name}.yaml" { buildInputs = [ pkgs.yq-go ]; } ''
yq -oy -P '.' ${pkgs.writeTextFile { name = "process-compose-${name}.json"; text = (builtins.toJSON attrs); }} > $out
'';
in
toYAMLFile (removeNullAndEmptyAttrs config.settings);