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