2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, openssl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
|
|
|
, Security
|
|
|
|
, libiconv
|
|
|
|
, protobuf
|
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tremor";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.12.4";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tremor-rs";
|
|
|
|
repo = "tremor-runtime";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-+cN+nMDMX4rxjs1VQnSgjBvCsjxxAd13otp9qd21SYo=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"http-client-6.5.1" = "sha256-IfFZSiNqN4kiro8qSR5HV7e0U3nadS2vaYtBF+7UPVs=";
|
|
|
|
"qwal-0.1.0" = "sha256-PFdqRTNht77+/7GWzJm7/wESEaO3QjTTY+aRwpK9Ddo=";
|
|
|
|
"rdkafka-0.28.0" = "sha256-6dUGf5TRtiGz9OCxcrPmLdhtZoOd/aJR9VgNFQC2tnQ=";
|
|
|
|
"window-0.1.1" = "sha256-H6w1Y8ClhXISNYmALSRSwfREOaMzccNafygc6E44NYs=";
|
|
|
|
};
|
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config installShellFiles ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# relax lints to fix an error caused by invalid macro_export
|
|
|
|
# error: `log_error` isn't a valid `#[macro_export]` argument
|
|
|
|
# note: `#[deny(invalid_macro_export_arguments)]` implied by `#[deny(warnings)]`
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/lib.rs \
|
|
|
|
--replace '#![deny(' '#![warn('
|
|
|
|
'';
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
# TODO export TREMOR_PATH($out/lib) variable
|
2021-03-09 03:18:52 +00:00
|
|
|
postInstall = ''
|
2021-04-17 00:35:05 +00:00
|
|
|
# Copy the standard library to $out/lib
|
|
|
|
cp -r ${src}/tremor-script/lib/ $out
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
installShellCompletion --cmd tremor \
|
|
|
|
--bash <($out/bin/tremor completions bash) \
|
|
|
|
--fish <($out/bin/tremor completions fish) \
|
|
|
|
--zsh <($out/bin/tremor completions zsh)
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
# OPENSSL_NO_VENDOR - If set, always find OpenSSL in the system, even if the vendored feature is enabled.
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# needed for internal protobuf c wrapper library
|
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# all try to make a network access
|
|
|
|
"--skip=connectors::tests::http::server::https_server_test"
|
|
|
|
"--skip=connectors::tests::tcp::client::tls_client"
|
|
|
|
"--skip=connectors::tests::udp::udp_no_bind"
|
|
|
|
"--skip=connectors::tests::ws::ws_client_bad_config"
|
|
|
|
"--skip=connectors::tests::ws::wss_server_binary_routing"
|
|
|
|
"--skip=connectors::tests::ws::wss_server_text_routing"
|
|
|
|
"--skip=connectors::utils::tls::tests::client_config"
|
|
|
|
];
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
cargoBuildFlags = [ "-p tremor-cli" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-11-21 17:40:18 +00:00
|
|
|
description = ''
|
|
|
|
Early stage event processing system for unstructured data with rich
|
|
|
|
support for structural pattern matching, filtering and transformation
|
|
|
|
'';
|
2021-03-09 03:18:52 +00:00
|
|
|
homepage = "https://www.tremor.rs/";
|
|
|
|
license = licenses.asl20;
|
2021-05-20 23:08:51 +00:00
|
|
|
platforms = platforms.x86_64;
|
2022-11-21 17:40:18 +00:00
|
|
|
maintainers = with maintainers; [ humancalico happysalada ];
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
}
|