02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aioresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pyroute2
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "unifi-discovery";
|
|
version = "1.1.5";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdraco";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-WO1oLD09fokMR7lVCqs1Qeodjc+Yg431otl9rohtmPo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
pyroute2
|
|
];
|
|
|
|
checkInputs = [
|
|
aioresponses
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--asyncio-mode=legacy"
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"unifi_discovery"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Module to discover Unifi devices";
|
|
homepage = "https://github.com/bdraco/unifi-discovery";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|