buildGraalvmNativeImage: allow LC_ALL overrides

This commit is contained in:
Thiago Kenji Okada 2022-07-03 18:16:38 +01:00
parent b96962caaa
commit 8f58bc3a1d

View file

@ -21,20 +21,20 @@
, graalvmXmx ? "-J-Xmx6g"
# The GraalVM derivation to use
, graalvmDrv ? graalvm
# Locale to be used by GraalVM compiler
, LC_ALL ? "en_US.UTF-8"
, meta ? { }
, ...
} @ args:
stdenv.mkDerivation (args // {
inherit dontUnpack;
inherit dontUnpack LC_ALL;
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ];
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
buildPhase = args.buildPhase or ''
export LC_ALL="en_US.UTF-8"
runHook preBuild
native-image ''${nativeImageBuildArgs[@]}