diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix index e39681865ab2..996aaa01e9af 100644 --- a/pkgs/build-support/writers/test.nix +++ b/pkgs/build-support/writers/test.nix @@ -477,7 +477,11 @@ recurseIntoAttrs { yaml = expectDataEqual { file = writeYAML "data.yaml" { hello = "world"; }; - expected = "hello: world\n"; + expected = '' + %YAML 1.1 + --- + hello: world + ''; }; }; diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index e5f941af3770..a38b92f9444f 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -167,16 +167,16 @@ optionalAttrs allowAliases aliases generate = name: value: pkgs.callPackage ( - { runCommand, remarshal_0_17 }: + { runCommand, remarshal }: runCommand name { - nativeBuildInputs = [ remarshal_0_17 ]; + nativeBuildInputs = [ remarshal ]; inherit value; preferLocalBuild = true; __structuredAttrs = true; } '' - json2yaml ${ + remarshal --from json --to yaml-1.1 ${ # attributes with null values are omitted from the JSON with structured attrs # yaml_1_1Null test keeps this in check if value == null then ''<(echo "null")'' else ''--unwrap value "$NIX_ATTRS_JSON_FILE"'' diff --git a/pkgs/pkgs-lib/tests/formats.nix b/pkgs/pkgs-lib/tests/formats.nix index b03b44c99150..56ce50ed6953 100644 --- a/pkgs/pkgs-lib/tests/formats.nix +++ b/pkgs/pkgs-lib/tests/formats.nix @@ -168,6 +168,8 @@ runBuildTests { time = "22:30:00"; }; expected = '' + %YAML 1.1 + --- attrs: foo: null 'false': false @@ -188,8 +190,9 @@ runBuildTests { format = formats.yaml_1_1 { }; input = null; expected = '' - null - ... + %YAML 1.1 + --- + null ''; }; diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index 47b2133368b3..51407db2654f 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -54,7 +54,7 @@ let meta.description = "Release-critical packages from the python package sets"; constituents = [ jobs.nixos-render-docs.x86_64-linux # Used in nixos manual - jobs.remarshal_0_17.x86_64-linux # Used in pkgs.formats.yaml_1_1 + jobs.remarshal.x86_64-linux # Used in pkgs.formats.yaml_1_1 jobs.python313Packages.afdko.x86_64-linux # Used in noto-fonts-color-emoji jobs.python313Packages.buildcatrust.x86_64-linux # Used in pkgs.cacert jobs.python313Packages.colorama.x86_64-linux # Used in nixos test-driver