update-package

Update local Nix package versions and resolve hashes via nix build.

8|1|Updated Oct 21, 2015
One-click install
npx skills add https://github.com/iamruinous/nix-config --skill update-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-package
Source: https://github.com/iamruinous/nix-config/tree/main/.opencode/skills/update-package
Command: npx skills add https://github.com/iamruinous/nix-config --skill update-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Updating local Nix packages in packages/ can be error-prone due to manual hash management and tag formatting. This skill automates the version bump and hash resolution to keep builds reproducible across environments.

Core Features & Use Cases

  • Version bump automation: Update the package version in default.nix and normalize tags (strip leading v if needed).
  • Hash placeholder management: Replace source and dependency hashes with placeholders and guide the user to obtain the correct values via a build run.
  • Guided rebuild workflow: Provide iterative steps to fetch the correct hashes using nix build and update files accordingly for common fetch methods.

Quick Start

Run the skill with the package name and new version to update, for example forgejo-mcp 2.6.0.

Frequently Asked Questions about update-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a Nix package version and fix the hash automatically?

To update a Nix package version and fix the hash, you can automate the process by editing default.nix to bump the version, replacing hashes with placeholders like lib.fakeHash, and running nix build to resolve the correct values.

What is the best way to handle Nix hash placeholders when bumping a package version?

The best way to handle Nix hash placeholders during a version bump is to replace source and dependency hashes with placeholders, then run a guided nix build to fetch and update the correct hash values iteratively.

Why does my Nix build fail with a hash mismatch after a version bump?

A Nix build fails with a hash mismatch after a version bump because the source hash changed. You need to replace the old hash with a placeholder and run nix build to derive the new correct hash for the updated package.

Can I use this to normalize tags when updating local Nix packages?

Yes, you can normalize tags when updating local Nix packages in the packages/ directory. The process strips leading characters like 'v' from version tags if needed to ensure correct formatting during the version bump.

Does this Nix package update workflow support different fetch methods?

Yes, this Nix package update workflow supports common fetch methods. It guides you through editing default.nix, managing hash placeholders, and running nix build to resolve correct hashes across various fetch techniques.

What do I need to set up before automating Nix package version bumps?

Before automating Nix package version bumps, you need a local Nix environment with packages defined in a packages/ directory, and the default.nix file for the target package must be accessible for editing and running nix build.