2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
awesomeversion,
|
|
|
|
backoff,
|
|
|
|
buildPythonPackage,
|
|
|
|
cachetools,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
mashumaro,
|
|
|
|
orjson,
|
2024-06-05 15:53:02 +00:00
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
typer,
|
|
|
|
yarl,
|
|
|
|
zeroconf,
|
2020-10-19 00:13:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wled";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.20.2";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2020-10-19 00:13:06 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-wled";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-7P/V83dGkfJJjZxZtiEwQXIY7CeBZ/fmvTdEjDirKj0=";
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version for the pyproject.toml
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail "0.0.0" "${version}" \
|
|
|
|
--replace-fail "--cov" ""
|
2023-11-16 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2020-10-19 00:13:06 +00:00
|
|
|
aiohttp
|
2021-12-19 01:06:50 +00:00
|
|
|
awesomeversion
|
2020-10-19 00:13:06 +00:00
|
|
|
backoff
|
2021-12-19 01:06:50 +00:00
|
|
|
cachetools
|
2024-09-19 14:19:46 +00:00
|
|
|
mashumaro
|
|
|
|
orjson
|
2020-10-19 00:13:06 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
cli = [
|
|
|
|
typer
|
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-10-19 00:13:06 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
2024-02-07 01:22:34 +00:00
|
|
|
pytest-xdist
|
2020-10-19 00:13:06 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "wled" ];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous Python client for WLED";
|
|
|
|
homepage = "https://github.com/frenck/python-wled";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/frenck/python-wled/releases/tag/v${version}";
|
2020-10-19 00:13:06 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|