20 stdenv.mkDerivation (finalAttrs: {
24 src = fetchFromGitLab {
26 repo = "development/core/lib-cpp/dbus-cpp";
27 rev = finalAttrs.version;
28 hash = "sha256-t8SzPRUuKeEchT8vAsITf8MwbgHA+mR5C9CnkdVyX7s=";
39 # Handle already-stolen dbus call better
40 # Remove when version > 5.0.3
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=";
47 # Fix GCC13 compilation
48 # Remove when version > 5.0.3
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=";
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
98 "-DDBUS_CPP_ENABLE_DOC_GENERATION=ON"
101 # Too flaky on ARM CI & for some amd64 users
104 # DBus, parallelism messes with communication
105 enableParallelChecking = false;
108 moveToOutput libexec/examples $examples
112 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
113 updateScript = gitUpdater { };
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;