From c8871e0b654c318508559ba4a7e2651d3e1a0e42 Mon Sep 17 00:00:00 2001 From: Cray Elliott Date: Fri, 1 Aug 2014 18:26:21 -0700 Subject: [PATCH] ewemoa : add the Android Support repository --- .../mobile/androidenv/androidsdk.nix | 11 ++++++++++- pkgs/development/mobile/androidenv/default.nix | 6 +++++- .../mobile/androidenv/support-repository.nix | 17 +++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/mobile/androidenv/support-repository.nix diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index 3c9327f1c594..60f71517323d 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -1,5 +1,5 @@ { stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper -, platformTools, buildTools, support, platforms, sysimages, addons +, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons , zlib_32bit , libX11_32bit, libxcb_32bit, libXau_32bit, libXdmcp_32bit, libXext_32bit, mesa_32bit, alsaLib_32bit , libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, mesa, alsaLib @@ -139,6 +139,15 @@ stdenv.mkDerivation rec { cd .. + # Symlink required extras + + mkdir -p extras/android + cd extras/android + + ln -s ${supportRepository}/m2repository + + cd ../.. + # Symlink required platforms mkdir -p platforms diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 6e71195e41cb..796f0f862bdd 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -16,6 +16,10 @@ rec { inherit (pkgs) stdenv fetchurl unzip; }; + supportRepository = import ./support-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; @@ -39,7 +43,7 @@ rec { inherit (pkgs) freetype fontconfig glib gtk atk mesa file alsaLib jdk; inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst; - inherit platformTools buildTools support platforms sysimages addons; + inherit platformTools buildTools support supportRepository platforms sysimages addons; stdenv_32bit = pkgs_i686.stdenv; zlib_32bit = pkgs_i686.zlib; diff --git a/pkgs/development/mobile/androidenv/support-repository.nix b/pkgs/development/mobile/androidenv/support-repository.nix new file mode 100644 index 000000000000..66a532328b1b --- /dev/null +++ b/pkgs/development/mobile/androidenv/support-repository.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation { + name = "android-support-repository-r5"; + src = fetchurl { + url = http://dl-ssl.google.com/android/repository/android_m2repository_r05.zip; + sha1 = "2ee9723da079ba0d4fe2a185e00ded842de96f13"; + }; + + buildCommand = '' + mkdir -p $out + cd $out + unzip $src + ''; + + buildInputs = [ unzip ]; +}