nix: name the crane derivations, instead of "cargo-package"
The root manifest is a pure [workspace], so crane finds no [package].name to name its derivations after and falls back to a placeholder — every build of crabidy logged two "crane will use a placeholder value" warnings and produced cargo-package-0.1.0.drv, which says nothing about what was built. Name it in [workspace.metadata.crane], the spelling crane itself suggests. Cargo ignores unknown workspace metadata, so this is a build label and nothing more. The cross build takes its name from the same root, which would leave the native and aarch64 derivations both called crabidy-0.1.0; give it an explicit pname so a build log can tell them apart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a2e3da6aa5
commit
2bfdac25a7
|
|
@ -22,6 +22,12 @@ members = [
|
|||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# This root manifest is a pure workspace, so crane finds no `[package].name` to
|
||||
# name its derivations after and warns that it is using a placeholder
|
||||
# ("cargo-package-0.1.0.drv" in the build log). Name it here instead.
|
||||
[workspace.metadata.crane]
|
||||
name = "crabidy"
|
||||
|
||||
[workspace.dependencies]
|
||||
anyhow = "1"
|
||||
argon2 = { version = "0.5", features = ["std"] }
|
||||
|
|
|
|||
|
|
@ -201,6 +201,10 @@
|
|||
crossArgs = {
|
||||
inherit src;
|
||||
strictDeps = true;
|
||||
# Both builds take their name from the workspace root, so name this
|
||||
# one for its target — otherwise the native and cross derivations are
|
||||
# both "crabidy-0.1.0" and a build log cannot tell them apart.
|
||||
pname = "crabidy-server-aarch64";
|
||||
# web-ui is a default feature; keep it on so the embedded UI ships.
|
||||
cargoExtraArgs = "--locked -p crabidy-server";
|
||||
CARGO_BUILD_TARGET = muslTarget;
|
||||
|
|
|
|||
Loading…
Reference in New Issue