1{ lib
2, adb-shell
3, aiofiles
4, buildPythonPackage
5, fetchFromGitHub
6, isPy3k
7, mock
8, pure-python-adb
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "androidtv";
14 version = "0.0.60";
15
16 # pypi does not contain tests, using github sources instead
17 src = fetchFromGitHub {
18 owner = "JeffLIrion";
19 repo = "python-androidtv";
20 rev = "v${version}";
21 sha256 = "sha256-GWCiRxZ6pHrcVkOKNGxSK8lUD0RohtED8czXIWUoVaM=";
22 };
23
24 propagatedBuildInputs = [ adb-shell pure-python-adb ]
25 ++ lib.optionals (isPy3k) [ aiofiles ];
26
27 checkInputs = [
28 mock
29 pytestCheckHook
30 ];
31
32 pythonImportsCheck = [ "androidtv" ];
33
34 meta = with lib; {
35 description =
36 "Communicate with an Android TV or Fire TV device via ADB over a network";
37 homepage = "https://github.com/JeffLIrion/python-androidtv/";
38 license = licenses.mit;
39 maintainers = with maintainers; [ jamiemagee ];
40 };
41}