···22, features ? ([ "sinks" "sources" "transforms" ]
23 # the second feature flag is passed to the rdkafka dependency
24 # building on linux fails without this feature flag (both x86_64 and AArch64)
25- ++ (lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ])
26- ++ (lib.optional stdenv.targetPlatform.isUnix "unix"))
27}:
2829let
···51 RUSTONIG_SYSTEM_LIBONIG = true;
52 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
5354- cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ];
000055 # TODO investigate compilation failure for tests
56 # dev dependency includes httpmock which depends on iashc which depends on curl-sys with http2 feature enabled
57 # compilation fails because of a missing http2 include
58 doCheck = !stdenv.isDarwin;
59- # healthcheck_grafana_cloud is trying to make a network access
60- # test_stream_errors is flaky on linux-aarch64
61- # tcp_with_tls_intermediate_ca is flaky on linux-x86_64
62- checkPhase = ''
63- TZDIR=${tzdata}/share/zoneinfo cargo test \
64- --no-default-features \
65- --features ${lib.concatStringsSep "," features} \
66- -- --test-threads 1 \
67- --skip=sinks::loki::tests::healthcheck_grafana_cloud \
68- --skip=kubernetes::api_watcher::tests::test_stream_errors \
69- --skip=sources::socket::test::tcp_with_tls_intermediate_ca \
70- --skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics
71- '';
7273 # recent overhauls of DNS support in 0.9 mean that we try to resolve
74 # vector.dev during the checkPhase, which obviously isn't going to work.
···22, features ? ([ "sinks" "sources" "transforms" ]
23 # the second feature flag is passed to the rdkafka dependency
24 # building on linux fails without this feature flag (both x86_64 and AArch64)
25+ ++ lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ]
26+ ++ lib.optional stdenv.targetPlatform.isUnix "unix")
27}:
2829let
···51 RUSTONIG_SYSTEM_LIBONIG = true;
52 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
5354+ TZDIR = "${tzdata}/share/zoneinfo";
55+56+ buildNoDefaultFeatures = true;
57+ buildFeatures = features;
58+59 # TODO investigate compilation failure for tests
60 # dev dependency includes httpmock which depends on iashc which depends on curl-sys with http2 feature enabled
61 # compilation fails because of a missing http2 include
62 doCheck = !stdenv.isDarwin;
63+64+ checkFlags = [
65+ # tries to make a network access
66+ "--skip=sinks::loki::tests::healthcheck_grafana_cloud"
67+68+ # flaky on linux-aarch64
69+ "--skip=kubernetes::api_watcher::tests::test_stream_errors"
70+71+ # flaky on linux-x86_64
72+ "--skip=sources::socket::test::tcp_with_tls_intermediate_ca"
73+74+ "--skip=sources::host_metrics::cgroups::tests::generates_cgroups_metrics"
75+ ];
7677 # recent overhauls of DNS support in 0.9 mean that we try to resolve
78 # vector.dev during the checkPhase, which obviously isn't going to work.