Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / zeroconf / default.nix
blobbd00a51c3fa501bf90df48acb65429d4580a53b6
1 { lib
2 , cython
3 , async-timeout
4 , buildPythonPackage
5 , fetchFromGitHub
6 , ifaddr
7 , poetry-core
8 , pytest-asyncio
9 , pytest-timeout
10 , pythonOlder
11 , pytestCheckHook
12 , setuptools
15 buildPythonPackage rec {
16   pname = "zeroconf";
17   version = "0.132.2";
18   pyproject = true;
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "jstasiak";
24     repo = "python-zeroconf";
25     rev = "refs/tags/${version}";
26     hash = "sha256-Jmz9zs//EVdBbEElq6OEfGZiOiMvjV5CJxZOM/lHvok=";
27   };
29   postPatch = ''
30     substituteInPlace pyproject.toml \
31       --replace-fail "Cython>=3.0.8" "Cython"
32   '';
34   build-system = [
35     cython
36     poetry-core
37     setuptools
38   ];
40   dependencies = [
41     ifaddr
42   ] ++ lib.optionals (pythonOlder "3.11") [
43     async-timeout
44   ];
46   nativeCheckInputs = [
47     pytest-asyncio
48     pytest-timeout
49     pytestCheckHook
50   ];
52   preCheck = ''
53     sed -i '/addopts/d' pyproject.toml
54   '';
56   disabledTests = [
57     # OSError: [Errno 19] No such device
58     "test_close_multiple_times"
59     "test_integration_with_listener_ipv6"
60     "test_launch_and_close"
61     "test_launch_and_close_context_manager"
62     "test_launch_and_close_v4_v6"
63   ];
65   __darwinAllowLocalNetworking = true;
67   pythonImportsCheck = [
68     "zeroconf"
69     "zeroconf.asyncio"
70   ];
72   meta = with lib; {
73     description = "Python implementation of multicast DNS service discovery";
74     homepage = "https://github.com/python-zeroconf/python-zeroconf";
75     changelog = "https://github.com/python-zeroconf/python-zeroconf/releases/tag/${version}";
76     license = licenses.lgpl21Only;
77     maintainers = with maintainers; [ abbradar ];
78   };