diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-16 18:23:47 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-16 18:34:14 +0200 |
commit | c39bee0c0f9b3b01786bc553532eb90cbaba2692 (patch) | |
tree | d87c60b8bc98f2ada07d1a6889336856d62a5dbb /pkgs | |
parent | 3c58261c675e21d320c530b2937a09acd84d7647 (diff) | |
download | nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar.gz nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar.bz2 nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar.lz nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar.xz nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.tar.zst nixlib-c39bee0c0f9b3b01786bc553532eb90cbaba2692.zip |
oraclejdk: Export the same setup hooks as openjdk
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/jdk/jdk-linux-base.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/development/compilers/jdk/jdk-linux-base.nix b/pkgs/development/compilers/jdk/jdk-linux-base.nix index 5c19fff3c184..90a64ecd5217 100644 --- a/pkgs/development/compilers/jdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/jdk/jdk-linux-base.nix @@ -30,6 +30,7 @@ , alsaLib , atk , gdk_pixbuf +, setJavaClassPath }: assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; @@ -59,7 +60,7 @@ let ""; in -stdenv.mkDerivation rec { +let result = stdenv.mkDerivation rec { name = if installjdk then "oraclejdk-${productVersion}u${patchVersion}" else "oraclejre-${productVersion}u${patchVersion}"; @@ -156,6 +157,14 @@ stdenv.mkDerivation rec { mkdir $jrePath/lib/${architecture}/plugins ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins + + mkdir -p $out/nix-support + echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + + # Set JAVA_HOME automatically. + cat <<EOF >> $out/nix-support/setup-hook + if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi + EOF ''; inherit installjdk pluginSupport; @@ -169,5 +178,8 @@ stdenv.mkDerivation rec { passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins"; + passthru.jre = result; # FIXME: use multiple outputs or return actual JRE package + meta.license = "unfree"; -} + +}; in result |