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