2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aioresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pyroute2,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "unifi-discovery";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.2.0";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "unifi-discovery";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-Ea+zxV2GUAaG/BxO103NhOLzzr/TNJaOsynDad2/2VA=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-06-16 17:23:12 +00:00
|
|
|
aiohttp
|
|
|
|
pyroute2
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "unifi_discovery" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to discover Unifi devices";
|
|
|
|
homepage = "https://github.com/bdraco/unifi-discovery";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/bdraco/unifi-discovery/releases/tag/v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-06-05 15:53:02 +00:00
|
|
|
platforms = platforms.linux;
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|