Skip to content

nix: node_modules hash mismatch and bun version constraint too strict for some nixpkgs-unstable snapshots #27

Closed

Description

@thomas-yanga

Description

Environment

  • nixpkgs-unstable (mirror: USTC, bun 1.3.13)
  • System: x86_64-linux

Problem 1: node_modules hash mismatch

When building from nixpkgs-unstable where bun is at 1.3.13 (vs the expected ^1.3.14 in the project),
the node_modules derivation produces a different hash than the one locked in nix/hashes.json.

Error:
hash mismatch in fixed-output derivation:
specified: sha256-OttgLsPJSYW1b9RGqiYSi7qPdDC3GuD2FE7k5tPe6Iw=
got: sha256-vB4imi5LtCxnDuOaJFQh+asK51RUDCnIVCkIzBQN12o=

Problem 2: bun version check too strict

The build script in packages/script/src/index.ts requires bun@^1.3.14,
but the current nixpkgs-unstable ships bun 1.3.13, causing the build to fail:

error: This script requires bun@^1.3.14, but you are using bun@1.3.13

Workaround

I forked the repo and:

  1. Updated nix/hashes.json x86_64-linux hash to the got value
  2. Added a patchPhase in nix/deepagent-code.nix to relax the bun version check to ^1.3.13

Suggestion

The hashes.json approach is fragile because it pins a hash tied to a specific
nixpkgs snapshot. Consider either:

  • Using a hash derivation approach that tolerates minor bun version differences
  • Or documenting how to regenerate hashes.json

Happy to open a PR for the bun version check fix.

Plugins

No response

DeepAgent Code version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

NixOS 26.05 (Yarara)

Terminal

Kitty

Activity

  1. added a commit that references this issue on Jul 10, 2026
    d0e7e61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions