nix: hash mismatch for aarch64-darwin after CI simplification #8156

Closed
opened 2026-02-16 18:09:17 -05:00 by yindo · 1 comment
Owner

Originally created by @jerome-benoit on GitHub (Jan 31, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Building the nix package on aarch64-darwin fails with a hash mismatch for node_modules:

error: hash mismatch in fixed-output derivation '/nix/store/...-opencode-node_modules-1.1.48-597ae57.drv':
         specified: sha256-pWfXomWTDvG8WpWmUCwNXdbSHw6hPlqoT0Q/XuNceMc=
            got:    sha256-jGr2udrVeseioMWpIzpjYFfS1CN8GvNFwo6o92Aa5Oc=

Root cause

Commit 2fc4ab9 ("ci: simplify nix hash updates") replaced native runners with cross-compilation from a single Linux runner.

Before: Each platform had its native runner:

matrix:
  include:
    - system: aarch64-darwin
      host: macos-latest

After: All hashes computed from Linux using bun install --cpu=arm64 --os=darwin:

runs-on: blacksmith-4vcpu-ubuntu-2404
UPDATER_ATTR=".#packages.x86_64-linux.${SYSTEM}_node_modules"

The problem is that bun install with --cpu and --os flags on Linux does not produce the same output as a native bun install on macOS, resulting in different hashes.

OpenCode version

v1.1.48

Operating System

macOS (aarch64-darwin)

Originally created by @jerome-benoit on GitHub (Jan 31, 2026). Originally assigned to: @thdxr on GitHub. ## Description Building the nix package on `aarch64-darwin` fails with a hash mismatch for `node_modules`: ``` error: hash mismatch in fixed-output derivation '/nix/store/...-opencode-node_modules-1.1.48-597ae57.drv': specified: sha256-pWfXomWTDvG8WpWmUCwNXdbSHw6hPlqoT0Q/XuNceMc= got: sha256-jGr2udrVeseioMWpIzpjYFfS1CN8GvNFwo6o92Aa5Oc= ``` ## Root cause Commit [2fc4ab9](https://github.com/anomalyco/opencode/commit/2fc4ab9) ("ci: simplify nix hash updates") replaced native runners with cross-compilation from a single Linux runner. **Before:** Each platform had its native runner: ```yaml matrix: include: - system: aarch64-darwin host: macos-latest ``` **After:** All hashes computed from Linux using `bun install --cpu=arm64 --os=darwin`: ```yaml runs-on: blacksmith-4vcpu-ubuntu-2404 UPDATER_ATTR=".#packages.x86_64-linux.${SYSTEM}_node_modules" ``` The problem is that `bun install` with `--cpu` and `--os` flags on Linux does not produce the same output as a native `bun install` on macOS, resulting in different hashes. ## OpenCode version v1.1.48 ## Operating System macOS (aarch64-darwin)
yindo added the nix label 2026-02-16 18:09:17 -05:00
yindo closed this issue 2026-02-16 18:09:17 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11408: Nix darwin hashes unreliable from Linux runner - describes the same hash mismatch problem for Darwin after switching to cross-compilation from Linux runner

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of existing issues. Please check: - #11408: Nix darwin hashes unreliable from Linux runner - describes the same hash mismatch problem for Darwin after switching to cross-compilation from Linux runner Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8156