Merge pull request #58150 from srhb/anbox-i686

anbox: Prevent eval failure on non-existent arches
This commit is contained in:
Sarah Brofeldt 2019-03-23 10:15:42 +01:00 committed by GitHub
commit c987fe408d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,31 +97,28 @@ stdenv.mkDerivation rec {
passthru.image = let passthru.image = let
imgroot = "https://build.anbox.io/android-images"; imgroot = "https://build.anbox.io/android-images";
arches = { in
armv7l-linux = { {
armv7l-linux = fetchurl {
url = imgroot + "/2017/06/12/android_1_armhf.img"; url = imgroot + "/2017/06/12/android_1_armhf.img";
sha256 = "1za4q6vnj8wgphcqpvyq1r8jg6khz7v6b7h6ws1qkd5ljangf1w5"; sha256 = "1za4q6vnj8wgphcqpvyq1r8jg6khz7v6b7h6ws1qkd5ljangf1w5";
}; };
aarch64-linux = { aarch64-linux = fetchurl {
url = imgroot + "/2017/08/04/android_1_arm64.img"; url = imgroot + "/2017/08/04/android_1_arm64.img";
sha256 = "02yvgpx7n0w0ya64y5c7bdxilaiqj9z3s682l5s54vzfnm5a2bg5"; sha256 = "02yvgpx7n0w0ya64y5c7bdxilaiqj9z3s682l5s54vzfnm5a2bg5";
}; };
x86_64-linux = { x86_64-linux = fetchurl {
url = imgroot + "/2018/07/19/android_amd64.img"; url = imgroot + "/2018/07/19/android_amd64.img";
sha256 = "1jlcda4q20w30cm9ikm6bjq01p547nigik1dz7m4v0aps4rws13b"; sha256 = "1jlcda4q20w30cm9ikm6bjq01p547nigik1dz7m4v0aps4rws13b";
}; };
}; }.${stdenv.system} or null;
in
fetchurl {
inherit (arches.${stdenv.system}) url sha256;
};
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://anbox.io; homepage = https://anbox.io;
description = "Android in a box."; description = "Android in a box.";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux; platforms = [ "armv7l-linux" "aarch64-linux" "x86-64-linux" ];
}; };
} }