Skip to content

Opencode build fails in a nix flake input #18273

Closed as not planned
Closed as not planned

Description

@filipeltsilva

Description

Building opencode as a nix flake referred in a home-manager package isn't working.

Link to my repo.

Plugins

No response

OpenCode version

1.2.27

Steps to reproduce

  • Add opencode repo as a nix flake input
  • Set the package in a home-manager module
  • run sudo darwin-rebuild switch --flake .

Screenshot and/or share link

Image

Operating System

macOS Sonoma 14.8.4

Terminal

Apple Terminal 2.14 (453)

Activity

  1. github-actions commented on Mar 19, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Steps to reproduce is empty — please provide the exact commands or steps used to trigger the build failure (e.g. the nix command you ran, your flake input configuration)
    • OpenCode version is empty — please provide the version you are using
    • Operating System field is empty — you mentioned macOS Sonoma in the description, but please fill in the dedicated field as well

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If your error matches one of the above, please comment there instead (or reference it here with details on how your case differs).

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Mar 19, 2026
  3. github-actions commented on Mar 19, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets our contributing guidelines. We appreciate you providing the steps to reproduce, your OpenCode version, and system information.

  4. filipeltsilva commented on Mar 19, 2026

    @filipeltsilva
    Author

    Apparently, the flake runs bun install one way or another without consider if bun is locally installed.

  5. gigamonster256 commented on Mar 24, 2026

    @gigamonster256
    Contributor

    bun requires a CPU with AVX extensions to run - hence the illegal instruction error message. You can try overriding the bun version to baseline, but according to nixpkgs even that will have issues

  6. filipeltsilva commented on Mar 24, 2026

    @filipeltsilva
    Author

    My CPU is a Sandy Bridge generation. It has AVX support (256-bit SIMD). I'll do some research to see what I can do, because I can't acquire new hardware for now.

  7. kirelagin commented on Apr 25, 2026

    @kirelagin

    I think “Illegal Instruction” (i.e. SIGILL) on macOS does not necessarily mean that it is an unsupported CPU instruction, it could also be a system library incompatibility. Nixpkgs does not build bun itself, it just pulls pre-compiled binaries from the upstream, so it might be that those binaries require a newer macOS than what you have.

  8. kirelagin commented on Apr 25, 2026

    @kirelagin

    That’s actually oven-sh/bun#26872.

  9. ghaif commented on Apr 29, 2026

    @ghaif

    same issue in nixos, and it has been for a while

  10. removed
    bugSomething isn't working
    on May 3, 2026
  11. alain-san commented on May 28, 2026

    @alain-san

    same issue in nixos

  12. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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