Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / unifi-discovery / default.nix
blobcd53dae36822f80eb2e63c2c5c7c48c2ab560c8d
1 { lib
2 , aiohttp
3 , aioresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pyroute2
8 , pytest-asyncio
9 , pytestCheckHook
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "unifi-discovery";
15   version = "1.1.7";
16   format = "pyproject";
18   disabled = pythonOlder "3.9";
20   src = fetchFromGitHub {
21     owner = "bdraco";
22     repo = pname;
23     rev = "refs/tags/v${version}";
24     hash = "sha256-EQFk3kRY/JL1ZTDdHKzl0KbMUuhZSFc4tYqAYvsNSj0=";
25   };
27   nativeBuildInputs = [
28     poetry-core
29   ];
31   propagatedBuildInputs = [
32     aiohttp
33     pyroute2
34   ];
36   nativeCheckInputs = [
37     aioresponses
38     pytest-asyncio
39     pytestCheckHook
40   ];
42   pytestFlagsArray = [
43     "--asyncio-mode=auto"
44   ];
46   postPatch = ''
47     substituteInPlace pyproject.toml \
48       --replace "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
49   '';
51   pythonImportsCheck = [
52     "unifi_discovery"
53   ];
55   meta = with lib; {
56     description = "Module to discover Unifi devices";
57     homepage = "https://github.com/bdraco/unifi-discovery";
58     license = with licenses; [ asl20 ];
59     maintainers = with maintainers; [ fab ];
60   };