Commit b766ab5427cd

Vincent Demeester <vincent@sbr.pm>
2026-01-15 12:07:09
nixpkgs: recommend multi-arch testing in PR reviews
Update the Nixpkgs skill to recommend testing on multiple architectures when reviewing PRs. This provides better coverage and catches architecture-specific issues that might be missed with single-arch testing. Changes: - Make `--system x86_64-linux,aarch64-linux --no-shell` the recommended default for PR reviews - Add clear guidance on when multi-arch vs single-arch is appropriate - Update all review workflow examples to show multi-arch first - Add multi-arch testing tip to best practices section Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 8a51bf3
Changed files (2)
dots
.config
claude
skills
Nixpkgs
dots/.config/claude/skills/Nixpkgs/workflows/Review.md
@@ -81,8 +81,19 @@ github.com:
 ## Review Workflow
 
 ### Step 1: Fetch and Review PR
+
+**Multi-Architecture Testing (Recommended):**
 ```bash
-# Review PR
+# Review PR on multiple architectures (preferred)
+nixpkgs-review pr 12345 --system x86_64-linux,aarch64-linux --no-shell
+
+# This provides better coverage and catches arch-specific issues
+# Use --no-shell for non-interactive batch building
+```
+
+**Single Architecture (Quick Test):**
+```bash
+# Review PR on current system only
 nixpkgs-review pr 12345
 
 # This will:
@@ -92,6 +103,17 @@ nixpkgs-review pr 12345
 # 4. Drop you into nix-shell with built packages
 ```
 
+**When to use multi-arch:**
+- For packages that claim multi-platform support
+- When you have time for thorough review
+- For cross-platform packages (most packages)
+- On Linux systems (can build both x86_64 and aarch64)
+
+**When single-arch is OK:**
+- Platform-specific packages (e.g., Linux kernel modules)
+- Darwin-only packages (when reviewing on macOS)
+- Quick sanity checks before detailed review
+
 ### Step 2: Test Built Packages
 In the nix-shell environment:
 
dots/.config/claude/skills/Nixpkgs/SKILL.md
@@ -37,7 +37,10 @@ When the user's request matches specific nixpkgs operations, route to the approp
 
 ### Review PR
 ```bash
-# Review pull request
+# Review pull request (multi-arch recommended)
+nixpkgs-review pr 12345 --system x86_64-linux,aarch64-linux --no-shell
+
+# Review single architecture (quick test)
 nixpkgs-review pr 12345
 
 # Review and post results
@@ -87,17 +90,21 @@ nix-shell -p nixpkgs-review
 
 ### Basic PR Review
 ```bash
-# Review PR by number
+# Review PR on multiple architectures (recommended for thorough review)
+nixpkgs-review pr 12345 --system x86_64-linux,aarch64-linux --no-shell
+
+# Review PR by number (single arch, interactive)
 nixpkgs-review pr 12345
 
 # Review PR by URL
 nixpkgs-review pr https://github.com/NixOS/nixpkgs/pull/12345
 
-# This will:
+# Multi-arch review will:
 # 1. Fetch the PR
 # 2. Determine changed packages
-# 3. Build all changed packages
-# 4. Drop you into nix-shell with built packages
+# 3. Build all changed packages on both x86_64 and aarch64
+# 4. Catch architecture-specific issues
+# 5. Provide more comprehensive testing
 ```
 
 ### Post Results to PR
@@ -396,18 +403,23 @@ gh pr create
 
 ### Review Workflow
 ```bash
-# 1. Review PR
+# 1. Review PR on multiple architectures (recommended)
+nixpkgs-review pr 12345 --system x86_64-linux,aarch64-linux --no-shell
+
+# OR: Review PR interactively (single arch)
 nixpkgs-review pr 12345
 
-# 2. In the nix-shell, test packages
+# 2. In the nix-shell (if interactive), test packages
 nix-shell> package-name --version
 nix-shell> package-name --help
 
 # 3. Check for issues
 nix-shell> ls -la $(which package-name)
 
-# 4. If good, approve
+# 4. If good, approve (or use gh pr review for multi-arch)
 nix-shell> nixpkgs-review approve
+# OR (if --no-shell was used):
+gh pr review 12345 --approve --body "Built successfully on x86_64-linux and aarch64-linux. LGTM."
 
 # 5. Exit
 nix-shell> exit
@@ -426,13 +438,13 @@ nix-shell> exit
 
 #### Version Update PR
 ```bash
-# Review version bump
-nixpkgs-review pr 12345
+# Review version bump (multi-arch recommended)
+nixpkgs-review pr 12345 --system x86_64-linux,aarch64-linux --no-shell
 
 # Check:
 # - Version number correct
 # - Hash updated correctly
-# - Tests still pass
+# - Tests still pass on both architectures
 # - No breaking changes
 ```
 
@@ -618,16 +630,17 @@ nix-instantiate --parse default.nix
 ## Tips and Tricks
 
 1. **⚠️ ALWAYS run `nixpkgs-review wip` before submitting**: This is the most important step - test your changes locally before pushing
-2. **Use --post-result**: Auto-comment on PRs to help maintainers
-3. **Review regularly**: Help reduce PR backlog
-4. **Test on your system**: Real-world testing is valuable
-5. **Be thorough but kind**: Constructive feedback
-6. **Check ofborg results**: CI results before reviewing
-7. **Use nix-update**: Automate version updates
-8. **Review related PRs**: Check for conflicts
-9. **Comment on approach**: Not just build success
-10. **Approve quickly**: Don't block good PRs
-11. **Learn from reviews**: Read other reviewers' comments
+2. **Test multiple architectures when reviewing**: Use `--system x86_64-linux,aarch64-linux` to catch arch-specific issues
+3. **Use --post-result**: Auto-comment on PRs to help maintainers
+4. **Review regularly**: Help reduce PR backlog
+5. **Test on your system**: Real-world testing is valuable
+6. **Be thorough but kind**: Constructive feedback
+7. **Check ofborg results**: CI results before reviewing
+8. **Use nix-update**: Automate version updates
+9. **Review related PRs**: Check for conflicts
+10. **Comment on approach**: Not just build success
+11. **Approve quickly**: Don't block good PRs
+12. **Learn from reviews**: Read other reviewers' comments
 
 ## Resources