From 63d00d3fc904debada30d2ada45c50ffc2dd848c Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 23 Dec 2022 14:00:19 -0500 Subject: [PATCH] vector: fix build against rust 1.66 (cherry picked from commit 108f65bbd6672065c0df89193d8aafbd3d98869f) --- pkgs/tools/misc/vector/default.nix | 5 +++++ pkgs/tools/misc/vector/fix-for-rust-1.66.diff | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/tools/misc/vector/fix-for-rust-1.66.diff diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index af53417640ff3..bc24cbbac1993 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -44,6 +44,11 @@ rustPlatform.buildRustPackage { hash = "sha256-7iYiSO966o0M9M0ijGCpuRVRgus+tURLBN9S5lPDRb8="; }; + patches = [ + # replace with https://github.com/vectordotdev/vector/pull/15093 when ready + ./fix-for-rust-1.66.diff + ]; + cargoHash = "sha256-EqK6r/pFFKmnpPPUhqdC3bztYQZ+2w7u7V8Rj+9oWII="; nativeBuildInputs = [ pkg-config cmake perl ]; buildInputs = [ oniguruma openssl protobuf rdkafka zstd ] diff --git a/pkgs/tools/misc/vector/fix-for-rust-1.66.diff b/pkgs/tools/misc/vector/fix-for-rust-1.66.diff new file mode 100644 index 0000000000000..1ad2c6854edf5 --- /dev/null +++ b/pkgs/tools/misc/vector/fix-for-rust-1.66.diff @@ -0,0 +1,13 @@ +diff --git a/src/sources/aws_kinesis_firehose/filters.rs b/src/sources/aws_kinesis_firehose/filters.rs +index ac33682..fe65ed4 100644 +--- a/src/sources/aws_kinesis_firehose/filters.rs ++++ b/src/sources/aws_kinesis_firehose/filters.rs +@@ -28,7 +28,7 @@ pub fn firehose( + acknowledgements: bool, + out: SourceSender, + log_namespace: LogNamespace, +-) -> impl Filter + Clone { ++) -> impl Filter + Clone { + let bytes_received = register!(BytesReceived::from(Protocol::HTTP)); + let context = handlers::Context { + compression: record_compression,