Skip to content

Commit 4e8618a

Browse files
authored
cargoNextest: cargoNextestArchiveExtraArgs option (#1011)
1 parent 6c23998 commit 4e8618a

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
Ultimately this should make no difference since the Nix store will reset all
1212
ownership permissions anyway, but it may avoid some spurious errors on certain
1313
systems.
14+
* `cargoNextest` now has a `cargoNextestArchiveExtraArgs` option for passing
15+
flags to nextest archive invocations.
1416

1517
## [0.23.2] - 2026-03-23
1618

docs/API.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ Except where noted below, all derivation attributes are delegated to
699699
(e.g. specifying a profile)
700700
- Default value: `""`
701701
- Note that all flags from `cargo test` are supported.
702+
* `cargoNextestArchiveExtraArgs`: additional flags to be passed in the nextest archive invocation
703+
- Default value: `""`
702704
* `cargoNextestPartitionsExtraArgs`: additional flags to be passed in the nextest partition invocation
703705
- Default value: `""`
704706
* `env.NEXTEST_SHOW_PROGRESS`: environment variable which controls nextest's progress output.

lib/cargoNextest.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
cargoExtraArgs ? "",
1212
cargoLlvmCovExtraArgs ? "--lcov --output-path $out/coverage",
1313
cargoNextestExtraArgs ? "",
14+
cargoNextestArchiveExtraArgs ? "",
1415
cargoNextestPartitionsExtraArgs ? "",
1516
doInstallCargoArtifacts ? true,
1617
partitions ? 1,
@@ -101,7 +102,12 @@ else
101102
mkArchiveArgs = root: "--archive-format tar-zst --archive-file ${root}/archive.tar.zst";
102103
archive = mkCargoDerivation (mkUpdatedArgs {
103104
cmd = "archive";
104-
moreArgs = mkArchiveArgs "$out";
105+
moreArgs = builtins.concatStringsSep " " (
106+
[
107+
(mkArchiveArgs "$out")
108+
]
109+
++ lib.optional (cargoNextestArchiveExtraArgs != "") cargoNextestArchiveExtraArgs
110+
);
105111
withLlvmCov =
106112
!(lib.asserts.assertMsg (!withLlvmCov) "withLLvmCov is not supported for partitioned runs");
107113
});

0 commit comments

Comments
 (0)