From 2bfdac25a71648c0fd8ded952a0f496de41f73e7 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 28 Jul 2026 08:11:20 +0200 Subject: [PATCH] nix: name the crane derivations, instead of "cargo-package" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- Cargo.toml | 6 ++++++ flake.nix | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 8525d98..0cef08d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/flake.nix b/flake.nix index 7b73a3d..762f3fe 100644 --- a/flake.nix +++ b/flake.nix @@ -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;