From 4b2694acd9bec13b1a1c1480f055593524f22d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Fri, 12 Jun 2026 14:13:07 +0200 Subject: [PATCH] temporal-cli: fix version, add versionCheckHook See https://github.com/temporalio/cli/pull/937 --- pkgs/by-name/te/temporal-cli/package.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/te/temporal-cli/package.nix b/pkgs/by-name/te/temporal-cli/package.nix index 506dcb427281..9216ea6e34dd 100644 --- a/pkgs/by-name/te/temporal-cli/package.nix +++ b/pkgs/by-name/te/temporal-cli/package.nix @@ -6,6 +6,7 @@ writableTmpDirAsHomeHook, stdenv, nix-update-script, + versionCheckHook, }: buildGoModule (finalAttrs: { @@ -21,6 +22,8 @@ buildGoModule (finalAttrs: { vendorHash = "sha256-N9K05Kcb0YaQO7M9gR22QzAOzbmgEhIqADcAESqYtQ8="; + __structuredAttrs = true; + nativeBuildInputs = [ installShellFiles ]; subPackages = [ @@ -30,7 +33,7 @@ buildGoModule (finalAttrs: { ldflags = [ "-s" "-w" - "-X github.com/temporalio/cli/temporalcli.Version=${finalAttrs.version}" + "-X github.com/temporalio/cli/internal/temporalcli.Version=${finalAttrs.version}" ]; # Tests fail with x86 on macOS Rosetta 2 @@ -38,6 +41,9 @@ buildGoModule (finalAttrs: { nativeCheckInputs = [ writableTmpDirAsHomeHook ]; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd temporal \ --bash <($out/bin/temporal completion bash) \ @@ -58,7 +64,10 @@ buildGoModule (finalAttrs: { description = "Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal"; homepage = "https://docs.temporal.io/cli"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ aaronjheng ]; + maintainers = with lib.maintainers; [ + aaronjheng + jlesquembre + ]; mainProgram = "temporal"; }; })