forked from mirrors/nixpkgs
252608fbbb
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.
47 lines
902 B
Nix
47 lines
902 B
Nix
{ 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 ];
|
|
};
|
|
|
|
}
|