summary refs log tree commit diff
path: root/pkgs/development/libraries/prometheus-cpp
diff options
context:
space:
mode:
authorHector Escobedo <hector.escobedo@obsidian.systems>2021-01-21 02:54:38 -0800
committerHector Escobedo <hector.escobedo@obsidian.systems>2021-01-21 02:54:38 -0800
commit451ffe6ad07f473a8c96b752b92c822cf48a41a3 (patch)
treecf8489b7505d3d4b13b13379c994bb0ba932d103 /pkgs/development/libraries/prometheus-cpp
parent33784b72282008c1e4025668b7d40ea7bb6bb0cf (diff)
downloadnixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar.gz
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar.bz2
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar.lz
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar.xz
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.tar.zst
nixpkgs-451ffe6ad07f473a8c96b752b92c822cf48a41a3.zip
prometheus-cpp: add pkgconfig data
Diffstat (limited to 'pkgs/development/libraries/prometheus-cpp')
-rw-r--r--pkgs/development/libraries/prometheus-cpp/default.nix5
-rw-r--r--pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in10
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/libraries/prometheus-cpp/default.nix b/pkgs/development/libraries/prometheus-cpp/default.nix
index 5377d2b96d0..3714e2c89e6 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 00000000000..c373f4153b5
--- /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