1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 expat,
7 pkg-config,
8 systemdLibs,
9}:
10let
11 generic =
12 {
13 version,
14 rev ? "v${version}",
15 hash,
16 }:
17 stdenv.mkDerivation (finalAttrs: {
18 pname = "sdbus-cpp";
19 inherit version;
20
21 src = fetchFromGitHub {
22 owner = "kistler-group";
23 repo = "sdbus-cpp";
24 inherit rev hash;
25 };
26
27 nativeBuildInputs = [
28 cmake
29 pkg-config
30 ];
31
32 buildInputs = [
33 expat
34 systemdLibs
35 ];
36
37 cmakeFlags = [
38 (lib.cmakeBool "BUILD_CODE_GEN" true)
39 ];
40
41 meta = {
42 homepage = "https://github.com/Kistler-Group/sdbus-cpp";
43 changelog = "https://github.com/Kistler-Group/sdbus-cpp/blob/v${version}/ChangeLog";
44 description = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API";
45 longDescription = ''
46 sdbus-c++ is a high-level C++ D-Bus library for Linux designed to provide
47 expressive, easy-to-use API in modern C++.
48 It adds another layer of abstraction on top of sd-bus, a nice, fresh C
49 D-Bus implementation by systemd.
50 It's been written primarily as a replacement of dbus-c++, which currently
51 suffers from a number of (unresolved) bugs, concurrency issues and
52 inherent design complexities and limitations.
53 '';
54 license = lib.licenses.lgpl2Only;
55 maintainers = [ ];
56 platforms = lib.platforms.linux;
57 mainProgram = "sdbus-c++-xml2cpp";
58 };
59 });
60in
61{
62 sdbus-cpp = generic {
63 version = "1.5.0";
64 hash = "sha256-oO8QNffwNI245AEPdutOGqxj4qyusZYK3bZWLh2Lcag=";
65 };
66
67 sdbus-cpp_2 = generic {
68 version = "2.0.0";
69 hash = "sha256-W8V5FRhV3jtERMFrZ4gf30OpIQLYoj2yYGpnYOmH2+g=";
70 };
71}