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
Open
fix(nix): Fixed nix hash for dependencies, added CI job and script for updating dependencies versions#948xilec wants to merge 2 commits intocjpais:mainfrom
xilec wants to merge 2 commits intocjpais:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before Submitting This PR
Please confirm you have done the following:
closed ones) to ensure this isn't a duplicate
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:
continue-on-error) that detects flake.nixevaluation failures on every PR and hints at how to fix them.
scripts/update-nix-hashes.sh— a script that automatically updatesoutputHashes 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
./scripts/update-nix-hashes.sh— script automatically detectedthe version mismatch, updated keys, and resolved all hashes in 3
iterations
nix build .#handycompletes successfully with the finalflake.nix
Screenshots/Videos (if applicable)
N/A
AI Assistance
If AI was used:
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).