From 260f32359ba33f5a7e4f4a8841cda8d59659d55f Mon Sep 17 00:00:00 2001 From: David Abram Date: Sat, 10 Oct 2026 23:06:53 +0200 Subject: [PATCH] perf(nix): prepare test dependencies without redundant cargo build --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index f9a280842..e99d0a6df 100644 --- a/flake.nix +++ b/flake.nix @@ -400,10 +400,17 @@ CARGO_PROFILE_TEST_DEBUG = "line-tables-only"; }; + # The deps-only derivation must also prepare test/dev-dependency artifacts. + # The usual cargo build is redundant here: the checked targets are followed + # by cargo test --no-run during the check phase. cargoArtifactsTest = craneLib.buildDepsOnly ( cargoDepsArgs // testProfileArgs - // { pname = "sce-test-deps"; } + // { + pname = "sce-test-deps"; + doCheck = true; + buildPhaseCargoCommand = "cargoWithProfile check --locked --all-targets"; + } ); testCargoArgs = commonCargoArgs // testProfileArgs // {