···2222, features ? ([ "sinks" "sources" "transforms" ]
2323 # the second feature flag is passed to the rdkafka dependency
2424 # building on linux fails without this feature flag (both x86_64 and AArch64)
2525- ++ (lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ])
2626- ++ (lib.optional stdenv.targetPlatform.isUnix "unix"))
2525+ ++ lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ]
2626+ ++ lib.optional stdenv.targetPlatform.isUnix "unix")
2727}:
28282929let
···5151 RUSTONIG_SYSTEM_LIBONIG = true;
5252 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
53535454- cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ];
5454+ TZDIR = "${tzdata}/share/zoneinfo";
5555+5656+ buildNoDefaultFeatures = true;
5757+ buildFeatures = features;
5858+5559 # TODO investigate compilation failure for tests
5660 # dev dependency includes httpmock which depends on iashc which depends on curl-sys with http2 feature enabled
5761 # compilation fails because of a missing http2 include
5862 doCheck = !stdenv.isDarwin;
5959- # healthcheck_grafana_cloud is trying to make a network access
6060- # test_stream_errors is flaky on linux-aarch64
6161- # tcp_with_tls_intermediate_ca is flaky on linux-x86_64
6262- checkPhase = ''
6363- TZDIR=${tzdata}/share/zoneinfo cargo test \
6464- --no-default-features \
6565- --features ${lib.concatStringsSep "," features} \
6666- -- --test-threads 1 \
6767- --skip=sinks::loki::tests::healthcheck_grafana_cloud \
6868- --skip=kubernetes::api_watcher::tests::test_stream_errors \
6969- --skip=sources::socket::test::tcp_with_tls_intermediate_ca \
7070- --skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics
7171- '';
6363+6464+ checkFlags = [
6565+ # tries to make a network access
6666+ "--skip=sinks::loki::tests::healthcheck_grafana_cloud"
6767+6868+ # flaky on linux-aarch64
6969+ "--skip=kubernetes::api_watcher::tests::test_stream_errors"
7070+7171+ # flaky on linux-x86_64
7272+ "--skip=sources::socket::test::tcp_with_tls_intermediate_ca"
7373+7474+ "--skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics"
7575+ ];
72767377 # recent overhauls of DNS support in 0.9 mean that we try to resolve
7478 # vector.dev during the checkPhase, which obviously isn't going to work.