chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / db / dbus-cpp / package.nix
blobb11ffb330b94e31b1b6f915a7c0a0f01746472dd
1 { stdenv
2 , lib
3 , fetchFromGitLab
4 , fetchpatch
5 , gitUpdater
6 , testers
7 , boost
8 , cmake
9 , dbus
10 , doxygen
11 , graphviz
12 , gtest
13 , libxml2
14 , lomiri
15 , pkg-config
16 , process-cpp
17 , properties-cpp
20 stdenv.mkDerivation (finalAttrs: {
21   pname = "dbus-cpp";
22   version = "5.0.3";
24   src = fetchFromGitLab {
25     owner = "ubports";
26     repo = "development/core/lib-cpp/dbus-cpp";
27     rev = finalAttrs.version;
28     hash = "sha256-t8SzPRUuKeEchT8vAsITf8MwbgHA+mR5C9CnkdVyX7s=";
29   };
31   outputs = [
32     "out"
33     "dev"
34     "doc"
35     "examples"
36   ];
38   patches = [
39     # Handle already-stolen dbus call better
40     # Remove when version > 5.0.3
41     (fetchpatch {
42       name = "0001-dbus-cpp-src-Dont-steal-a-pending-dbus-call-more-then-once.patch";
43       url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/9f3d1ff2b1c6c732285949c3dbb35e40cf55ea92.patch";
44       hash = "sha256-xzOCIJVsK2J+X9RsV930R9uw6h4UxqwSaNOgv8v4qQU=";
45     })
47     # Fix GCC13 compilation
48     # Remove when version > 5.0.3
49     (fetchpatch {
50       name = "0002-dbus-cpp-Add-missing-headers-for-GCC13.patch";
51       url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/c761b1eec084962dbe64d35d7f7b86dcbe57a3f7.patch";
52       hash = "sha256-/tKe3iHWxP9jWtpdgwwRynj8565u9LxCt4WXJDXzgX4=";
53     })
54   ];
56   postPatch = ''
57     substituteInPlace doc/CMakeLists.txt \
58       --replace 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}'
60     # Warning on aarch64-linux breaks build due to -Werror
61     substituteInPlace CMakeLists.txt \
62       --replace '-Werror' ""
64     # pkg-config output patching hook expects prefix variable here
65     substituteInPlace data/dbus-cpp.pc.in \
66       --replace 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
67   '' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
68     sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
69   '';
71   strictDeps = true;
73   nativeBuildInputs = [
74     cmake
75     doxygen
76     graphviz
77     pkg-config
78   ];
80   buildInputs = [
81     boost
82     lomiri.cmake-extras
83     dbus
84     libxml2
85     process-cpp
86     properties-cpp
87   ];
89   nativeCheckInputs = [
90     dbus
91   ];
93   checkInputs = [
94     gtest
95   ];
97   cmakeFlags = [
98     "-DDBUS_CPP_ENABLE_DOC_GENERATION=ON"
99   ];
101   # Too flaky on ARM CI & for some amd64 users
102   doCheck = false;
104   # DBus, parallelism messes with communication
105   enableParallelChecking = false;
107   preFixup = ''
108     moveToOutput libexec/examples $examples
109   '';
111   passthru = {
112     tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
113     updateScript = gitUpdater { };
114   };
116   meta = with lib; {
117     description = "Dbus-binding leveraging C++-11";
118     homepage = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp";
119     license = licenses.lgpl3Only;
120     maintainers = with maintainers; [ OPNA2608 ];
121     mainProgram = "dbus-cppc";
122     platforms = platforms.linux;
123     pkgConfigModules = [
124       "dbus-cpp"
125     ];
126   };