at master 1.4 kB view raw
1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 fetchpatch2, 8 mashumaro, 9 orjson, 10 poetry-core, 11 pytest-asyncio, 12 pytest-cov-stub, 13 pytestCheckHook, 14 pythonOlder, 15 syrupy, 16 yarl, 17}: 18 19buildPythonPackage rec { 20 pname = "powerfox"; 21 version = "1.3.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.11"; 25 26 src = fetchFromGitHub { 27 owner = "klaasnicolaas"; 28 repo = "python-powerfox"; 29 tag = "v${version}"; 30 hash = "sha256-oGOKh+/KCR7eFi4b8TrLiBiOfauhUhKkRvPMejwelJY="; 31 }; 32 33 patches = [ 34 # requires poetry-core>=2.0 35 (fetchpatch2 { 36 url = "https://github.com/klaasnicolaas/python-powerfox/commit/e3f1e39573fc278cd2800a2d4f4315cf0aff592b.patch"; 37 includes = [ "pyproject.toml" ]; 38 hash = "sha256-hkXLT3IWBVlbAwWvu/erENEsxOuIb8wv9UIVtAZqMPc="; 39 revert = true; 40 }) 41 ]; 42 43 build-system = [ poetry-core ]; 44 45 dependencies = [ 46 aiohttp 47 mashumaro 48 orjson 49 yarl 50 ]; 51 52 nativeCheckInputs = [ 53 aresponses 54 pytest-asyncio 55 pytest-cov-stub 56 pytestCheckHook 57 syrupy 58 ]; 59 60 pythonImportsCheck = [ "powerfox" ]; 61 62 meta = { 63 description = "Asynchronous Python client for the Powerfox devices"; 64 homepage = "https://github.com/klaasnicolaas/python-powerfox"; 65 changelog = "https://github.com/klaasnicolaas/python-powerfox/releases/tag/${src.tag}"; 66 license = lib.licenses.mit; 67 maintainers = with lib.maintainers; [ fab ]; 68 }; 69}