prometheus-cpp: 1.1.0 -> 1.3.0, reformat, finalAttrs, fix pkgsStatic (#363342)

This commit is contained in:
Franz Pletz 2024-12-09 11:44:19 +01:00 committed by GitHub
commit a5ca609b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 35 deletions

View File

@ -1,46 +1,54 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gbenchmark
, gtest
, civetweb
, zlib
, curl
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
civetweb,
curl,
gbenchmark,
gtest,
zlib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "prometheus-cpp";
version = "1.1.0";
version = "1.3.0";
src = fetchFromGitHub {
owner = "jupp0r";
repo = pname;
rev = "v${version}";
sha256 = "sha256-qx6oBxd0YrUyFq+7ArnKBqOwrl5X8RS9nErhRDUJ7+8=";
repo = "prometheus-cpp";
tag = "v${finalAttrs.version}";
hash = "sha256-XQ8N+affKVqn/hrMHWg0eN+0Op6m9ZdVNNAW0GpDAng=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gbenchmark gtest zlib curl ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
curl
gbenchmark
gtest
zlib
];
propagatedBuildInputs = [ civetweb ];
strictDeps = true;
cmakeFlags = [
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
"-DBUILD_SHARED_LIBS=ON"
"-DOVERRIDE_CXX_STANDARD_FLAGS=OFF"
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
];
outputs = [ "out" "dev" ];
postInstall = ''
mkdir -p $dev/lib/pkgconfig
substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc
'';
outputs = [
"out"
"dev"
];
meta = {
description = "Prometheus Client Library for Modern C++";
homepage = "https://github.com/jupp0r/prometheus-cpp";
license = [ lib.licenses.mit ];
};
}
})

View File

@ -1,10 +0,0 @@
prefix=@out@
includedir=${prefix}/include
libdir=${prefix}/lib
Name: prometheus-cpp
Description: Prometheus Client Library for Modern C++
URL: https://github.com/jupp0r/prometheus-cpp
Version: @version@
Cflags: -isystem${includedir}
Libs: -Wl,-rpath,${libdir} -L${libdir} -lprometheus-cpp-core -lprometheus-cpp-pull -lprometheus-cpp-push