nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 36 lines 949 B view raw
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: 2 3buildGoModule rec { 4 pname = "hcloud"; 5 version = "1.29.5"; 6 7 src = fetchFromGitHub { 8 owner = "hetznercloud"; 9 repo = "cli"; 10 rev = "v${version}"; 11 sha256 = "sha256-a+AXWr/60VFdNk+UkDYRXo5ib8LvaCVpjNi1GFrRVho="; 12 }; 13 14 vendorSha256 = "sha256-iJnjmfP9BcT+OXotbS2+OSWGxQaMXwdlR1WTi04FesM="; 15 16 ldflags = [ 17 "-s" "-w" 18 "-X github.com/hetznercloud/cli/internal/version.Version=${version}" 19 ]; 20 21 nativeBuildInputs = [ installShellFiles ]; 22 23 postInstall = '' 24 for shell in bash zsh; do 25 $out/bin/hcloud completion $shell > hcloud.$shell 26 installShellCompletion hcloud.$shell 27 done 28 ''; 29 30 meta = { 31 description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers"; 32 homepage = "https://github.com/hetznercloud/cli"; 33 license = lib.licenses.mit; 34 maintainers = [ lib.maintainers.zauberpony ]; 35 }; 36}