2021-03-09 03:18:52 +00:00
|
|
|
{ lib, rustPlatform, pkg-config, cmake, llvmPackages, openssl, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, installShellFiles, stdenv, Security, libiconv }:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tremor";
|
2021-10-11 16:52:03 +00:00
|
|
|
version = "0.11.6";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tremor-rs";
|
|
|
|
repo = "tremor-runtime";
|
|
|
|
rev = "v${version}";
|
2021-10-11 16:52:03 +00:00
|
|
|
sha256 = "1ldqa4q7q9afrbjh7adinav21zsh26pqqvrd6q9542r90mxnygmx";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-11 16:52:03 +00:00
|
|
|
cargoSha256 = "0ivxd5mhvcpzv9wf859vwyiq1s0bbd9vdk6fy6m81bn5ykihx7ar";
|
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
|
|
|
|
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;
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
cargoBuildFlags = [ "-p tremor-cli" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-03-12 07:09:13 +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;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ humancalico ];
|
|
|
|
};
|
|
|
|
}
|