diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/prometheus-cpp')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix | 46 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in | 10 |
2 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix b/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix new file mode 100644 index 000000000000..1591f8a332c8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, gbenchmark +, gtest +, civetweb +, zlib +, curl +}: + +stdenv.mkDerivation rec { + pname = "prometheus-cpp"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "jupp0r"; + repo = pname; + rev = "v${version}"; + sha256 = "L6CXRup3kU1lY5UnwPbaOwEtCeAySNmFCPmHwsk6cRE="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ gbenchmark gtest zlib curl ]; + propagatedBuildInputs = [ civetweb ]; + strictDeps = true; + + cmakeFlags = [ + "-DUSE_THIRDPARTY_LIBRARIES=OFF" + "-DBUILD_SHARED_LIBS=ON" + ]; + + outputs = [ "out" "dev" ]; + + postInstall = '' + mkdir -p $dev/lib/pkgconfig + substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc + ''; + + meta = { + description = "Prometheus Client Library for Modern C++"; + homepage = "https://github.com/jupp0r/prometheus-cpp"; + license = [ lib.licenses.mit ]; + }; + +} diff --git a/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in b/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in new file mode 100644 index 000000000000..c373f4153b55 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in @@ -0,0 +1,10 @@ +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 |