2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
awesomeversion,
|
|
|
|
backoff,
|
|
|
|
buildPythonPackage,
|
|
|
|
cachetools,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-freezegun,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
xmltodict,
|
|
|
|
yarl,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rokuecp";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.19.4";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ctalkington";
|
|
|
|
repo = "python-rokuecp";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-GotVSRSMdbAtDmVEXNizf5Pf/02sva1R/6ULL6h7ciY=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace-fail "--cov" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2021-04-25 03:57:28 +00:00
|
|
|
aiohttp
|
2022-02-10 20:34:41 +00:00
|
|
|
backoff
|
2022-01-27 00:19:43 +00:00
|
|
|
cachetools
|
2021-04-25 03:57:28 +00:00
|
|
|
xmltodict
|
2022-02-10 20:34:41 +00:00
|
|
|
awesomeversion
|
2021-04-25 03:57:28 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-freezegun
|
|
|
|
pytestCheckHook
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
2022-03-30 09:31:56 +00:00
|
|
|
# Network related tests are having troube in the sandbox
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_resolve_hostname"
|
2022-03-30 09:31:56 +00:00
|
|
|
"test_get_dns_state"
|
2022-02-20 05:27:41 +00:00
|
|
|
# Assertion issue
|
|
|
|
"test_guess_stream_format"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_update_tv"
|
|
|
|
"test_get_apps_single_app"
|
|
|
|
"test_get_tv_channels_single_channel"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "rokuecp" ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous Python client for Roku (ECP)";
|
|
|
|
homepage = "https://github.com/ctalkington/python-rokuecp";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/ctalkington/python-rokuecp/releases/tag/${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
}
|