nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 70 lines 1.3 kB view raw
1{ lib 2, aiofiles 3, buildPythonPackage 4, cryptography 5, fetchFromGitHub 6, isPy3k 7, libusb1 8, mock 9, pyasn1 10, pythonAtLeast 11, pycryptodome 12, pytestCheckHook 13, rsa 14}: 15 16buildPythonPackage rec { 17 pname = "adb-shell"; 18 version = "0.4.2"; 19 format = "setuptools"; 20 21 disabled = !isPy3k; 22 23 src = fetchFromGitHub { 24 owner = "JeffLIrion"; 25 repo = "adb_shell"; 26 rev = "v${version}"; 27 hash = "sha256-8tclSjmLlTAIeq6t7YPGtJwvSwtlzQ7sRAQatcQRzeY="; 28 }; 29 30 propagatedBuildInputs = [ 31 cryptography 32 pyasn1 33 rsa 34 ]; 35 36 passthru.optional-dependencies = { 37 async = [ 38 aiofiles 39 ]; 40 usb = [ 41 libusb1 42 ]; 43 }; 44 45 checkInputs = [ 46 mock 47 pycryptodome 48 pytestCheckHook 49 ] 50 ++ passthru.optional-dependencies.async 51 ++ passthru.optional-dependencies.usb; 52 53 disabledTests = lib.optionals (pythonAtLeast "3.10") [ 54 # Tests are failing with Python 3.10 55 # https://github.com/JeffLIrion/adb_shell/issues/198 56 "TestAdbDeviceAsync" 57 "TestTcpTransportAsync" 58 ]; 59 60 pythonImportsCheck = [ 61 "adb_shell" 62 ]; 63 64 meta = with lib; { 65 description = "Python implementation of ADB with shell and FileSync functionality"; 66 homepage = "https://github.com/JeffLIrion/adb_shell"; 67 license = licenses.asl20; 68 maintainers = with maintainers; [ jamiemagee ]; 69 }; 70}