rPackages.rJava: set JAVA_HOME, fixes darwin (#355931)

This commit is contained in:
Justin Bedő 2024-11-18 11:41:09 +11:00 committed by GitHub
commit 5083ec8877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1286,6 +1286,10 @@ let
preConfigure = ''
export JAVA_CPPFLAGS=-I${pkgs.jdk}/include/
export JAVA_HOME=${pkgs.jdk}
substituteInPlace R/zzz.R.in \
--replace-fail ".onLoad <- function(libname, pkgname) {" \
".onLoad <- function(libname, pkgname) {
Sys.setenv(\"JAVA_HOME\" = Sys.getenv(\"JAVA_HOME\", unset = \"${pkgs.jdk}\"))"
'';
});