about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/vector
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
commit4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch)
tree67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/tools/misc/vector
parent633cab0ecb07627706c6b523e219490f019eaab5 (diff)
parent7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff)
downloadnixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts:
#	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/vector')
-rw-r--r--nixpkgs/pkgs/tools/misc/vector/default.nix36
1 files changed, 26 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/tools/misc/vector/default.nix b/nixpkgs/pkgs/tools/misc/vector/default.nix
index 161c28054b0b..e8c3ed7cbe9e 100644
--- a/nixpkgs/pkgs/tools/misc/vector/default.nix
+++ b/nixpkgs/pkgs/tools/misc/vector/default.nix
@@ -2,41 +2,57 @@
 , lib
 , fetchFromGitHub
 , rustPlatform
-, openssl
 , pkg-config
+, llvmPackages
+, openssl
 , protobuf
+, rdkafka
+, oniguruma
+, zstd
 , Security
 , libiconv
-, rdkafka
-, tzdata
 , coreutils
 , CoreServices
-, features ? ([ "jemallocator" "rdkafka" "rdkafka/dynamic_linking" ]
-    ++ (lib.optional stdenv.targetPlatform.isUnix "unix")
-    ++ [ "sinks" "sources" "transforms" ])
+, tzdata
+  # kafka is optional but one of the most used features
+, enableKafka ? true
+  # TODO investigate adding "api" "api-client" "vrl-cli" and various "vendor-*"
+  # "disk-buffer" is using leveldb TODO: investigate how useful
+  # it would be, perhaps only for massive scale?
+, features ? ([ "sinks" "sources" "transforms" ]
+    # the second feature flag is passed to the rdkafka dependency
+    # building on linux fails without this feature flag (both x86_64 and AArch64)
+    ++ (lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ])
+    ++ (lib.optional stdenv.targetPlatform.isUnix "unix"))
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "vector";
-  version = "0.13.1";
+  version = "0.14.0";
 
   src = fetchFromGitHub {
     owner = "timberio";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-ige0138alZ0KAmPakPVmDVydz5qco6m0xK7AEzScyXc=";
+    sha256 = "sha256-wtihrR19jMJ7Kgvy6XBzOUrC/WKNVl2MVx4lWgXYlvg=";
   };
 
-  cargoSha256 = "sha256-oK4M6zTfI0QVW9kQTgpP/vSxFt2VlRABmKvQ4aAqC74=";
+  cargoSha256 = "sha256-VYIzAqh5Xxmn1koxhh+UDb2G3WS2UVXffuBY7h5Kr7A=";
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ openssl protobuf rdkafka ]
+  buildInputs = [ oniguruma openssl protobuf rdkafka zstd ]
     ++ lib.optional stdenv.isDarwin [ Security libiconv coreutils CoreServices ];
 
   # needed for internal protobuf c wrapper library
   PROTOC = "${protobuf}/bin/protoc";
   PROTOC_INCLUDE = "${protobuf}/include";
+  RUSTONIG_SYSTEM_LIBONIG = true;
+  LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
 
   cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ];
+  # TODO investigate compilation failure for tests
+  # dev dependency includes httpmock which depends on iashc which depends on curl-sys with http2 feature enabled
+  # compilation fails because of a missing http2 include
+  doCheck = !stdenv.isDarwin;
   checkPhase = "TZDIR=${tzdata}/share/zoneinfo cargo test --no-default-features --features ${lib.concatStringsSep "," features} -- --test-threads 1";
 
   # recent overhauls of DNS support in 0.9 mean that we try to resolve