nixpkgs/pkgs/development/python-modules/aiounifi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.3 KiB
Nix
Raw Normal View History

2021-09-29 07:41:51 +00:00
{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
2022-07-06 20:05:28 +00:00
, orjson
2021-09-29 07:41:51 +00:00
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, segno
, setuptools
, trustme
2021-09-29 07:41:51 +00:00
}:
2019-02-28 06:03:19 +00:00
buildPythonPackage rec {
pname = "aiounifi";
version = "72";
2024-01-18 07:10:38 +00:00
pyproject = true;
2019-02-28 06:03:19 +00:00
disabled = pythonOlder "3.11";
2019-02-28 06:03:19 +00:00
2021-09-29 07:41:51 +00:00
src = fetchFromGitHub {
owner = "Kane610";
2024-01-18 07:10:38 +00:00
repo = "aiounifi";
2022-06-20 07:14:40 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-PrFI5ncHW4r2Re1BIqRZlz8ns6d5p6y6PASCleSmyNc=";
2019-02-28 06:03:19 +00:00
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "setuptools==" "setuptools>=" \
--replace "wheel==" "wheel>="
sed -i '/--cov=/d' pyproject.toml
'';
nativeBuildInputs = [
setuptools
];
2021-09-29 07:41:51 +00:00
propagatedBuildInputs = [
aiohttp
2022-07-06 20:05:28 +00:00
orjson
segno
2021-09-29 07:41:51 +00:00
];
2019-02-28 06:03:19 +00:00
nativeCheckInputs = [
2021-09-29 07:41:51 +00:00
aioresponses
pytest-aiohttp
pytest-asyncio
pytestCheckHook
trustme
2021-09-29 07:41:51 +00:00
];
pytestFlagsArray = [
"--asyncio-mode=auto"
];
pythonImportsCheck = [
"aiounifi"
];
2019-02-28 06:03:19 +00:00
meta = with lib; {
2021-09-29 07:41:51 +00:00
description = "Python library for communicating with Unifi Controller API";
mainProgram = "aiounifi";
2021-09-29 07:41:51 +00:00
homepage = "https://github.com/Kane610/aiounifi";
changelog = "https://github.com/Kane610/aiounifi/releases/tag/v${version}";
2021-09-29 07:41:51 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2019-02-28 06:03:19 +00:00
};
}