1{
2 lib,
3 cython,
4 async-timeout,
5 buildPythonPackage,
6 fetchFromGitHub,
7 ifaddr,
8 poetry-core,
9 pytest-asyncio,
10 pytest-cov-stub,
11 pytest-timeout,
12 pythonOlder,
13 pytestCheckHook,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "zeroconf";
19 version = "0.136.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "jstasiak";
26 repo = "python-zeroconf";
27 rev = "refs/tags/${version}";
28 hash = "sha256-q1Dk2lUiChjDFJeRCUqkPAIO1I+PsnvuLSx6UgXHPU4=";
29 };
30
31 build-system = [
32 cython
33 poetry-core
34 setuptools
35 ];
36
37 dependencies = [ ifaddr ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytest-cov-stub
42 pytest-timeout
43 pytestCheckHook
44 ];
45
46 disabledTests = [
47 # OSError: [Errno 19] No such device
48 "test_close_multiple_times"
49 "test_integration_with_listener_ipv6"
50 "test_launch_and_close"
51 "test_launch_and_close_context_manager"
52 "test_launch_and_close_v4_v6"
53 ];
54
55 __darwinAllowLocalNetworking = true;
56
57 pythonImportsCheck = [
58 "zeroconf"
59 "zeroconf.asyncio"
60 ];
61
62 meta = with lib; {
63 description = "Python implementation of multicast DNS service discovery";
64 homepage = "https://github.com/python-zeroconf/python-zeroconf";
65 changelog = "https://github.com/python-zeroconf/python-zeroconf/releases/tag/${version}";
66 license = licenses.lgpl21Only;
67 maintainers = with maintainers; [ abbradar ];
68 };
69}