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.
Adding nix infrastructure as suggested in #12 (comment).
Added a flake.nix and default.nix to properly build the package, which now can be used with
nix build
ornix run
. The go modules are handled by gomod2nix, which can regerenate the gomod2nix.toml withnix develop
andgomod2nix regenerate
(if you change anything on the go modules). I've added a line in the justfile that make your release command also change the nix package version, so you don't have to worry about it. I've also added the result dir (the directory of the nix builds) to the gitignore.The flake itself is locked with a flake.lock and can be updated with
nix flake update
. It's tracking nixos-unstable (the rolling-release branch of NixOS), but it can track the stable version if requested (although you'll have to change the url from time to time to update the stable version eg. 24.05 will be 24.11 in the next release).Also added a shell.nix to handle
nix develop
, this pulls all the tooling for development and also gomod2nix. You can add more packages inside thepkgs.mkShell
to enhance the development environment. I've added all the basic tools I've found in your justfile.