1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 civetweb,
8 curl,
9 gbenchmark,
10 gtest,
11 zlib,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "prometheus-cpp";
16 version = "1.3.0";
17
18 src = fetchFromGitHub {
19 owner = "jupp0r";
20 repo = "prometheus-cpp";
21 tag = "v${finalAttrs.version}";
22 hash = "sha256-XQ8N+affKVqn/hrMHWg0eN+0Op6m9ZdVNNAW0GpDAng=";
23 };
24
25 nativeBuildInputs = [
26 cmake
27 pkg-config
28 ];
29 buildInputs = [
30 gbenchmark
31 gtest
32 ];
33 propagatedBuildInputs = [
34 civetweb
35 curl
36 zlib
37 ];
38 strictDeps = true;
39
40 cmakeFlags = [
41 "-DBUILD_SHARED_LIBS=ON"
42 "-DOVERRIDE_CXX_STANDARD_FLAGS=OFF"
43 "-DUSE_THIRDPARTY_LIBRARIES=OFF"
44 ];
45
46 outputs = [
47 "out"
48 "dev"
49 ];
50
51 meta = {
52 description = "Prometheus Client Library for Modern C++";
53 homepage = "https://github.com/jupp0r/prometheus-cpp";
54 license = [ lib.licenses.mit ];
55 };
56})