buildGraalVmNativeImage: enable utf-8 by default

The tools built with buildGraalVmNativeImage have broken UTF-8 support
when not properly setting the locale, e.g.

$ bb -e '(prn "bépo àê")'
"b??po ????"

This commit sets the locale to en_US.UTF-8 by default, which fixes that.
This commit is contained in:
heyarne 2022-01-04 09:56:34 +01:00
parent ae4da5e933
commit ce9b3a3723

View File

@ -33,6 +33,8 @@ stdenv.mkDerivation (args // {
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
buildPhase = args.buildPhase or ''
export LC_ALL="en_US.UTF-8"
runHook preBuild
native-image ''${nativeImageBuildArgs[@]}