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 mock
44 pytestCheckHook
45 ]
46 ++ optional-dependencies.async
47 ++ optional-dependencies.usb;
48
49 disabledTests = [
50 # Requires git but fails anyway
51 "test_no_underscores"
52 ];
53
54 pythonImportsCheck = [ "androidtv" ];
55
56 meta = with lib; {
57 description = "Communicate with an Android TV or Fire TV device via ADB over a network";
58 homepage = "https://github.com/JeffLIrion/python-androidtv/";
59 license = licenses.mit;
60 maintainers = with maintainers; [ jamiemagee ];
61 };
62}