Skip to content

fix(nix): Fixed nix hash for dependencies, added CI job and script for updating dependencies versions#948

Open
xilec wants to merge 2 commits intocjpais:mainfrom
xilec:fix/nix-update-hashes
Open

fix(nix): Fixed nix hash for dependencies, added CI job and script for updating dependencies versions#948
xilec wants to merge 2 commits intocjpais:mainfrom
xilec:fix/nix-update-hashes

Conversation

@xilec
Copy link

@xilec xilec commented Mar 3, 2026

Before Submitting This PR

Please confirm you have done the following:

If this is a feature or change that was previously closed/rejected:

N/A — this is a bug fix.

Human Written Description

Fixes #934

Nix packages pin dependency hashes, so they break whenever Cargo or bun
dependencies are updated. Since Nix expertise isn't common among
contributors, these breakages can sit unnoticed for a while.

To improve this going forward:

  • A non-blocking CI job (continue-on-error) that detects flake.nix
    evaluation failures on every PR and hints at how to fix them.
  • scripts/update-nix-hashes.sh — a script that automatically updates
    outputHashes and bunDeps hash in flake.nix. Works on NixOS, Ubuntu,
    and macOS.

Related Issues/Discussions

Fixes #934

Previous similar fixes: #842, #853

Community Feedback

Issue #934 was reported by a community member (simonkoeck)
experiencing the exact same build failure.

Testing

  • Reverted flake.nix to the broken state (tauri-runtime-2.9.1 hash)
  • Ran ./scripts/update-nix-hashes.sh — script automatically detected
    the version mismatch, updated keys, and resolved all hashes in 3
    iterations
  • Verified nix build .#handy completes successfully with the final
    flake.nix

Screenshots/Videos (if applicable)

N/A

AI Assistance

  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code (claude-opus-4-6)
  • How extensively: AI assisted with writing the update-nix-hashes.sh
    script and nix-check.yml CI workflow, and identified the hash
    mismatches in flake.nix. All changes were reviewed and tested
    manually (only on NixOS).

xilec added 2 commits March 3, 2026 10:42
tauri-runtime upgraded from 2.9.1 to 2.10.0 (branch handy-2.10.2)
and bun.lock changed, but flake.nix hashes were not updated.
- scripts/update-nix-hashes.sh: automatically detects outputHashes
  version mismatches against Cargo.lock and fixes hashes via
  iterative nix build. Works on NixOS, Ubuntu, macOS.
- .github/workflows/nix-check.yml: non-blocking PR check that
  catches flake.nix evaluation failures and hints at the script.
- .gitignore: add nix build result symlink.
@xilec xilec changed the title fix(nix): Fixed nix hash for dependencies, added CI checking nix dependencies and added script for auto updating versions of dependencies fix(nix): Fixed nix hash for dependencies, added CI job and script for autoupdating dependencies versions Mar 3, 2026
@xilec xilec changed the title fix(nix): Fixed nix hash for dependencies, added CI job and script for autoupdating dependencies versions fix(nix): Fixed nix hash for dependencies, added CI job and script for updating dependencies versions Mar 4, 2026
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.

[BUG] Nix build fails: tauri-runtime-2.9.1 hash with no corresponding git dependency

1 participant