blob: 1bfcce4e430e4f65494c844a5e5f41f243e191c9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pyroute2,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "unifi-discovery";
version = "1.1.8";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bdraco";
repo = "unifi-discovery";
rev = "refs/tags/v${version}";
hash = "sha256-gE/2awyhDACrc0nuTvTPOcK2lFbPIZAXDPRnVJtWFco=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
pyroute2
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "unifi_discovery" ];
meta = with lib; {
description = "Module to discover Unifi devices";
homepage = "https://github.com/bdraco/unifi-discovery";
changelog = "https://github.com/bdraco/unifi-discovery/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}
|