원클릭으로
update-package
Update a local Nix package to a new version with automatic hash resolution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Update a local Nix package to a new version with automatic hash resolution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add an AeroSpace window rule to assign an app/window to a workspace (macOS only)
Create or update secrets using Infisical (preferred) or legacy agenix files
Re-encrypt all secrets after modifying .age files or changing host keys
Decrypt and view the contents of an .age secret file
Deploy NixOS/Darwin configuration to local or remote host using justfile commands
Analyze project from URL/path and auto-detect build system to create Nix package
| name | update-package |
| description | Update a local Nix package to a new version with automatic hash resolution |
| compatibility | Requires nix |
| metadata | {"author":"ruinous.ai","version":"1.1","domain":"packaging"} |
| parameters | {"package_name":{"type":"string","description":"Name of existing package in packages/ directory","required":true,"placeholder":"forgejo-mcp"},"new_version":{"type":"string","description":"New version or tag to update to","required":true,"placeholder":"2.6.0"}} |
Update a local Nix package in packages/ to a new version, automatically resolving the new hash.
If parameters are missing from $ARGUMENTS, use mcp_question to gather them:
mcp_question({
questions: [
{
question: "Which package do you want to update?",
header: "Package",
options: [
{ label: "Enter package name...", description: "e.g., forgejo-mcp, weaviate-cli" }
]
},
{
question: "What version should it be updated to?",
header: "Version",
options: [
{ label: "Enter version...", description: "e.g., 2.6.0, v3.3.0" }
]
}
]
})
Expected $ARGUMENTS format: <package_name> <new_version>
forgejo-mcp 2.6.0weaviate-cli v3.3.0cat packages/<package-name>/default.nix
Identify:
version valuehash, sha256, vendorHash, cargoHash)fetchFromGitHub, fetchurl, fetchzip, fetchgit)Edit packages/<package-name>/default.nix:
version = "X.Y.Z"; to the new versionv prefix in tag but not in version string, strip itReplace the existing hash with lib.fakeHash or the placeholder string:
# For sha256/hash fields:
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
# Or use lib.fakeHash:
hash = pkgs.lib.fakeHash;
Common hash fields to update:
hash or sha256 - Source archive hashvendorHash - Go module dependencies (buildGoModule)cargoHash - Rust dependencies (buildRustPackage)nix build .#<package-name> 2>&1 | grep -E "(got:|hash mismatch)" | head -5
The output will contain the correct hash:
error: hash mismatch in fixed-output derivation
got: sha256-CORRECT_HASH_HERE=
Replace the placeholder with the actual hash from the error output.
For Go packages (buildGoModule):
# After fixing source hash, build again to get vendorHash
nix build .#<package-name> 2>&1 | grep "got:"
For Rust packages (buildRustPackage):
# After fixing source hash, build again to get cargoHash
nix build .#<package-name> 2>&1 | grep "got:"
nix build .#<package-name>
Ensure build completes successfully.
./result/bin/<program> --version
# or
./result/bin/<program> --help
| Hash Type | Placeholder |
|---|---|
| SRI format | sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= |
| lib.fakeHash | pkgs.lib.fakeHash |
| Old base32 | 0000000000000000000000000000000000000000000000000000 |
/update-package forgejo-mcp 2.6.0
Before:
version = "2.5.0";
src = pkgs.fetchurl {
url = "https://codeberg.org/goern/forgejo-mcp/archive/v${version}.tar.gz";
hash = "sha256-oT2AYvMv0L6CBRNYi0ph6NaQQOMsROqQ8BPTDL8okcI=";
};
vendorHash = "sha256-tOTRbc735TrIZ7fL9EywKLLlePKWMMCeuhbQJGHUuk4=";
Step 1 - Update version and placeholder:
version = "2.6.0";
src = pkgs.fetchurl {
url = "https://codeberg.org/goern/forgejo-mcp/archive/v${version}.tar.gz";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
vendorHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
Step 2 - Build, extract source hash:
nix build .#forgejo-mcp 2>&1 | grep "got:"
# got: sha256-NEW_SOURCE_HASH=
Step 3 - Update source hash, build again for vendorHash:
nix build .#forgejo-mcp 2>&1 | grep "got:"
# got: sha256-NEW_VENDOR_HASH=
Step 4 - Update vendorHash, final build:
nix build .#forgejo-mcp
./result/bin/forgejo-mcp --version
/update-package weaviate-cli 3.3.0
Python packages typically only have one hash (source):
version = "3.3.0";
src = pkgs.fetchFromGitHub {
owner = "weaviate";
repo = "weaviate-cli";
rev = "v${version}";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
| Method | URL Pattern | Hash Field |
|---|---|---|
fetchFromGitHub | GitHub repos | hash |
fetchurl | Direct URL | hash or sha256 |
fetchzip | Release archives | sha256 |
fetchgit | Git repos | hash |
v2.0.0 vs 2.0.0)owner, repo, or URL template as needednix build .#<package>./result/bin/<program> --version