Skip to content

Commit

Permalink
Merge pull request #300407 from numinit/update-androidenv
Browse files Browse the repository at this point in the history
androidenv: update to latest
  • Loading branch information
Artturin authored Apr 17, 2024
2 parents bb1e65a + a10fada commit b34f377
Show file tree
Hide file tree
Showing 5 changed files with 1,352 additions and 564 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
, licenseAccepted ? false
}:

{ cmdLineToolsVersion ? "11.0"
{ cmdLineToolsVersion ? "13.0"
, toolsVersion ? "26.1.1"
, platformToolsVersion ? "34.0.5"
, platformToolsVersion ? "35.0.1"
, buildToolsVersions ? [ "34.0.0" ]
, includeEmulator ? false
, emulatorVersion ? "34.1.9"
, emulatorVersion ? "35.1.4"
, platformVersions ? []
, includeSources ? false
, includeSystemImages ? false
, systemImageTypes ? [ "google_apis_playstore" ]
, abiVersions ? [ "armeabi-v7a" "arm64-v8a" ]
, cmakeVersions ? [ ]
, includeNDK ? false
, ndkVersion ? "26.1.10909125"
, ndkVersion ? "26.3.11579264"
, ndkVersions ? [ndkVersion]
, useGoogleAPIs ? false
, useGoogleTVAddOns ? false
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/mobile/androidenv/emulator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ deployAndroidPackage {
libcxx
libGL
libpulseaudio
libtiff
libuuid
zlib
libbsd
ncurses5
libdrm
stdenv.cc.cc
pkgsi686Linux.glibc
expat
Expand All @@ -30,13 +33,22 @@ deployAndroidPackage {
libXi
libXrender
libXtst
libICE
libSM
libxkbfile
]);
patchInstructions = lib.optionalString (os == "linux") ''
addAutoPatchelfSearchPath $packageBaseDir/lib
addAutoPatchelfSearchPath $packageBaseDir/lib64
addAutoPatchelfSearchPath $packageBaseDir/lib64/qt/lib
# autoPatchelf is not detecting libuuid :(
addAutoPatchelfSearchPath ${pkgs.libuuid.out}/lib
# This library is linked against a version of libtiff that nixpkgs doesn't have
for file in $out/libexec/android-sdk/emulator/*/qt/plugins/imageformats/libqtiffAndroidEmu.so; do
patchelf --replace-needed libtiff.so.5 libtiff.so "$file" || true
done
autoPatchelf $out
# Wrap emulator so that it can load required libraries at runtime
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/mobile/androidenv/examples/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ let
# versions may be used in multiple places in this Nix expression.
android = {
versions = {
cmdLineToolsVersion = "11.0";
platformTools = "34.0.5";
cmdLineToolsVersion = "13.0";
platformTools = "35.0.1";
buildTools = "34.0.0";
ndk = [
"26.1.10909125"
"26.3.11579264"
];
cmake = "3.6.4111459";
emulator = "34.1.9";
emulator = "35.1.4";
};

platforms = [ "23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33" "34" ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/mobile/androidenv/ndk-bundle/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ deployAndroidPackage rec {
inherit package os;
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
autoPatchelfIgnoreMissingDeps = true;
buildInputs = lib.optionals (os == "linux") [ pkgs.zlib ];
autoPatchelfIgnoreMissingDeps = [ "*" ];
buildInputs = lib.optionals (os == "linux") [ pkgs.zlib pkgs.libcxx stdenv.cc.cc.lib ];

patchElfBnaries = ''
# Patch the executables of the toolchains, but not the libraries -- they are needed for crosscompiling
Expand Down
Loading

0 comments on commit b34f377

Please sign in to comment.