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
opencode binary on macOS arm64 is 0 byte large when building from nix flake #4575
I made the same observation in nix-ai-tools, which is why I switched to bundeling the javascript. There is something off when running bun install inside the nix sandbox. The same commands work fine outside the sandbox.
$ nix build github:sst/opencode
$ ./result/bin/opencode --version
$ ls -al ./result/bin/.opencode-wrapped
.r-xr-xr-x@ 0 root 55 years ./result/bin/.opencode-wrapped
$ du -sh ./result/bin/.opencode-wrapped
0B .opencode-wrapped
changed the title [-]flake on macOS arm64 is 0 byte large[/-][+]opencode binary on macOS arm64 is 0 byte large when building from flake[/+]on Nov 21, 2025
changed the title [-]opencode binary on macOS arm64 is 0 byte large when building from flake[/-][+]opencode binary on macOS arm64 is 0 byte large when building from nix flake[/+]on Nov 21, 2025
Activity
[-]flake on macOS arm64 is 0 byte large[/-][+]opencode binary on macOS arm64 is 0 byte large when building from flake[/+][-]opencode binary on macOS arm64 is 0 byte large when building from flake[/-][+]opencode binary on macOS arm64 is 0 byte large when building from nix flake[/+]Alb-O commentedon Nov 21, 2025
I believe this is an unresolved, upstream bug with bun, see oven-sh/bun#24645
Not sure what we can do here except pester the bun developers
Mic92 commentedon Nov 21, 2025
This approach works for me: numtide/llm-agents.nix#1032 now:
https://github.com/numtide/nix-ai-tools/blob/main/packages/opencode/package.nix
Alb-O commentedon Nov 21, 2025
Nice, I'll have a look at this tomorrow and see if I can get it merged here, thanks
Alb-O commentedon Nov 22, 2025
@Mic92 Before I open a PR, would you be so kind as to test run this?
github:Alb-O/opencode/nix-supportbogorad commentedon Nov 22, 2025
quick'n'dirty solution for now, I really hope we get to the bottom of the bun issues.
alias oc=''nix run github:bogorad/oc-bin-flake --refresh''https://github.com/bogorad/oc-bin-flake
Mic92 commentedon Nov 23, 2025
I had actually issues with patchelf on arm64-linux for this packages, which is why I went through the hassel of building from source.