R: Enable java support on all platforms

This commit is contained in:
Tom Hall 2020-02-19 22:57:41 +00:00
parent 0eb33b0485
commit 4e5aeca90b

View File

@ -7,7 +7,6 @@
# R as of writing does not support outputting both .so and .a files; it outputs: # R as of writing does not support outputting both .so and .a files; it outputs:
# --enable-R-static-lib conflicts with --enable-R-shlib and will be ignored # --enable-R-static-lib conflicts with --enable-R-shlib and will be ignored
, static ? false , static ? false
, javaSupport ? (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64)
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -23,9 +22,8 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses
pango pcre perl readline texLive xz zlib less texinfo graphviz icu pango pcre perl readline texLive xz zlib less texinfo graphviz icu
pkgconfig bison imake which openblas curl tcl tk pkgconfig bison imake which openblas curl tcl tk jdk
] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ] ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ];
++ stdenv.lib.optional javaSupport jdk;
patches = [ patches = [
./no-usr-local-search-paths.patch ./no-usr-local-search-paths.patch
@ -57,7 +55,7 @@ stdenv.mkDerivation rec {
CC=$(type -p cc) CC=$(type -p cc)
CXX=$(type -p c++) CXX=$(type -p c++)
FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran" FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
${stdenv.lib.optionalString javaSupport "JAVA_HOME=\"${jdk}\""} JAVA_HOME="${jdk}"
RANLIB=$(type -p ranlib) RANLIB=$(type -p ranlib)
R_SHELL="${stdenv.shell}" R_SHELL="${stdenv.shell}"
'' + stdenv.lib.optionalString stdenv.isDarwin '' '' + stdenv.lib.optionalString stdenv.isDarwin ''