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