opencode, bun: new packages - #5639
Draft
aprozo wants to merge 2 commits into
Draft
Conversation
Member
|
@aprozo instead of installing opencode from the binary releases we should look at building it from source archives. An example package that should be pretty close to this one is pi/package.py. |
Author
|
Thanks a lot, @alecbcs , will do! |
aprozo
added a commit
to eic/eic-spack
that referenced
this pull request
Jul 28, 2026
Build dependency of opencode: its lockfile, catalog:/workspace: dependency protocols and single-file-executable build are bun-specific. Mirrors the package proposed upstream in spack/spack-packages#5639; drop this copy once that lands.
aprozo
added a commit
to eic/eic-spack
that referenced
this pull request
Jul 28, 2026
Upstream review of spack/spack-packages#5639 asked for a source build rather than the per-platform GitHub release binaries. Build the tagged source archive with bun (bun install + Bun.build compile), the way nixpkgs does.
Author
|
@alecbcs, done but had to add bun as well |
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.
Adds opencode (anomalyco/opencode), an open-source AI coding agent CLI — useful on headless systems (farm nodes, CI debugging) where a graphical client is not available — together with the
bunpackage it needs to build.Built from the tagged source archive. opencode is a bun workspace: the lockfile is
bun.lock, dependencies use bun'scatalog:/workspace:protocols pluspatchedDependencies, and the build isBun.build({ compile: ... }), which links the sources against the bun runtime into a single executable — so npm cannot drive it. The build steps follow the nixpkgs derivation:bun installover the workspaces the CLI pulls in, thenbun --bun ./script/build.ts --single --skip-installinpackages/opencode.bunitself is installed from the upstream release archives, in the same shape as the existingdenopackage: bun is Zig plus a patched JavaScriptCore and needs an existing bun to bootstrap. It is a separate commit and can be split into its own PR if preferred.Dependencies, each confirmed by shimming the tool out of
PATHand re-running the build:bunandnode-jsat build time (the embedded web UI is built with vite, which runs on node),ripgrepat run time (otherwise opencode downloads anrgbinary into the user cache at first use).gitandnpmare not needed.Verified on linux-x86_64: clean
spack install opencode→bin/opencode,opencode --versionreports1.18.3. Companion to #5637; also exercised in the EIC eic-shell stack (eic/eic-spack#986).