biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dbus-fast / default.nix
blob552207472c4ddd7c5edd518a4301949a745806c1
2   lib,
3   async-timeout,
4   buildPythonPackage,
5   cython,
6   dbus,
7   fetchFromGitHub,
8   poetry-core,
9   pytest,
10   pytest-asyncio,
11   pytest-cov-stub,
12   python,
13   pythonOlder,
14   setuptools,
17 buildPythonPackage rec {
18   pname = "dbus-fast";
19   version = "2.24.0";
20   pyproject = true;
22   disabled = pythonOlder "3.8";
24   src = fetchFromGitHub {
25     owner = "Bluetooth-Devices";
26     repo = "dbus-fast";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-8M2SRyAkuxNbwT5NRN6cwJ82OtprfBZXi9Yqwh1NLVY=";
29   };
31   # The project can build both an optimized cython version and an unoptimized
32   # python version. This ensures we fail if we build the wrong one.
33   env.REQUIRE_CYTHON = 1;
35   build-system = [
36     cython
37     poetry-core
38     setuptools
39   ];
41   dependencies = [ async-timeout ];
43   nativeCheckInputs = [
44     dbus
45     pytest
46     pytest-asyncio
47     pytest-cov-stub
48   ];
50   pythonImportsCheck = [
51     "dbus_fast"
52     "dbus_fast.aio"
53     "dbus_fast.service"
54     "dbus_fast.message"
55   ];
57   checkPhase = ''
58     runHook preCheck
60     # test_peer_interface times out
61     dbus-run-session \
62       --config-file=${dbus}/share/dbus-1/session.conf \
63       ${python.interpreter} -m pytest -k "not test_peer_interface"
65     runHook postCheck
66   '';
68   meta = with lib; {
69     description = "Faster version of dbus-next";
70     homepage = "https://github.com/bluetooth-devices/dbus-fast";
71     changelog = "https://github.com/Bluetooth-Devices/dbus-fast/blob/${src.rev}/CHANGELOG.md";
72     license = licenses.mit;
73     maintainers = with maintainers; [ fab ];
74   };