1 { lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
7 src = fetchFromGitHub {
11 hash = "sha256-6OVigI2eHE8qFC5nmH67NcKkDD0iFXl3ynYJyFcpmGw=";
14 vendorHash = "sha256-MDzYiLMYoR9qOTPVnlzTDbgVvg72HDP2DpM6NKUFNdg=";
16 nativeBuildInputs = [ installShellFiles ];
18 ldflags = [ "-s" "-w" ];
20 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
21 installShellCompletion --cmd vultr-cli \
22 --bash <($out/bin/vultr-cli completion bash) \
23 --fish <($out/bin/vultr-cli completion fish) \
24 --zsh <($out/bin/vultr-cli completion zsh)
28 description = "Official command line tool for Vultr services";
29 homepage = "https://github.com/vultr/vultr-cli";
30 changelog = "https://github.com/vultr/vultr-cli/blob/v${version}/CHANGELOG.md";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ Br1ght0ne ];
33 mainProgram = "vultr-cli";