1{
2 lib,
3 buildGoModule,
4 fetchFromGitLab,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "tuleap-cli";
10 version = "1.1.0";
11
12 src = fetchFromGitLab {
13 owner = "csgroup-oss";
14 repo = "tuleap-cli";
15 rev = "refs/tags/v${version}";
16 hash = "sha256-hL0mGWXzvHYFc8u4RXCDys3Fe/cgsGljfhSkPAjzt4o=";
17 };
18
19 vendorHash = "sha256-N9Hmxw/70Cgc790AVRn7lmuhMtDhI94CTUlqHU4VbaY=";
20
21 nativeBuildInputs = [ installShellFiles ];
22
23 ldflags = [
24 "-s"
25 "-w"
26 ];
27
28 subPackages = [ "." ];
29
30 postInstall = ''
31 installShellCompletion --cmd tuleap-cli \
32 --bash <($out/bin/tuleap-cli -s tuleap.example.com completion bash) \
33 --fish <($out/bin/tuleap-cli -s tuleap.example.com completion fish) \
34 --zsh <($out/bin/tuleap-cli -s tuleap.example.com completion zsh)
35 '';
36
37 meta = {
38 description = "Command-line interface for the Tuleap API";
39 homepage = "https://gitlab.com/csgroup-oss/tuleap-cli";
40 license = lib.licenses.gpl3Plus;
41 maintainers = with lib.maintainers; [ lesuisse ];
42 mainProgram = "tuleap-cli";
43 };
44}