about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix b/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
new file mode 100644
index 000000000000..59eb468868a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
@@ -0,0 +1,34 @@
+{ lib, jdk11, fetchFromGitHub, buildPythonPackage, docopt, psutil, pythonOlder }:
+
+buildPythonPackage rec {
+  pname = "adb-enhanced";
+  version = "2.5.10";
+
+  disabled = pythonOlder "3.4";
+
+  src = fetchFromGitHub {
+    owner = "ashishb";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-JMbcOk9Yr4WbfVUMKe5zZZWvvjKwhpPMdBt9d7xE6ek=";
+  };
+
+  postPatch = ''
+    substituteInPlace adbe/adb_enhanced.py \
+      --replace "cmd = 'java" "cmd = '${jdk11}/bin/java"
+  '';
+
+  propagatedBuildInputs = [ psutil docopt ];
+
+  # Disable tests because they require a dedicated android emulator
+  doCheck = false;
+
+  pythonImportsCheck = [ "adbe" ];
+
+  meta = with lib; {
+    description = "Tool for Android testing and development";
+    homepage = "https://github.com/ashishb/adb-enhanced";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ vtuan10 ];
+  };
+}