Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
installShellFiles,
|
|
stdenv,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "temporal-cli";
|
|
version = "1.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "temporalio";
|
|
repo = "cli";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-fbaqRjYFDeGuCheg3EIUVh/QMhFzLNUb6MUoc/J51Ko=";
|
|
};
|
|
|
|
vendorHash = "sha256-dWcf4X8/Wy/TULdT6PbiMaOd1d+haBlnII+6VKazrD4=";
|
|
|
|
overrideModAttrs = old: {
|
|
# https://gitlab.com/cznic/libc/-/merge_requests/10
|
|
postBuild = ''
|
|
patch -p0 < ${./darwin-sandbox-fix.patch}
|
|
'';
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
excludedPackages = [
|
|
"./cmd/docgen"
|
|
"./tests"
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/temporalio/cli/temporalcli.Version=${finalAttrs.version}"
|
|
];
|
|
|
|
# Tests fail with x86 on macOS Rosetta 2
|
|
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64);
|
|
|
|
preCheck = ''
|
|
export HOME="$(mktemp -d)"
|
|
'';
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd temporal \
|
|
--bash <($out/bin/temporal completion bash) \
|
|
--fish <($out/bin/temporal completion fish) \
|
|
--zsh <($out/bin/temporal completion zsh)
|
|
'';
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"^v(\\d+\\.\\d+\\.\\d+)$"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
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 ];
|
|
mainProgram = "temporal";
|
|
};
|
|
})
|