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