diff options
author | figsoda <figsoda@pm.me> | 2021-11-15 19:19:01 -0500 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2021-11-16 08:11:50 -0500 |
commit | 5999944ad06c8015430fddaecee700fcfdb29148 (patch) | |
tree | 7a23727326ed352dfaf1fc0c6eed88a45faf0d32 /pkgs/tools/misc/vector | |
parent | 1b7125db17fba70cec83289d0ef9dba6f9e27d9e (diff) | |
download | nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar.gz nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar.bz2 nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar.lz nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar.xz nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.tar.zst nixpkgs-5999944ad06c8015430fddaecee700fcfdb29148.zip |
vector: use buildFeatures, clean up
Diffstat (limited to 'pkgs/tools/misc/vector')
-rw-r--r-- | pkgs/tools/misc/vector/default.nix | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index 49588419484..9f06c858b48 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -22,8 +22,8 @@ , 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")) + ++ lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ] + ++ lib.optional stdenv.targetPlatform.isUnix "unix") }: let @@ -51,24 +51,28 @@ rustPlatform.buildRustPackage { RUSTONIG_SYSTEM_LIBONIG = true; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ]; + TZDIR = "${tzdata}/share/zoneinfo"; + + buildNoDefaultFeatures = true; + buildFeatures = 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; - # healthcheck_grafana_cloud is trying to make a network access - # test_stream_errors is flaky on linux-aarch64 - # tcp_with_tls_intermediate_ca is flaky on linux-x86_64 - checkPhase = '' - TZDIR=${tzdata}/share/zoneinfo cargo test \ - --no-default-features \ - --features ${lib.concatStringsSep "," features} \ - -- --test-threads 1 \ - --skip=sinks::loki::tests::healthcheck_grafana_cloud \ - --skip=kubernetes::api_watcher::tests::test_stream_errors \ - --skip=sources::socket::test::tcp_with_tls_intermediate_ca \ - --skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics - ''; + + checkFlags = [ + # tries to make a network access + "--skip=sinks::loki::tests::healthcheck_grafana_cloud" + + # flaky on linux-aarch64 + "--skip=kubernetes::api_watcher::tests::test_stream_errors" + + # flaky on linux-x86_64 + "--skip=sources::socket::test::tcp_with_tls_intermediate_ca" + + "--skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics" + ]; # recent overhauls of DNS support in 0.9 mean that we try to resolve # vector.dev during the checkPhase, which obviously isn't going to work. |