fix(nix): use the required Bun version for builds - #12592
Merged
Conversation
noobezlol
marked this pull request as ready for review
July 28, 2026 10:36
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by claude-sonnet-5 · Input: 16 · Output: 5.3K · Cached: 310.3K Review guidance: REVIEW.md from base branch |
Collaborator
|
Thanks @noobezlol |
marius-kilocode
approved these changes
Jul 28, 2026
marius-kilocode
left a comment
Collaborator
There was a problem hiding this comment.
Looks right to me. The packages path picked up nixpkgs' bun through callPackage autofill while only the devShell had the pin, which is exactly why nix run broke. Sharing one derivation keyed off package.json's packageManager fixes the drift and matches how setup-bun in CI already resolves the version.
Two non-blocking follow-ups:
- When packageManager bumps next, the hashes in nix/bun.nix go stale and builds fail with a hash mismatch. Can we add a short comment there with the prefetch command so the next bump knows what to update?
- The overlay in flake.nix still calls node_modules.nix without the pinned bun and references nix/opencode.nix, which no longer exists. Worth a separate cleanup PR to fix or drop it.
This was referenced Jul 29, 2026
This was referenced Jul 31, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 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
Fixes #12432
Context
The flake pinned Bun 1.3.14 only inside the development shell.
nix runbuildspackages.defaultthroughnix/node_modules.nixandnix/kilo.nix, wherecallPackagestill supplied nixpkgs' Bun 1.3.11. The repository's version guard therefore rejected the Nix build becausepackage.jsonrequires Bun 1.3.14.Implementation
Extract the official Bun derivation into a reusable
nix/bun.nix. Its version is derived from the rootpackageManagerfield, while the platform hashes remain explicit.Both the development shell and the
nix runpackage path now use that same derivation. The pinned Bun is passed to dependency installation and the final Kilo build, preventing the package and shell paths from drifting apart again.Screenshots / Video
N/A — Nix build configuration only.
How to Test
Manual/local verification
nix flake check --no-buildpassed.packages.x86_64-linux.default.nativeBuildInputs; it containsbun-1.3.14.git diff --checkpassed.Reviewer test steps
nix run github:Kilo-Org/kilocode/<branch>.nix developand confirmbun --versionalso reports 1.3.14.Blocked checks and substitute verification
bun-1.3.14.Checklist
Get in Touch
GitHub: @noobezlol