mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
natscli: set main.version=${version}
Otherwise, `natscli --version` reports its version as "development" instead of the version number. Adds versionCheckHook to verify.
This commit is contained in:
parent
f1f3b5ec6e
commit
6572a49f3c
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user