sdbus-cpp_2: init at 2.0.0

This commit is contained in:
Lin Xianyi 2024-10-22 18:20:47 +08:00 committed by John Titor
parent 50db3b6fbb
commit 7b01b810a6
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0
2 changed files with 64 additions and 46 deletions

View File

@ -1,21 +1,27 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, expat
, pkg-config
, systemd
{
lib,
stdenv,
fetchFromGitHub,
cmake,
expat,
pkg-config,
systemdLibs,
}:
stdenv.mkDerivation rec {
let
generic =
{
version,
rev ? "v${version}",
hash,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sdbus-cpp";
version = "1.5.0";
inherit version;
src = fetchFromGitHub {
owner = "kistler-group";
repo = "sdbus-cpp";
rev = "v${version}";
hash = "sha256-oO8QNffwNI245AEPdutOGqxj4qyusZYK3bZWLh2Lcag=";
inherit rev hash;
};
nativeBuildInputs = [
@ -25,11 +31,11 @@ stdenv.mkDerivation rec {
buildInputs = [
expat
systemd
systemdLibs
];
cmakeFlags = [
"-DBUILD_CODE_GEN=ON"
(lib.cmakeBool "BUILD_CODE_GEN" true)
];
meta = {
@ -50,4 +56,16 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.linux;
mainProgram = "sdbus-c++-xml2cpp";
};
});
in
{
sdbus-cpp = generic {
version = "1.5.0";
hash = "sha256-oO8QNffwNI245AEPdutOGqxj4qyusZYK3bZWLh2Lcag=";
};
sdbus-cpp_2 = generic {
version = "2.0.0";
hash = "sha256-W8V5FRhV3jtERMFrZ4gf30OpIQLYoj2yYGpnYOmH2+g=";
};
}

View File

@ -1906,7 +1906,7 @@ with pkgs;
scarab = callPackage ../tools/games/scarab { };
sdbus-cpp = callPackage ../development/libraries/sdbus-cpp { };
inherit (callPackage ../development/libraries/sdbus-cpp { }) sdbus-cpp sdbus-cpp_2;
sdlookup = callPackage ../tools/security/sdlookup { };