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
|
2023-08-04 22:07:22 +00:00
|
|
|
, segno
|
2023-10-09 19:29:22 +00:00
|
|
|
, setuptools
|
|
|
|
, trustme
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiounifi";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "72";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kane610";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "aiounifi";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-PrFI5ncHW4r2Re1BIqRZlz8ns6d5p6y6PASCleSmyNc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "setuptools==" "setuptools>=" \
|
|
|
|
--replace "wheel==" "wheel>="
|
|
|
|
|
|
|
|
sed -i '/--cov=/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-07-14 12:49:19 +00:00
|
|
|
orjson
|
2023-08-04 22:07:22 +00:00
|
|
|
segno
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-01 09:20:50 +00:00
|
|
|
aioresponses
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
trustme
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/Kane610/aiounifi/releases/tag/v${version}";
|
2021-10-01 09:20:50 +00:00
|
|
|
license = licenses.mit;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|