2020-10-19 00:13:06 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2021-12-19 01:06:50 +00:00
|
|
|
, awesomeversion
|
2020-10-19 00:13:06 +00:00
|
|
|
, backoff
|
2021-12-26 17:43:05 +00:00
|
|
|
, buildPythonPackage
|
2021-12-19 01:06:50 +00:00
|
|
|
, cachetools
|
2021-12-26 17:43:05 +00:00
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, poetry-core
|
2020-10-19 00:13:06 +00:00
|
|
|
, yarl
|
|
|
|
, aresponses
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
, pythonOlder
|
2020-10-19 00:13:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wled";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.16.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
format = "pyproject";
|
2020-10-19 00:13:06 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
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}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-esINtvctvgl8AqNwCDVnGU+3j/UzEHqY8H1Rws1kQfs=";
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
2020-10-19 00:13:06 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-10-19 00:13:06 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version for the pyproject.toml
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "0.0.0" "${version}" \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +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 ];
|
|
|
|
};
|
|
|
|
}
|