git.iko.soy/typeable/nixpkgs
on master help sign in
android-tools: init at 31.0.0p1

lowPrio is used to avoid collisions with the simg2img package. Licensing information is in share/licenses/android-tools/AOSP_LICENSE.

commitc57b309d32d74e4f1e60d32d32c53a76aac89577 authorMichael Weiss <dev.primeos@gmail.com> dateSun 30 May 2021, 22:06 (5 years ago) parent0882e24
3 files changed+55
lib/licenses.nix+5 pkgs/tools/misc/android-tools/default.nix+46 pkgs/top-level/all-packages.nix+4
lib/licenses.nix+5
@@ -760,6 +760,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) ({
760760 # channel and NixOS images.
761761 };
762762
763+ unicode-dfs-2015 = spdx {
764+ spdxId = "Unicode-DFS-2015";
765+ fullName = "Unicode License Agreement - Data Files and Software (2015)";
766+ };
767+
763768 unicode-dfs-2016 = spdx {
764769 spdxId = "Unicode-DFS-2016";
765770 fullName = "Unicode License Agreement - Data Files and Software (2016)";
pkgs/tools/misc/android-tools/default.nixnew file+46
@@ -0,0 +1,46 @@
1+{ lib, stdenv, fetchurl
2+, cmake, perl, go
3+, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "android-tools";
8+ version = "31.0.0p1";
9+
10+ src = fetchurl {
11+ url = "https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz";
12+ sha256 = "1dn7v10gdx1pi0pkddznd5sdz941qz0x4jww8h2mk50nbyxc792i";
13+ };
14+
15+ nativeBuildInputs = [ cmake perl go ];
16+ buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
17+
18+ # Don't try to fetch any Go modules via the network:
19+ GOFLAGS = [ "-mod=vendor" ];
20+
21+ preConfigure = ''
22+ export GOCACHE=$TMPDIR/go-cache
23+ '';
24+
25+ meta = with lib; {
26+ description = "Android SDK platform tools";
27+ longDescription = ''
28+ Android SDK Platform-Tools is a component for the Android SDK. It
29+ includes tools that interface with the Android platform, such as adb and
30+ fastboot. These tools are required for Android app development. They're
31+ also needed if you want to unlock your device bootloader and flash it
32+ with a new system image.
33+ Currently the following tools are supported:
34+ - adb
35+ - fastboot
36+ - mke2fs.android (required by fastboot)
37+ - simg2img, img2simg, append2simg
38+ '';
39+ # https://developer.android.com/studio/command-line#tools-platform
40+ # https://developer.android.com/studio/releases/platform-tools
41+ homepage = "https://github.com/nmeum/android-tools";
42+ license = with licenses; [ asl20 unicode-dfs-2015 ];
43+ platforms = platforms.linux;
44+ maintainers = with maintainers; [ primeos ];
45+ };
46+}
pkgs/top-level/all-packages.nix+4
@@ -1039,6 +1039,10 @@ in
10391039
10401040 analog = callPackage ../tools/admin/analog {};
10411041
1042+ android-tools = lowPrio (callPackage ../tools/misc/android-tools {
1043+ stdenv = if stdenv.targetPlatform.isAarch64 then gcc10Stdenv else stdenv;
1044+ });
1045+
10421046 angle-grinder = callPackage ../tools/text/angle-grinder {};
10431047
10441048 ansifilter = callPackage ../tools/text/ansifilter {};