stc-cli: add -version

This commit is contained in:
Scott Edlund
2025-12-08 16:20:39 +07:00
parent a882bca3ff
commit 34dd0d96a5
+8 -1
View File
@@ -1,7 +1,8 @@
{
lib,
buildGoModule,
fetchFromGitHub,
lib,
versionCheckHook,
}:
buildGoModule rec {
@@ -17,6 +18,12 @@ buildGoModule rec {
vendorHash = "sha256-qLpWXikTr+vB2bIw2EqnoJ0uOxUc/qc6SdGEJQXwmTQ=";
ldflags = [ "-X main.GitTag=${version}" ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "-version";
meta = {
description = "Syncthing CLI Tool";
homepage = "https://github.com/tenox7/stc";