oraclejdk: use working mirror for download

http://download.oracle.com/otn-pub/ was recently renamed to
http://download.oracle.com/otn/ and now requires authentication with an
Oracle account. http://download.oracle.com/otn-pub/ links don't work
anymore, so installing oraclejdk fails.

Switch to http://javadl.oracle.com/webapps/download/GetFile/, which does
not require authentication. This fixes installing oraclejdk.

Note: The URL for JCE is still broken; this commit only fixes the URL
for the JDK.
This commit is contained in:
Matthew Glazar 2019-04-20 21:13:45 -07:00 committed by Frederik Rietdijk
parent 0094dd6eaa
commit 1a0098042d
1 changed files with 2 additions and 1 deletions

View File

@ -89,8 +89,9 @@ let result = stdenv.mkDerivation rec {
armv7l-linux = "linux-arm32-vfp-hflt";
aarch64-linux = "linux-arm64-vfp-hflt";
}.${stdenv.hostPlatform.system};
javadlPlatformName = "linux-i586";
in fetchurl {
url = "http://download.oracle.com/otn-pub/java/jdk/${productVersion}u${patchVersion}-b${buildVersion}/${releaseToken}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
url = "http://javadl.oracle.com/webapps/download/GetFile/1.${productVersion}.0_${patchVersion}-b${buildVersion}/${releaseToken}/${javadlPlatformName}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
curlOpts = "-b oraclelicense=a";
sha256 = sha256.${stdenv.hostPlatform.system};
};