Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,13 @@
src = craneLib.cleanCargoSource ./cli;
};

cargoArtifacts = craneLib.buildDepsOnly cargoDepsArgs;
# Release consumers only need compiled dependencies, not check artifacts.
cargoArtifacts = craneLib.buildDepsOnly (
cargoDepsArgs
// {
buildPhaseCargoCommand = "cargoWithProfile build --locked";
}
);

# Keep production artifacts on Crane's release profile. The test and
# Clippy derivations use the unoptimized Cargo test profile with a
Expand Down Expand Up @@ -481,12 +487,19 @@
CARGO_BUILD_TARGET = muslTarget;
};

cargoArtifactsMusl = craneLibMusl.buildDepsOnly cargoDepsArgsMusl;
cargoArtifactsMusl = craneLibMusl.buildDepsOnly (
cargoDepsArgsMusl
// {
buildPhaseCargoCommand = "cargoWithProfile build --locked";
}
);

scePackageMusl = craneLibMusl.buildPackage (
(commonCargoArgs // muslEnvVars // releaseCommitArgs)
// {
inherit cargoArtifactsMusl;
# Crane expects cargoArtifacts rather than cargoArtifactsMusl.
# Reuse the separately prepared musl dependency artifacts.
cargoArtifacts = cargoArtifactsMusl;
nativeBuildInputs = [
rustToolchainMusl
pkgs.cmake
Expand Down
Loading