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-09-19 14:19:46 +00:00
|
|
|
version = "80";
|
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-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-320ptaKT+6mKUj9y+MvGovp4/XVbYIlDTb9lLXY7c1w=";
|
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-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "aiounifi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|