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