{ lib, aiohttp, aioresponses, buildPythonPackage, fetchFromGitHub, orjson, pytest-aiohttp, pytest-asyncio, pytest-cov-stub, pytestCheckHook, pythonOlder, segno, setuptools, trustme, }: buildPythonPackage rec { pname = "aiounifi"; version = "88"; pyproject = true; disabled = pythonOlder "3.13"; src = fetchFromGitHub { owner = "Kane610"; repo = "aiounifi"; tag = "v${version}"; hash = "sha256-nMx2mygHn27Y1LbTZR30lQ5p4LmEt5FxOAKr6rF82JI="; }; postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "setuptools==80.9.0" "setuptools" \ --replace-fail "wheel==0.46.1" "wheel" ''; build-system = [ setuptools ]; dependencies = [ aiohttp orjson segno ]; nativeCheckInputs = [ aioresponses pytest-aiohttp pytest-asyncio pytest-cov-stub pytestCheckHook trustme ]; pythonImportsCheck = [ "aiounifi" ]; meta = { description = "Python library for communicating with Unifi Controller API"; homepage = "https://github.com/Kane610/aiounifi"; changelog = "https://github.com/Kane610/aiounifi/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = [ ]; mainProgram = "aiounifi"; }; }