1{ lib 2, async-timeout 3, buildPythonPackage 4, cython_3 5, fetchFromGitHub 6, poetry-core 7, pytest-asyncio 8, pytestCheckHook 9, pythonOlder 10, setuptools 11, wheel 12}: 13 14buildPythonPackage rec { 15 pname = "dbus-fast"; 16 version = "2.14.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "Bluetooth-Devices"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-IT18r7LKOVuiCuE/QzW6X/jkr5EK8sSR038i4LR1bcs="; 26 }; 27 28 # The project can build both an optimized cython version and an unoptimized 29 # python version. This ensures we fail if we build the wrong one. 30 env.REQUIRE_CYTHON = 1; 31 32 nativeBuildInputs = [ 33 cython_3 34 poetry-core 35 setuptools 36 wheel 37 ]; 38 39 propagatedBuildInputs = [ 40 async-timeout 41 ]; 42 43 nativeCheckInputs = [ 44 pytest-asyncio 45 pytestCheckHook 46 ]; 47 48 postPatch = '' 49 substituteInPlace pyproject.toml \ 50 --replace " --cov=dbus_fast --cov-report=term-missing:skip-covered" "" 51 ''; 52 53 pythonImportsCheck = [ 54 "dbus_fast" 55 "dbus_fast.aio" 56 "dbus_fast.service" 57 "dbus_fast.message" 58 ]; 59 60 disabledTests = [ 61 # Test require a running Dbus instance 62 "test_aio_big_message" 63 "test_aio_properties" 64 "test_aio_proxy_object" 65 "test_bus_disconnect_before_reply" 66 "test_export_alias" 67 "test_export_introspection" 68 "test_export_unexport" 69 "test_fast_disconnect" 70 "test_glib_big_message" 71 "test_high_level_service_fd_passing" 72 "test_interface_add_remove_signal" 73 "test_introspectable_interface" 74 "test_methods" 75 "test_multiple_flags_in_message" 76 "test_name_requests" 77 "test_object_manager" 78 "test_peer_interface" 79 "test_property_changed_signal" 80 "test_property_changed_signal" 81 "test_property_methods" 82 "test_sending_file_descriptor_low_level" 83 "test_sending_file_descriptor_with_proxy" 84 "test_sending_messages_between_buses" 85 "test_sending_signals_between_buses" 86 "test_signals" 87 "test_standard_interface_properties" 88 "test_standard_interfaces" 89 "test_tcp_connection_with_forwarding" 90 "test_unexpected_disconnect" 91 # NameError: name '_cast_uint32_native' is not defined 92 "test_unmarshall_bluez_interfaces_added_message" 93 "test_unmarshall_bluez_interfaces_removed_message" 94 "test_unmarshall_bluez_message" 95 "test_unmarshall_bluez_properties_changed_with_service_data" 96 "test_unmarshall_can_resume" 97 "test_unmarshalling_with_table" 98 "test_ay_buffer" 99 ]; 100 101 meta = with lib; { 102 description = "Faster version of dbus-next"; 103 homepage = "https://github.com/bluetooth-devices/dbus-fast"; 104 changelog = "https://github.com/Bluetooth-Devices/dbus-fast/releases/tag/v${version}"; 105 license = licenses.mit; 106 maintainers = with maintainers; [ fab ]; 107 }; 108}