{ lib, buildPythonPackage, fetchFromGitHub, # build-system poetry-core, # dependencies aiofiles, aiohttp, aioshutil, async-timeout, av, convertertools, dateparser, orjson, packaging, pillow, platformdirs, propcache, pydantic, pydantic-extra-types, pyjwt, rich, typer, yarl, # tests aiosqlite, asttokens, ffmpeg, pytest-asyncio, pytest-benchmark, pytest-cov-stub, pytest-timeout, pytest-xdist, pytestCheckHook, }: buildPythonPackage rec { pname = "uiprotect"; version = "8.0.0"; pyproject = true; src = fetchFromGitHub { owner = "uilibs"; repo = "uiprotect"; tag = "v${version}"; hash = "sha256-YYF7YERl9pKpnfD1Q00NlL8zWfEohMBO3UuidedLHn0="; }; build-system = [ poetry-core ]; pythonRelaxDeps = [ "aiofiles" "pydantic" ]; dependencies = [ aiofiles aiohttp aioshutil async-timeout av convertertools dateparser orjson packaging pillow platformdirs propcache pydantic pydantic-extra-types pyjwt rich typer yarl ]; nativeCheckInputs = [ aiosqlite asttokens ffmpeg # Required for command ffprobe pytest-asyncio pytest-benchmark pytest-cov-stub pytest-timeout pytest-xdist pytestCheckHook ]; pytestFlags = [ "--benchmark-disable" ]; pythonImportsCheck = [ "uiprotect" ]; meta = { description = "Python API for UniFi Protect (Unofficial)"; homepage = "https://github.com/uilibs/uiprotect"; changelog = "https://github.com/uilibs/uiprotect/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ hexa ]; }; }