@@ -1,15 +1,13 @@
11{ productVersion
22, patchVersion
3−, buildVersion
43, sha256
54, jceName
6−, releaseToken
75, sha256JCE
86}:
97
108{ swingSupport ? true
119, stdenv
12−, fetchurl
10+, requireFile
1311, makeWrapper
1412, unzip
1513, file
@@ -55,14 +53,14 @@ let
5553 x86_64-linux = "amd64";
5654 armv7l-linux = "arm";
5755 aarch64-linux = "aarch64";
58− }.${stdenv.hostPlatform.system};
56+ }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
5957
6058 jce =
6159 if installjce then
62− fetchurl {
63− url = "http://download.oracle.com/otn-pub/java/jce/${productVersion}/${jceName}";
60+ requireFile {
61+ name = jceName;
62+ url = "http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html";
6463 sha256 = sha256JCE;
65− curlOpts = "-b oraclelicense=a";
6664 }
6765 else
6866 "";
@@ -76,25 +74,23 @@ let
7674
7775in
7876
79−assert sha256 ? ${stdenv.hostPlatform.system};
80−
8177let result = stdenv.mkDerivation rec {
82− name =
83− if installjdk then "oraclejdk-${productVersion}u${patchVersion}" else "oraclejre-${productVersion}u${patchVersion}";
84−
85− src = let
86− platformName = {
87− i686-linux = "linux-i586";
88− x86_64-linux = "linux-x64";
89− armv7l-linux = "linux-arm32-vfp-hflt";
90− aarch64-linux = "linux-arm64-vfp-hflt";
91− }.${stdenv.hostPlatform.system};
92− javadlPlatformName = "linux-i586";
93− in fetchurl {
94− url = "http://javadl.oracle.com/webapps/download/GetFile/1.${productVersion}.0_${patchVersion}-b${buildVersion}/${releaseToken}/${javadlPlatformName}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
95− curlOpts = "-b oraclelicense=a";
96− sha256 = sha256.${stdenv.hostPlatform.system};
97− };
78+ pname = if installjdk then "oraclejdk" else "oraclejre";
79+ version = "${productVersion}u${patchVersion}";
80+
81+ src =
82+ let
83+ platformName = {
84+ i686-linux = "linux-i586";
85+ x86_64-linux = "linux-x64";
86+ armv7l-linux = "linux-arm32-vfp-hflt";
87+ aarch64-linux = "linux-arm64-vfp-hflt";
88+ }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
89+ in requireFile {
90+ name = "jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
91+ url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
92+ sha256 = sha256.${stdenv.hostPlatform.system};
93+ };
9894
9995 nativeBuildInputs = [ file ]
10096 ++ stdenv.lib.optional installjce unzip;