1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, dbus, pytest, pytest-cov, pytest-asyncio, pytest-timeout
6}:
7
8buildPythonPackage rec {
9 pname = "dbus-next";
10 version = "0.2.3";
11
12 src = fetchFromGitHub {
13 owner = "altdesktop";
14 repo = "python-dbus-next";
15 rev = "v${version}";
16 sha256 = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo=";
17 };
18
19 checkInputs = [
20 dbus
21 pytest
22 pytest-cov
23 pytest-asyncio
24 pytest-timeout
25 ];
26
27 # test_peer_interface hits a timeout
28 checkPhase = ''
29 dbus-run-session --config-file=${dbus.daemon}/share/dbus-1/session.conf \
30 ${python.interpreter} -m pytest -sv --cov=dbus_next \
31 -k "not test_peer_interface"
32 '';
33
34 meta = with lib; {
35 homepage = "https://github.com/altdesktop/python-dbus-next";
36 description = "A zero-dependency DBus library for Python with asyncio support";
37 license = licenses.mit;
38 maintainers = with maintainers; [ sfrijters ];
39 };
40}