You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Updating opencode@2 to 2.2.5 fails due to hash mismatch #3040
Hi, updating opencode@2 to 2.2.5 fails due to hash mismatch (both globally and locally).
Devbox: Version 0.19.0
Distro: Debian GNU/Linux 13 (trixie)
Kernel: Linux 7.1.8+deb13-amd64
Steps to reproduce
devbox global add opencode@2.2.1
devbox global update opencode@2.2.5
Command
update
devbox.json
Devbox version
0.19.0
Nix version
2.26.3
What system does this bug occur on?
Linux (x86-64)
Debug logs
$ devbox global update opencode@latest
Info: Updating opencode@latest 2.2.1 -> 2.2.5
Info: Installing the following packages to the nix store: opencode@latest
error: hash mismatch in fixed-output derivation '/nix/store/kfdz406fa44wmh8bgiq2d7nnbxa19f0f-opencode-node_modules-2.2.5.drv':
specified: sha256-xfOVcw1+waLVNhFDwzOtzxrUSQEogvn88YomydOlhwc=
got: sha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=
error: 1 dependencies of derivation '/nix/store/3yj9jzx7j7rgphgw3vfgb4llhiv8i5yc-opencode-2.2.5.drv' failed to build
Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' build --impure --no-link --refresh 'github:NixOS/nixpkgs/9a6cbf4722bdbbef65f9e0400452ca088e31dc4b#opencode': exit code 1
Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetify-com/devbox/issues
(Normal logs, as the debug is quite long and does not show anything special.)
Found the root cause — this is not a devbox code bug, but devbox's package catalog currently points opencode 2.2.5 at a nixpkgs rev that contains a packaging regression.
The nixpkgs rev that devbox update resolves for opencode@2 (via https://www.nixsearch.com/v2/resolve?name=opencode&version=2, per-system rev: 9d3b8db48266c17be0b5f9c6360c3ecfbac3d1f5, last_updated 2026-11-03T19:55:20Z) packages the opencode-node_modules-2.2.5 fixed-output derivation with a singleoutputHash = sha256-xfOVcw1+waLVNhFDwzOtzxrUSQEogvn88YomydOlhwc=.
That hash was evidently computed on macOS: on any Linux host the (fully deterministic, --frozen-lockfile) bun install produces sha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=, hence the mismatch on every Linux machine. Hydra never built Linux binaries for it, so there's no substitution fallback.
Suggested devbox-side fix: refresh the nixsearch record for opencode 2.2.5 so its nixpkgs rev includes the above commit; then devbox update opencode@2 works again on Linux.
This should be fixed now. devbox resolved opencode 2.2.5 to nixpkgs 9a6cbf47, which still had the broken node_modules hash. The upstream fix (NixOS/nixpkgs@c399e1b7) kept the version at 2.2.5, and the search index picked it up on Nov 6: opencode@2.2.5 now resolves to 4fe25e12, which has the corrected hash. Please re-run devbox global update opencode and let us know if it still fails.
devbox is no longer using the nixhub back end (which is closed source). You can use https://www.nixsearch.com/search?q=opencode which shares the same search as devbox (that site uses the source code from the devbox-search repo)
Activity
redtux commentedon Nov 4, 2026
Hmm, was https://www.nixhub.io/packages/opencode recently changed? 🤔
Version 2 is not available anymore. Or was it never available? This would explain why the package was built manually.
I just tried updating on another system, and there I am getting
Error: opencode@2: package not foundnow.redtux commentedon Nov 4, 2026
Found the root cause — this is not a devbox code bug, but devbox's package catalog currently points
opencode 2.2.5at a nixpkgs rev that contains a packaging regression.devbox updateresolves foropencode@2(viahttps://www.nixsearch.com/v2/resolve?name=opencode&version=2, per-systemrev: 9d3b8db48266c17be0b5f9c6360c3ecfbac3d1f5,last_updated 2026-11-03T19:55:20Z) packages theopencode-node_modules-2.2.5fixed-output derivation with a singleoutputHash=sha256-xfOVcw1+waLVNhFDwzOtzxrUSQEogvn88YomydOlhwc=.--frozen-lockfile)bun installproducessha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=, hence the mismatch on every Linux machine. Hydra never built Linux binaries for it, so there's no substitution fallback.outputHashper-platform — and the Linux value there is exactly theprx9dX7…hash we observe.opencode 2.2.5so its nixpkgs rev includes the above commit; thendevbox update opencode@2works again on Linux.opencode: fix hash
redtux commentedon Nov 9, 2026
Hi @mikeland73, sorry for tagging but you seem to be the most active dev here. 😺
Any chance to get this merged? Upstream fixed this five days ago, so I guess that you just need to poll it.
I couldn't find any public nixsearch/nixhub catalog repo, otherwise I would have created a PR to get this fixed. Thanks for your help!
mikeland73 commentedon Nov 9, 2026
This should be fixed now. devbox resolved opencode 2.2.5 to nixpkgs
9a6cbf47, which still had the broken node_modules hash. The upstream fix (NixOS/nixpkgs@c399e1b7) kept the version at 2.2.5, and the search index picked it up on Nov 6:opencode@2.2.5now resolves to4fe25e12, which has the corrected hash. Please re-rundevbox global update opencodeand let us know if it still fails.The index is open source at https://github.com/mikeland73/devbox-search if you want to file issues or PRs there.
Written by Claude on behalf of / prompted by @mikeland73.
redtux commentedon Nov 10, 2026
Thanks @mikeland73, this worked! And great that there is a public
devbox-searchrepo, I had missed it. Thank you for the hint!What needs to be done to get V2 published/listed on https://www.nixhub.io/packages/opencode?
mikeland73 commentedon Nov 10, 2026
devbox is no longer using the nixhub back end (which is closed source). You can use https://www.nixsearch.com/search?q=opencode which shares the same search as devbox (that site uses the source code from the devbox-search repo)