2021-10-01 09:20:50 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-07-14 12:49:19 +00:00
|
|
|
, orjson
|
2021-10-01 09:20:50 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiounifi";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "42";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kane610";
|
|
|
|
repo = pname;
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-vScAWEjdzXSy1gktz+Tfhx13S6OeXZbwZgoS6D1BBtk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-07-14 12:49:19 +00:00
|
|
|
orjson
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=auto"
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiounifi"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-01 09:20:50 +00:00
|
|
|
description = "Python library for communicating with Unifi Controller API";
|
|
|
|
homepage = "https://github.com/Kane610/aiounifi";
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|