nali: add version to ldflags

This commit is contained in:
XYenon
2023-10-13 11:23:25 +08:00
parent 467ed599a3
commit b3bb130f7c
@@ -8,7 +8,7 @@ buildGoModule rec {
owner = "zu1k";
repo = "nali";
rev = "v${version}";
sha256 = "sha256-JIP0QX1okCfDj2Y6wZ5TaV3QH0WP3oU3JjaKK6vMfWY=";
hash = "sha256-JIP0QX1okCfDj2Y6wZ5TaV3QH0WP3oU3JjaKK6vMfWY=";
};
vendorHash = "sha256-wIp/ShUddz+RIcsEuKWUfxsV/wNB2X1jZtIltBZ0ROM=";
@@ -16,6 +16,9 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X github.com/zu1k/nali/internal/constant.Version=${version}" ];
postInstall = ''
installShellCompletion --cmd nali \
--bash <($out/bin/nali completion bash) \