adoptopenjdk: autogenerate sources + add support for aarch64

This commit is contained in:
Benno Fünfstück
2018-12-17 23:08:56 +01:00
parent 27e174c678
commit 5a44fef594
6 changed files with 184 additions and 91 deletions
@@ -1,7 +1,4 @@
{ name
, url
, sha256
}:
sourcePerArch:
{ swingSupport ? true
, stdenv
@@ -48,10 +45,12 @@ let
in
let result = stdenv.mkDerivation rec {
inherit name;
name = if sourcePerArch.packageType == "jdk"
then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.version}"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.version}";
src = fetchurl {
inherit url sha256;
inherit (sourcePerArch.${stdenv.hostPlatform.parsed.cpu.name}) url sha256;
};
nativeBuildInputs = [ file ];
@@ -112,7 +111,7 @@ let result = stdenv.mkDerivation rec {
meta = with stdenv.lib; {
license = licenses.gpl2Classpath;
description = "AdoptOpenJDK, prebuilt OpenJDK binary";
platforms = [ "x86_64-linux" ]; # some inherit jre.meta.platforms
platforms = stdenv.lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
maintainers = with stdenv.lib.maintainers; [ taku0 ];
};