lol

vector: use buildFeatures, clean up

figsoda 5999944a 1b7125db

+20 -16
+20 -16
pkgs/tools/misc/vector/default.nix
··· 22 22 , features ? ([ "sinks" "sources" "transforms" ] 23 23 # the second feature flag is passed to the rdkafka dependency 24 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")) 25 + ++ lib.optionals enableKafka [ "rdkafka-plain" "rdkafka/dynamic_linking" ] 26 + ++ lib.optional stdenv.targetPlatform.isUnix "unix") 27 27 }: 28 28 29 29 let ··· 51 51 RUSTONIG_SYSTEM_LIBONIG = true; 52 52 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; 53 53 54 - cargoBuildFlags = [ "--no-default-features" "--features" (lib.concatStringsSep "," features) ]; 54 + TZDIR = "${tzdata}/share/zoneinfo"; 55 + 56 + buildNoDefaultFeatures = true; 57 + buildFeatures = features; 58 + 55 59 # TODO investigate compilation failure for tests 56 60 # dev dependency includes httpmock which depends on iashc which depends on curl-sys with http2 feature enabled 57 61 # compilation fails because of a missing http2 include 58 62 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 - ''; 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 + ]; 72 76 73 77 # recent overhauls of DNS support in 0.9 mean that we try to resolve 74 78 # vector.dev during the checkPhase, which obviously isn't going to work.