nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 pkgs,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pkg-config,
7 dbus,
8 setuptools,
9 pytestCheckHook,
10}:
11
12buildPythonPackage (finalAttrs: {
13 pname = "sdbus";
14 version = "0.14.2";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "python-sdbus";
19 repo = "python-sdbus";
20 tag = finalAttrs.version;
21 hash = "sha256-vRz7RTSI5QjI48YnaC20mbOKl6+yXk/TrFicQ0MDR9Q=";
22 };
23
24 build-system = [ setuptools ];
25
26 nativeBuildInputs = [ pkg-config ];
27
28 buildInputs = [ pkgs.systemd ];
29
30 pythonImportsCheck = [ "sdbus" ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 dbus
35 ];
36
37 disabledTestPaths = [
38 # try to access /var/lib/dbus/machine-id
39 "test/test_proxies.py::TestFreedesktopDbus::test_connection"
40 "test/test_sdbus_block.py::TestSync::test_sync"
41 ];
42
43 meta = {
44 description = "Modern Python library for D-Bus";
45 homepage = "https://github.com/python-sdbus/python-sdbus";
46 license = lib.licenses.lgpl2Plus;
47 maintainers = with lib.maintainers; [ camelpunch ];
48 platforms = lib.platforms.linux;
49 };
50})