[PR #184] [MERGED] fix(nix): resolve issues and revamp the flake #656

Closed
opened 2026-04-16 03:37:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/newt/pull/184
Author: @water-sucks
Created: 12/4/2025
Status: Merged
Merged: 12/4/2025
Merged by: @oschwartz10612

Base: mainHead: nix-fixes-this


📝 Commits (7)

  • d981a82 chore(nix): use nixpkgs-unstable branch and update flake inputs
  • c7d6562 fix(nix): replace version string sub with ldflags, use gitignore on src
  • 09568c1 fix(nix): use correct hash for vendored deps
  • 8db50d9 refactor(nix): remove with keyword antipattern
  • f9fb13a chore(nix): add water-sucks to maintainers list
  • e27e6fb feat(nix): disable cgo for the newt package
  • 15b40b0 chore(nix): sync to latest version number for newt package

📊 Changes

2 files changed (+37 additions, -21 deletions)

View changed files

📝 flake.lock (+4 -4)
📝 flake.nix (+33 -17)

📄 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 fixes up some inconsistencies and regressions with the Nix flake in this repository.

  • The Go version used by nixpkgs was 1.24, while the current required toolchain version is 1.25.
  • The vendor hash was wrong due to upgraded dependencies.
  • Filtering out files was super clunky and didn't scale with the gitignore, so this uses a special nixpkgs function that automatically filters ALL files found in .gitignore transparently.
  • The version was not synced with the latest version, and was stuck on 1.4.2 while the latest at time of writing is 1.6.0.

Additionally, I decided to follow Nix best practices and avoid antipatterns such as with, as described in https://nix.dev/guides/best-practices; instead, inherit is used whenever possible.

I also took the liberty of adding myself as a maintainer for the Nix package, and will likely do so in nixpkgs as well for future updates, since over there the Nix version is still stuck on 1.5.2, rather than the latest 1.6.0, again at time of writing.

How to test?

Build the Nix package using nix build, and also drop into the Nix devshell using nix develop to make sure the correct version of Go and all other Go SDK tooling is still available.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/newt/pull/184 **Author:** [@water-sucks](https://github.com/water-sucks) **Created:** 12/4/2025 **Status:** ✅ Merged **Merged:** 12/4/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `main` ← **Head:** `nix-fixes-this` --- ### 📝 Commits (7) - [`d981a82`](https://github.com/fosrl/newt/commit/d981a82b1c02b4c5aea0727a68be0cb21d438c77) chore(nix): use nixpkgs-unstable branch and update flake inputs - [`c7d6562`](https://github.com/fosrl/newt/commit/c7d656214f40ba168a8cb0c857e9dd54302eb59a) fix(nix): replace version string sub with ldflags, use gitignore on src - [`09568c1`](https://github.com/fosrl/newt/commit/09568c1aaf0884062b29c521840eb8ec1135693d) fix(nix): use correct hash for vendored deps - [`8db50d9`](https://github.com/fosrl/newt/commit/8db50d94c0e417672263a8dd97bbc3b62be4ceeb) refactor(nix): remove with keyword antipattern - [`f9fb13a`](https://github.com/fosrl/newt/commit/f9fb13a0d7f35da7fe95423eed55548651a6c66d) chore(nix): add water-sucks to maintainers list - [`e27e6fb`](https://github.com/fosrl/newt/commit/e27e6fbce86e47909c4c652b9c0ea021efefb4ca) feat(nix): disable cgo for the newt package - [`15b40b0`](https://github.com/fosrl/newt/commit/15b40b0f24006ab7e1e9fe4dd2b760a29d3a3923) chore(nix): sync to latest version number for newt package ### 📊 Changes **2 files changed** (+37 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `flake.lock` (+4 -4) 📝 `flake.nix` (+33 -17) </details> ### 📄 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 fixes up some inconsistencies and regressions with the Nix flake in this repository. - The Go version used by `nixpkgs` was 1.24, while the current required toolchain version is 1.25. - The vendor hash was wrong due to upgraded dependencies. - Filtering out files was super clunky and didn't scale with the gitignore, so this uses a special `nixpkgs` function that automatically filters ALL files found in `.gitignore` transparently. - The version was not synced with the latest version, and was stuck on 1.4.2 while the latest at time of writing is 1.6.0. Additionally, I decided to follow Nix best practices and avoid antipatterns such as `with`, as described in https://nix.dev/guides/best-practices; instead, `inherit` is used whenever possible. I also took the liberty of adding myself as a maintainer for the Nix package, and will likely do so in `nixpkgs` as well for future updates, since over there the Nix version is still stuck on 1.5.2, rather than the latest 1.6.0, again at time of writing. ## How to test? Build the Nix package using `nix build`, and also drop into the Nix devshell using `nix develop` to make sure the correct version of Go and all other Go SDK tooling is still available. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 03:37:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#656