summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2022-10-07 17:53:23 -0700
committerYt <happysalada@proton.me>2022-10-08 12:44:27 +0900
commitbc2ce9630aa6d0dc28105becb260988136cd9ef6 (patch)
treec3969d8a81521505fe8fe5e741158c759c215b64 /pkgs/tools
parent73ed812bf73dbb20012a8af258aae3e613cdf538 (diff)
downloadnixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar.gz
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar.bz2
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar.lz
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar.xz
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.tar.zst
nixpkgs-bc2ce9630aa6d0dc28105becb260988136cd9ef6.zip
vector: patch to compile with rust 1.64.
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/vector/default.nix24
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix
index 76736912301..ebf2f082db0 100644
--- a/pkgs/tools/misc/vector/default.nix
+++ b/pkgs/tools/misc/vector/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitHub
+, fetchpatch
 , rustPlatform
 , pkg-config
 , llvmPackages
@@ -40,10 +41,28 @@ rustPlatform.buildRustPackage {
     owner = "vectordotdev";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-RfKg14r3B5Jx2vIa4gpJs5vXRqSXKOXKRFmmQmzQorQ=";
+    hash = "sha256-RfKg14r3B5Jx2vIa4gpJs5vXRqSXKOXKRFmmQmzQorQ=";
   };
 
-  cargoSha256 = "sha256-l2rrT2SeeH4bYYlzSiFASNBxtg4TBm1dRA4cFRfvpkk=";
+  patches = [
+    (fetchpatch {
+      name = "rust-1.64-part1.patch";
+      url = "https://github.com/vectordotdev/vector/commit/e7437df97711b6a660a3532fe5026244472a900f.patch";
+      hash = "sha256-EyheI3nngt72+ZZNNsjp3KV1CuRb9CZ7wUCHt0twFVs=";
+    })
+    (fetchpatch {
+      name = "rust-1.64-part2.patch";
+      url = "https://github.com/vectordotdev/vector/commit/e80c7afaf7601cf936c7c3468bd7b4b230ef6149.patch";
+      hash = "sha256-pHcq7XLn+9PKs0DnBTK5FawN5KSF8BuJf7sBO9u5Gb8=";
+      excludes = [
+        # There are too many conflicts to easily resolve patching this file, but
+        # the changes here do not block compilation.
+        "lib/lookup/src/lookup_v2/owned.rs"
+      ];
+    })
+  ];
+
+  cargoHash = "sha256-l2rrT2SeeH4bYYlzSiFASNBxtg4TBm1dRA4cFRfvpkk=";
   nativeBuildInputs = [ pkg-config cmake perl ];
   buildInputs = [ oniguruma openssl protobuf rdkafka zstd ]
     ++ lib.optionals stdenv.isDarwin [ Security libiconv coreutils CoreServices ];
@@ -111,3 +130,4 @@ rustPlatform.buildRustPackage {
     platforms = with platforms; all;
   };
 }
+