2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
2022-09-22 12:36:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dbus-fast";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.22.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "dbus-fast";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-WT32nkRcS+JFCJCZNXXFm38nzttYLsqU98tJD7YBn9w=";
|
2022-09-22 12:36:57 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# The project can build both an optimized cython version and an unoptimized
|
|
|
|
# python version. This ensures we fail if we build the wrong one.
|
|
|
|
env.REQUIRE_CYTHON = 1;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2022-09-22 12:36:57 +00:00
|
|
|
poetry-core
|
2022-10-06 18:32:54 +00:00
|
|
|
setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
wheel
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [ async-timeout ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-10-06 18:32:54 +00:00
|
|
|
--replace " --cov=dbus_fast --cov-report=term-missing:skip-covered" ""
|
2022-09-22 12:36:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"dbus_fast"
|
2022-09-30 11:47:45 +00:00
|
|
|
"dbus_fast.aio"
|
|
|
|
"dbus_fast.service"
|
|
|
|
"dbus_fast.message"
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test require a running Dbus instance
|
|
|
|
"test_aio_big_message"
|
|
|
|
"test_aio_properties"
|
|
|
|
"test_aio_proxy_object"
|
|
|
|
"test_bus_disconnect_before_reply"
|
2024-06-05 15:53:02 +00:00
|
|
|
"test_error_handling"
|
2022-09-22 12:36:57 +00:00
|
|
|
"test_export_alias"
|
|
|
|
"test_export_introspection"
|
|
|
|
"test_export_unexport"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_fast_disconnect"
|
2022-09-22 12:36:57 +00:00
|
|
|
"test_glib_big_message"
|
|
|
|
"test_high_level_service_fd_passing"
|
|
|
|
"test_interface_add_remove_signal"
|
|
|
|
"test_introspectable_interface"
|
|
|
|
"test_methods"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_multiple_flags_in_message"
|
2022-09-22 12:36:57 +00:00
|
|
|
"test_name_requests"
|
|
|
|
"test_object_manager"
|
|
|
|
"test_peer_interface"
|
|
|
|
"test_property_changed_signal"
|
|
|
|
"test_property_changed_signal"
|
|
|
|
"test_property_methods"
|
|
|
|
"test_sending_file_descriptor_low_level"
|
|
|
|
"test_sending_file_descriptor_with_proxy"
|
|
|
|
"test_sending_messages_between_buses"
|
|
|
|
"test_sending_signals_between_buses"
|
|
|
|
"test_signals"
|
|
|
|
"test_standard_interface_properties"
|
|
|
|
"test_standard_interfaces"
|
|
|
|
"test_tcp_connection_with_forwarding"
|
|
|
|
"test_unexpected_disconnect"
|
2022-11-04 12:27:35 +00:00
|
|
|
# NameError: name '_cast_uint32_native' is not defined
|
|
|
|
"test_unmarshall_bluez_interfaces_added_message"
|
|
|
|
"test_unmarshall_bluez_interfaces_removed_message"
|
|
|
|
"test_unmarshall_bluez_message"
|
|
|
|
"test_unmarshall_bluez_properties_changed_with_service_data"
|
|
|
|
"test_unmarshall_can_resume"
|
|
|
|
"test_unmarshalling_with_table"
|
|
|
|
"test_ay_buffer"
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Faster version of dbus-next";
|
|
|
|
homepage = "https://github.com/bluetooth-devices/dbus-fast";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/dbus-fast/releases/tag/v${version}";
|
2022-09-22 12:36:57 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|