mirror of
https://github.com/fosrl/newt.git
synced 2026-05-07 00:20:00 -05:00
[PR #217] [MERGED] chore(nix): add nix hash update automation #979
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/newt/pull/217
Author: @water-sucks
Created: 12/22/2025
Status: ✅ Merged
Merged: 12/23/2025
Merged by: @oschwartz10612
Base:
main← Head:nix-automation📝 Commits (5)
b25a07cchore(nix): sync version number with latest version1c87196fix(nix): disable tests, set meta.mainProgram for package34e4e8aci: build nix package when go.mod is changede3d161achore: add direnv and nix result dirs to gitignore79e312aci: update nix go vendor hash if needed for dependabot PRs📊 Changes
4 files changed (+88 additions, -2 deletions)
View changed files
➕
.github/workflows/nix-build.yml(+23 -0)➕
.github/workflows/nix-dependabot-update-hash.yml(+48 -0)📝
.gitignore(+3 -1)📝
flake.nix(+14 -1)📄 Description
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.sumare 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-updatein 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.sumchange happens, a successful Nix package build should be a prerequisite for merging.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.