nixpkgs/pkgs/development/libraries/lightstep-tracer-cpp/default.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, pkg-config, cmake
, opentracing-cpp, protobuf, zlib
, enableGrpc ? false, grpc ? null, openssl ? null, c-ares ? null
}:
assert enableGrpc -> grpc != null;
assert enableGrpc -> openssl != null;
assert enableGrpc -> c-ares != null;
stdenv.mkDerivation rec {
pname = "lightstep-tracer-cpp";
2020-09-25 22:13:51 +01:00
version = "0.14.0";
src = fetchFromGitHub {
owner = "lightstep";
repo = pname;
2018-11-01 02:05:59 +00:00
rev = "v${version}";
2020-09-25 22:13:51 +01:00
sha256 = "1xr11dm94qpbx3nxb7si7zy7hzg2akj01pyxkd8pzzbvmkmic16j";
};
nativeBuildInputs = [
cmake pkg-config
];
buildInputs = [
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; {
description = "Distributed tracing system built on top of the OpenTracing standard";
homepage = "https://lightstep.com/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ cstrahan ];
};
}