Nixpkgs Package Update
Batch NixOS/nixpkgs update workflow: Repology discovery; strict easy-update filtering; parallel git worktrees.
Required follow-up reads
| Need |
Read |
When |
| Phase prompts, PR templates, failure handling |
references/update-workflow.md |
Before executing or delegating updates |
| Commands, platform checks, candidate tables |
references/quick-reference.md |
Before running update commands |
Exact referenced command syntax MUST survive delegation.
Workflow
DISCOVER → FILTER → VALIDATE → SELECT → UPDATE → REPORT
- DISCOVER: Query Repology API for outdated
nix_unstable packages with User-Agent nixpkgs-update/1.0; collect name, nixpkgs_version, newest_version. Use exact Repology commands from either required reference.
- FILTER: Keep only packages in
pkgs/by-name/ of type Rust | Go, with has_patches=false, complexity=simple, patch/minor version bumps, and support for the current system. Rust requires buildRustPackage/cargoHash; Go requires buildGoModule/vendorHash. Reject major bumps and packages restricted from local testing.
- VALIDATE: Spawn one Explore agent per filtered candidate. Each inspects
pkgs/by-name/*/<package>/package.nix for patches, complex install logic, overrides, complexity, and platform restrictions. Proceed only when has_patches=false, complexity=simple, and current-platform support.
- SELECT: Present only validated easy candidates in a multi-select table containing package, version bump, and type. Ask:
Which packages would you like to update? (enter numbers, e.g., 1,2).
- UPDATE: Work only from the nixpkgs checkout the user intends to contribute from. Create one worktree per selected package:
git worktree add <temp-dir>/nixpkgs-<package>-<version> -b <package>-<version> master
Launch one agent per worktree; agents MUST not git switch in one shared repo. Each agent MUST:
- Verify worktree and branch.
- Run
timeout 600 nix run nixpkgs#nix-update -- <PACKAGE>.
- Run
timeout 600 nix build .#<PACKAGE>.
- Run a binary version check when applicable.
- Run
timeout 600 nix run nixpkgs#nixpkgs-review -- wip --print-result (nixpkgs-review mandatory; NEVER skip).
- Commit with title
<PACKAGE>: <OLD_VERSION> -> <NEW_VERSION>.
- Push to fork and create a PR against
NixOS/nixpkgs.
- Return PR URL or failure reason.
Every long build/review command MUST use timeout 600. Use the full agent prompt, commit body, PR body, and cleanup commands from references/update-workflow.md.
6. REPORT: Collect and display PR URLs/results:
## Update Results
| Package | Version | Status | PR |
|--------------|------------------|--------|--------|
| some-rust | 1.0.0 → 1.0.1 | ✅ | #12345 |
| some-go | 0.5.0 → 0.5.1 | ⏱️ | timeout |
Clean up successful worktrees after reporting. Failed worktrees MUST already be removed by failure handling.
Non-negotiables and failure handling
- Present only candidates passing every strict filter; NEVER show packages needing manual work, complex packages, packages with patches, major bumps, or packages untestable on the current platform. Platform support is mandatory.
- On failure or timeout, abort that package, clean up its worktree/branch, and report the reason.
- Build timeout (>10m), build error, or review timeout (>10m) → discard, clean up, report.
- Platform mismatch → NEVER present to user.
- Cleanup commands are in
references/update-workflow.md and references/quick-reference.md.
1---2name: nixpkgs-update3description: Use when updating a nixpkgs package or contributing a package bump with nix-update or nixpkgs-review.4license: AGPL-3.0-or-later5---67# Nixpkgs Package Update89Batch NixOS/nixpkgs update workflow: Repology discovery; strict easy-update filtering; parallel git worktrees.1011## Required follow-up reads1213|Need|Read|When|14|---|---|---|15|Phase prompts, PR templates, failure handling|`references/update-workflow.md`|Before executing or delegating updates|16|Commands, platform checks, candidate tables|`references/quick-reference.md`|Before running update commands|1718Exact referenced command syntax MUST survive delegation.1920## Workflow2122`DISCOVER → FILTER → VALIDATE → SELECT → UPDATE → REPORT`23241. **DISCOVER**: Query Repology API for outdated `nix_unstable` packages with User-Agent `nixpkgs-update/1.0`; collect `name`, `nixpkgs_version`, `newest_version`. Use exact Repology commands from either required reference.252. **FILTER**: Keep only packages in `pkgs/by-name/` of type Rust | Go, with `has_patches=false`, `complexity=simple`, patch/minor version bumps, and support for the current system. Rust requires `buildRustPackage`/`cargoHash`; Go requires `buildGoModule`/`vendorHash`. Reject major bumps and packages restricted from local testing.263. **VALIDATE**: Spawn one Explore agent per filtered candidate. Each inspects `pkgs/by-name/*/<package>/package.nix` for patches, complex install logic, overrides, complexity, and platform restrictions. Proceed only when `has_patches=false`, `complexity=simple`, and current-platform support.274. **SELECT**: Present only validated easy candidates in a multi-select table containing package, version bump, and type. Ask: `Which packages would you like to update? (enter numbers, e.g., 1,2)`.285. **UPDATE**: Work only from the nixpkgs checkout the user intends to contribute from. Create one worktree per selected package:2930```bash31git worktree add <temp-dir>/nixpkgs-<package>-<version> -b <package>-<version> master32```3334Launch one agent per worktree; agents MUST not `git switch` in one shared repo. Each agent MUST:35361. Verify worktree and branch.372. Run `timeout 600 nix run nixpkgs#nix-update -- <PACKAGE>`.383. Run `timeout 600 nix build .#<PACKAGE>`.394. Run a binary version check when applicable.405. Run `timeout 600 nix run nixpkgs#nixpkgs-review -- wip --print-result` (`nixpkgs-review` mandatory; NEVER skip).416. Commit with title `<PACKAGE>: <OLD_VERSION> -> <NEW_VERSION>`.427. Push to fork and create a PR against `NixOS/nixpkgs`.438. Return PR URL or failure reason.4445Every long build/review command MUST use `timeout 600`. Use the full agent prompt, commit body, PR body, and cleanup commands from `references/update-workflow.md`.466. **REPORT**: Collect and display PR URLs/results:4748```49## Update Results5051| Package | Version | Status | PR |52|--------------|------------------|--------|--------|53| some-rust | 1.0.0 → 1.0.1 | ✅ | #12345 |54| some-go | 0.5.0 → 0.5.1 | ⏱️ | timeout |55```5657Clean up successful worktrees after reporting. Failed worktrees MUST already be removed by failure handling.5859## Non-negotiables and failure handling6061- Present only candidates passing every strict filter; NEVER show packages needing manual work, complex packages, packages with patches, major bumps, or packages untestable on the current platform. Platform support is mandatory.62- On failure or timeout, abort that package, clean up its worktree/branch, and report the reason.63- Build timeout (>10m), build error, or review timeout (>10m) → discard, clean up, report.64- Platform mismatch → NEVER present to user.65- Cleanup commands are in `references/update-workflow.md` and `references/quick-reference.md`.