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