567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
66 lines
1.2 KiB
Nix
66 lines
1.2 KiB
Nix
{
|
|
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";
|
|
};
|
|
}
|