1{ lib
2, buildPythonPackage
3, docopt
4, fetchFromGitHub
5, jdk11
6, psutil
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "adb-enhanced";
12 version = "2.5.14";
13
14 disabled = pythonOlder "3.4";
15
16 src = fetchFromGitHub {
17 owner = "ashishb";
18 repo = pname;
19 rev = version;
20 sha256 = "sha256-GaPOYBQEGI40MutjjY8exABqGge2p/buk9v+NcZ5oJs=";
21 };
22
23 propagatedBuildInputs = [
24 psutil
25 docopt
26 ];
27
28 postPatch = ''
29 substituteInPlace adbe/adb_enhanced.py \
30 --replace "cmd = 'java" "cmd = '${jdk11}/bin/java"
31 '';
32
33 # Disable tests because they require a dedicated Android emulator
34 doCheck = false;
35
36 pythonImportsCheck = [
37 "adbe"
38 ];
39
40 meta = with lib; {
41 description = "Tool for Android testing and development";
42 homepage = "https://github.com/ashishb/adb-enhanced";
43 sourceProvenance = with sourceTypes; [
44 fromSource
45 binaryBytecode
46 ];
47 license = licenses.asl20;
48 maintainers = with maintainers; [ vtuan10 ];
49 mainProgram = "adbe";
50 };
51}