Skip to content

Accept bun.lock versions 2 and 3 - #110

Open
Mic92 wants to merge 1 commit into
nix-community:masterfrom
Mic92:lockfile-v2-v3
Open

Mic92 wants to merge 1 commit into
nix-community:masterfrom
Mic92:lockfile-v2-v3

Conversation

@Mic92

@Mic92 Mic92 commented Sep 21, 2026

Copy link
Copy Markdown
Member

bun >= 1.3 stamps lockfileVersion 2 (stricter parsing of tarball
integrity and git tags only) and 3 (object-valued overrides). Neither
changes the packages layout bun2nix consumes, so projects that
regenerated their lockfile were rejected for no reason.

bun >= 1.3 stamps lockfileVersion 2 (stricter parsing of tarball
integrity and git tags only) and 3 (object-valued `overrides`). Neither
changes the `packages` layout bun2nix consumes, so projects that
regenerated their lockfile were rejected for no reason.
etrobert added a commit to etrobert/setup that referenced this pull request Sep 28, 2026
bun2nix turns bun.lock into _bun.nix, from which its mkDerivation
compiles auto-brightness with suncalc into a standalone Bun binary.
auto-brightness fades from the day to the night brightness as the sun
goes from 6° to -6°.

The input tracks Mic92's fork until nix-community/bun2nix#110 lands:
upstream rejects the v2 bun.lock that nixpkgs' bun writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
czxtm added a commit to darkmatter/stackpanel that referenced this pull request Oct 3, 2026
The overlay pins Bun 1.4.2, which writes new lockfiles as lockfileVersion 2.
bun2nix only accepts version 1, so a project whose bun.lock is created fresh
could never produce bun.nix, and an app with bun.enable then fails to
evaluate. This repository did not notice because Bun keeps version 1 for an
existing lockfile.

Version 2 only parses integrity and git tags more strictly; the package layout
bun2nix reads is unchanged (nix-community/bun2nix#110, not merged yet). For a
271-package project the two lockfiles differ in the version line alone, and the
patched bun2nix produces the same bun.nix from either.

Carry the one-line check as an overlay override. It uses --replace-fail, so the
build breaks once upstream changes that check and the override can go.

Refs: stackpanel-vry

Co-Authored-By: Claude Opus 5.5 <[email protected]>
UnstoppableMango added a commit to UnstoppableMango/thecluster.lan that referenced this pull request Oct 4, 2026
Refresh web/bun.lock with bun 1.3.5 and regenerate web/bun.nix. The flake.lock bump is left out: it brings bun 1.4, whose lockfile v2 bun2nix cannot parse yet (nix-community/bun2nix#110).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
UnstoppableMango added a commit to UnstoppableMango/thecluster.lan that referenced this pull request Oct 4, 2026
Refresh web/bun.lock with bun 1.3.5 and regenerate web/bun.nix. The flake.lock bump is left out: it brings bun 1.4, whose lockfile v2 bun2nix cannot parse yet (nix-community/bun2nix#110).

Co-authored-by: UnstoppableMango <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 12, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 12, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 12, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 12, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
@itzTheMeow

Copy link
Copy Markdown

@baileylu121 would you be able to take a look at this?
ive been running this patch myself and it works well

tjholm added a commit to tjholm/forkit that referenced this pull request Oct 13, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 13, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
tjholm added a commit to tjholm/forkit that referenced this pull request Oct 13, 2026
nix build now produces forkit with its desktop entry and icon. Neither half
of the build carries a dependency hash:

- The frontend's Bun dependencies come from bun2nix, which generates its
  Nix expression from bun.lock at evaluation time using the integrity
  hashes bun.lock already records. bun2nix is pinned to the branch of
  nix-community/bun2nix#110 until it accepts lockfile version 2.
- The Go modules come from gomod2nix.toml. Regenerate it with
  `gomod2nix generate` (in the dev shell) whenever go.mod or go.sum changes.
gshpychka added a commit to gshpychka/realm that referenced this pull request Oct 16, 2026
The project installs, tests and runs the Alchemy CLI with bun: bun.lock and
bun test take over from npm and vitest, and the package scripts run
`bun alchemy`, which loads @effect/platform-bun. Dependency install scripts
stay off through an empty trustedDependencies.

The flake check installs from bun.nix, which bun install regenerates through
bun2nix. A new bun2nix input, pinned to nix-community/bun2nix#110 for
lockfile version 2 support, supplies the check's fetcher and the infra
shell's CLI; treefmt and deadnix skip the generated bun.nix. The infra shell
carries bun in place of node.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RRgRMWSVRcoHJ5VjS622wS
jDmacD added a commit to jDmacD/crann that referenced this pull request Oct 19, 2026
Package a Claude Code channel server (claude-channel-grafana) that
receives Grafana alerting webhooks and pushes them into a running
session. Built with bun2nix's mkDerivation into a standalone binary.

crann.ai-utils.channels.grafana installs a claude-alerts launcher that
loads the server via --mcp-config and the development-channels flag, so
only sessions started through it bind the webhook port.

The MCP SDK stays on 1.x: Claude Code's v2 MCP runtime won't register a
channel server that negotiates protocol revision 2026-07-28. bun.nix is
generated from a lockfileVersion-1 copy of bun.lock until
nix-community/bun2nix#110 lands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012QVsPoet9GXi9FgsQVFCWe
aciceri added a commit to aciceri/omfp that referenced this pull request Nov 10, 2026
Replace the local one-line patch with nix-community/bun2nix#110 (commit 0456acb, accepts lockfile versions 2 and 3) through fetchpatch. Roadmap: spike S-11 picked React 19 over Preact.

@aciceri aciceri left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this works, I'm also using it 👍
@baileylu121 could you please take a look when you've time?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants