Commit 2f6981d6 authored by sohalt's avatar sohalt
Browse files

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`.
parent b06aeee2
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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