opentofu-ls: add versionCheckHook
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
unstableGitUpdater,
|
||||
}:
|
||||
|
||||
@@ -21,6 +22,7 @@ buildGoModule (finalAttrs: {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X 'main.rawVersion=${finalAttrs.version}'"
|
||||
];
|
||||
|
||||
checkFlags =
|
||||
@@ -40,6 +42,11 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
versionCheckProgram = "${placeholder "out"}/bin/tofu-ls";
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru = {
|
||||
updateScript = unstableGitUpdater { };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user