adoptopenjdk-bin: fail in a good way when unsupported

It was breaking the tarball job:
https://hydra.nixos.org/build/87863422
This commit is contained in:
Vladimír Čunát 2019-01-27 10:42:57 +01:00
parent aca9bfec57
commit 185d88c515
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -48,8 +48,10 @@ in
let result = stdenv.mkDerivation rec { let result = stdenv.mkDerivation rec {
name = if sourcePerArch.packageType == "jdk" name = if sourcePerArch.packageType == "jdk"
then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}" then "adoptopenjdk-${sourcePerArch.vmType}-bin-${version}"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}"; else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${version}";
version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
src = fetchurl { src = fetchurl {
inherit (sourcePerArch.${cpuName}) url sha256; inherit (sourcePerArch.${cpuName}) url sha256;