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}:
13
14buildPythonPackage rec {
15 pname = "androidtv";
16 version = "0.0.73";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "JeffLIrion";
23 repo = "python-androidtv";
24 rev = "v${version}";
25 hash = "sha256-FJUTJfS9jiC7KDf6XcGVRNXf75bVUOBPZe8y9M39Uak=";
26 };
27
28 propagatedBuildInputs = [
29 adb-shell
30 async-timeout
31 pure-python-adb
32 ];
33
34 passthru.optional-dependencies = {
35 async = [ aiofiles ];
36 inherit (adb-shell.optional-dependencies) usb;
37 };
38
39 nativeCheckInputs = [
40 mock
41 pytestCheckHook
42 ] ++ passthru.optional-dependencies.async ++ passthru.optional-dependencies.usb;
43
44 disabledTests = [
45 # Requires git but fails anyway
46 "test_no_underscores"
47 ];
48
49 pythonImportsCheck = [ "androidtv" ];
50
51 meta = with lib; {
52 description = "Communicate with an Android TV or Fire TV device via ADB over a network";
53 homepage = "https://github.com/JeffLIrion/python-androidtv/";
54 license = licenses.mit;
55 maintainers = with maintainers; [ jamiemagee ];
56 };
57}