2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2023-11-16 04:20:00 +00:00
|
|
|
, cmake, ninja, pkg-config, perl, go, python3
|
2022-11-04 12:27:35 +00:00
|
|
|
, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
let
|
|
|
|
pythonEnv = python3.withPackages(ps: [ ps.protobuf ]);
|
|
|
|
in
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "android-tools";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "34.0.5";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-+wnP8Sz7gqz0Ko6+u8A0JnG/zQIRdxY2i9xz/dpgMEo=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ cmake ninja pkg-config perl go ];
|
2022-11-04 12:27:35 +00:00
|
|
|
buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [ pythonEnv ];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export GOCACHE=$TMPDIR/go-cache
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Android SDK platform tools";
|
|
|
|
longDescription = ''
|
|
|
|
Android SDK Platform-Tools is a component for the Android SDK. It
|
|
|
|
includes tools that interface with the Android platform, such as adb and
|
|
|
|
fastboot. These tools are required for Android app development. They're
|
|
|
|
also needed if you want to unlock your device bootloader and flash it
|
|
|
|
with a new system image.
|
|
|
|
Currently the following tools are supported:
|
|
|
|
- adb
|
|
|
|
- fastboot
|
|
|
|
- mke2fs.android (required by fastboot)
|
|
|
|
- simg2img, img2simg, append2simg
|
2022-01-13 20:06:32 +00:00
|
|
|
- lpdump, lpmake, lpadd, lpflash, lpunpack
|
2022-12-17 10:02:37 +00:00
|
|
|
- mkbootimg, unpack_bootimg, repack_bootimg, avbtool
|
|
|
|
- mkdtboimg
|
2021-06-04 09:07:49 +00:00
|
|
|
'';
|
|
|
|
# https://developer.android.com/studio/command-line#tools-platform
|
|
|
|
# https://developer.android.com/studio/releases/platform-tools
|
|
|
|
homepage = "https://github.com/nmeum/android-tools";
|
|
|
|
license = with licenses; [ asl20 unicode-dfs-2015 ];
|
2022-10-30 15:09:59 +00:00
|
|
|
platforms = platforms.unix;
|
2021-06-04 09:07:49 +00:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|