Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 python, 6 setuptools, 7 dbus, 8 pytest, 9 pytest-cov, 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 rev = "refs/tags/v${version}"; 23 hash = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 nativeCheckInputs = [ 29 dbus 30 pytest 31 pytest-cov 32 pytest-asyncio 33 pytest-timeout 34 ]; 35 36 # test_peer_interface hits a timeout 37 # test_tcp_connection_with_forwarding fails due to dbus 38 # creating unix socket anyway on v1.14.4 39 checkPhase = '' 40 dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \ 41 ${python.interpreter} -m pytest -sv --cov=dbus_next \ 42 -k "not test_peer_interface and not test_tcp_connection_with_forwarding" 43 ''; 44 45 meta = with lib; { 46 description = "Zero-dependency DBus library for Python with asyncio support"; 47 homepage = "https://github.com/altdesktop/python-dbus-next"; 48 changelog = "https://github.com/altdesktop/python-dbus-next/releases/tag/v${version}"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ sfrijters ]; 51 }; 52}