Skip to content

chore(nix): add nix hash update automation#217

Merged
oschwartz10612 merged 5 commits intofosrl:mainfrom
water-sucks:nix-automation
Dec 23, 2025
Merged

chore(nix): add nix hash update automation#217
oschwartz10612 merged 5 commits intofosrl:mainfrom
water-sucks:nix-automation

Conversation

@water-sucks
Copy link
Contributor

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

This syncs up the latest Nix package, unbreaks the Nix package build, and also attempts to add CI checks/updates for the Nix hash to prevent this from happening in the future.

From now on, whenever a PR is opened, and go.mod/go.sum are changed, the Nix package is built by CI, and it will fail if the hash is incorrect. Any maintainer can subsequently update the hash themselves, or post the hash in a PR review comment and ask the user to update their PR.

Additionally, since Dependabot automates Go package updates, this PR adds an action to run nix-update in order to get the new hash, and updates the Dependabot PR with the hash change.

Ultimately, the maintainers are still responsible for updating the version number on their own before release. This cannot be automated away, unfortunately.

How to test?

Next time a Dependabot update happens, the Dependabot action should trigger and update the Nix hash.

Additionally, the next time a go.mod/go.sum change happens, a successful Nix package build should be a prerequisite for merging.

@oschwartz10612
Copy link
Member

LGTM lets see what happens! Thanks Varun

@oschwartz10612 oschwartz10612 merged commit f9b6f36 into fosrl:main Dec 23, 2025
12 checks passed
@water-sucks water-sucks deleted the nix-automation branch December 23, 2025 00:44
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.

2 participants

Comments