diff --git a/pkgs/by-name/op/opentofu-ls/package.nix b/pkgs/by-name/op/opentofu-ls/package.nix index a9a44d500c51..0f478c6885f1 100644 --- a/pkgs/by-name/op/opentofu-ls/package.nix +++ b/pkgs/by-name/op/opentofu-ls/package.nix @@ -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 { }; };