From 440f5728e7beb6b38927c28c27679dbc261ea451 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 27 Apr 2026 12:25:44 +0200 Subject: [PATCH] Fix: Do not add a newline after the cargo-nextest args When overriding the checkPhase and re-using the checkPhaseCargoCommand from the old mkCargoDerivation definition here, with all of `cargoExtraArgs`, `cargoNextestExtraArgs` and `moreArgs` empty, the trailing `\` adds a newline to the cargo-nextest call, which causes scripts to misbehave in situations like: RUST_LOG=off ${old.checkPhaseCargoCommand} --custom-arg || somethingElse With this change, this trailing newline is removed, which makes the scenario described above work. Signed-off-by: Matthias Beyer --- lib/cargoNextest.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cargoNextest.nix b/lib/cargoNextest.nix index 807519c6..e6561f3d 100644 --- a/lib/cargoNextest.nix +++ b/lib/cargoNextest.nix @@ -66,8 +66,7 @@ let ${ if withLlvmCov then "cargo llvm-cov nextest ${cargoLlvmCovExtraArgs}" else "cargo nextest ${cmd}" } \ - ''${CARGO_PROFILE:+--cargo-profile $CARGO_PROFILE} \ - ${cargoExtraArgs} ${cargoNextestExtraArgs} ${moreArgs} + ''${CARGO_PROFILE:+--cargo-profile $CARGO_PROFILE} ${cargoExtraArgs} ${cargoNextestExtraArgs} ${moreArgs} ''; nativeBuildInputs =