Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 40 lines 1.0 kB view raw
1{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake 2, opentracing-cpp, protobuf, zlib 3, enableGrpc ? false, grpc ? null, openssl ? null, c-ares ? null 4}: 5 6assert enableGrpc -> grpc != null; 7assert enableGrpc -> openssl != null; 8assert enableGrpc -> c-ares != null; 9 10stdenv.mkDerivation rec { 11 pname = "lightstep-tracer-cpp"; 12 version = "0.13.0"; 13 14 src = fetchFromGitHub { 15 owner = "lightstep"; 16 repo = pname; 17 rev = "v${version}"; 18 sha256 = "0d7z9isf0n8s63mvp3j75949w0yv7jsva29i62lq8yxbym688fxb"; 19 }; 20 21 nativeBuildInputs = [ 22 cmake pkgconfig 23 ]; 24 25 buildInputs = [ 26 opentracing-cpp protobuf zlib 27 ] ++ lib.optionals enableGrpc [ 28 grpc openssl c-ares c-ares.cmake-config 29 ]; 30 31 cmakeFlags = lib.optionals (!enableGrpc) [ "-DWITH_GRPC=OFF" ]; 32 33 meta = with lib; { 34 description = "Distributed tracing system built on top of the OpenTracing standard"; 35 homepage = "https://lightstep.com/"; 36 license = licenses.mit; 37 platforms = platforms.linux; 38 maintainers = with maintainers; [ cstrahan ]; 39 }; 40}