build-graalvm-native-image: do not use NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION

Packages that require access to environment variables in the build
should specify these using `-E` arguments in `nativeImageBuildArgs` or
using a `native-image.properties` as described here:
https://www.graalvm.org/22.1/reference-manual/native-image/BuildConfiguration/#embedding-a-configuration-file

Specifying NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION=true breaks with
packages that list their environment variables explicitly in `native-image.properties`.
This commit is contained in:
sohalt 2024-01-22 12:44:31 +01:00
parent b06aeee2a0
commit 2f6981d6e1

View File

@ -49,13 +49,6 @@ stdenv.mkDerivation ({
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
# Workaround GraalVM issue where the builder does not have access to the
# environment variables since 21.0.0
# https://github.com/oracle/graal/pull/6095
# https://github.com/oracle/graal/pull/6095
# https://github.com/oracle/graal/issues/7502
env.NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION = "true";
buildPhase = args.buildPhase or ''
runHook preBuild