adoptopenjdk: autogenerate sources + add support for aarch64

This commit is contained in:
Benno Fünfstück
2018-12-19 14:08:09 +01:00
parent da093022a4
commit 5bbfc0cc37
6 changed files with 184 additions and 91 deletions
@@ -1,7 +1,4 @@
{ name
, url
, sha256
}:
sourcePerArch:
{ swingSupport ? true # not used for now
, stdenv
@@ -9,10 +6,12 @@
}:
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;
};
# See: https://github.com/NixOS/patchelf/issues/10