14 rustPlatform.buildRustPackage rec {
18 src = fetchFromGitHub {
20 repo = "tremor-runtime";
22 sha256 = "sha256-+cN+nMDMX4rxjs1VQnSgjBvCsjxxAd13otp9qd21SYo=";
26 lockFile = ./Cargo.lock;
28 "http-client-6.5.1" = "sha256-IfFZSiNqN4kiro8qSR5HV7e0U3nadS2vaYtBF+7UPVs=";
29 "qwal-0.1.0" = "sha256-PFdqRTNht77+/7GWzJm7/wESEaO3QjTTY+aRwpK9Ddo=";
30 "rdkafka-0.28.0" = "sha256-6dUGf5TRtiGz9OCxcrPmLdhtZoOd/aJR9VgNFQC2tnQ=";
31 "window-0.1.1" = "sha256-H6w1Y8ClhXISNYmALSRSwfREOaMzccNafygc6E44NYs=";
35 nativeBuildInputs = [ cmake pkg-config installShellFiles rustPlatform.bindgenHook ];
37 buildInputs = [ openssl ]
38 ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ];
40 # relax lints to fix an error caused by invalid macro_export
41 # error: `log_error` isn't a valid `#[macro_export]` argument
42 # note: `#[deny(invalid_macro_export_arguments)]` implied by `#[deny(warnings)]`
44 substituteInPlace src/lib.rs \
45 --replace '#![deny(' '#![warn('
48 # TODO export TREMOR_PATH($out/lib) variable
50 # Copy the standard library to $out/lib
51 cp -r ${src}/tremor-script/lib/ $out
53 '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
54 installShellCompletion --cmd tremor \
55 --bash <($out/bin/tremor completions bash) \
56 --fish <($out/bin/tremor completions fish) \
57 --zsh <($out/bin/tremor completions zsh)
60 # OPENSSL_NO_VENDOR - If set, always find OpenSSL in the system, even if the vendored feature is enabled.
61 OPENSSL_NO_VENDOR = 1;
63 # needed for internal protobuf c wrapper library
64 PROTOC = "${protobuf}/bin/protoc";
65 PROTOC_INCLUDE = "${protobuf}/include";
67 env = lib.optionalAttrs (stdenv.system == "x86_64-darwin") {
68 RUSTFLAGS = "-C target-feature=+avx,+avx2,+sse4.2";
71 # tests failed on x86_64-darwin with SIGILL: illegal instruction
72 doCheck = stdenv.system != "x86_64-darwin";
75 # all try to make a network access
76 "--skip=connectors::tests::http::server::https_server_test"
77 "--skip=connectors::tests::tcp::client::tls_client"
78 "--skip=connectors::tests::udp::udp_no_bind"
79 "--skip=connectors::tests::ws::ws_client_bad_config"
80 "--skip=connectors::tests::ws::wss_server_binary_routing"
81 "--skip=connectors::tests::ws::wss_server_text_routing"
82 "--skip=connectors::utils::tls::tests::client_config"
85 cargoBuildFlags = [ "-p tremor-cli" ];
89 Early stage event processing system for unstructured data with rich
90 support for structural pattern matching, filtering and transformation
92 homepage = "https://www.tremor.rs/";
93 license = licenses.asl20;
94 maintainers = with maintainers; [ humancalico happysalada ];