Skip to content

Move to nixos-unstable-small for bun #13291

@MBanucu

Description

@MBanucu

Description

The current version of bun on nixos-unstable is 1.3.8 but the requirement of the package.json is 1.3.9. This leads to an error that the build of opencode fails on NixOS.

Proposed solution: move to nixos-unstable-small, at least for using bun as package manager, because nixos-unstable-small is ahead of nixos-unstable, but still stable enough to be useful. The current version of bun on nixos-unstable-small is 1.3.9 and that matches the requirement of opencode.

edit: the flake.nix is not using nixos-unstable, but nixpkgs-unstable instead and the latest revision of this branch includes bun version 1.3.9, so the other solution is as always: update flake.lock, please!

Plugins

No response

OpenCode version

1.1.60-624dd94

Steps to reproduce

No response

Screenshot and/or share link

[michi@nixos:~]$ cd /etc/nixos

[michi@nixos:/etc/nixos]$ sudo ./cleanup.sh 
warning: Git tree '/etc/nixos' is dirty
warning: updating lock file "/etc/nixos/flake.lock":
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2db38e08fdadcc0ce3232f7279bab59a15b94482?narHash=sha256-1jZvgZoAagZZB6NwGRv2T2ezPy%2BX6EFDsJm%2BYSlsvEs%3D' (2026-02-09)
  → 'github:NixOS/nixpkgs/6c5e707c6b5339359a9a9e215c5e66d6d802fd7a?narHash=sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs%3D' (2026-02-11)
• Updated input 'nixpkgsUnstableSmall':
    'github:NixOS/nixpkgs/8ee95bcb238069810a968efbf2bba8e4d6ff11a6?narHash=sha256-S8s8l0CfMYsFMNS0hXZaQV9sOTkUB6qdXdTSEs2aTT8%3D' (2026-02-10)
  → 'github:NixOS/nixpkgs/bdea685ed95455a82fcb77295bd4222820b297ac?narHash=sha256-zeNZTIO0FyNht31Vd1Rwur5THhvwNwmIP5LW3smjhwY%3D' (2026-02-12)
• Updated input 'opencode':
    'github:anomalyco/opencode/783888131efb8f9eef4516a33b15dc3d63d6e401?narHash=sha256-DlXcR0eurqhA18WZsBYXwG3zaij%2B5H7S9Fz4YA6HzQ8%3D' (2026-02-11)
  → 'github:anomalyco/opencode/624dd94b5dd8dca03aa3b246312f8b54fd3331f1?narHash=sha256-phzI/O/nWLUBnhs9qDrLj3GlLw3IpAPST3A/QRnVVj0%3D' (2026-02-12)
warning: Git tree '/etc/nixos' is dirty
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
error: Cannot build '/nix/store/ncmripc3np8mmy3g660c2m1hmnz4jkbr-opencode-1.1.60-624dd94.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/n566fi0qnkzjvyf04zzn1w6cy32qx9fm-opencode-1.1.60-624dd94
       Last 19 log lines:
       > Using versionCheckHook
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/7fwb82dayxa22249qrnz1czwqnpa2gmv-source
       > source root is source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > 11 |
       > 12 | // relax version requirement
       > 13 | const expectedBunVersionRange = `^${expectedBunVersion}`
       > 14 |
       > 15 | if (!semver.satisfies(process.versions.bun, expectedBunVersionRange)) {
       > 16 |   throw new Error(`This script requires bun@${expectedBunVersionRange}, but you are using bun@${process.versions.bun}`)
       >                  ^
       > error: This script requires bun@^1.3.9, but you are using bun@1.3.8
       >       at /build/source/packages/script/src/index.ts:16:13
       > 
       > Bun v1.3.8 (Linux x64)
       For full logs, run:
         nix log /nix/store/ncmripc3np8mmy3g660c2m1hmnz4jkbr-opencode-1.1.60-624dd94.drv
error: Cannot build '/nix/store/lif6d6pfl1ag6mjh15aakjs1kx7c2qbx-system-path.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/h8jmzisf4q0ggwshp1l90mvdyaz2kk3c-system-path
error: Cannot build '/nix/store/kh7f5s4k2xqjlv46js77glcnfx1hvjd6-nixos-system-nixos-25.11.20260211.6c5e707.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/acmhva5qpann29n0ha2vxxy8izxr5rp7-nixos-system-nixos-25.11.20260211.6c5e707
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."nixos".config.system.build.toplevel' --no-link' returned non-zero exit status 1.

[michi@nixos:/etc/nixos]$ 

Operating System

NixOS 25.11

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnix

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions