androidenv: Use fetchzip instead of googlerepository

This commit is contained in:
Matthew Bauer 2018-06-21 12:12:02 -04:00
parent fe04fe868b
commit 2e8feba171
3 changed files with 11 additions and 26 deletions

View file

@ -1,7 +1,6 @@
{ stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper
{ stdenv, stdenv_32bit, fetchurl, fetchzip, unzip, makeWrapper
, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons, sources
, libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, libGLU_combined, alsaLib
, googleRepository
, freetype, fontconfig, glib, gtk2, atk, file, jdk, coreutils, libpulseaudio, dbus
, zlib, glxinfo, xkeyboardconfig
, includeSources
@ -9,7 +8,15 @@
{ platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false
, useGooglePlayServices ? false, useInstantApps ? false }:
let inherit (stdenv.lib) makeLibraryPath; in
let inherit (stdenv.lib) makeLibraryPath;
googleRepository = let version = "gms_v9_rc41_wear_2_0_rc6";
in fetchzip rec {
url = "https://dl-ssl.google.com/android/repository/google_m2repository_${version}.zip";
sha256 = "0k99xmynv0k62d301zx5jnjkddflr51i5lb02l9incg7m5cn8kzx";
};
in
stdenv.mkDerivation rec {
name = "android-sdk-${version}";

View file

@ -23,10 +23,6 @@ rec {
inherit (pkgs) stdenv fetchurl unzip;
};
googleRepository = import ./google-repository.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux")
then import ./platforms-linux.nix {
inherit (pkgs) stdenv fetchurl unzip;
@ -54,7 +50,7 @@ rec {
inherit (pkgs) zlib glxinfo freetype fontconfig glib gtk2 atk libGLU_combined file alsaLib jdk coreutils libpulseaudio dbus;
inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst xkeyboardconfig;
inherit platformTools buildTools support supportRepository googleRepository platforms sysimages addons sources includeSources;
inherit platformTools buildTools support supportRepository platforms sysimages addons sources includeSources;
stdenv_32bit = pkgs_i686.stdenv;
};

View file

@ -1,18 +0,0 @@
{stdenv, fetchurl, unzip}:
stdenv.mkDerivation rec {
version = "gms_v9_rc41_wear_2_0_rc6";
name = "google-repository";
src = fetchurl {
url = "https://dl-ssl.google.com/android/repository/google_m2repository_${version}.zip";
sha256 = "0gjmmzkvjp80krbak5nkmkvvs75givqbz0cvw58f6kc7i9jm12nf";
};
buildCommand = ''
mkdir -p $out
cd $out
unzip $src
'';
buildInputs = [ unzip ];
}