blob: 9671b4b304e9b65a87e47fba6de7d0c61fe52411 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
{ lib, fetchFromGitHub, buildGoModule, installShellFiles, symlinkJoin }:
let
tctl-next = buildGoModule rec {
pname = "tctl-next";
version = "0.9.0";
src = fetchFromGitHub {
owner = "temporalio";
repo = "cli";
rev = "v${version}";
hash = "sha256-zgi1wNx7fWf/iFGKaVffcXnC90vUz+mBT6HhCGdXMa0=";
};
vendorHash = "sha256-muTNwK2Sb2+0df/6DtAzT14gwyuqa13jkG6eQaqhSKg=";
nativeBuildInputs = [ installShellFiles ];
excludedPackages = [ "./cmd/docgen" "./tests" ];
ldflags = [
"-s"
"-w"
"-X github.com/temporalio/cli/headers.Version=${version}"
];
preCheck = ''
export HOME=$(mktemp -d)
'';
postInstall = ''
installShellCompletion --cmd temporal \
--bash <($out/bin/temporal completion bash) \
--zsh <($out/bin/temporal completion zsh)
'';
};
tctl = buildGoModule rec {
pname = "tctl";
version = "1.18.0";
src = fetchFromGitHub {
owner = "temporalio";
repo = "tctl";
rev = "v${version}";
hash = "sha256-LcBKkx3mcDOrGT6yJx98CSgxbwskqGPWqOzHWOu6cig=";
};
vendorHash = "sha256-BUYEeC5zli++OxVFgECJGqJkbDwglLppSxgo+4AqOb0=";
nativeBuildInputs = [ installShellFiles ];
excludedPackages = [ "./cmd/copyright" ];
ldflags = [ "-s" "-w" ];
preCheck = ''
export HOME=$(mktemp -d)
'';
postInstall = ''
installShellCompletion --cmd tctl \
--bash <($out/bin/tctl completion bash) \
--zsh <($out/bin/tctl completion zsh)
'';
};
in
symlinkJoin rec {
pname = "temporal-cli";
inherit (tctl) version;
name = "${pname}-${version}";
paths = [
tctl-next
tctl
];
passthru = { inherit tctl tctl-next; };
meta = with lib; {
description = "Temporal CLI";
homepage = "https://temporal.io";
license = licenses.mit;
maintainers = with maintainers; [ aaronjheng ];
mainProgram = "temporal";
};
}
|