2023-10-09 19:29:22 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "vultr-cli";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.20.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vultr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-3Zd507yAymmQRgybm96VD413kId0/kMxIHbmUh8j6Kk=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
vendorHash = "sha256-OVoOCExAU6cDyWhSpk4hkhBZpWehH+4/vU/X81w9XgA=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd vultr-cli \
|
|
|
|
--bash <($out/bin/vultr-cli completion bash) \
|
|
|
|
--fish <($out/bin/vultr-cli completion fish) \
|
|
|
|
--zsh <($out/bin/vultr-cli completion zsh)
|
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "Official command line tool for Vultr services";
|
|
|
|
homepage = "https://github.com/vultr/vultr-cli";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/vultr/vultr-cli/blob/v${version}/CHANGELOG.md";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.asl20;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "vultr-cli";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|