2024-01-25 14:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitLab
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tuleap-cli";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "csgroup-oss";
|
|
|
|
repo = "tuleap-cli";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-hL0mGWXzvHYFc8u4RXCDys3Fe/cgsGljfhSkPAjzt4o=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
vendorHash = "sha256-N9Hmxw/70Cgc790AVRn7lmuhMtDhI94CTUlqHU4VbaY=";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd tuleap-cli \
|
|
|
|
--bash <($out/bin/tuleap-cli -s tuleap.example.com completion bash) \
|
|
|
|
--fish <($out/bin/tuleap-cli -s tuleap.example.com completion fish) \
|
|
|
|
--zsh <($out/bin/tuleap-cli -s tuleap.example.com completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Command-line interface for the Tuleap API";
|
|
|
|
homepage = "https://gitlab.com/csgroup-oss/tuleap-cli";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ lesuisse ];
|
|
|
|
mainProgram = "tuleap-cli";
|
|
|
|
};
|
|
|
|
}
|