diff options
Diffstat (limited to 'pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix')
-rw-r--r-- | pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index cf38ca9eaebea..eb614b0784f99 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -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 ]; }; |