2021-03-14 00:35:33 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, yarl
|
|
|
|
}:
|
2020-10-02 14:49:47 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "adguardhome";
|
2021-03-14 00:35:33 +00:00
|
|
|
version = "0.5.0";
|
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-10-02 14:49:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-${pname}";
|
|
|
|
rev = "v${version}";
|
2021-03-14 00:35:33 +00:00
|
|
|
sha256 = "sha256-f8uZF4DXbfiL1nL82shjGNpo6lXSUomRgO1YnNT/GDw=";
|
2020-10-02 14:49:47 +01:00
|
|
|
};
|
|
|
|
|
2021-03-14 00:35:33 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml --replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "adguardhome" ];
|
2020-10-02 14:49:47 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-03-14 00:35:33 +00:00
|
|
|
description = "Python client for the AdGuard Home API";
|
2020-10-02 14:49:47 +01:00
|
|
|
homepage = "https://github.com/frenck/python-adguardhome";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|