parent
019fcab7f5
commit
76761a82e0
@ -1,44 +1,35 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, pkgconfig, protobuf, cmake, zlib
|
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
|
||||||
, opentracing-cpp, enableGrpc ? false
|
, opentracing-cpp, protobuf, zlib
|
||||||
|
, enableGrpc ? false, grpc ? null, openssl ? null, c-ares ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
assert enableGrpc -> grpc != null;
|
||||||
# be sure to use the right revision based on the submodule!
|
assert enableGrpc -> openssl != null;
|
||||||
common =
|
assert enableGrpc -> c-ares != null;
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "lightstep";
|
|
||||||
repo = "lightstep-tracer-common";
|
|
||||||
rev = "5fe3bf885bcece14c3c65df06c86c826ba45ad69";
|
|
||||||
sha256 = "1q39a0zaqbnqyhl2hza2xzc44235p65bbkfkzs2981niscmggq8w";
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lightstep-tracer-cpp";
|
pname = "lightstep-tracer-cpp";
|
||||||
version = "0.8.1";
|
version = "0.11.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lightstep";
|
owner = "lightstep";
|
||||||
repo = "lightstep-tracer-cpp";
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1m4kl70lhvy1bsmkdh6bf2fddz5v1ikb27vgi99i2akpq40g4fvf";
|
sha256 = "1x7n3b5i9a0481azy3ymfybjfvr5z0i8wm17d964hsv7ryvnapj0";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
|
||||||
cp -r ${common}/* $sourceRoot/lightstep-tracer-common
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = ["-DOPENTRACING_INCLUDE_DIR=${opentracing-cpp}/include" "-DOPENTRACING_LIBRARY=${opentracing-cpp}/lib/libopentracing.so"] ++ lib.optional (!enableGrpc) [ "-DWITH_GRPC=OFF" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgconfig cmake
|
cmake pkgconfig
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
protobuf zlib
|
opentracing-cpp protobuf zlib
|
||||||
|
] ++ lib.optionals enableGrpc [
|
||||||
|
grpc openssl c-ares c-ares.cmake-config
|
||||||
];
|
];
|
||||||
|
|
||||||
|
cmakeFlags = lib.optionals (!enableGrpc) [ "-DWITH_GRPC=OFF" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Distributed tracing system built on top of the OpenTracing standard";
|
description = "Distributed tracing system built on top of the OpenTracing standard";
|
||||||
homepage = "https://lightstep.com/";
|
homepage = "https://lightstep.com/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user