natscli: set main.version=${version} (#346008)

This commit is contained in:
Peder Bergebakken Sundt
2024-10-14 00:57:40 +02:00
committed by GitHub
+9
View File
@@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, versionCheckHook
}:
buildGoModule rec {
@@ -16,6 +17,14 @@ buildGoModule rec {
vendorHash = "sha256-T6VcyklwfRS012ZRzqxkahn9YYrQGky/znTqLIkAoK0=";
ldflags = [
"-X main.version=${version}"
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/nats";
meta = with lib; {
description = "NATS Command Line Interface";
homepage = "https://github.com/nats-io/natscli";