1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, ifaddr
6, pytest-asyncio
7, pythonOlder
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "zeroconf";
13 version = "0.36.13";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "jstasiak";
20 repo = "python-zeroconf";
21 rev = version;
22 sha256 = "sha256-aYNb67ESyz2Q2CKLhG+/Z8Xtt0Js8uf+xrVSEpY0X8c=";
23 };
24
25 propagatedBuildInputs = [
26 ifaddr
27 ];
28
29 checkInputs = [
30 pytest-asyncio
31 pytestCheckHook
32 ];
33
34 disabledTests = [
35 # tests that require network interaction
36 "test_close_multiple_times"
37 "test_launch_and_close"
38 "test_launch_and_close_context_manager"
39 "test_launch_and_close_v4_v6"
40 "test_launch_and_close_v6_only"
41 "test_integration_with_listener_ipv6"
42 ] ++ lib.optionals stdenv.isDarwin [
43 "test_lots_of_names"
44 ];
45
46 __darwinAllowLocalNetworking = true;
47
48 pythonImportsCheck = [
49 "zeroconf"
50 "zeroconf.asyncio"
51 ];
52
53 meta = with lib; {
54 description = "Python implementation of multicast DNS service discovery";
55 homepage = "https://github.com/jstasiak/python-zeroconf";
56 license = licenses.lgpl21Only;
57 maintainers = with maintainers; [ abbradar ];
58 };
59}