Skip to content

fix(nix): install opencode and keep opencode2 alias - #48662

Merged
rekram1-node merged 2 commits into
anomalyco:v2from
ReStranger:fix-nix-build
Sep 14, 2026
Merged

rekram1-node merged 2 commits into
anomalyco:v2from
ReStranger:fix-nix-build

Conversation

@ReStranger

@ReStranger ReStranger commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #48663

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The Nix package was still installing opencode2 as the primary CLI even though V2 uses opencode.

This switches the packaged binary to opencode, keeps opencode2 as a symlink for compatibility, generates completions for both names, and updates mainProgram to opencode.

It also aligns nix/desktop.nix with that contract so the desktop packaging path stages opencode, matching the bundled CLI path that the desktop build consumes.

How did you verify your code works?

  • nix build .#opencode --no-link
  • ran both $out/bin/opencode --version and $out/bin/opencode2 --version
  • confirmed $out/bin/opencode2 is a symlink to opencode
  • nix build .#opencode-desktop --dry-run

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@rekram1-node
rekram1-node merged commit ce380fb into anomalyco:v2 Sep 14, 2026
4 checks passed
@ReStranger
ReStranger deleted the fix-nix-build branch September 14, 2026 11:33
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants