summary refs log tree commit diff
path: root/pkgs/development/libraries/lightstep-tracer-cpp
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-11-09 09:45:03 +0100
committerGitHub <noreply@github.com>2019-11-09 09:45:03 +0100
commit76761a82e019fd549eab4dea502cb4cdfe5fc46f (patch)
tree6b68aa77b74a1bda1e7d7a2be4d824a5d0d890d7 /pkgs/development/libraries/lightstep-tracer-cpp
parent019fcab7f5ce06aa76e081142e048ddc42b795b6 (diff)
downloadnixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar.gz
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar.bz2
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar.lz
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar.xz
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.tar.zst
nixpkgs-76761a82e019fd549eab4dea502cb4cdfe5fc46f.zip
lightstep-tracer-cpp: 0.8.1 -> 0.11.0
 (#72995)
Diffstat (limited to 'pkgs/development/libraries/lightstep-tracer-cpp')
-rw-r--r--pkgs/development/libraries/lightstep-tracer-cpp/default.nix39
1 files changed, 15 insertions, 24 deletions
diff --git a/pkgs/development/libraries/lightstep-tracer-cpp/default.nix b/pkgs/development/libraries/lightstep-tracer-cpp/default.nix
index 7f82d49462c..7fba3f3baa6 100644
--- a/pkgs/development/libraries/lightstep-tracer-cpp/default.nix
+++ b/pkgs/development/libraries/lightstep-tracer-cpp/default.nix
@@ -1,44 +1,35 @@
-{ stdenv, lib, fetchFromGitHub, pkgconfig, protobuf, cmake, zlib
-, opentracing-cpp, enableGrpc ? false
+{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
+, opentracing-cpp, protobuf, zlib
+, enableGrpc ? false, grpc ? null, openssl ? null, c-ares ? null
 }:
 
-let
-  # be sure to use the right revision based on the submodule!
-  common =
-    fetchFromGitHub {
-      owner = "lightstep";
-      repo = "lightstep-tracer-common";
-      rev = "5fe3bf885bcece14c3c65df06c86c826ba45ad69";
-      sha256 = "1q39a0zaqbnqyhl2hza2xzc44235p65bbkfkzs2981niscmggq8w";
-    };
-
-in
+assert enableGrpc -> grpc != null;
+assert enableGrpc -> openssl != null;
+assert enableGrpc -> c-ares != null;
 
 stdenv.mkDerivation rec {
   pname = "lightstep-tracer-cpp";
-  version = "0.8.1";
+  version = "0.11.0";
 
   src = fetchFromGitHub {
     owner = "lightstep";
-    repo = "lightstep-tracer-cpp";
+    repo = pname;
     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 = [
-    pkgconfig cmake
+    cmake pkgconfig
   ];
 
   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; {
     description = "Distributed tracing system built on top of the OpenTracing standard";
     homepage = "https://lightstep.com/";