2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pyroute2
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "unifi-discovery";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "1.1.5";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
hash = "sha256-WO1oLD09fokMR7lVCqs1Qeodjc+Yg431otl9rohtmPo=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
pyroute2
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|