|
|
|
@ -1,8 +1,17 @@ |
|
|
|
|
{ stdenv, lib, fetchFromGitHub, rustPlatform, openssl, pkg-config, protobuf |
|
|
|
|
, Security, libiconv, rdkafka, tzdata, coreutils, CoreServices |
|
|
|
|
|
|
|
|
|
, features ? |
|
|
|
|
([ "jemallocator" "rdkafka" "rdkafka/dynamic_linking" ] |
|
|
|
|
{ stdenv |
|
|
|
|
, lib |
|
|
|
|
, fetchFromGitHub |
|
|
|
|
, rustPlatform |
|
|
|
|
, openssl |
|
|
|
|
, pkg-config |
|
|
|
|
, protobuf |
|
|
|
|
, Security |
|
|
|
|
, libiconv |
|
|
|
|
, rdkafka |
|
|
|
|
, tzdata |
|
|
|
|
, coreutils |
|
|
|
|
, CoreServices |
|
|
|
|
, features ? ([ "jemallocator" "rdkafka" "rdkafka/dynamic_linking" ] |
|
|
|
|
++ (lib.optional stdenv.targetPlatform.isUnix "unix") |
|
|
|
|
++ [ "sinks" "sources" "transforms" ]) |
|
|
|
|
}: |
|
|
|
@ -12,20 +21,20 @@ rustPlatform.buildRustPackage rec { |
|
|
|
|
version = "0.12.1"; |
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
|
owner = "timberio"; |
|
|
|
|
repo = pname; |
|
|
|
|
rev = "v${version}"; |
|
|
|
|
owner = "timberio"; |
|
|
|
|
repo = pname; |
|
|
|
|
rev = "v${version}"; |
|
|
|
|
sha256 = "0sw05472znxmggckxjbrl3b8ky8nsw42xmrsb41p8z4q0aw115fd"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
cargoSha256 = "0mfhrdqry6qrzfx5px1zqgfv5iqa186vl2yh290ibinkxy0x5fa9"; |
|
|
|
|
nativeBuildInputs = [ pkg-config ]; |
|
|
|
|
buildInputs = [ openssl protobuf rdkafka ] |
|
|
|
|
++ lib.optional stdenv.isDarwin [ Security libiconv coreutils CoreServices ]; |
|
|
|
|
++ lib.optional stdenv.isDarwin [ Security libiconv coreutils CoreServices ]; |
|
|
|
|
|
|
|
|
|
# needed for internal protobuf c wrapper library |
|
|
|
|
PROTOC="${protobuf}/bin/protoc"; |
|
|
|
|
PROTOC_INCLUDE="${protobuf}/include"; |
|
|
|
|
PROTOC = "${protobuf}/bin/protoc"; |
|
|
|
|
PROTOC_INCLUDE = "${protobuf}/include"; |
|
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ]; |
|
|
|
|
checkPhase = "TZDIR=${tzdata}/share/zoneinfo cargo test --no-default-features --features ${lib.concatStringsSep "," features} -- --test-threads 1"; |
|
|
|
@ -54,8 +63,8 @@ rustPlatform.buildRustPackage rec { |
|
|
|
|
|
|
|
|
|
meta = with lib; { |
|
|
|
|
description = "A high-performance logs, metrics, and events router"; |
|
|
|
|
homepage = "https://github.com/timberio/vector"; |
|
|
|
|
license = with licenses; [ asl20 ]; |
|
|
|
|
homepage = "https://github.com/timberio/vector"; |
|
|
|
|
license = with licenses; [ asl20 ]; |
|
|
|
|
maintainers = with maintainers; [ thoughtpolice happysalada ]; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|