python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / python-dbusmock / default.nix
blobd39f44084d5086676200c9ae1119aa027ca9e305
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   runCommand,
8   # build-system
9   setuptools,
10   setuptools-scm,
12   # dependencies
13   dbus-python,
15   # checks
16   dbus,
17   gobject-introspection,
18   pygobject3,
19   bluez,
20   networkmanager,
21   pytestCheckHook,
24 let
25   # Cannot just add it to path in preCheck since that attribute will be passed to
26   # mkDerivation even with doCheck = false, causing a dependency cycle.
27   pbap-client = runCommand "pbap-client" { } ''
28     mkdir -p "$out/bin"
29     ln -s "${bluez.test}/test/pbap-client" "$out/bin/pbap-client"
30   '';
32 buildPythonPackage rec {
33   pname = "python-dbusmock";
34   version = "0.32.2";
35   pyproject = true;
37   src = fetchFromGitHub {
38     owner = "martinpitt";
39     repo = pname;
40     rev = "refs/tags/${version}";
41     hash = "sha256-TOs6wAZDcSD1eP+Hbj78YXoAtKbReC5di5QSpQdwp8E=";
42   };
44   patches = [
45     (fetchpatch {
46       name = "musl.patch";
47       url = "https://github.com/martinpitt/python-dbusmock/commit/1a8d8722068ef7e5f061336047a72d1a0f253b98.patch";
48       hash = "sha256-0j3UXsTMDh1+UolkmoLQXlwHXve81yKiGJ7gDWNZVPY=";
49     })
50     (fetchpatch {
51       name = "os-release.patch";
52       url = "https://github.com/martinpitt/python-dbusmock/commit/4b99cff50e8c741f20aef4527b27ccdb2a4053d2.patch";
53       hash = "sha256-Xcovv44JeuTvPAtXWJvWE+MxlyloClSJGKZz+C3P5bE=";
54     })
55   ];
57   build-system = [
58     setuptools
59     setuptools-scm
60   ];
62   dependencies = [ dbus-python ];
64   nativeCheckInputs = [
65     dbus
66     gobject-introspection
67     pygobject3
68     bluez
69     pbap-client
70     networkmanager
71     pytestCheckHook
72   ];
74   disabledTests = [
75     # wants to call upower, which is a reverse-dependency
76     "test_dbusmock_test_template"
77     # Failed to execute program org.TestSystem: No such file or directory
78     "test_system_service_activation"
79     "test_session_service_activation"
80   ];
82   meta = with lib; {
83     changelog = "https://github.com/martinpitt/python-dbusmock/releases/tag/${version}";
84     description = "Mock D-Bus objects for tests";
85     homepage = "https://github.com/martinpitt/python-dbusmock";
86     license = licenses.lgpl3Plus;
87     maintainers = with maintainers; [ callahad ];
88     platforms = platforms.linux;
89   };