diff options
Diffstat (limited to 'pkgs/tools/misc/vector/default.nix')
-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 4958841948478..9f06c858b48ae 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. |