{ lib, stdenv, buildPythonPackage, fetchFromGitHub, # build-system setuptools, # dependencies aiohttp, defusedxml, python-didl-lite, voluptuous, # tests pytest-aiohttp, pytest-asyncio, pytestCheckHook, }: buildPythonPackage rec { pname = "async-upnp-client"; version = "0.46.1"; pyproject = true; src = fetchFromGitHub { owner = "StevenLooman"; repo = "async_upnp_client"; tag = version; hash = "sha256-Ez7UnZjSA0JYrqY5SV4q9myrbXCQzg/plrQ9P941b6E="; }; build-system = [ setuptools ]; dependencies = [ aiohttp defusedxml python-didl-lite voluptuous ]; nativeCheckInputs = [ pytestCheckHook pytest-aiohttp pytest-asyncio ]; disabledTests = [ # socket.gaierror: [Errno -2] Name or service not known "test_async_get_local_ip" "test_get_local_ip" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_deferred_callback_url" ]; disabledTestPaths = [ # Tries to bind to multicast socket and fails to find proper interface "tests/test_ssdp_listener.py" ]; pythonImportsCheck = [ "async_upnp_client" ]; meta = { description = "Asyncio UPnP Client library for Python"; homepage = "https://github.com/StevenLooman/async_upnp_client"; changelog = "https://github.com/StevenLooman/async_upnp_client/blob/${src.tag}/CHANGES.rst"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ hexa ]; mainProgram = "upnp-client"; }; }