[PR #13496] ci(nix): add build check on pull requests #14690

Open
opened 2026-02-16 18:19:27 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13496

State: open
Merged: No


What does this PR do?

This PR adds a nix-check workflow that runs nix build on pull requests that modify nix-related files (flake.nix, flake.lock, nix/, package.json, bun.lock, patches/).

Problem: Issue #13300 occurred because package.json was bumped to require Bun 1.3.9 but flake.lock still pinned nixpkgs with only Bun 1.3.8. The nix build broke but wasn't caught until after merge.

Solution: Instead of auto-updating flake.lock (which the nix overhaul in dac099a48 intentionally removed to avoid silently pulling in unrelated breakage), this PR fails the PR if the nix build breaks. This puts the responsibility on PR authors to keep flake.lock compatible with their changes.

The workflow runs on a single x86_64-linux runner to keep CI cost down. Cross-platform hash differences are already handled by the existing nix-hashes workflow post-merge.

Relationship to #12175: That PR proposes a nix-eval workflow using nix eval to catch evaluation-time errors (syntax, missing attributes). This is complementary but would not have caught #13300 — the Bun version mismatch is a build-time error. This PR uses nix build which catches both evaluation-time and build-time failures.

This PR also includes the flake.lock update to fix the immediate Bun version issue.

Fixes #13300

How did you verify your code works?

Tested the workflow on my fork by triggering it with commits that touch the watched file paths. The workflow successfully runs nix build .#packages.x86_64-linux.default --no-link and catches build failures.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13496 **State:** open **Merged:** No --- ### What does this PR do? This PR adds a `nix-check` workflow that runs `nix build` on pull requests that modify nix-related files (flake.nix, flake.lock, nix/**, package.json, bun.lock, patches/**). **Problem:** Issue #13300 occurred because package.json was bumped to require Bun 1.3.9 but flake.lock still pinned nixpkgs with only Bun 1.3.8. The nix build broke but wasn't caught until after merge. **Solution:** Instead of auto-updating flake.lock (which the nix overhaul in dac099a48 intentionally removed to avoid silently pulling in unrelated breakage), this PR fails the PR if the nix build breaks. This puts the responsibility on PR authors to keep flake.lock compatible with their changes. The workflow runs on a single x86_64-linux runner to keep CI cost down. Cross-platform hash differences are already handled by the existing nix-hashes workflow post-merge. **Relationship to #12175:** That PR proposes a `nix-eval` workflow using `nix eval` to catch evaluation-time errors (syntax, missing attributes). This is complementary but would not have caught #13300 — the Bun version mismatch is a build-time error. This PR uses `nix build` which catches both evaluation-time and build-time failures. This PR also includes the flake.lock update to fix the immediate Bun version issue. Fixes #13300 ### How did you verify your code works? Tested the workflow on my fork by triggering it with commits that touch the watched file paths. The workflow successfully runs `nix build .#packages.x86_64-linux.default --no-link` and catches build failures.
yindo added the pull-request label 2026-02-16 18:19:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14690