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