一键导入
update-rust-derivation
Update a Rust derivation to a new version with correct hashes. Use when the user wants to update a Rust package in their nix derivations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update a Rust derivation to a new version with correct hashes. Use when the user wants to update a Rust package in their nix derivations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Help author, validate, and edit mori/cookbook.dhall cookbook extension catalogs. Covers entry fields, content types, topics, imports, and validation rules. TRIGGER when: user wants to create, edit, or validate their mori/cookbook.dhall config.
Bootstrap a complete corpus project from a repo name — initializes git, adds upstream subtrees, writes mori.dhall and Justfile, validates, registers, and optionally sets up cookbook and documentation entries. TRIGGER when: user wants to create a corpus project, wrap upstream repos as subtrees, or set up a third-party code reading workspace.
Help author, validate, and edit mori.dhall project configuration files. Covers project identity, packages, dependencies, repositories, documentation, skills, and subagents. TRIGGER when: user wants to create, edit, or understand their mori.dhall config.
Create, implement, discuss, or update execution plans (ExecPlans) — self-contained design documents that guide a coding agent or novice through delivering a working feature or system change. Use when planning significant work, implementing from a plan, or recording design decisions. TRIGGER when: user wants to plan a feature, follow a plan, or manage ExecPlan documents.
Create and manage master plans that decompose large initiatives into multiple coordinated ExecPlans with dependencies and integration points. TRIGGER when: user wants to plan a large initiative, coordinate multiple exec-plans, or track multi-plan progress.
Create a new Bun/TypeScript derivation using bun2nix from a GitHub URL. Use when the user wants to package a JavaScript/TypeScript npm package as a Nix derivation.
| name | update-rust-derivation |
| description | Update a Rust derivation to a new version with correct hashes. Use when the user wants to update a Rust package in their nix derivations. |
Update the Rust derivation: $ARGUMENTS
Read the derivation: Read the derivation file to understand its current structure, version, and hash fields.
Update the version: Change the version attribute to the new version.
Get the source hash:
nix-prefetch-url --unpack "https://github.com/<owner>/<repo>/archive/refs/tags/v<version>.tar.gz"
Then convert to SRI format:
nix hash to-sri --type sha256 <hash>
Update the source hash: Replace the hash attribute in fetchFromGitHub with the new SRI hash.
Set cargoHash to placeholder: Temporarily set cargoHash = lib.fakeHash; to trigger nix to compute the correct hash.
Build to get cargoHash:
nix build --impure --expr 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ./<path-to-derivation> {}' 2>&1 | grep -A2 "got:"
Extract the correct cargoHash from the error output.
Update cargoHash: Replace lib.fakeHash with the actual cargoHash from the build output.
Verify the build:
nix build --impure --expr 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ./<path-to-derivation> {}'
Ensure the build completes successfully.
Summary: Report the version update (old -> new) and remind to run darwin-rebuild switch --flake . to apply changes.
rustPlatform.buildRustPackage with cargoHashcargoLock instead of cargoHash, the process differs (fetch Cargo.lock from repo)patches, buildInputs)