2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gbenchmark
|
|
|
|
, gtest
|
|
|
|
, civetweb
|
|
|
|
, zlib
|
|
|
|
, curl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "prometheus-cpp";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupp0r";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "L6CXRup3kU1lY5UnwPbaOwEtCeAySNmFCPmHwsk6cRE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [ gbenchmark gtest zlib curl ];
|
|
|
|
propagatedBuildInputs = [ civetweb ];
|
2020-04-24 23:36:52 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
mkdir -p $dev/lib/pkgconfig
|
|
|
|
substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Prometheus Client Library for Modern C++";
|
|
|
|
homepage = "https://github.com/jupp0r/prometheus-cpp";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = [ lib.licenses.mit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|