aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix
index 37595702b686..d7b141153f46 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/misc/vector/default.nix
@@ -4,9 +4,13 @@
, tzdata
, features ?
- (if stdenv.isAarch64
+ ((if stdenv.isAarch64
then [ "jemallocator" "rdkafka" "rdkafka/dynamic_linking" ]
else [ "leveldb" "leveldb/leveldb-sys-2" "jemallocator" "rdkafka" "rdkafka/dynamic_linking" ])
+ ++
+ (lib.optional stdenv.targetPlatform.isUnix "unix")
+ ++
+ [ "sinks" "sources" "transforms" ])
, coreutils
, CoreServices
}:
@@ -38,15 +42,26 @@ rustPlatform.buildRustPackage rec {
# vector.dev during the checkPhase, which obviously isn't going to work.
# these tests in the DNS module are trivial though, so stubbing them out is
# fine IMO.
+ #
+ # the geoip transform yields maxmindb.so which contains references to rustc.
+ # neither figured out why the shared object is included in the output
+ # (it doesn't seem to be a runtime dependencies of the geoip transform),
+ # nor do I know why it depends on rustc.
+ # However, in order for the closure size to stay at a reasonable level,
+ # transforms-geoip is patched out of Cargo.toml for now - unless explicitly asked for.
patchPhase = ''
substituteInPlace ./src/dns.rs \
--replace "#[test]" ""
+
+ ${lib.optionalString (!builtins.elem "transforms-geoip" features) ''
+ substituteInPlace ./Cargo.toml --replace '"transforms-geoip",' ""
+ ''}
'';
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 ];
+ maintainers = with maintainers; [ thoughtpolice happysalada ];
};
}