nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 43 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 installShellFiles, 7}: 8 9buildGoModule rec { 10 pname = "vultr-cli"; 11 version = "3.8.0"; 12 13 src = fetchFromGitHub { 14 owner = "vultr"; 15 repo = "vultr-cli"; 16 rev = "v${version}"; 17 hash = "sha256-6uVMy7FogacaJOtedly5kg7Gt55WSIhPLF2zGbM3LbE="; 18 }; 19 20 vendorHash = "sha256-YPAlOC+8hxjtc4q4VQ+f0C/CpO1nGvEvuR2FOA34b08="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 ]; 28 29 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 30 installShellCompletion --cmd vultr-cli \ 31 --bash <($out/bin/vultr-cli completion bash) \ 32 --fish <($out/bin/vultr-cli completion fish) \ 33 --zsh <($out/bin/vultr-cli completion zsh) 34 ''; 35 36 meta = { 37 description = "Official command line tool for Vultr services"; 38 homepage = "https://github.com/vultr/vultr-cli"; 39 changelog = "https://github.com/vultr/vultr-cli/blob/v${version}/CHANGELOG.md"; 40 license = lib.licenses.asl20; 41 mainProgram = "vultr-cli"; 42 }; 43}