1 { lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
7 src = fetchFromGitHub {
11 hash = "sha256-uk0tG66u0gQgEzpiFAeMC0qPrd+Pk6nbrXuuyOtVLe4=";
14 vendorHash = "sha256-qf0l76MGIFv5m7uSjo4FgS6XxYzCT4+Efgt6W6jA1i8=";
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";