2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2022-02-10 20:34:41 +00:00
|
|
|
, awesomeversion
|
|
|
|
, backoff
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
2022-01-27 00:19:43 +00:00
|
|
|
, cachetools
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, poetry-core
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytest-asyncio
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytest-freezegun
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
|
|
|
, xmltodict
|
|
|
|
, yarl
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rokuecp";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.18.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
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}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-YvJ1+o7/S/QNROedYGsP8m99Dr+WpAkfe5YPEN+2ZhU=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
poetry-core
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-03-30 09:31:56 +00:00
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"rokuecp"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|