diff options
author | Matthias Treydte <mt@waldheinz.de> | 2022-03-22 12:30:20 +0100 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2022-03-22 13:42:00 -0700 |
commit | 252608fbbbd6093a1cc92018e80d66dd7bcee01e (patch) | |
tree | a02c88f9cfebc3e32ba50bc1396427d84067baa4 | |
parent | 3ff5f0eb764e42d922f22e7007db67c9bf23ae08 (diff) | |
download | nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar.gz nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar.bz2 nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar.lz nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar.xz nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.tar.zst nixpkgs-252608fbbbd6093a1cc92018e80d66dd7bcee01e.zip |
prometheus-cpp: fix use with CMake and clean up
The derivation did not properly propagate it's dependency on civetweb, causing dependent CMake derivations not to find it. So just move it to propagatedBuildInputs instead of messing with the cmakeFlags. Also, split off "dev" so we don't carry around the headers as a runtime dependency.
-rw-r--r-- | pkgs/development/libraries/prometheus-cpp/default.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/development/libraries/prometheus-cpp/default.nix b/pkgs/development/libraries/prometheus-cpp/default.nix index a046f255a6a..1591f8a332c 100644 --- a/pkgs/development/libraries/prometheus-cpp/default.nix +++ b/pkgs/development/libraries/prometheus-cpp/default.nix @@ -21,22 +21,20 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ gbenchmark civetweb gtest zlib curl ]; - + buildInputs = [ gbenchmark gtest zlib curl ]; + propagatedBuildInputs = [ civetweb ]; strictDeps = true; cmakeFlags = [ "-DUSE_THIRDPARTY_LIBRARIES=OFF" - "-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include" - "-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}" "-DBUILD_SHARED_LIBS=ON" ]; - NIX_LDFLAGS = "-ldl"; + outputs = [ "out" "dev" ]; postInstall = '' - mkdir -p $out/lib/pkgconfig - substituteAll ${./prometheus-cpp.pc.in} $out/lib/pkgconfig/prometheus-cpp.pc + mkdir -p $dev/lib/pkgconfig + substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc ''; meta = { |