Repository navigation
fix(nix): preserve baseline executable layout - #14
Open
firatoezcan wants to merge 2 commits into
Open
firatoezcan wants to merge 2 commits into
firatoezcan wants to merge 2 commits into
Conversation
Keep the standard Nix Bun package as the build runtime, and stage the pinned upstream baseline binary only as Bun compile target. This prevents autoPatchelf changes to the compiler from becoming the standalone executable template.
Run autoPatchelf only after Bun appends the standalone payload, and keep Nix stripping from removing its footer. Scope both operations to Linux x86_64.
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Fork-local packaging regression; no linked issue.
Type of change
What does this PR do?
Keep standard Nix Bun as the build runtime. On Linux x86_64, stage the pinned upstream Bun 1.3.13 baseline executable under Bun’s compile-target lookup name, patch only the completed standalone output, and keep Nix stripping from deleting Bun’s appended footer.
The previous override made Nix auto-patch baseline Bun before compilation. Bun then reused that changed ELF as its standalone template, producing an OpenCode binary whose appended payload LOAD preceded its offset-zero LOAD. Bun aborted in ELF mapping before OpenCode started.
How did you verify your code works?
opencode --versionon the exact shipped amd64 image with all capabilities dropped:ElfMapper.cpp:399, exit 133.models-devdependency because the emulator exposes no AVX; this happened before the OpenCode derivation ran. The full native amd64 runtime gate remains pending.Screenshots / recordings
Not applicable.
Checklist