about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2023-11-15 21:23:58 +0000
committerThiago Kenji Okada <thiagokokada@gmail.com>2023-11-16 10:13:46 +0000
commitca662df7bf17b2edba5a7f622e08270748925500 (patch)
treec725018ac0125e5c5c7409ab90ef40e933e2261d
parent372ce96efcd43e93541fa56ac1128cd5f2a1e850 (diff)
buildGraalvmNativeImage: fix Unicode issue by setting encoding explicitly
Remove the old workaround where we set it by LC_ALL, that does not seem
to be working anymore.

Fixes #260161.
-rw-r--r--pkgs/build-support/build-graalvm-native-image/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix
index e25a714050895..6a5e82427f7b0 100644
--- a/pkgs/build-support/build-graalvm-native-image/default.nix
+++ b/pkgs/build-support/build-graalvm-native-image/default.nix
@@ -3,7 +3,6 @@
 , glibcLocales
   # The GraalVM derivation to use
 , graalvmDrv
-, name ? "${args.pname}-${args.version}"
 , executable ? args.pname
   # JAR used as input for GraalVM derivation, defaults to src
 , jar ? args.src
@@ -15,13 +14,13 @@
     "-H:Name=${executable}"
     "-march=compatibility"
     "--verbose"
+    "-J-Dsun.stdout.encoding=UTF-8"
+    "-J-Dsun.stderr.encoding=UTF-8"
   ]
   # Extra arguments to be passed to the native-image
 , extraNativeImageBuildArgs ? [ ]
   # XMX size of GraalVM during build
 , graalvmXmx ? "-J-Xmx6g"
-  # Locale to be used by GraalVM compiler
-, LC_ALL ? "en_US.UTF-8"
 , meta ? { }
 , ...
 } @ args:
@@ -41,7 +40,7 @@ let
   ];
 in
 stdenv.mkDerivation ({
-  inherit dontUnpack LC_ALL jar;
+  inherit dontUnpack jar;
 
   nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ];