diff options
author | Guillaume Girol <symphorien@users.noreply.github.com> | 2023-04-09 16:59:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-09 16:59:17 +0000 |
commit | ca9824645bf0c599f8e1ad2b97c29413af21f96f (patch) | |
tree | 6f2c41a64953fb68045edcb73fae5600e49cd0de /pkgs/shells | |
parent | 0cd94d7f94b457001c2f8e1648a5e79347fe3e93 (diff) | |
parent | 0b39ed44dd08d37a9364cd39bc20f097c1fb07b7 (diff) |
Merge pull request #224127 from star-szr/carapace--add-version
carapace: add ldflags for version
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/carapace/default.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/shells/carapace/default.nix b/pkgs/shells/carapace/default.nix index b740851590986..dae5b9bc442de 100644 --- a/pkgs/shells/carapace/default.nix +++ b/pkgs/shells/carapace/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, testers, carapace }: buildGoModule rec { pname = "carapace"; @@ -13,6 +13,12 @@ buildGoModule rec { vendorHash = "sha256-s8U0ERAb/qLwen8ABfeZ21HLTgHWvHaYHazztSeP87c="; + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + ]; + subPackages = [ "./cmd/carapace" ]; tags = [ "release" ]; @@ -21,10 +27,12 @@ buildGoModule rec { go generate ./... ''; + passthru.tests.version = testers.testVersion { package = carapace; }; + meta = with lib; { description = "Multi-shell multi-command argument completer"; homepage = "https://rsteube.github.io/carapace-bin/"; - maintainers = with maintainers; [ mredaelli ]; + maintainers = with maintainers; [ star-szr ]; license = licenses.mit; platforms = platforms.unix; }; |