Closed bloominstrong closed 12 months ago
Good catch! I'll publish a fix by tomorrow, and look into using ldflags afterwards. Seems to be the standard-ish in nixpkgs anyway.
Hi @NotAShelf
I'm interested in adding Hyprkeys to nixpkgs and plan to update https://github.com/NixOS/nixpkgs/pull/241201 once the new version comes out.
I'm not sure why, but the current archive returns "the given path has multiple possibilities", thus breaking the build. Maybe it's because the tag was deleted?
@donovanglover,
I think the problem is there is a branch called v1.0.2 . You can reference the tag directly with https://github.com/hyprland-community/Hyprkeys/archive/refs/tags/v1.0.2.tar.gz But I don't know if nix's fetch from GitHub function can specifically use the ref tags address instead
Thanks for the hint! PR is now fixed
fetchFromGitHub should be able to fetch the v1.0.2 branch with rev = "v${version$"
or similar
p.s. I deleted the v1.0.2 branch, should be easier to do so now
@bloominstrong I've pushed some changes that I think should solve the issue. The version string is now obtained from ldlags in both Makefile and nix builds. I've not tested goreleaser, but it should probably also work. Please let me know if the issue is fixed.
Thank you @NotAShelf , that's working here.
Calling
hyprkeys version
givesHyprkeys: v1.1.0
which has been set in cmd/version.go in release v1.0.2It could be worth considering something similar to what nebula does in using ldflags to set the Version variable at compile if not already set. this means that the version is automatically picked up when using git.