mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-25 06:38:22 +03:00
vector: use buildFeatures, clean up
This commit is contained in:
parent
1b7125db17
commit
5999944ad0
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user