at master 1.9 kB view raw
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 ( 39 if lib.versionOlder finalAttrs.version "2.0.0" then "BUILD_CODE_GEN" else "SDBUSCPP_BUILD_CODEGEN" 40 ) true) 41 ]; 42 43 meta = { 44 homepage = "https://github.com/Kistler-Group/sdbus-cpp"; 45 changelog = "https://github.com/Kistler-Group/sdbus-cpp/blob/v${version}/ChangeLog"; 46 description = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API"; 47 longDescription = '' 48 sdbus-c++ is a high-level C++ D-Bus library for Linux designed to provide 49 expressive, easy-to-use API in modern C++. 50 It adds another layer of abstraction on top of sd-bus, a nice, fresh C 51 D-Bus implementation by systemd. 52 It's been written primarily as a replacement of dbus-c++, which currently 53 suffers from a number of (unresolved) bugs, concurrency issues and 54 inherent design complexities and limitations. 55 ''; 56 license = lib.licenses.lgpl2Only; 57 maintainers = with lib.maintainers; [ etwas ]; 58 platforms = lib.platforms.linux; 59 mainProgram = "sdbus-c++-xml2cpp"; 60 }; 61 }); 62in 63{ 64 sdbus-cpp = generic { 65 version = "1.5.0"; 66 hash = "sha256-oO8QNffwNI245AEPdutOGqxj4qyusZYK3bZWLh2Lcag="; 67 }; 68 69 sdbus-cpp_2 = generic { 70 version = "2.1.0"; 71 hash = "sha256-JnjabBr7oELLsUV9a+dAAaRyUzaMIriu90vkaVJg2eY="; 72 }; 73}