Skip to content

fix(nix): update Electron headers sha256 hash to fix hermes-desktop nix build (#72095) - #72121

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-72095
Closed

fix(nix): update Electron headers sha256 hash to fix hermes-desktop nix build (#72095)#72121
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-72095

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Problem

nix/desktop.nix pins a stale sha256 for the Electron node-gyp headers tarball. Building hermes-desktop with Nix fails with:

hash mismatch in fixed-output derivation
specified: sha256-zi/QMwRZ0+FwE9XTE+DiSIeJXAwxmLKEaBWD5W3pMOI=
got:      sha256-zOl8rx6woWh7aeRUOlkTMviKc/EAQQX6nr/MxAx1ZPI=

Fix

Updated the pinned hash to the current correct value (the got: hash from the Nix error output).

Verification

  • One-line change to nix/desktop.nix — Nix file, no Python tests to run.
  • Visual diff confirms only the hash string changed.

Closes #72095

…ix build (NousResearch#72095)

The pinned sha256 for the Electron node-gyp headers tarball was stale,
causing Nix fixed-output derivation hash mismatches when building
hermes-desktop. Updated to the current correct hash reported by
.

Closes NousResearch#72095
@alt-glitch alt-glitch added type/bug Something isn't working area/nix Nix flake, NixOS module, container packaging comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 26, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for isolating the Electron-header failure.

Problems

  • nix/desktop.nix:33-34 still pairs a URL derived from ${electron.version} with one fixed SHA. Replacing that SHA with the 41.9.1 value fixes only that version; it preserves the mismatch class whenever Electron changes.
  • The PR does not change flake.lock, and current main has the same nix/desktop.nix blob as the PR base. The linked #61443/#53202 discussion records that the repository lock resolves Electron 41.0.2 while the proposed hash is for 41.9.1, so this can break the default locked build rather than support both inputs.

Suggested changes

  • Remove the manual fetchurl/tar extraction and use ${electron.headers} as node-gyp's --nodedir, as in the durable approach documented on #61443.
  • Verify both the pinned and overridden Electron inputs with nix build .#desktop.

Automated hermes-sweeper review.

Comment thread nix/desktop.nix
electronHeaders = pkgs.fetchurl {
url = "https://artifacts.electronjs.org/headers/dist/v${electron.version}/node-v${electron.version}-headers.tar.gz";
sha256 = "sha256-zi/QMwRZ0+FwE9XTE+DiSIeJXAwxmLKEaBWD5W3pMOI=";
sha256 = "sha256-zOl8rx6woWh7aeRUOlkTMviKc/EAQQX6nr/MxAx1ZPI=";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This hash is specific to the reported Electron 41.9.1 archive, while line 33 still derives the URL from arbitrary ${electron.version}. Please remove the independent fetch/hash and point node-gyp at ${electron.headers} instead; otherwise any differing or future Electron version can desynchronize this pair again.

@teknium1 teknium1 added sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/install-update Installer, updater, packaging, wheels, doctor labels Jul 30, 2026
@kyssta-exe

Copy link
Copy Markdown
Contributor Author

Closing this PR because it is not mergeable: it has merge conflicts with main (GitHub reports mergeable=CONFLICTING / merge state DIRTY). Please rebase the branch onto the latest main and resolve the conflict in nix/desktop.nix, then this can be reopened for review. This is an automated close by the PR maintenance job (close-stale-duplicate-prs).

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

Labels

area/install-update Installer, updater, packaging, wheels, doctor area/nix Nix flake, NixOS module, container packaging comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Wrong sha256 pin for Electron headers fetchurl breaks hermes-desktop build

3 participants