diff --git a/nixos/modules/services/networking/knot-resolver.nix b/nixos/modules/services/networking/knot-resolver.nix index d943b29b5b73..4aa8d47f110a 100644 --- a/nixos/modules/services/networking/knot-resolver.nix +++ b/nixos/modules/services/networking/knot-resolver.nix @@ -10,17 +10,17 @@ let configFile = pkgs.callPackage ( { runCommandLocal, - remarshal_0_17, + remarshal, stdenv, }: runCommandLocal "knot-resolver.yaml" { - nativeBuildInputs = [ remarshal_0_17 ]; + nativeBuildInputs = [ remarshal ]; value = builtins.toJSON cfg.settings; passAsFile = [ "value" ]; } '' - json2yaml "$valuePath" "$out" + remarshal --from json --to yaml-1.1 "$valuePath" "$out" ${ # We skip validation if the build platform cannot execute # the binary targeting the host platform. lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' diff --git a/nixos/tests/web-apps/dashy.nix b/nixos/tests/web-apps/dashy.nix index d83c14d3294f..d54b08d60b3a 100644 --- a/nixos/tests/web-apps/dashy.nix +++ b/nixos/tests/web-apps/dashy.nix @@ -18,7 +18,7 @@ let ]; }; - customSettingsYaml = (pkgs.formats.yaml_1_1 { }).generate "custom-conf.yaml" customSettings; + customSettingsYaml = (pkgs.formats.yaml_1_2 { }).generate "custom-conf.yaml" customSettings; in { name = "dashy"; 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/by-name/da/dashy-ui/package.nix b/pkgs/by-name/da/dashy-ui/package.nix index 70f4ce154563..a01e848d696a 100644 --- a/pkgs/by-name/da/dashy-ui/package.nix +++ b/pkgs/by-name/da/dashy-ui/package.nix @@ -11,7 +11,7 @@ nixosTests, nodejs_24, nodejs-slim_24, - remarshal_0_17, + remarshal, nix-update-script, settings ? { }, }: @@ -68,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { yarnBuildHook nodejs_24 # For yaml conversion - remarshal_0_17 + remarshal ]; doDist = false; meta = { diff --git a/pkgs/by-name/re/remarshal_0_17/package.nix b/pkgs/by-name/re/remarshal_0_17/package.nix deleted file mode 100644 index a4109bad5238..000000000000 --- a/pkgs/by-name/re/remarshal_0_17/package.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - lib, - python3Packages, - fetchFromGitHub, - fetchPypi, - fetchpatch, -}: - -let - packageOverrides = self: super: { - tomlkit = super.tomlkit.overridePythonAttrs (oldAttrs: rec { - version = "0.12.5"; - src = fetchPypi { - pname = "tomlkit"; - inherit version; - hash = "sha256-7vNPujmDTU1rc8m6fz5NHEF6Tlb4mn6W4JDdDSS4+zw="; - }; - patches = [ - (fetchpatch { - url = "https://github.com/python-poetry/tomlkit/commit/05d9be1c2b2a95a4eb3a53d999f1483dd7abae5a.patch"; - hash = "sha256-9pLGxcGHs+XoKrqlh7Q0dyc07XrK7J6u2T7Kvfd0ICc="; - excludes = [ ".github/workflows/tests.yml" ]; - }) - ]; - }); - }; - python = python3Packages.python.override (old: { - self = python3Packages.python; - packageOverrides = lib.composeExtensions (old.packageOverrides or (_: _: { })) packageOverrides; - }); - pythonPackages = python.pkgs; -in -pythonPackages.buildPythonApplication (finalAttrs: { - pname = "remarshal"; - version = "0.17.1"; # last version with YAML 1.1 support, do not update - pyproject = true; - - __structuredAttrs = true; - - src = fetchFromGitHub { - owner = "remarshal-project"; - repo = "remarshal"; - tag = "v${finalAttrs.version}"; - hash = "sha256-2WxMh5P/8NvElymnMU3JzQU0P4DMXFF6j15OxLaS+VA="; - }; - - pythonRemoveDeps = [ "pytest" ]; - - build-system = [ pythonPackages.poetry-core ]; - - dependencies = with pythonPackages; [ - cbor2 - colorama - python-dateutil - pyyaml - rich-argparse - ruamel-yaml - tomlkit - u-msgpack-python - ]; - - pythonRelaxDeps = [ "cbor2" ]; - - nativeCheckInputs = [ pythonPackages.pytestCheckHook ]; - - # nixpkgs-update: no auto update - - meta = { - changelog = "https://github.com/remarshal-project/remarshal/releases/tag/${finalAttrs.src.tag}"; - description = "Convert between TOML, YAML and JSON"; - license = lib.licenses.mit; - homepage = "https://github.com/remarshal-project/remarshal"; - maintainers = with lib.maintainers; [ hexa ]; - mainProgram = "remarshal"; - }; -}) 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/aliases.nix b/pkgs/top-level/aliases.nix index 73efb15c4bc4..8f4da2320b2d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2084,6 +2084,7 @@ mapAliases { redpanda = throw "'redpanda' has been renamed to/replaced by 'redpanda-client'"; # Converted to throw 2025-10-27 redshift-plasma-applet = throw "'redshift-plasma-applet' has been removed as it is obsolete and lacks maintenance upstream."; # Added 2025-11-09 reiserfsprogs = throw "'reiserfsprogs' has been removed as ReiserFS has not been actively maintained for many years."; # Added 2025-11-13 + remarshal_0_17 = throw "'remarshal_0_17' has been removed because 'remarshal' supports YAML 1.1 with the `--to yaml-1.1` flag."; # added 2026-07-30 remodel = throw "'remodel' has been removed because it was unmaintained upstream, deprecated in favor of 'lune'"; # Added 2026-05-08 remotebox = throw "remotebox has been removed because it was unmaintained and broken for a long time"; # Added 2025-09-11 resp-app = throw "'resp-app' has been replaced by 'redisinsight'"; # Added 2025-12-17 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