diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index 8c6db5ecd8c9..6e3fe6c4ebf1 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -48,8 +48,10 @@ in let result = stdenv.mkDerivation rec { name = if sourcePerArch.packageType == "jdk" - then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}" - else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}"; + then "adoptopenjdk-${sourcePerArch.vmType}-bin-${version}" + else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${version}"; + + version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}"); src = fetchurl { inherit (sourcePerArch.${cpuName}) url sha256;