diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index 46a0dfcfcfe9..9478a11f83f6 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -461,16 +461,16 @@ optionalAttrs allowAliases aliases generate = name: value: pkgs.callPackage ( - { runCommand, remarshal }: + { runCommand, yj }: runCommand name { - nativeBuildInputs = [ remarshal ]; + nativeBuildInputs = [ yj ]; value = builtins.toJSON value; passAsFile = [ "value" ]; preferLocalBuild = true; } '' - json2toml "$valuePath" "$out" + yj -jt < "$valuePath" > "$out" '' ) { }; diff --git a/pkgs/pkgs-lib/tests/formats.nix b/pkgs/pkgs-lib/tests/formats.nix index c50a92174436..d51b5d2f272b 100644 --- a/pkgs/pkgs-lib/tests/formats.nix +++ b/pkgs/pkgs-lib/tests/formats.nix @@ -701,6 +701,8 @@ runBuildTests { [attrs] foo = "foo" + [level1] + [level1.level2] [level1.level2.level3] level4 = "deep" '';