AgentSkillsCN

nixpkgs-broken-package

在Flake更新后,通过系统化的调试步骤对损坏的nixpkg进行故障排查与修复。

SKILL.md
--- frontmatter
name: nixpkgs-broken-package
description: Triage a broken nixpkg after flake update with systematic debugging steps.
disable-model-invocation: true

Triage a broken nixpkg after flake update.

Error from: [nix flake check / darwin-rebuild switch / nix build ...]

code
$ARGUMENTS

Quick reference

ScenarioStrategyFile
Single package brokenStable fallbackmodules/nixpkgs/overlays/stable-fallbacks.nix
Tests fail onlyBuild modificationmodules/nixpkgs/overlays/overrides.nix
Fix exists in PRUpstream patchmodules/nixpkgs/overlays/channels.nix
Multiple packages brokenFlake.lock rollbackflake.lock

Context to load

Read these files to understand current state and patterns:

Documentation: @packages/docs/src/content/docs/guides/handling-broken-packages.md

Current overlays (see existing patterns): @modules/nixpkgs/overlays/stable-fallbacks.nix @modules/nixpkgs/overlays/channels.nix @modules/nixpkgs/overlays/overrides.nix

Architecture (if needed): @packages/docs/src/content/docs/development/architecture/adrs/0017-deferred-module-composition-overlay-patterns.md

Workflow

  1. Identify broken package(s) from error output
  2. Check upstream status:
  3. Assess scope (single package? multiple? platform-specific?)
  4. Match scenario to strategy using quick reference above
  5. Draft implementation following patterns in existing overlay files

Output format

Present findings:

  • Package(s): name and system(s) affected
  • Root cause: why it's broken (compiler issue, test failure, dependency)
  • Upstream status: links to hydra/issues/PRs
  • Recommended strategy: A/B/C/D with rationale
  • Implementation: exact code change with file path

Wait for approval before implementing.