From a276841f672f81f60208be3166b1af789f5cd3e3 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 11 Apr 2026 17:05:52 +0200 Subject: [PATCH] json-schema-catalog-rs-formats: use more idiomatic formats.json instead of toFile/toJSON This also avoids toFile running at eval time. --- .../js/json-schema-catalog-rs/test-run.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/js/json-schema-catalog-rs/test-run.nix b/pkgs/by-name/js/json-schema-catalog-rs/test-run.nix index 5b5a56aaa998..416e7f3bccc6 100644 --- a/pkgs/by-name/js/json-schema-catalog-rs/test-run.nix +++ b/pkgs/by-name/js/json-schema-catalog-rs/test-run.nix @@ -1,18 +1,18 @@ { json-schema-catalog-rs, runCommand, + writeText, + formats, }: let - sample = builtins.toFile "example-schema.json" ( - builtins.toJSON { - "$schema" = "http://json-schema.org/draft-07/schema#"; - "$id" = "https://example.com/example-2.9.json"; - "title" = "Example Schema"; - } - ); + sample = (formats.json { }).generate "example-schema.json" { + "$schema" = "http://json-schema.org/draft-07/schema#"; + "$id" = "https://example.com/example-2.9.json"; + "title" = "Example Schema"; + }; - expectedOutput = builtins.toFile "expected-output" '' + expectedOutput = writeText "expected-output" '' { "groups": [ {