1{ lib
2, aiohttp
3, awesomeversion
4, backoff
5, buildPythonPackage
6, cachetools
7, fetchFromGitHub
8, poetry-core
9, yarl
10, aresponses
11, pytest-asyncio
12, pytestCheckHook
13, pythonOlder
14}:
15
16buildPythonPackage rec {
17 pname = "wled";
18 version = "0.14.1";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "frenck";
25 repo = "python-wled";
26 rev = "refs/tags/v${version}";
27 sha256 = "sha256-ytjCjxnJOMmFlGS+AuEAbIZcV2yoTgaXSLdqxPg6Hew=";
28 };
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 awesomeversion
37 backoff
38 cachetools
39 yarl
40 ];
41
42 checkInputs = [
43 aresponses
44 pytest-asyncio
45 pytestCheckHook
46 ];
47
48 postPatch = ''
49 # Upstream doesn't set a version for the pyproject.toml
50 substituteInPlace pyproject.toml \
51 --replace "0.0.0" "${version}" \
52 --replace "--cov" ""
53 '';
54
55 pythonImportsCheck = [
56 "wled"
57 ];
58
59 meta = with lib; {
60 description = "Asynchronous Python client for WLED";
61 homepage = "https://github.com/frenck/python-wled";
62 license = licenses.mit;
63 maintainers = with maintainers; [ hexa ];
64 };
65}