Merge pull request #89744 from vojta001/traefik-indent-config

traefik: unify TOML generation
This commit is contained in:
Alyssa Ross 2020-06-19 15:23:55 +00:00 committed by GitHub
commit 4e69b0a899
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,10 +20,10 @@ let
in valueType; in valueType;
dynamicConfigFile = if cfg.dynamicConfigFile == null then dynamicConfigFile = if cfg.dynamicConfigFile == null then
pkgs.runCommand "config.toml" { pkgs.runCommand "config.toml" {
buildInputs = [ pkgs.remarshal ]; buildInputs = [ pkgs.yj ];
preferLocalBuild = true; preferLocalBuild = true;
} '' } ''
remarshal -if json -of toml \ yj -jt -i \
< ${ < ${
pkgs.writeText "dynamic_config.json" pkgs.writeText "dynamic_config.json"
(builtins.toJSON cfg.dynamicConfigOptions) (builtins.toJSON cfg.dynamicConfigOptions)