1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 poetry-core, 8 pytest-asyncio, 9 pytestCheckHook, 10 syrupy, 11 pythonOlder, 12 yarl, 13}: 14 15buildPythonPackage rec { 16 pname = "p1monitor"; 17 version = "3.1.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.11"; 21 22 src = fetchFromGitHub { 23 owner = "klaasnicolaas"; 24 repo = "python-p1monitor"; 25 tag = "v${version}"; 26 hash = "sha256-vr/JLvn593cgZ2KEsfDW1lS4QlGiymr0qZ8130zo6Ec="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace '"0.0.0"' '"${version}"' \ 32 --replace 'addopts = "--cov"' "" 33 ''; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 aiohttp 39 yarl 40 ]; 41 42 nativeCheckInputs = [ 43 aresponses 44 pytest-asyncio 45 pytestCheckHook 46 syrupy 47 ]; 48 49 pythonImportsCheck = [ "p1monitor" ]; 50 51 meta = with lib; { 52 description = "Module for interacting with the P1 Monitor"; 53 homepage = "https://github.com/klaasnicolaas/python-p1monitor"; 54 changelog = "https://github.com/klaasnicolaas/python-p1monitor/releases/tag/v${version}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}