mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 12:38:41 +03:00
Merge pull request #267861 from thiagokokada/graalvm-fixes
buildGraalvmNativeImage: fix Unicode issue by setting encoding explicitly
This commit is contained in:
commit
d0e729bc26
@ -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 ];
|
||||
|
||||
|
@ -33,9 +33,10 @@ let
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/bb --version | grep '${version}'
|
||||
$out/bin/bb '(+ 1 2)' | grep '3'
|
||||
$out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | grep '[1 2]'
|
||||
$out/bin/bb --version | fgrep '${version}'
|
||||
$out/bin/bb '(+ 1 2)' | fgrep '3'
|
||||
$out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | fgrep '[1 2]'
|
||||
$out/bin/bb '(prn "bépo àê")' | fgrep 'bépo àê'
|
||||
'';
|
||||
|
||||
# As of v1.2.174, this will remove references to ${graalvmDrv}/conf/chronology,
|
||||
|
Loading…
Reference in New Issue
Block a user