nixpkgs/pkgs/development/python-modules/aiounifi/default.nix
2023-01-02 09:59:15 +01:00

55 lines
1 KiB
Nix

{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, orjson
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiounifi";
version = "43";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Kane610";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-qpFQdNlw6voqccoJwPsnmbU5DtAC6zwtouUeysZ8/0M=";
};
propagatedBuildInputs = [
aiohttp
orjson
];
checkInputs = [
aioresponses
pytest-aiohttp
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
"--asyncio-mode=auto"
];
pythonImportsCheck = [
"aiounifi"
];
meta = with lib; {
description = "Python library for communicating with Unifi Controller API";
homepage = "https://github.com/Kane610/aiounifi";
changelog = "https://github.com/Kane610/aiounifi/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}