about summary refs log tree commit diff
path: root/pkgs/development/mobile/androidenv/androidndk.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/mobile/androidenv/androidndk.nix')
-rw-r--r--pkgs/development/mobile/androidenv/androidndk.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix
index dc693accbf4b..072a6dc3168e 100644
--- a/pkgs/development/mobile/androidenv/androidndk.nix
+++ b/pkgs/development/mobile/androidenv/androidndk.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, zlib, ncurses5, unzip, lib, makeWrapper
 , coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
-, platformTools, python3, libcxx, version, sha256, bash, runCommand
+, platformTools, python3, libcxx, version, sha1s, bash, runCommand
 , fullNDK ? false # set to true if you want other parts of the NDK
                   # that is not used by Nixpkgs like sources,
                   # examples, docs, or LLVM toolchains
@@ -16,10 +16,10 @@ let
     name = "android-ndk-r${version}";
     inherit version;
 
-    src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
-      url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip";
-      inherit sha256;
-    } else throw "platform ${stdenv.hostPlatform.system} not supported!";
+    src = fetchurl {
+      url = "https://dl.google.com/android/repository/${name}-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}.zip";
+      sha1 = sha1s.${stdenv.hostPlatform.system} or (throw "platform ${stdenv.hostPlatform.system} not supported!");
+    };
 
     phases = "buildPhase";
 
@@ -99,7 +99,7 @@ let
     '';
 
     meta = {
-      platforms = stdenv.lib.platforms.linux;
+      platforms = builtins.attrNames sha1s;
       hydraPlatforms = [];
       license = stdenv.lib.licenses.asl20;
     };