Cargo Nix Plugin
Description
A Nix plugin that resolves Cargo workspaces natively and allows for crate level builds
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
cargo-nix-plugin
A Nix plugin that resolves Cargo workspaces natively, replacing the generated `Cargo.nix` file from crate2nix with a single `builtins.resolveCargoWorkspace` primop.
What It Does
- Reads
Cargo.lockand the sparse registry index directly, so there is nocargobinary at eval time (you can also feed it pre-generatedcargo metadataJSON) - Evaluates
cfg()target expressions for your platform during resolution - Produces an attrset that plugs into
buildRustCrate - No more
crate2nix generatestep or checked-in 50K-100K lineCargo.nix
Install
Add the plugin to your Nix configuration:
# nix.conf or via --option — point at the directory so the right
# extension (.so/.dylib) is picked up automatically
plugin-files = /path/to/cargo-nix-plugin/lib/nix/plugins
Or use the flake output:
{
inputs.cargo-nix-plugin.url = "github:anthropics/cargo-nix-plugin";
}
Usage
Default (lockfile resolve)
Point at your workspace root:
cargoNix = cargo-nix-plugin.lib {
inherit pkgs;
src = ./.; # must contain Cargo.toml + Cargo.lock
};
The plugin reads `Cargo.lock` plus the sparse registry index directly — no `cargo` binary, no crate sources at eval time. On first use it fetches each crate's index entry (a few hundred bytes) into `$CARGO_HOME` and reuses it on later runs.
If you already redirect cargo to a mirror (`CARGO_REGISTRIES_CRATES_IO_INDEX` or `[source.crates-io] replace-with` in `.cargo/config.toml`), the resolver picks that up too:
# .cargo/config.toml — used by both cargo and the plugin
[source.crates-io]
replace-with = "mirror"
[source.mirror]
registry = "sparse+https://artifactory.example/api/cargo/crates/index/"
If every index lookup fails (e.g. egress to `index.crates.io` is blocked and no mirror is configured), evaluation fails rather than silently producing derivations with missing features.
Explicit metadata
You can also generate cargo's resolution up front an
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11