about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2019-10-28 00:35:02 -0500
committerAustin Seipp <aseipp@pobox.com>2019-10-28 15:03:48 -0500
commitf86361d186354167ff09f8aa163e70f7c5685503 (patch)
tree69e109c8cc089a3b89839dd85c83d4c9b0891d3a
parent2d8dc891aa36904ba1bc76252fc0d831a0bf03be (diff)
downloadnixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar.gz
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar.bz2
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar.lz
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar.xz
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.tar.zst
nixlib-f86361d186354167ff09f8aa163e70f7c5685503.zip
vector: init at 0.5.0
Signed-off-by: Austin Seipp <aseipp@pobox.com>
-rw-r--r--pkgs/tools/misc/vector/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix
new file mode 100644
index 000000000000..8c5ba4100c64
--- /dev/null
+++ b/pkgs/tools/misc/vector/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchFromGitHub, rustPlatform
+, openssl, pkgconfig, protobuf
+, Security, libiconv
+
+, features ?
+    (if stdenv.isAarch64
+     then [ "jemallocator" ]
+     else [ "leveldb" "jemallocator" ])
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "vector";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner  = "timberio";
+    repo   = pname;
+    rev    = "refs/tags/v${version}";
+    sha256 = "0niyxlvphn3awrpfh1hbqy767cckgjzyjrkqjxj844czxhh1hhff";
+  };
+
+  cargoSha256 = "0bdgan891hrah54g6aaysqizkxrfsbidnxihai0i7h7knzq9gsk5";
+  buildInputs = [ openssl pkgconfig protobuf ]
+                ++ stdenv.lib.optional stdenv.isDarwin [ Security libiconv ];
+
+  # needed for internal protobuf c wrapper library
+  PROTOC="${protobuf}/bin/protoc";
+  PROTOC_INCLUDE="${protobuf}/include";
+
+  # rdkafka fails to build, for some reason...
+  cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
+  checkPhase = ":"; # skip tests, too -- they don't respect the rdkafka flag...
+
+  meta = with stdenv.lib; {
+    description = "A high-performance logs, metrics, and events router";
+    homepage    = "https://github.com/timberio/vector";
+    license     = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 76388c04db19..d66a70dbb2e4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -24201,6 +24201,10 @@ in
     inherit (darwin.apple_sdk.frameworks) Security;
   };
 
+  vector = callPackage ../tools/misc/vector {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
   epkowa = callPackage ../misc/drivers/epkowa { };
 
   utsushi = callPackage ../misc/drivers/utsushi { };