2020-10-19 00:13:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, backoff
|
2021-06-28 23:13:55 +00:00
|
|
|
, poetry-core
|
2020-10-19 00:13:06 +00:00
|
|
|
, packaging
|
|
|
|
, yarl
|
|
|
|
, aresponses
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wled";
|
2021-08-08 23:34:03 +00:00
|
|
|
version = "0.8.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
format = "pyproject";
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-wled";
|
|
|
|
rev = "v${version}";
|
2021-08-08 23:34:03 +00:00
|
|
|
sha256 = "1jhykilb81sp1srxk91222qglwdlr993ssvgfnl837nbcx6ws1hw";
|
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
|
|
|
|
backoff
|
|
|
|
packaging
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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" ""
|
|
|
|
'';
|
|
|
|
|
2020-11-06 00:33:48 +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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|