Add Nix flake - #2
Conversation
This adds a flake.nix that allows users to install gitshorty using Nix flakes. Users can now: - Install directly: nix profile install github:carpeliam/gitshorty - Use in flake-based projects as an input - Run without installing: nix run github:carpeliam/gitshorty The flake builds the project using `buildGoModule` and renames the binary from `gitshorty` to `sc` to match the project's conventions. Also updates README.md with installation instructions for Nix users.
|
Thanks @mattwynne! I'm not too familiar with the nix ecosystem, so I have a few questions. Is the SHA attached to the HEAD commit, or the commit at tag |
|
After looking around a bit, it looks like the vendor hash follows my dependencies, but I just merged a dependabot update of some dependencies. Does that mean this is already out of date? From a cursory glance, it looks like the best way to update the flake is to use |
This adds a flake.nix that allows users to install gitshorty using Nix flakes. Users can now:
The flake builds the project using
buildGoModuleand renames the binary fromgitshortytoscto match the project's conventions.Also updates README.md with installation instructions for Nix users.