@@ -0,0 +1,41 @@
1+{ stdenv
2+, fetchFromGitHub
3+, cmake
4+, gbenchmark
5+, gtest
6+, civetweb
7+, zlib
8+, curl
9+}:
10+
11+stdenv.mkDerivation rec {
12+ pname = "prometheus-cpp";
13+ version = "0.6.0";
14+
15+ src = fetchFromGitHub {
16+ owner = "jupp0r";
17+ repo = pname;
18+ rev = "v${version}";
19+ sha256 = "sha256:1a0gpfmk0z9wgsbzvx823aqbs7w836l0j0rnsxl9ifwgdxnxbl6m";
20+ };
21+
22+ nativeBuildInputs = [ cmake ];
23+ buildInputs = [ gbenchmark civetweb gtest zlib curl ];
24+
25+ strictDeps = true;
26+
27+ cmakeFlags = [
28+ "-DUSE_THIRDPARTY_LIBRARIES=OFF"
29+ "-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include"
30+ "-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
31+ ];
32+
33+ NIX_LDFLAGS = [ "-ldl" ];
34+
35+ meta = {
36+ description = "Prometheus Client Library for Modern C++";
37+ homepage = https://github.com/jupp0r/prometheus-cpp;
38+ license = [ stdenv.lib.licenses.mit ];
39+ };
40+
41+}