1{ lib 2, aiofiles 3, async-timeout 4, buildPythonPackage 5, cryptography 6, fetchFromGitHub 7, isPy3k 8, libusb1 9, mock 10, pyasn1 11, pythonAtLeast 12, pycryptodome 13, pytestCheckHook 14, rsa 15}: 16 17buildPythonPackage rec { 18 pname = "adb-shell"; 19 version = "0.4.4"; 20 format = "setuptools"; 21 22 disabled = !isPy3k; 23 24 src = fetchFromGitHub { 25 owner = "JeffLIrion"; 26 repo = "adb_shell"; 27 rev = "v${version}"; 28 hash = "sha256-pOkFUh3SEu/ch9R1lVoQn50nufQp8oI+D4/+Ybal5CA="; 29 }; 30 31 propagatedBuildInputs = [ 32 cryptography 33 pyasn1 34 rsa 35 ]; 36 37 passthru.optional-dependencies = { 38 async = [ 39 aiofiles 40 async-timeout 41 ]; 42 usb = [ 43 libusb1 44 ]; 45 }; 46 47 nativeCheckInputs = [ 48 mock 49 pycryptodome 50 pytestCheckHook 51 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 52 53 pythonImportsCheck = [ 54 "adb_shell" 55 ]; 56 57 meta = with lib; { 58 description = "Python implementation of ADB with shell and FileSync functionality"; 59 homepage = "https://github.com/JeffLIrion/adb_shell"; 60 license = licenses.asl20; 61 maintainers = with maintainers; [ jamiemagee ]; 62 }; 63}