Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: 2 3buildGoModule rec { 4 pname = "hcloud"; 5 version = "1.34.0"; 6 7 src = fetchFromGitHub { 8 owner = "hetznercloud"; 9 repo = "cli"; 10 rev = "v${version}"; 11 sha256 = "sha256-9jiRCatd6rWbzrekBgBU6yW56xz3x0jyzdcpB7TI7zI="; 12 }; 13 14 vendorHash = "sha256-Q9le/jbWkABlobn4qG/h48HEDYAPSkiy1N9YlUo6swQ="; 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 fish zsh; do 25 $out/bin/hcloud completion $shell > hcloud.$shell 26 installShellCompletion hcloud.$shell 27 done 28 ''; 29 30 meta = { 31 changelog = "https://github.com/hetznercloud/cli/releases/tag/v${version}"; 32 description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers"; 33 homepage = "https://github.com/hetznercloud/cli"; 34 license = lib.licenses.mit; 35 maintainers = [ lib.maintainers.zauberpony ]; 36 }; 37}