From 4c7627dfec88350f9a1705e9527c38dd41506f8b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 17 Aug 2023 23:47:41 -0400 Subject: gnu: Add sdbus-cpp. * gnu/packages/glib.scm (sdbus-cpp): New variable. Reviewed-by: Liliana Marie Prikler --- gnu/packages/glib.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index a0b85b15d1..f523706449 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1290,6 +1290,46 @@ Some codes examples can be find at: (home-page "https://dbus-cxx.github.io/") (license license:gpl3))) +(define-public sdbus-c++ + ;; Use the latest commit, which includes unreleased fixes to the pkg-config + ;; file. + (package + (name "sdbus-c++") + (version "1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Kistler-Group/sdbus-cpp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03maivi3nj4g5wcydk9ih703ivmqkc93yip47wlyjni6dhikzzsb")))) + (build-system cmake-build-system) + (arguments + (list + ;; Avoid the integration test, which requires a system bus. + #:test-target "sdbus-c++-unit-tests" + #:configure-flags #~(list "-DBUILD_CODE_GEN=ON" + "-DBUILD_TESTS=ON" + ;; Do not install tests. + "-DTESTS_INSTALL_PATH=/tmp" + "-DCMAKE_VERBOSE_MAKEFILE=ON") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'do-not-install-tests + (lambda _ + (substitute* "tests/CMakeLists.txt" + (("/etc/dbus-1/system.d") "/tmp"))))))) + (native-inputs (list googletest pkg-config)) + (inputs (list expat)) + (propagated-inputs (list elogind)) ;required by sdbus-c++.pc + (home-page "https://github.com/Kistler-Group/sdbus-cpp") + (synopsis "High-level C++ D-Bus library") + (description "@code{sdbus-c++} is a high-level C++ D-Bus library designed +to provide easy-to-use yet powerful API in modern C++. It adds another layer +of abstraction on top of @code{sd-bus}, the C D-Bus implementation by systemd.") + (license license:lgpl2.1+))) + (define-public appstream-glib (package (name "appstream-glib") -- cgit v1.2.3