Port packages with Android dependencies to new androidenv

This commit is contained in:
Sander van der Burg 2018-11-18 13:51:06 +01:00
parent 27f8b6b89e
commit 53550c826d
5 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst }:
{ stdenv, requireFile, p7zip, jre, libusb1, platform-tools, gtk2, glib, libXtst }:
# TODO:
#
@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
'';
buildPhase = ''
ln -s ${platformTools}/platform-tools/adb x10flasher_lib/adb.linux
ln -s ${platformTools}/platform-tools/fastboot x10flasher_lib/fastboot.linux
ln -s ${platform-tools}/libexec/android-sdk/platform-tools/adb x10flasher_lib/adb.linux
ln -s ${platform-tools}/libexec/android-sdk/platform-tools/fastboot x10flasher_lib/fastboot.linux
ln -s ${libusb1.out}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so
chmod +x x10flasher_lib/unyaffs.linux.x86 x10flasher_lib/bin2elf x10flasher_lib/bin2sin

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
{ stdenv, fetchurl, makeWrapper, jre, build-tools }:
stdenv.mkDerivation rec {
name = "apktool-${version}";
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
--add-flags "-jar $out/libexec/apktool/apktool.jar" \
--prefix PATH : "${buildTools.v25_0_1}/build-tools/25.0.1/"
--prefix PATH : "${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3"
'';
meta = with stdenv.lib; {

View File

@ -3,7 +3,7 @@
, ninja
, pkgconfig
, platformTools
, platform-tools
, ffmpeg
, SDL2
}:
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server.jar"
# runtime dep on `adb` to push the server
wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platformTools}/bin"
wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platform-tools}/bin"
'';
meta = with stdenv.lib; {

View File

@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
patches = [
(substituteAll {
src = ./paths.patch;
adb = "${androidenv.platformTools}/bin/adb";
adb = "${androidenv.androidPkgs_9_0.platform-tools}/bin/adb";
inherit apk;
})
];

View File

@ -539,7 +539,7 @@ in
ansifilter = callPackage ../tools/text/ansifilter {};
apktool = callPackage ../development/tools/apktool {
buildTools = androidenv.buildTools;
inherit (androidenv.androidPkgs_9_0) build-tools;
};
appimage-run = callPackage ../tools/package-management/appimage-run {};
@ -822,7 +822,7 @@ in
abootimg = callPackage ../development/mobile/abootimg {};
adbfs-rootless = callPackage ../development/mobile/adbfs-rootless {
adb = androidenv.platformTools;
adb = androidenv.androidPkgs_9_0.platform-tools;
};
adb-sync = callPackage ../development/mobile/adb-sync { };
@ -832,15 +832,11 @@ in
#licenseAccepted = (config.android_sdk.accept_license or false);
};
inherit (androidenv) androidndk;
androidndkPkgs = androidndkPkgs_17c;
androidndkPkgs_17c = (callPackage ../development/androidndk-pkgs {})."17c";
androidndkPkgs_10e = (callPackage ../development/androidndk-pkgs {})."10e";
androidsdk = androidenv.androidsdk_8_0;
androidsdk_extras = res.androidenv.androidsdk_8_0_extras;
androidsdk_9_0 = androidenv.androidPkgs_9_0.androidsdk;
webos = recurseIntoAttrs {
cmake-modules = callPackage ../development/mobile/webos/cmake-modules.nix { };
@ -2678,7 +2674,7 @@ in
flamerobin = callPackage ../applications/misc/flamerobin { };
flashtool = pkgsi686Linux.callPackage ../development/mobile/flashtool {
platformTools = androidenv.platformTools;
inherit (androidenv.androidPkgs_9_0) platform-tools;
};
flashrom = callPackage ../tools/misc/flashrom { };
@ -5311,7 +5307,7 @@ in
};
scrcpy = callPackage ../misc/scrcpy {
inherit (androidenv) platformTools;
inherit (androidenv.androidPkgs_9_0) platform-tools;
};
screen-message = callPackage ../tools/X11/screen-message { };