Skip to content

nix-eval never builds, so a broken Nix derivation can merge into v2 undetected #52863

Open

Description

@jerome-benoit

Description

Since #52143, nix-eval does run on v2 pull requests, but it only evaluates drvPath (.github/workflows/nix-eval.yml:52, :70, :84) and never builds. A derivation that evaluates cleanly and fails to build is therefore invisible until after merge.

Two details make it weaker than it looks:

  • desktop sits in OPTIONAL_PACKAGES (nix-eval.yml:43), and a failed desktop evaluation emits ::warning:: rather than an error (:74). A desktop build can be broken without turning the check red.
  • nix-hashes.yml triggers on push to dev/beta/v2, never pull_request, and it only recomputes .nodeModules in nix/hashes.json. It cannot look at a PR, and it cannot catch a derivation bug at all.

#50408 is the concrete case: nix/opencode.nix kept calling opencode completion, which v2 dropped. That evaluated fine and broke the build. It was reported by a user eight days after landing.

Plugins

None

OpenCode version

v2 at eb1a9ea4d9

Steps to reproduce

  1. Land a change on a v2 PR that alters a build phase, for example replacing a CLI invocation in nix/opencode.nix with a flag that does not exist.
  2. nix-eval passes: it only evaluates, and desktop is warning-only anyway.
  3. nix-hashes does not run on the PR.
  4. Merge, then run nix build .#packages.x86_64-linux.opencode on v2. It fails in postInstall.

Screenshot and/or share link

Not applicable; reproduction is command line only.

Operating System

Linux x86_64, nixpkgs 26.11, nix 2.34.8

Terminal

Not applicable.

Building opencode in the workflow would catch the #50408 class. Alternatively, drop desktop from OPTIONAL_PACKAGES once #11755 is fixed so its evaluation failure fails the job like the others.

Happy to contribute whichever direction you prefer.

Activity

  1. github-actions commented on Oct 2, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #52123: Reports the v2 Nix CI gap and explicitly notes that nix-eval evaluates derivations without building them.
    • #15400: A Nix build regression that escaped detection because CI only evaluated the derivation instead of running a build.
  2. jerome-benoit commented on Oct 2, 2026

    @jerome-benoit
    ContributorAuthor

    Checked both, and I think this is distinct:

    What is still open here is the workflow configuration: nix-eval evaluating drvPath only, desktop being warning-only, and nix-hashes having no pull_request trigger.

  3. opencodejr commented on Oct 27, 2026

    @opencodejr

    Thanks for the detailed write-up, @jerome-benoit!

    To restate the request: the Nix CI check should actually build the opencode derivation on pull requests, not just evaluate its drvPath. That would catch build-phase breakage like #50408 before merge. A second option is to make the desktop evaluation fail the job once #11755 is resolved.

    A note for whoever picks this up: on dev the workflow is now .github/workflows/check-nix.yml (renamed in #59077) and it runs on dev pull requests. It still only runs nix eval ...drvPath, desktop is still warning-only, and bot-nix-hashes.yml still runs only on push to dev. The completion call from #50408 has since been switched to --completions in nix/opencode.nix.

    Related:

    The maintainers will consider this and which direction they prefer, including the CI time a full build would add. Thanks also for offering to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions