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.17.0";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.11";
22
23 src = fetchFromGitHub {
24 owner = "frenck";
25 repo = "python-wled";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-y32zynkVsn5vWw+BZ6ZRf9zemGOWJMN4yfNQZ0bRpos=";
28 };
29
30 postPatch = ''
31 # Upstream doesn't set a version for the pyproject.toml
32 substituteInPlace pyproject.toml \
33 --replace "0.0.0" "${version}" \
34 --replace "--cov" ""
35 '';
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 propagatedBuildInputs = [
42 aiohttp
43 awesomeversion
44 backoff
45 cachetools
46 yarl
47 ];
48
49 nativeCheckInputs = [
50 aresponses
51 pytest-asyncio
52 pytestCheckHook
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 changelog = "https://github.com/frenck/python-wled/releases/tag/v${version}";
63 license = licenses.mit;
64 maintainers = with maintainers; [ hexa ];
65 };
66}