Unverified Commit 6efe194f authored by Yt's avatar Yt Committed by GitHub
Browse files

tremor-rs: 0.12.4 -> 0.13.0-rc.33 (#355757)

parents 6b407854 930ff4a6
Loading
Loading
Loading
Loading
+4052 −1963

File changed.

Preview size limit exceeded, changes collapsed.

+42 −35
Original line number Diff line number Diff line
{ lib
, rustPlatform
, pkg-config
, cmake
, openssl
, fetchFromGitHub
, installShellFiles
, stdenv
, Security
, libiconv
, protobuf
{
  lib,
  rustPlatform,
  pkg-config,
  cmake,
  openssl,
  fetchFromGitHub,
  installShellFiles,
  stdenv,
  Security,
  libiconv,
  protobuf,
}:

rustPlatform.buildRustPackage rec {
  pname = "tremor";
  version = "0.12.4";
  version = "0.13.0-rc.33";

  src = fetchFromGitHub {
    owner = "tremor-rs";
    repo = "tremor-runtime";
    rev = "v${version}";
    sha256 = "sha256-+cN+nMDMX4rxjs1VQnSgjBvCsjxxAd13otp9qd21SYo=";
    hash = "sha256-DoFqHKTu4CvgDYPT4vbwNvSZ/lNTdAF+wlHOOIBJKUw=";
  };

  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=";
    };
  };
  cargoHash = "sha256-mgg6yzjRZsDbnK19nhNmy2I95tPWD4NmGCXtI957D0M=";

  nativeBuildInputs = [ cmake pkg-config installShellFiles rustPlatform.bindgenHook ];
  nativeBuildInputs = [
    cmake
    pkg-config
    installShellFiles
    rustPlatform.bindgenHook
  ];

  buildInputs = [ openssl ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ];
  buildInputs =
    [ openssl ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      Security
      libiconv
    ];

  # relax lints to fix an error caused by invalid macro_export
  # error: `log_error` isn't a valid `#[macro_export]` argument
@@ -46,11 +48,13 @@ rustPlatform.buildRustPackage rec {
  '';

  # TODO export TREMOR_PATH($out/lib) variable
  postInstall = ''
  postInstall =
    ''
      # Copy the standard library to $out/lib
      cp -r ${src}/tremor-script/lib/ $out

  '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    ''
    + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
      installShellCompletion --cmd tremor \
        --bash <($out/bin/tremor completions bash) \
        --fish <($out/bin/tremor completions fish) \
@@ -91,6 +95,9 @@ rustPlatform.buildRustPackage rec {
    '';
    homepage = "https://www.tremor.rs/";
    license = licenses.asl20;
    maintainers = with maintainers; [ humancalico happysalada ];
    maintainers = with maintainers; [
      humancalico
      happysalada
    ];
  };
}