1{ lib
2, aiohttp
3, aresponses
4, awesomeversion
5, backoff
6, buildPythonPackage
7, cachetools
8, fetchFromGitHub
9, poetry-core
10, pytest-asyncio
11, pytest-freezegun
12, pytestCheckHook
13, pythonOlder
14, xmltodict
15, yarl
16}:
17
18buildPythonPackage rec {
19 pname = "rokuecp";
20 version = "0.17.0";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "ctalkington";
27 repo = "python-rokuecp";
28 rev = version;
29 hash = "sha256-M4eZzFphhc96Pf1bspD+Hvl9SUN1N72xnxdtVFiPc78=";
30 };
31
32 nativeBuildInputs = [
33 poetry-core
34 ];
35
36 propagatedBuildInputs = [
37 aiohttp
38 backoff
39 cachetools
40 xmltodict
41 awesomeversion
42 yarl
43 ];
44
45 checkInputs = [
46 aresponses
47 pytest-asyncio
48 pytest-freezegun
49 pytestCheckHook
50 ];
51
52 postPatch = ''
53 substituteInPlace pyproject.toml \
54 --replace 'version = "0.0.0"' 'version = "${version}"' \
55 --replace " --cov" ""
56 '';
57
58 disabledTests = [
59 # Network related tests are having troube in the sandbox
60 "test_resolve_hostname"
61 "test_get_dns_state"
62 # Assertion issue
63 "test_guess_stream_format"
64 "test_update_tv"
65 "test_get_apps_single_app"
66 "test_get_tv_channels_single_channel"
67 ];
68
69 pythonImportsCheck = [
70 "rokuecp"
71 ];
72
73 meta = with lib; {
74 description = "Asynchronous Python client for Roku (ECP)";
75 homepage = "https://github.com/ctalkington/python-rokuecp";
76 license = licenses.mit;
77 maintainers = with maintainers; [ fab ];
78 };
79}