2018-11-01 02:05:59 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkgconfig, protobuf, cmake, zlib
|
|
|
|
, opentracing-cpp, enableGrpc ? false
|
2017-07-25 01:03:40 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# be sure to use the right revision based on the submodule!
|
|
|
|
common =
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "lightstep";
|
|
|
|
repo = "lightstep-tracer-common";
|
2018-11-01 02:05:59 +00:00
|
|
|
rev = "5fe3bf885bcece14c3c65df06c86c826ba45ad69";
|
|
|
|
sha256 = "1q39a0zaqbnqyhl2hza2xzc44235p65bbkfkzs2981niscmggq8w";
|
2017-07-25 01:03:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lightstep-tracer-cpp";
|
2018-11-01 02:05:59 +00:00
|
|
|
version = "0.8.1";
|
2017-07-25 01:03:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lightstep";
|
|
|
|
repo = "lightstep-tracer-cpp";
|
2018-11-01 02:05:59 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1m4kl70lhvy1bsmkdh6bf2fddz5v1ikb27vgi99i2akpq40g4fvf";
|
2017-07-25 01:03:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -r ${common}/* $sourceRoot/lightstep-tracer-common
|
|
|
|
'';
|
|
|
|
|
2018-11-01 02:05:59 +00:00
|
|
|
cmakeFlags = ["-DOPENTRACING_INCLUDE_DIR=${opentracing-cpp}/include" "-DOPENTRACING_LIBRARY=${opentracing-cpp}/lib/libopentracing.so"] ++ lib.optional (!enableGrpc) [ "-DWITH_GRPC=OFF" ];
|
2017-07-25 01:03:40 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2018-11-01 02:05:59 +00:00
|
|
|
pkgconfig cmake
|
2017-07-25 01:03:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-09-05 16:11:41 +01:00
|
|
|
protobuf zlib
|
2017-07-25 01:03:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Distributed tracing system built on top of the OpenTracing standard";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = "https://lightstep.com/";
|
2017-07-25 01:03:40 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|