at master 1.4 kB view raw
1{ 2 lib, 3 aiohttp, 4 aresponses, 5 awesomeversion, 6 backoff, 7 buildPythonPackage, 8 cachetools, 9 fetchFromGitHub, 10 mashumaro, 11 orjson, 12 poetry-core, 13 pytest-asyncio, 14 pytest-cov-stub, 15 pytest-xdist, 16 pytestCheckHook, 17 pythonOlder, 18 typer, 19 yarl, 20 zeroconf, 21}: 22 23buildPythonPackage rec { 24 pname = "wled"; 25 version = "0.21.0"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.11"; 29 30 src = fetchFromGitHub { 31 owner = "frenck"; 32 repo = "python-wled"; 33 tag = "v${version}"; 34 hash = "sha256-yJ7tiJWSOpkkLwKXo4lYlDrp1FEJ/cGoDaXJamY4ARg="; 35 }; 36 37 postPatch = '' 38 # Upstream doesn't set a version for the pyproject.toml 39 substituteInPlace pyproject.toml \ 40 --replace-fail "0.0.0" "${version}" \ 41 ''; 42 43 build-system = [ poetry-core ]; 44 45 dependencies = [ 46 aiohttp 47 awesomeversion 48 backoff 49 cachetools 50 mashumaro 51 orjson 52 yarl 53 ]; 54 55 optional-dependencies = { 56 cli = [ 57 typer 58 zeroconf 59 ]; 60 }; 61 62 nativeCheckInputs = [ 63 aresponses 64 pytest-asyncio 65 pytest-cov-stub 66 pytest-xdist 67 pytestCheckHook 68 ]; 69 70 pythonImportsCheck = [ "wled" ]; 71 72 meta = with lib; { 73 description = "Asynchronous Python client for WLED"; 74 homepage = "https://github.com/frenck/python-wled"; 75 changelog = "https://github.com/frenck/python-wled/releases/tag/v${version}"; 76 license = licenses.mit; 77 maintainers = with maintainers; [ hexa ]; 78 }; 79}