emacsPackages.treemacs: replace python3 program (#364623)
[NixPkgs.git] / pkgs / development / python-modules / unifi-discovery / default.nix
blob198b179498918f5f85027fa08a8da228b9469406
2   lib,
3   aiohttp,
4   aioresponses,
5   buildPythonPackage,
6   fetchFromGitHub,
7   poetry-core,
8   pyroute2,
9   pytest-asyncio,
10   pytestCheckHook,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "unifi-discovery";
16   version = "1.2.0";
17   pyproject = true;
19   disabled = pythonOlder "3.9";
21   src = fetchFromGitHub {
22     owner = "bdraco";
23     repo = "unifi-discovery";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-Ea+zxV2GUAaG/BxO103NhOLzzr/TNJaOsynDad2/2VA=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
31   '';
33   build-system = [ poetry-core ];
35   dependencies = [
36     aiohttp
37     pyroute2
38   ];
40   nativeCheckInputs = [
41     aioresponses
42     pytest-asyncio
43     pytestCheckHook
44   ];
46   pytestFlagsArray = [ "--asyncio-mode=auto" ];
48   pythonImportsCheck = [ "unifi_discovery" ];
50   meta = with lib; {
51     description = "Module to discover Unifi devices";
52     homepage = "https://github.com/bdraco/unifi-discovery";
53     changelog = "https://github.com/bdraco/unifi-discovery/releases/tag/v${version}";
54     license = with licenses; [ asl20 ];
55     maintainers = with maintainers; [ fab ];
56     platforms = platforms.linux;
57   };