1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 python, 6 setuptools, 7 dbus, 8 pytest, 9 pytest-cov-stub, 10 pytest-asyncio, 11 pytest-timeout, 12}: 13 14buildPythonPackage rec { 15 pname = "dbus-next"; 16 version = "0.2.3"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "altdesktop"; 21 repo = "python-dbus-next"; 22 tag = "v${version}"; 23 hash = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 nativeCheckInputs = [ 29 dbus 30 pytest 31 pytest-cov-stub 32 pytest-asyncio 33 pytest-timeout 34 ]; 35 36 # Tests are flaky and upstream is no longer active 37 doCheck = false; 38 39 # test_peer_interface hits a timeout 40 # test_tcp_connection_with_forwarding fails due to dbus 41 # creating unix socket anyway on v1.14.4 42 checkPhase = '' 43 runHook preCheck 44 dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \ 45 ${python.interpreter} -m pytest -sv --cov=dbus_next \ 46 -k "not test_peer_interface and not test_tcp_connection_with_forwarding" 47 runHook postCheck 48 ''; 49 50 meta = with lib; { 51 description = "Zero-dependency DBus library for Python with asyncio support"; 52 homepage = "https://github.com/altdesktop/python-dbus-next"; 53 changelog = "https://github.com/altdesktop/python-dbus-next/releases/tag/v${version}"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ ]; 56 }; 57}