1{ lib
2, aiohttp
3, aresponses
4, buildPythonPackage
5, fetchFromGitHub
6, poetry-core
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10, yarl
11}:
12
13buildPythonPackage rec {
14 pname = "adguardhome";
15 version = "0.5.0";
16 format = "pyproject";
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "frenck";
21 repo = "python-${pname}";
22 rev = "v${version}";
23 sha256 = "sha256-f8uZF4DXbfiL1nL82shjGNpo6lXSUomRgO1YnNT/GDw=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 aiohttp
30 yarl
31 ];
32
33 checkInputs = [
34 aresponses
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 postPatch = ''
40 substituteInPlace pyproject.toml --replace "--cov" ""
41 '';
42
43 pythonImportsCheck = [ "adguardhome" ];
44
45 meta = with lib; {
46 description = "Python client for the AdGuard Home API";
47 homepage = "https://github.com/frenck/python-adguardhome";
48 license = licenses.mit;
49 maintainers = with maintainers; [ jamiemagee ];
50 };
51}