2019-03-07 08:52:56 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gbenchmark
|
|
|
|
, gtest
|
|
|
|
, civetweb
|
|
|
|
, zlib
|
|
|
|
, curl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "prometheus-cpp";
|
2019-11-30 15:22:12 +00:00
|
|
|
version = "0.8.0";
|
2019-03-07 08:52:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupp0r";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-11-30 15:22:12 +00:00
|
|
|
sha256 = "0j12ir8skw3y2q8n743zql4ddp7v1j4h030pjcsqn0xqrqw7m5hg";
|
2019-03-07 08:52:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ gbenchmark civetweb gtest zlib curl ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_THIRDPARTY_LIBRARIES=OFF"
|
|
|
|
"-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
|
|
|
|
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = [ "-ldl" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Prometheus Client Library for Modern C++";
|
|
|
|
homepage = https://github.com/jupp0r/prometheus-cpp;
|
|
|
|
license = [ stdenv.lib.licenses.mit ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|