treewide: fix cargoTestFlags/cargoBuildFlags for structuredAttrs (#484699)

This commit is contained in:
Gergő Gutyina
2026-01-31 13:07:30 +00:00
committed by GitHub
19 changed files with 85 additions and 37 deletions
+2 -1
View File
@@ -34,8 +34,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoBuildFlags = [ "-p=biome_cli" ];
cargoTestFlags = finalAttrs.cargoBuildFlags ++ [
"--"
# fails due to cargo insta
"-- --skip=commands::check::print_json"
"--skip=commands::check::print_json"
"--skip=commands::check::print_json_pretty"
"--skip=commands::explain::explain_logs"
"--skip=commands::format::print_json"
+4 -1
View File
@@ -39,7 +39,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
zstd
];
cargoBuildFlags = [ "--package tauri-cli" ];
cargoBuildFlags = [
"--package"
"tauri-cli"
];
cargoTestFlags = finalAttrs.cargoBuildFlags;
env = lib.optionalAttrs stdenv.hostPlatform.isLinux {
+8 -2
View File
@@ -19,8 +19,14 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-JpXjnkZHz12YxgTSqTcWdQTkrMugP7ZGw48145BeBZk=";
cargoBuildFlags = [ "-p eludris" ];
cargoTestFlags = [ "-p eludris" ];
cargoBuildFlags = [
"--package"
"eludris"
];
cargoTestFlags = [
"--package"
"eludris"
];
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
+1 -1
View File
@@ -24,7 +24,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-HG0HZes01shEtuVK7QCYmy/zsU0snbwsqCtev7u3/WI=";
# For aws-lc-sys@0.22.0: use external bindgen.
AWS_LC_SYS_EXTERNAL_BINDGEN = "true";
env.AWS_LC_SYS_EXTERNAL_BINDGEN = "true";
# For aws-lc-sys@0.22.0: fix gcc error:
# In function 'memcpy',
@@ -18,8 +18,14 @@ rustPlatform.buildRustPackage rec {
};
cargoHash = "sha256-pxEwcLiRB95UBfXb+JgS8duEXiZUApH/C8Exus5TkfU=";
cargoBuildFlags = "--package flutter_rust_bridge_codegen";
cargoTestFlags = "--package flutter_rust_bridge_codegen";
cargoBuildFlags = [
"--package"
"flutter_rust_bridge_codegen"
];
cargoTestFlags = [
"--package"
"flutter_rust_bridge_codegen"
];
# needed to get tests running
nativeBuildInputs = [ cargo-expand ];
+2 -1
View File
@@ -31,7 +31,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoTestFlags = [
"--lib"
"--bins"
"--test integration"
"--test"
"integration"
# "--test integration_tests"
];
+11 -10
View File
@@ -78,7 +78,8 @@ rustPlatform.buildRustPackage rec {
};
cargoBuildFlags = [
"--package lighthouse"
"--package"
"lighthouse"
];
__darwinAllowLocalNetworking = true;
@@ -88,15 +89,15 @@ rustPlatform.buildRustPackage rec {
# All of these tests require network access and/or docker
cargoTestFlags = [
"--workspace"
"--exclude beacon_chain"
"--exclude beacon_node"
"--exclude http_api"
"--exclude lighthouse"
"--exclude lighthouse_network"
"--exclude network"
"--exclude slashing_protection"
"--exclude watch"
"--exclude web3signer_tests"
"--exclude=beacon_chain"
"--exclude=beacon_node"
"--exclude=http_api"
"--exclude=lighthouse"
"--exclude=lighthouse_network"
"--exclude=network"
"--exclude=slashing_protection"
"--exclude=watch"
"--exclude=web3signer_tests"
];
# All of these tests require network access
+3 -1
View File
@@ -59,7 +59,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
LUX_SKIP_IMPURE_TESTS = 1; # Disable impure unit tests
};
cargoTestFlags = "--lib"; # Disable impure integration tests
cargoTestFlags = [
"--lib" # Disable impure integration tests
];
nativeCheckInputs = [
lua5_4
+4 -2
View File
@@ -26,8 +26,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-uCy/Qo92yZ4pjjgW64nWYH21EbdMMwGXP5522tl8MAE=";
cargoBuildFlags = [
"-p nickel-lang-cli"
"-p nickel-lang-lsp"
"--package"
"nickel-lang-cli"
"--package"
"nickel-lang-lsp"
];
nativeBuildInputs = [
+8 -3
View File
@@ -58,10 +58,15 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-TVsPS1jzDzRSY9b636Tv30WupCnyfADeA+8pYn8STIs=";
cargoBuildFlags = [
"--package rerun-cli"
"--package rerun_c"
"--package"
"rerun-cli"
"--package"
"rerun_c"
];
cargoTestFlags = [
"--package"
"rerun-cli"
];
cargoTestFlags = [ "--package rerun-cli" ];
buildNoDefaultFeatures = true;
buildFeatures = [
"native_viewer"
+3 -2
View File
@@ -37,10 +37,11 @@ rustPlatform.buildRustPackage rec {
# The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
# To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
env.RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
cargoTestFlags = [
"-- --skip=query_planner::tests::missing_typename_and_fragments_in_requires"
"--"
"--skip=query_planner::tests::missing_typename_and_fragments_in_requires"
];
passthru = {
+2 -1
View File
@@ -38,7 +38,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
# valid by making a network call to the repo that houses their binaries; but, the
# build env can't make network calls (impurity)
cargoTestFlags = [
"-- --skip=latest_plugins_are_valid_versions"
"--"
"--skip=latest_plugins_are_valid_versions"
];
# Some tests try to write configuration data to a location in the user's home
+2 -1
View File
@@ -32,7 +32,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoTestFlags = [
# Prefer the "smoke" profile over "ci" to exclude flaky tests: https://github.com/rvben/rumdl/pull/341
"--profile smoke"
"--profile"
"smoke"
];
doInstallCheck = true;
+5 -2
View File
@@ -48,11 +48,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
installManPage docs/build/man/man1/tpnote.1
'';
RUSTONIG_SYSTEM_LIBONIG = true;
env.RUSTONIG_SYSTEM_LIBONIG = true;
# The `tpnote` crate has no unit tests. All tests are in `tpnote-lib`.
checkType = "debug";
cargoTestFlags = "--package tpnote-lib";
cargoTestFlags = [
"--package"
"tpnote-lib"
];
doCheck = true;
nativeInstallCheckInputs = [
+1 -1
View File
@@ -43,7 +43,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
# Force linking to libEGL, which is always dlopen()ed, and to
# libwayland-client & libxkbcommon, which is dlopen()ed based on the
# winit backend.
NIX_LDFLAGS = [
env.NIX_LDFLAGS = [
"--push-state"
"--no-as-needed"
"-lEGL"
@@ -29,8 +29,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
pipewire
];
cargoBuildFlags = "-p vhost-device-sound";
cargoTestFlags = "-p vhost-device-sound";
cargoBuildFlags = [
"--package"
"vhost-device-sound"
];
cargoTestFlags = [
"--package"
"vhost-device-sound"
];
# Runs dbus-daemon, which tries to load config from /etc.
doCheck = false;
+2 -1
View File
@@ -18,7 +18,8 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-PoexldRTp2cPu7iF7te//kO4Ph1P6A/jNZdMkYKERqM=";
cargoTestFlags = [
"--package viceroy-lib"
"--package"
"viceroy-lib"
];
meta = {
+8 -2
View File
@@ -19,8 +19,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-vNCqfXsPjb3mph28YuYKpWTs9VHbIcXs6GVn4XgQKtQ=";
cargoBuildFlags = [ "--package xdvdfs-cli" ];
cargoTestFlags = [ "--package xdvdfs-cli" ];
cargoBuildFlags = [
"--package"
"xdvdfs-cli"
];
cargoTestFlags = [
"--package"
"xdvdfs-cli"
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/xdvdfs";
+3 -1
View File
@@ -80,7 +80,9 @@ toLuaModule (
runHook postInstall
'';
cargoTestFlags = "--lib"; # Disable impure integration tests
cargoTestFlags = [
"--lib" # Disable impure integration tests
];
meta = {
description = "Lua API for the Lux package manager";