formats.yaml_1_1: use remarshal v2
This commit is contained in:
@@ -477,7 +477,11 @@ recurseIntoAttrs {
|
||||
|
||||
yaml = expectDataEqual {
|
||||
file = writeYAML "data.yaml" { hello = "world"; };
|
||||
expected = "hello: world\n";
|
||||
expected = ''
|
||||
%YAML 1.1
|
||||
---
|
||||
hello: world
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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"''
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user