summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2023-01-19 17:41:40 -0500
committerYt <happysalada@proton.me>2023-01-19 18:17:57 -0500
commit0e69342bad98c23bbd136bc9331f69fc85cd8169 (patch)
tree530ce60d21d7d80f4c63dd79804269c867563010 /pkgs
parent0e2f756d95807c5f5df5fb0a2e542f5652717695 (diff)
vector: 0.26.0 -> 0.27.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/vector/default.nix15
-rw-r--r--pkgs/tools/misc/vector/fix-for-rust-1.66.diff13
-rw-r--r--pkgs/tools/misc/vector/pin.json5
-rwxr-xr-xpkgs/tools/misc/vector/update.sh33
4 files changed, 5 insertions, 61 deletions
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix
index e3f82253e279..359b6b434b39 100644
--- a/pkgs/tools/misc/vector/default.nix
+++ b/pkgs/tools/misc/vector/default.nix
@@ -28,12 +28,12 @@
# building on linux fails without this feature flag (both x86_64 and AArch64)
++ lib.optionals enableKafka [ "rdkafka?/gssapi-vendored" ]
++ lib.optional stdenv.targetPlatform.isUnix "unix")
+, nix-update-script
}:
let
pname = "vector";
- pinData = lib.importJSON ./pin.json;
- version = pinData.version;
+ version = "0.27.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
@@ -42,15 +42,10 @@ rustPlatform.buildRustPackage {
owner = "vectordotdev";
repo = pname;
rev = "v${version}";
- sha256 = pinData.sha256;
+ sha256 = "sha256-+jap7cexevEky3H+Ct9LXXUwHR5tnbzdN+b13pv3f70=";
};
- patches = [
- # replace with https://github.com/vectordotdev/vector/pull/15093 when ready
- ./fix-for-rust-1.66.diff
- ];
-
- cargoSha256 = pinData.cargoSha256;
+ cargoSha256 = "sha256-KehBEwoz5N0zQLDk+9vwFSrn1TrVwljFj+asr7q7hmw=";
nativeBuildInputs = [ pkg-config cmake perl ];
buildInputs = [ oniguruma openssl protobuf rdkafka zstd ]
++ lib.optionals stdenv.isDarwin [ Security libiconv coreutils CoreServices ];
@@ -110,7 +105,7 @@ rustPlatform.buildRustPackage {
passthru = {
inherit features;
- updateScript = ./update.sh;
+ updateScript = nix-update-script { };
};
meta = with lib; {
diff --git a/pkgs/tools/misc/vector/fix-for-rust-1.66.diff b/pkgs/tools/misc/vector/fix-for-rust-1.66.diff
deleted file mode 100644
index 1ad2c6854edf..000000000000
--- a/pkgs/tools/misc/vector/fix-for-rust-1.66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-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<Extract = impl warp::Reply, Error = Infallible> + Clone {
-+) -> impl Filter<Extract = (impl warp::Reply,), Error = Infallible> + Clone {
- let bytes_received = register!(BytesReceived::from(Protocol::HTTP));
- let context = handlers::Context {
- compression: record_compression,
diff --git a/pkgs/tools/misc/vector/pin.json b/pkgs/tools/misc/vector/pin.json
deleted file mode 100644
index 705ddaf8e537..000000000000
--- a/pkgs/tools/misc/vector/pin.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "version": "0.26.0",
- "sha256": "sha256-0h9hcNgaVBDBeSKo39TvrMlloTS5ZoXrbVhm7Y43U+o=",
- "cargoSha256": "sha256-UHc8ZyLJ1pxaBuP6bOXdbAI1oVZD4CVHAIa8URnNdaI="
-}
diff --git a/pkgs/tools/misc/vector/update.sh b/pkgs/tools/misc/vector/update.sh
deleted file mode 100755
index 789437a21a0a..000000000000
--- a/pkgs/tools/misc/vector/update.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env nix-shell
-#! nix-shell -i oil -p jq sd nix-prefetch-github ripgrep
-
-# TODO set to `verbose` or `extdebug` once implemented in oil
-shopt --set xtrace
-# we need failures inside of command subs to get the correct cargoSha256
-shopt --unset inherit_errexit
-
-const directory = $(dirname $0 | xargs realpath)
-const owner = "vectordotdev"
-const repo = "vector"
-const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${repo}/releases/latest | \
- jq -r '.tag_name')
-const latest_version = $(echo $latest_rev | sd 'v' '')
-const current_version = $(jq -r '.version' $directory/pin.json)
-if ("$latest_version" === "$current_version") {
- echo "$repo is already up-to-date"
- return 0
-} else {
- const tarball_meta = $(nix-prefetch-github $owner $repo --rev "$latest_rev")
- const tarball_hash = "sha256-$(echo $tarball_meta | jq -r '.sha256')"
-
- jq ".version = \"$latest_version\" | \
- .\"sha256\" = \"$tarball_hash\" | \
- .\"cargoSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
-
- const new_cargo_sha256 = $(nix-build -A vector 2>&1 | \
- tail -n 2 | \
- head -n 1 | \
- sd '\s+got:\s+' '')
-
- jq ".cargoSha256 = \"$new_cargo_sha256\"" $directory/pin.json | sponge $directory/pin.json
-}