summary refs log tree commit diff
path: root/pkgs/tools/misc/android-tools/default.nix
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-05-30 22:06:45 +0200
committerMichael Weiss <dev.primeos@gmail.com>2021-06-02 12:08:01 +0200
commitc57b309d32d74e4f1e60d32d32c53a76aac89577 (patch)
tree5dfeb60eaaf1675b6a402590a807bf1bad0fb500 /pkgs/tools/misc/android-tools/default.nix
parent0882e24b7148e54eca9722c39021590bff47c8c0 (diff)
downloadnixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar.gz
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar.bz2
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar.lz
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar.xz
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.tar.zst
nixpkgs-c57b309d32d74e4f1e60d32d32c53a76aac89577.zip
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.
Diffstat (limited to 'pkgs/tools/misc/android-tools/default.nix')
-rw-r--r--pkgs/tools/misc/android-tools/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/tools/misc/android-tools/default.nix b/pkgs/tools/misc/android-tools/default.nix
new file mode 100644
index 00000000000..69a74e465c9
--- /dev/null
+++ b/pkgs/tools/misc/android-tools/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl
+, cmake, perl, go
+, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "android-tools";
+  version = "31.0.0p1";
+
+  src = fetchurl {
+    url = "https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz";
+    sha256 = "1dn7v10gdx1pi0pkddznd5sdz941qz0x4jww8h2mk50nbyxc792i";
+  };
+
+  nativeBuildInputs = [ cmake perl go ];
+  buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
+
+  # Don't try to fetch any Go modules via the network:
+  GOFLAGS = [ "-mod=vendor" ];
+
+  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
+    '';
+    # 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 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ primeos ];
+  };
+}