diff --git a/pkgs/development/libraries/prometheus-cpp/default.nix b/pkgs/development/libraries/prometheus-cpp/default.nix index 5377d2b96d00..3714e2c89e6b 100644 --- a/pkgs/development/libraries/prometheus-cpp/default.nix +++ b/pkgs/development/libraries/prometheus-cpp/default.nix @@ -33,6 +33,11 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = "-ldl"; + postInstall = '' + mkdir -p $out/lib/pkgconfig + substituteAll ${./prometheus-cpp.pc.in} $out/lib/pkgconfig/prometheus-cpp.pc + ''; + meta = { description = "Prometheus Client Library for Modern C++"; homepage = "https://github.com/jupp0r/prometheus-cpp"; diff --git a/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in b/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in new file mode 100644 index 000000000000..c373f4153b55 --- /dev/null +++ b/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