1{
2 lib,
3 adb-shell,
4 aiofiles,
5 async-timeout,
6 buildPythonPackage,
7 fetchFromGitHub,
8 mock,
9 pure-python-adb,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "androidtv";
17 version = "0.0.75";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "JeffLIrion";
24 repo = "python-androidtv";
25 tag = "v${version}";
26 hash = "sha256-2WFfGGEZkM3fWyTo5P6H3ha04Qyx2OiYetlGWv0jXac=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 adb-shell
33 async-timeout
34 pure-python-adb
35 ];
36
37 optional-dependencies = {
38 async = [ aiofiles ];
39 inherit (adb-shell.optional-dependencies) usb;
40 };
41
42 nativeCheckInputs =
43 [
44 mock
45 pytestCheckHook
46 ]
47 ++ optional-dependencies.async
48 ++ optional-dependencies.usb;
49
50 disabledTests = [
51 # Requires git but fails anyway
52 "test_no_underscores"
53 ];
54
55 pythonImportsCheck = [ "androidtv" ];
56
57 meta = with lib; {
58 description = "Communicate with an Android TV or Fire TV device via ADB over a network";
59 homepage = "https://github.com/JeffLIrion/python-androidtv/";
60 license = licenses.mit;
61 maintainers = with maintainers; [ jamiemagee ];
62 };
63}