{ lib , cython_3 , async-timeout , buildPythonPackage , fetchFromGitHub , ifaddr , poetry-core , pytest-asyncio , pytest-timeout , pythonOlder , pytestCheckHook , setuptools }: buildPythonPackage rec { pname = "zeroconf"; version = "0.132.0"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "jstasiak"; repo = "python-zeroconf"; rev = "refs/tags/${version}"; hash = "sha256-eHB+SkJU5aTQPF7QqRhYHMBJgN7EYZkwtk7gjxWxIno="; }; postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "Cython>=3.0.8" "Cython" ''; build-system = [ cython_3 poetry-core setuptools ]; dependencies = [ ifaddr ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; nativeCheckInputs = [ pytest-asyncio pytest-timeout pytestCheckHook ]; preCheck = '' sed -i '/addopts/d' pyproject.toml ''; disabledTests = [ # OSError: [Errno 19] No such device "test_close_multiple_times" "test_integration_with_listener_ipv6" "test_launch_and_close" "test_launch_and_close_context_manager" "test_launch_and_close_v4_v6" ]; __darwinAllowLocalNetworking = true; pythonImportsCheck = [ "zeroconf" "zeroconf.asyncio" ]; meta = with lib; { description = "Python implementation of multicast DNS service discovery"; homepage = "https://github.com/python-zeroconf/python-zeroconf"; changelog = "https://github.com/python-zeroconf/python-zeroconf/releases/tag/${version}"; license = licenses.lgpl21Only; maintainers = with maintainers; [ abbradar ]; }; }