blob: 760b9f96c89ba223926fe853a24d659408c88705 (
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
59
60
61
|
{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pyroute2
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "unifi-discovery";
version = "1.1.8";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bdraco";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gE/2awyhDACrc0nuTvTPOcK2lFbPIZAXDPRnVJtWFco=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pyroute2
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
"--asyncio-mode=auto"
];
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 ];
};
}
|