2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
2021-08-05 21:33:18 +00:00
|
|
|
, dbus, pytest, pytest-cov, pytest-asyncio, pytest-timeout
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dbus-next";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "0.2.3";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "altdesktop";
|
|
|
|
repo = "python-dbus-next";
|
|
|
|
rev = "v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dbus
|
|
|
|
pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-cov
|
2020-09-25 04:45:31 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
];
|
|
|
|
|
|
|
|
# test_peer_interface hits a timeout
|
2022-11-02 22:02:43 +00:00
|
|
|
# test_tcp_connection_with_forwarding fails due to dbus
|
|
|
|
# creating unix socket anyway on v1.14.4
|
2020-09-25 04:45:31 +00:00
|
|
|
checkPhase = ''
|
|
|
|
dbus-run-session --config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
|
|
|
${python.interpreter} -m pytest -sv --cov=dbus_next \
|
2022-11-02 22:02:43 +00:00
|
|
|
-k "not test_peer_interface and not test_tcp_connection_with_forwarding"
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/altdesktop/python-dbus-next";
|
|
|
|
description = "A zero-dependency DBus library for Python with asyncio support";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sfrijters ];
|
|
|
|
};
|
|
|
|
}
|