git.iko.soy/typeable/nixpkgs
on master help sign in
Add binary openjdk 8 build for x86_64-darwin, similar to the openjdk 7 build for x86_64-darwin.

(cherry picked from commit 5f3e33b8ec3eee16dbb6c3ec408ce85770930cd5)

commit3da892a18e68f49435f8d5d8f791e6665787e84b authorRob Vermaas <rob.vermaas@gmail.com> dateThu 14 Jan 2016, 02:28 (11 years ago) parent0ca4424
1 file changed+43
pkgs/development/compilers/openjdk-darwin/8.nix+43
pkgs/development/compilers/openjdk-darwin/8.nixnew file+43
@@ -0,0 +1,43 @@
1+{ stdenv, fetchurl, unzip, setJavaClassPath }:
2+let
3+ jdk = stdenv.mkDerivation {
4+ name = "zulu1.8.0_66-8.11.0.1";
5+
6+ src = fetchurl {
7+ url = http://cdn.azulsystems.com/zulu/bin/zulu1.8.0_66-8.11.0.1-macosx.zip;
8+ sha256 = "0pvbpb3vf0509xm2x1rh0p0w4wmx50zf15604p28z1k8ai1a23sz";
9+ curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
10+ };
11+
12+ buildInputs = [ unzip ];
13+
14+ installPhase = ''
15+ mkdir -p $out
16+ mv * $out
17+
18+ # jni.h expects jni_md.h to be in the header search path.
19+ ln -s $out/include/darwin/*_md.h $out/include/
20+ '';
21+
22+ preFixup = ''
23+ # Propagate the setJavaClassPath setup hook from the JRE so that
24+ # any package that depends on the JRE has $CLASSPATH set up
25+ # properly.
26+ mkdir -p $out/nix-support
27+ echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
28+
29+ # Set JAVA_HOME automatically.
30+ cat <<EOF >> $out/nix-support/setup-hook
31+ if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
32+ EOF
33+ '';
34+
35+ passthru = {
36+ jre = jdk;
37+ home = jdk;
38+ };
39+
40+ meta.platforms = stdenv.lib.platforms.darwin;
41+
42+ };
43+in jdk