Skip to content

Commit

Permalink
prometheus-cpp: fix paths in pkg-config files
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshpilkin committed May 18, 2022
1 parent c839327 commit 5eff4f4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/libraries/prometheus-cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ stdenv.mkDerivation rec {

outputs = [ "out" "dev" ];

# https://github.com/jupp0r/prometheus-cpp/issues/587
postPatch = ''
substituteInPlace cmake/prometheus-cpp-core.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace cmake/prometheus-cpp-pull.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace cmake/prometheus-cpp-push.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';

postInstall = ''
mkdir -p $dev/lib/pkgconfig
substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc
Expand Down

0 comments on commit 5eff4f4

Please sign in to comment.