Commit 9d353905 authored by sohalt's avatar sohalt
Browse files

build-graalvm-native-image: pass whole environment

Pass the whole environment to the native-image build process by
generating a -E option for every environment variable.

This has the same effect as setting
NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION=true
but is compatible with packages providing -E options themselves
parent 2f6981d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ stdenv.mkDerivation ({
  buildPhase = args.buildPhase or ''
    runHook preBuild

    native-image -jar "$jar" ''${nativeImageBuildArgs[@]}
    native-image -jar "$jar" $(export -p | sed -n 's/^declare -x \([^=]\+\)=.*$/ -E\1/p' | tr -d \\n) ''${nativeImageBuildArgs[@]}

    runHook postBuild
  '';