From f9f0c60b01a9e4530c3a81a680b535b09c399447 Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 14 Dec 2024 12:32:00 +0100 Subject: [PATCH] treewide: Fix invalid string escapes (cherry picked from commit 591861f2b10f446efb5871d1467b245983b7e829) --- pkgs/build-support/trivial-builders/default.nix | 2 +- pkgs/pkgs-lib/formats/hocon/test/comprehensive/default.nix | 2 +- pkgs/pkgs-lib/formats/java-properties/test/default.nix | 2 +- pkgs/pkgs-lib/formats/libconfig/test/comprehensive/default.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 12a40a2d960236..dbf0180ed95c06 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -719,7 +719,7 @@ rec { (name: value: { inherit value; - name = lib.head (builtins.match "${builtins.storeDir}/[${nixHashChars}]+-(.*)\.drv" name); + name = lib.head (builtins.match "${builtins.storeDir}/[${nixHashChars}]+-(.*)\\.drv" name); }) derivations; # The syntax of output paths differs between outputs named `out` diff --git a/pkgs/pkgs-lib/formats/hocon/test/comprehensive/default.nix b/pkgs/pkgs-lib/formats/hocon/test/comprehensive/default.nix index 14b708140eb5eb..c184b6bc72e437 100644 --- a/pkgs/pkgs-lib/formats/hocon/test/comprehensive/default.nix +++ b/pkgs/pkgs-lib/formats/hocon/test/comprehensive/default.nix @@ -37,7 +37,7 @@ let "b" ] ]; - nasty_string = "\"@\n\\\t^*\b\f\n\0\";'''$"; + nasty_string = "\"@\n\\\t^*bf\n0\";'''$"; "misc attrs" = { x = 1; diff --git a/pkgs/pkgs-lib/formats/java-properties/test/default.nix b/pkgs/pkgs-lib/formats/java-properties/test/default.nix index fdc589d2c1cd4c..2ea787a90341b3 100644 --- a/pkgs/pkgs-lib/formats/java-properties/test/default.nix +++ b/pkgs/pkgs-lib/formats/java-properties/test/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation { ); src = lib.sourceByRegex ./. [ - ".*\.java" + ".*\\.java" ]; # On Linux, this can be C.UTF-8, but darwin + zulu requires en_US.UTF-8 LANG = "en_US.UTF-8"; diff --git a/pkgs/pkgs-lib/formats/libconfig/test/comprehensive/default.nix b/pkgs/pkgs-lib/formats/libconfig/test/comprehensive/default.nix index cb331ccf4f0fea..6e4277da68a804 100644 --- a/pkgs/pkgs-lib/formats/libconfig/test/comprehensive/default.nix +++ b/pkgs/pkgs-lib/formats/libconfig/test/comprehensive/default.nix @@ -58,7 +58,7 @@ let 1 ]) ]; - nasty_string = "\"@\n\\\t^*\b\f\n\0\";'''$"; + nasty_string = "\"@\n\\\t^*bf\n0\";'''$"; weirderTypes = { _includes = [ include_file ];