From 3cb8b0787dae828c47132f7aba3c12a285caf9db Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 10 Jun 2026 15:34:37 +0200 Subject: [PATCH] formats.javaProperties: use structuredAttrs instead of passAsFile in test --- pkgs/pkgs-lib/formats/java-properties/test/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/pkgs-lib/formats/java-properties/test/default.nix b/pkgs/pkgs-lib/formats/java-properties/test/default.nix index 68cd5cfa1bcf..a756a9423b24 100644 --- a/pkgs/pkgs-lib/formats/java-properties/test/default.nix +++ b/pkgs/pkgs-lib/formats/java-properties/test/default.nix @@ -53,13 +53,13 @@ stdenv.mkDerivation { jdk glibcLocales ]; - + __structuredAttrs = true; + strictDeps = true; # technically should go through the type.merge first, but that's tested # in tests/formats.nix. properties = javaProperties.generate "example.properties" input; # Expected output as printed by Main.java - passAsFile = [ "expected" ]; expected = concatStrings ( attrValues ( mapAttrs (key: value: '' @@ -76,7 +76,7 @@ stdenv.mkDerivation { "**/*.java" ]; # On Linux, this can be C.UTF-8, but darwin + zulu requires en_US.UTF-8 - LANG = "en_US.UTF-8"; + env.LANG = "en_US.UTF-8"; buildPhase = '' javac Main.java ''; @@ -84,7 +84,7 @@ stdenv.mkDerivation { checkPhase = '' cat -v $properties java Main $properties >actual - diff -U3 $expectedPath actual + diff -U3 <(printf "%s" "$expected") actual ''; installPhase = "touch $out"; }