1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 libusb1,
6 rsa,
7 pycryptodome,
8 pytest,
9 mock,
10}:
11buildPythonPackage {
12 pname = "adb-homeassistant";
13 version = "1.3.1";
14 format = "setuptools";
15
16 # pypi does not contain tests, using github sources instead
17 src = fetchFromGitHub {
18 owner = "JeffLIrion";
19 repo = "python-adb";
20 rev = "5949bf432307cbba7128e84d7bc6add7f054a078";
21 sha256 = "0s3fazvbzchn1fsvjrd1jl8w9y4dvvgq6q8m8p5lr2gri0npr581";
22 };
23
24 propagatedBuildInputs = [
25 libusb1
26 rsa
27 pycryptodome
28 ];
29
30 nativeCheckInputs = [
31 pytest
32 mock
33 ];
34 checkPhase = ''
35 py.test test
36 '';
37
38 meta = with lib; {
39 description = "Pure python implementation of the Android ADB and Fastboot protocols";
40 homepage = "https://github.com/JeffLIrion/python-adb/tree/adb-homeassistant";
41 license = licenses.asl20;
42 maintainers = [ maintainers.makefu ];
43 };
44}