oraclejdk: 8.191 -> 8.201
also no longer use requireFile and accept the license via nixpkgs option
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
{ productVersion
|
||||
, patchVersion
|
||||
, downloadUrl
|
||||
, buildVersion
|
||||
, sha256
|
||||
, jceName
|
||||
, jceDownloadUrl
|
||||
, releaseToken
|
||||
, sha256JCE
|
||||
}:
|
||||
|
||||
{ swingSupport ? true
|
||||
, stdenv
|
||||
, requireFile
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, unzip
|
||||
, file
|
||||
@@ -17,6 +17,7 @@
|
||||
, installjdk ? true
|
||||
, pluginSupport ? true
|
||||
, installjce ? false
|
||||
, licenseAccepted ? false
|
||||
, glib
|
||||
, libxml2
|
||||
, libav_0_8
|
||||
@@ -36,6 +37,13 @@
|
||||
|
||||
assert swingSupport -> xorg != null;
|
||||
|
||||
if !licenseAccepted then throw ''
|
||||
You must accept the Oracle Binary Code License Agreement for Java SE at
|
||||
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
|
||||
by setting nixpkgs config option 'oraclejdk.accept_license = true;'
|
||||
''
|
||||
else assert licenseAccepted;
|
||||
|
||||
let
|
||||
|
||||
/**
|
||||
@@ -50,10 +58,10 @@ let
|
||||
|
||||
jce =
|
||||
if installjce then
|
||||
requireFile {
|
||||
name = jceName;
|
||||
url = jceDownloadUrl;
|
||||
fetchurl {
|
||||
url = "http://download.oracle.com/otn-pub/java/jce/${productVersion}/${jceName}";
|
||||
sha256 = sha256JCE;
|
||||
curlOpts = "-b oraclelicense=a";
|
||||
}
|
||||
else
|
||||
"";
|
||||
@@ -67,19 +75,23 @@ let
|
||||
|
||||
in
|
||||
|
||||
assert sha256 ? ${stdenv.hostPlatform.system};
|
||||
|
||||
let result = stdenv.mkDerivation rec {
|
||||
name =
|
||||
if installjdk then "oraclejdk-${productVersion}u${patchVersion}" else "oraclejre-${productVersion}u${patchVersion}";
|
||||
|
||||
src = requireFile {
|
||||
name = {
|
||||
i686-linux = "jdk-${productVersion}u${patchVersion}-linux-i586.tar.gz";
|
||||
x86_64-linux = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz";
|
||||
armv7l-linux = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz";
|
||||
aarch64-linux = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
|
||||
src = let
|
||||
platformName = {
|
||||
i686-linux = "linux-i586";
|
||||
x86_64-linux = "linux-x64";
|
||||
armv7l-linux = "linux-arm32-vfp-hflt";
|
||||
aarch64-linux = "linux-arm64-vfp-hflt";
|
||||
}.${stdenv.hostPlatform.system};
|
||||
url = downloadUrl;
|
||||
sha256 = sha256.${stdenv.hostPlatform.system};
|
||||
in fetchurl {
|
||||
url = "http://download.oracle.com/otn-pub/java/jdk/${productVersion}u${patchVersion}-b${buildVersion}/${releaseToken}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
|
||||
curlOpts = "-b oraclelicense=a";
|
||||
sha256 = sha256.${stdenv.hostPlatform.system};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ file ]
|
||||
|
||||
Reference in New Issue
Block a user