biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dbus-next / default.nix
blob117fa8c08948148bfbf75136c7f036aaac2bb0f6
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   python,
6   setuptools,
7   dbus,
8   pytest,
9   pytest-cov,
10   pytest-asyncio,
11   pytest-timeout,
14 buildPythonPackage rec {
15   pname = "dbus-next";
16   version = "0.2.3";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "altdesktop";
21     repo = "python-dbus-next";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-EKEQZFRUe+E65Z6DNCJFL5uCI5kbXrN7Tzd4O0X5Cqo=";
24   };
26   build-system = [ setuptools ];
28   nativeCheckInputs = [
29     dbus
30     pytest
31     pytest-cov
32     pytest-asyncio
33     pytest-timeout
34   ];
36   # test_peer_interface hits a timeout
37   # test_tcp_connection_with_forwarding fails due to dbus
38   # creating unix socket anyway on v1.14.4
39   checkPhase = ''
40     runHook preCheck
41     dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \
42       ${python.interpreter} -m pytest -sv --cov=dbus_next \
43       -k "not test_peer_interface and not test_tcp_connection_with_forwarding"
44     runHook postCheck
45   '';
47   meta = with lib; {
48     description = "Zero-dependency DBus library for Python with asyncio support";
49     homepage = "https://github.com/altdesktop/python-dbus-next";
50     changelog = "https://github.com/altdesktop/python-dbus-next/releases/tag/v${version}";
51     license = licenses.mit;
52     maintainers = with maintainers; [ sfrijters ];
53   };