Repository navigation
opencode: fix hash - #582675
opencode: fix hash#582675
Conversation
|
|
Tested this PR on aarch64-darwin (macOS 27.2, Determinate Nix 3.22.3 / 2.35.2): it still fails, and the hash I get on darwin is stable across two fresh builds: So |
|
I believe this broke due to bun update, I'm investigating |
|
Timeline: #581607 (opencode 2.2.1 -> 2.2.5) set Evidence:
The Darwin build already produces the same tree as Linux with Suggested change: --frozen-lockfile \
--ignore-scripts \
+ --libc="*" \
--no-progress \
--os="*"
...
- outputHash = "sha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=";
+ outputHash = "sha256-dIveiaiPFGSItwLyeMuPDxTE9gpvvnlTCB/+nG24qCc=";I verified In current nixpkgs master, opencode is the only |
|
An alternative to - outputHash = "sha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=";
+ outputHash =
+ if stdenv.hostPlatform.isDarwin
+ then "sha256-dIveiaiPFGSItwLyeMuPDxTE9gpvvnlTCB/+nG24qCc="
+ else "sha256-prx9dX7kUvs/E3zopkaPk5LXh3xJAy5sZeum/W8L7cA=";
|
|
@matteo-pacini please make sure not to close nixpkgs PRs. |
|
@GaetanLepage sorry, my mistake: a commit in my config repo said "fix #582675", and GitHub took it as a closing keyword. It won't happen again, and thanks for reopening. |
|
@DuskyElf Thanks for your investigation. I would prefer to have one hash for all platforms which makes updates a little easier. |
…lands (#172) nixpkgs' opencode 2.2.5 has a wrong node_modules hash on nixos-unstable and master, so the Home Manager job (which builds against today's nixos-unstable) fails on every branch. The job's test flake now overlays the one-line fix from NixOS/nixpkgs#582675, only while opencode still carries the broken hash: once that PR lands the condition is false and the overlay does nothing. Checked by running the job's build locally: both configurations build and the opencode adapter is pinned. Claude-Session: https://claude.ai/code/session_01JwzRjrosBrG5bivEKd7Dvq Co-authored-by: Claude Opus 5.5 <[email protected]>
nixpkgs 1d06008 bumps opencode 2.2.1 -> 2.2.5. That update's opencode-node_modules outputHash was computed against bun 1.4.2, but bun 1.4.4 (merged a few hours later) changes what `bun install --os=*` produces, so the fixed-output derivation fails with a hash mismatch and no host can build. The flake-update diff jobs for homelab01 and xps15 failed on exactly this. Carry upstream's rehash (NixOS/nixpkgs#582675) in the modifications overlay until it merges; the guard is the broken hash itself, so it goes inert the moment nixpkgs carries the fix. Verified with the failing lock applied: - flake-update lock artifact (nixpkgs 1d06008): xps15, homelab01 and homelab02 toplevels build; opencode --version reports 2.2.5 - current master lock (nixpkgs 0bb2eed): guard is inert, opencode 2.2.1 - nix flake check --no-build and nix fmt -- --ci pass
toastal
left a comment
There was a problem hiding this comment.
Works on my machine:
patches {
opencode-hash "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/582675.patch"
}
inputs {
nixpkgs gc=track {
archive {
url "https://releases.nixos.org/nixos/unstable/{{fresh_value}}/nixexprs.tar.zst"
mirrors "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/releases/nixos-unstable%40{{fresh_value}}/nixexprs.tar.zst"
}
hash algorithm=SHA-256
patches opencode-hash
fresh-cmd {
$ curl -Ls --http2 --compressed -o "/dev/null" -w "%{url_effective}" "https://channels.nixos.org/nixos-unstable"
| awk "-F/" "{print $NF}"
}
}
}$ nixos-rebuild --sudo switch --no-flake --file ~/nixcfg/host/$(hostname)
building the system configuration...
Starting [systemd-run] /nix/store/sbkyqd85aqam5g9ddyk3pphmf6vvjk01-nixos-system-manju-26.11pre1107793.1d060086d60c/bin/switch-to-configuration switch...
Started [systemd-run] /nix/store/sbkyqd85aqam5g9ddyk3pphmf6vvjk01-nixos-system-manju-26.11pre1107793.1d060086d60c/bin/switch-to-configuration switch.
Checking switch inhibitors... done
Skipping "/boot/EFI/systemd/systemd-bootx64.efi", same boot loader version in place already.
Skipping "/boot/EFI/BOOT/BOOTX64.EFI", same boot loader version in place already.
switching to system configuration /nix/store/sbkyqd85aqam5g9ddyk3pphmf6vvjk01-nixos-system-manju-26.11pre1107793.1d060086d60c
activating the configuration...
setting up /etc...
reloading user units for toastal...
restarting the following user units: nixos-activation.service
restarting sysinit-reactivation.target
the following new units were started: mandb.service, NetworkManager-dispatcher.service, nix-gc.service
finished switching to system configuration /nix/store/sbkyqd85aqam5g9ddyk3pphmf6vvjk01-nixos-system-manju-26.11pre1107793.1d060086d60c
nixos-rebuild-switch-to-configuration.service: Deactivated successfully.
Done. The new configuration is /nix/store/sbkyqd85aqam5g9ddyk3pphmf6vvjk01-nixos-system-manju-26.11pre1107793.1d060086d60c…code pin NixOS/nixpkgs#582675, which corrects opencode's node_modules hash, is merged, and the locked nixpkgs-master (9e99dab) contains it. Drop the input that held opencode at 2.2.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The lock update's nix-detour step now builds the fixed-output derivations (sources, vendored dependencies) of the watched packages no substituter has, with kleinbem-dev/nix-detour#38's `build: fetches`. That is how opencode 2.2.5's stale `node_modules` hash (upstream: NixOS/nixpkgs#582675) would have shown up on the lock PR instead of on the workstation 12 hours later. - Only when the update moves nixpkgs (nightly, or a requested `nixpkgs`); a sibling's one-input bump stays evaluation-only. - When the update validates but a fetch fails, the report goes to a "Lock update breaks package builds" issue: opened, commented only when the report changes, closed when nothing fails. The update still goes out, as before (report mode). - Pinned to nix-detour main `00c0138f` (no release with it yet). ## Checked - nix-detour's `--build-fetches` against this repo at `04907a23` with opencode unheld: built the one derivation (`opencode-node_modules-2.2.5`) and reported `broken opencode hash mismatch in opencode-node_modules-2.2.5 (got sha256-prx9…)`, 8.5 minutes including evaluation. - On the runner, without Attic, what cache.nixos.org lacks among nixos-nvme's 338 watched packages is 20 (our own, unfree); their fetches are built each nightly run. - The report step with a stubbed `gh`: opens, skips an identical report, comments a changed one, closes on "Nothing fails.", leaves the issue alone when the nix-detour step failed; the validation issue is closed as before. - actionlint, `nix fmt -- --fail-on-change`. - Not run: the workflow itself. The first nightly run after the merge shows the real runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Package-build failures are now reported separately from validation failures. Reports are created or updated when failures are identified, duplicate latest reports are avoided, and resolved reports are closed only when the applicable success conditions are met. * **Chores** * The automated build workflow now selects whether to fetch build inputs based on the requested inputs. Missing or failed status reports do not trigger updates to package-build failure reports. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…code pin (#462) NixOS/nixpkgs#582675, which corrects opencode's node_modules hash, is merged, and the locked nixpkgs-master (9e99dab) contains it. Drop the input that held opencode at 2.2.1. Co-authored-by: Claude Opus 5.5 <[email protected]>
nixpkgs stays held at 5c9de89, as it has been since 2026-11-04: nixpkgs-unstable 6dadaf4 still has the stale opencode node_modules hash (NixOS/nixpkgs#582675 is 6 commits ahead of it). Only rust-overlay moves. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016vtoatps5Q3JaFMLzSMtDw
renovateのlock file maintenanceはnixpkgs-unstableを`1d060086`に進めますが、 そのリビジョンではopencode 2.2.5の`node_modules`のFODハッシュが一致せずビルドできません。 上流では修正がmasterにマージ済みですが、 nixos-unstableチャンネルにはまだ降りてきていません。 チャンネルが進むのを待つ間も他のinputは更新したいので、 lock file maintenanceの更新からnixpkgs-unstableだけを除いて取り込みます。 nixpkgs-unstableは`0bb2eedc`のまま据え置きます。 次回のlock file maintenanceで修正済みのチャンネルに追い付く想定です。 ref NixOS/nixpkgs#582675
nixpkgs stays held at 5c9de89, as it has been since 2026-11-04: nixpkgs-unstable 6dadaf4 still has the stale opencode node_modules hash (NixOS/nixpkgs#582675 is 6 commits ahead of it). home-manager and rust-overlay move. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016vtoatps5Q3JaFMLzSMtDw
… main (#15) From the CodeRabbit full-repo review (#14). - `overrides/opencode.nix` sets the node_modules hash only for opencode 2.2.5. The lock here has 2.2.1, and a consumer on a newer nixpkgs gets a later version; both would otherwise get 2.2.5's hash and fail as a fixed-output mismatch. (upstream: NixOS/nixpkgs#582675 is merged, so the weekly release should drop this hold once nixos-unstable has it.) - check.yaml adds `nix flake check --all-systems --no-build`: the aarch64 checks (Pis, orin-nano use the holds) were skipped as an incompatible system. - release.yaml checks out the default branch, so a manual dispatch from a branch still releases from main's `held-packages.json`. Tested: - `nix flake check --all-systems --no-build` passes locally (x86_64 + aarch64). - Override: `opencode` 2.2.1 keeps `sha256-BLDp8…`; the same package with version 2.2.5 gets `sha256-prx9…`. - `nix fmt -- --fail-on-change` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Automated checks now evaluate held packages across systems, alongside the existing checks. * Release builds now use the repository’s default branch, including when triggered from another branch. * The OpenCode packaging override now applies only to version 2.2.5; other versions keep their existing package configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 <[email protected]>
nixpkgs moves from 5c9de89 to 4fe25e1, which contains the opencode node_modules hash fix (NixOS/nixpkgs#582675), so the hold in place since 2026-11-04 is released and opencode moves to 2.2.5. zed-editor stays pinned to 5c9de89 (nixpkgs-pins.json): cache.nixos.org has no zed-editor 1.27.0 for 4fe25e1 yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016vtoatps5Q3JaFMLzSMtDw
nixpkgs 6dadaf4 ships opencode 2.2.5 with a node_modules hash computed against bun 1.4.2. bun 1.4.4 filters optional dependencies by host libc, so the fixed-output derivation never matches and no host can build opencode. Carry the per-platform rehash from NixOS/nixpkgs#582675 in the modifications overlay. The guard is the broken hash itself, so it goes inert once nixpkgs carries the fix.
nixpkgs 6dadaf4 ships opencode 2.2.5 with a node_modules hash computed against bun 1.4.2. bun 1.4.4 filters optional dependencies by host libc, so the fixed-output derivation never matches and no host can build opencode. Carry the per-platform rehash from NixOS/nixpkgs#582675 in the modifications overlay. The guard is the broken hash: once nixpkgs carries the fixed hash (or moves past 2.2.5) the override throws, so it gets removed on the next bump instead of lingering silently.
nixpkgs 6dadaf4 ships opencode 2.2.5 with a node_modules hash computed against bun 1.4.2. bun 1.4.4 filters optional dependencies by host libc, so the fixed-output derivation never matches and no host can build opencode. Carry the per-platform rehash from NixOS/nixpkgs#582675 in the modifications overlay. The guard is the broken hash: once nixpkgs carries the fixed hash (or moves past 2.2.5) the override throws, so it gets removed on the next bump instead of lingering silently.
`opencode` builds from nixos-unstable again, so it no longer needs its hold (NixOS/nixpkgs#582675). A consumer whose nixpkgs is older keeps failing its lock check until it catches up. 🤖 Opened by the nix-detour release action. Co-authored-by: kleinbem-bot[bot] <293345884+kleinbem-bot[bot]@users.noreply.github.com>
nixpkgs now carries the fix for opencode's node_modules hash (NixOS/nixpkgs#582675), so the override is removed.
…oader (#737) nix-detour-fleet released its opencode hold (kleinbem/nix-detour-fleet#18) because nixos-unstable now has the node_modules hash fix (upstream: NixOS/nixpkgs#582675). nix-config's locked nixpkgs (2026-11-03) is older than that fix. With the newer nix-detour-fleet, opencode 2.2.5 fails on nixos-nvme with a hash mismatch in `opencode-node_modules`. The nightly lock update can't move nixpkgs because nixpkgs removed `services.scx` (#727). This PR: - bumps `nixpkgs` to nixos-unstable f4a03c0 (2026-11-07) and `nix-detour-fleet` to f397a7f - moves nixos-nvme from `services.scx` to `services.scx-loader`, keeping `scx_lavd` as `default_sched` Verified locally: `opencode` builds and `just dev::preflight` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated the documented Nix package collection revision. * **System Configuration** * Switched scheduler configuration to the loader-based setup, with LAVD remaining the selected scheduler. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: kleinbem-bot[bot] <293345884+kleinbem-bot[bot]@users.noreply.github.com>
nixpkgs 4fe25e1 ships the per-platform opencode node_modules hashes from NixOS/nixpkgs#582675, so the override's tripwire fired and the Home Manager discover job failed to evaluate. Remove the override and its broken-hash guard; upstream now matches both platform hashes.
* chore(deps): bump nixpkgs from `6dadaf4` to `4fe25e1` Bumps [nixpkgs](https://github.com/nixos/nixpkgs) from `6dadaf4` to `4fe25e1`. - [Commits](NixOS/nixpkgs@6dadaf4...4fe25e1) --- updated-dependencies: - dependency-name: nixpkgs dependency-version: 4fe25e12eb9f4c744966dd3de5a05246cf098601 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * fix(overlays): drop obsolete opencode node_modules rehash nixpkgs 4fe25e1 ships the per-platform opencode node_modules hashes from NixOS/nixpkgs#582675, so the override's tripwire fired and the Home Manager discover job failed to evaluate. Remove the override and its broken-hash guard; upstream now matches both platform hashes. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Sánchez <[email protected]>
- bump flake inputs; nixpkgs now ships opencode 2.2.6 - remove the 2.2.5 node_modules overlay, NixOS/nixpkgs#582675 landed 2026-11-04 - the build failed on the pinned 2.2.5 hash now that the package is 2.2.6
- glances: drop python-jose (now marked insecure, CVE-2026-120459); glances only uses it for optional REST API JWT auth, which harmony doesn't enable. - opencode: drop the node_modules hash override now that NixOS/nixpkgs#582675 has landed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Things done
Fix #582673
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.