16 opentelemetry-proto = fetchFromGitHub {
17 owner = "open-telemetry";
18 repo = "opentelemetry-proto";
20 hash = "sha256-bkVqPSVhyMHrmFvlI9DTAloZzDozj3sefIEwfW7OVrI=";
23 stdenv.mkDerivation (finalAttrs: {
24 pname = "opentelemetry-cpp";
27 src = fetchFromGitHub {
28 owner = "open-telemetry";
29 repo = "opentelemetry-cpp";
30 rev = "v${finalAttrs.version}";
31 hash = "sha256-31zwIZ4oehhfn+oCyg8VQTurPOmdgp72plH1Pf/9UKQ=";
35 ./0001-Disable-tests-requiring-network-access.patch
36 ] ++ lib.optional stdenv.hostPlatform.isDarwin ./0002-Disable-segfaulting-test-on-Darwin.patch;
38 nativeBuildInputs = [ cmake ];
57 "-DBUILD_SHARED_LIBS=ON"
61 "-DWITH_PROMETHEUS=ON"
62 "-DWITH_ELASTICSEARCH=ON"
64 "-DWITH_BENCHMARK=OFF"
65 "-DOTELCPP_PROTO_PATH=${opentelemetry-proto}"
74 substituteInPlace $out/lib/cmake/opentelemetry-cpp/opentelemetry-cpp-target.cmake \
75 --replace-fail "\''${_IMPORT_PREFIX}/include" "$dev/include"
78 passthru.updateScript = nix-update-script { };
81 description = "OpenTelemetry C++ Client Library";
82 homepage = "https://github.com/open-telemetry/opentelemetry-cpp";
83 license = [ lib.licenses.asl20 ];
84 maintainers = with lib.maintainers; [ jfroche ];
85 platforms = lib.platforms.linux;
86 # https://github.com/protocolbuffers/protobuf/issues/14492
87 broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform);