tcld: 0.40.0 -> 0.41.0 (#418245)

authored by jade and committed by GitHub 404e43d0 94fdeab1

+31 -3
+31 -3
pkgs/by-name/tc/tcld/package.nix
··· 4 lib, 5 stdenvNoCC, 6 installShellFiles, 7 nix-update-script, 8 ... 9 }: 10 11 buildGoModule (finalAttrs: { 12 pname = "tcld"; 13 - version = "0.40.0"; 14 src = fetchFromGitHub { 15 owner = "temporalio"; 16 repo = "tcld"; 17 rev = "refs/tags/v${finalAttrs.version}"; 18 - hash = "sha256-bIJSvop1T3yiLs/LTgFxIMmObfkVfvvnONyY4Bsjj8g="; 19 }; 20 vendorHash = "sha256-GOko8nboj7eN4W84dqP3yLD6jK7GA0bANV0Tj+1GpgY="; 21 - ldFlags = [ 22 "-s" 23 "-w" 24 ]; 25 26 # FIXME: Remove after https://github.com/temporalio/tcld/pull/447 lands. 27 patches = [ ./compgen.patch ]; 28 ··· 36 installShellCompletion --cmd tcld --zsh ${./zsh_autocomplete} 37 ''; 38 39 passthru.updateScript = nix-update-script { }; 40 41 meta = { 42 description = "Temporal cloud cli"; 43 homepage = "https://www.github.com/temporalio/tcld"; 44 license = lib.licenses.mit; 45 teams = [ lib.teams.mercury ]; 46 }; 47 })
··· 4 lib, 5 stdenvNoCC, 6 installShellFiles, 7 + versionCheckHook, 8 nix-update-script, 9 ... 10 }: 11 12 buildGoModule (finalAttrs: { 13 pname = "tcld"; 14 + version = "0.41.0"; 15 src = fetchFromGitHub { 16 owner = "temporalio"; 17 repo = "tcld"; 18 rev = "refs/tags/v${finalAttrs.version}"; 19 + hash = "sha256-Jnm6l9Jj1mi9esDS6teKTEMhq7V1QD/dTl3qFhKsW4o="; 20 + # Populate values from the git repository; by doing this in 'postFetch' we 21 + # can delete '.git' afterwards and the 'src' should stay reproducible. 22 + leaveDotGit = true; 23 + postFetch = '' 24 + cd "$out" 25 + # Replicate 'COMMIT' and 'DATE' variables from upstream's Makefile. 26 + git rev-parse --short=12 HEAD > $out/COMMIT 27 + git log -1 --format=%cd --date=iso-strict > $out/SOURCE_DATE_EPOCH 28 + find "$out" -name .git -exec rm -rf '{}' '+' 29 + ''; 30 }; 31 + 32 vendorHash = "sha256-GOko8nboj7eN4W84dqP3yLD6jK7GA0bANV0Tj+1GpgY="; 33 + 34 + subPackages = [ "cmd/tcld" ]; 35 + ldflags = [ 36 "-s" 37 "-w" 38 + "-X=github.com/temporalio/tcld/app.version=${finalAttrs.version}" 39 ]; 40 41 + # ldflags based on metadata from git. 42 + preBuild = '' 43 + ldflags+=" -X=github.com/temporalio/tcld/app.date=$(cat SOURCE_DATE_EPOCH)" 44 + ldflags+=" -X=github.com/temporalio/tcld/app.commit=$(cat COMMIT)" 45 + ''; 46 + 47 # FIXME: Remove after https://github.com/temporalio/tcld/pull/447 lands. 48 patches = [ ./compgen.patch ]; 49 ··· 57 installShellCompletion --cmd tcld --zsh ${./zsh_autocomplete} 58 ''; 59 60 + nativeInstallCheckInputs = [ versionCheckHook ]; 61 + doInstallCheck = true; 62 + versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}"; 63 + versionCheckProgramArg = "version"; 64 + 65 passthru.updateScript = nix-update-script { }; 66 67 meta = { 68 description = "Temporal cloud cli"; 69 homepage = "https://www.github.com/temporalio/tcld"; 70 + changelog = "https://github.com/temporalio/tcld/releases/tag/v${finalAttrs.version}"; 71 license = lib.licenses.mit; 72 teams = [ lib.teams.mercury ]; 73 + mainProgram = "tcld"; 74 }; 75 })