Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically fix the nix hash #1600

Merged
merged 29 commits into from
Dec 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes
bkchr committed Dec 18, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
bkchr Bastian Köcher
commit 2846924d0289cfcc9c600505841b49932b4a0f00
6 changes: 5 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -33,12 +33,16 @@ jobs:
echo "If the job is failing with: \"hash mismatch in fixed-output derivation\""
echo "Copy the hash after \"got:\" and replace \"npmDepsHash\" in \"flake-module.nix\" with the hash"
nix develop --command "exit 1" 2>shell_output
! cat shell_output | grep "hash mismatch" -A2

# Filter the hash and then replace it in `flake-module.nix`
# This needs to run before the last step that may let's the job fail
cat shell_output | grep "got:" | sed "s/[ \t]*got:[ \t]*//" > hash
sed "s@npmDepsHash = \"[^\"]*\"@npmDepsHash = \"$(cat hash)\"@" -i flake-module.nix

! cat shell_output | grep "hash mismatch" -A2

- uses: stefanzweifel/git-auto-commit-action@v5
if: always()
with:
add_options: '-u'
commit_message: Fix nix hash
209 changes: 0 additions & 209 deletions shell_output

This file was deleted.