tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
oraclejdk: Export the same setup hooks as openjdk
Eelco Dolstra
11 years ago
c39bee0c
3c58261c
+14
-2
1 changed file
expand all
collapse all
unified
split
pkgs
development
compilers
jdk
jdk-linux-base.nix
+14
-2
pkgs/development/compilers/jdk/jdk-linux-base.nix
···
30
30
, alsaLib
31
31
, atk
32
32
, gdk_pixbuf
33
33
+
, setJavaClassPath
33
34
}:
34
35
35
36
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
···
59
60
"";
60
61
in
61
62
62
62
-
stdenv.mkDerivation rec {
63
63
+
let result = stdenv.mkDerivation rec {
63
64
name =
64
65
if installjdk then "oraclejdk-${productVersion}u${patchVersion}" else "oraclejre-${productVersion}u${patchVersion}";
65
66
···
156
157
157
158
mkdir $jrePath/lib/${architecture}/plugins
158
159
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
160
160
+
161
161
+
mkdir -p $out/nix-support
162
162
+
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
163
163
+
164
164
+
# Set JAVA_HOME automatically.
165
165
+
cat <<EOF >> $out/nix-support/setup-hook
166
166
+
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
167
167
+
EOF
159
168
'';
160
169
161
170
inherit installjdk pluginSupport;
···
169
178
170
179
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
171
180
181
181
+
passthru.jre = result; # FIXME: use multiple outputs or return actual JRE package
182
182
+
172
183
meta.license = "unfree";
173
173
-
}
184
184
+
185
185
+
}; in result