2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aioresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
orjson,
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
segno,
|
|
|
|
setuptools,
|
|
|
|
trustme,
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiounifi";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "78";
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-fY3VsXJfs/uqqQjR6Sp03XlkCOk+8GvXq476dgagJQ8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "setuptools==" "setuptools>=" \
|
|
|
|
--replace-fail "wheel==" "wheel>="
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
sed -i '/--cov=/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-10-01 09:20:50 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-04-21 15:54:59 +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; [ ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "aiounifi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|