2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
setuptools,
|
|
|
|
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";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "altdesktop";
|
|
|
|
repo = "python-dbus-next";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
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 = ''
|
2022-12-02 08:20:57 +00:00
|
|
|
dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \
|
2020-09-25 04:45:31 +00:00
|
|
|
${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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Zero-dependency DBus library for Python with asyncio support";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://github.com/altdesktop/python-dbus-next";
|
|
|
|
changelog = "https://github.com/altdesktop/python-dbus-next/releases/tag/v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sfrijters ];
|
2022-11-27 09:42:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|