Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 43 lines 1.1 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5}: 6 7buildGoModule rec { 8 pname = "hcloud"; 9 version = "1.43.1"; 10 11 src = fetchFromGitHub { 12 owner = "hetznercloud"; 13 repo = "cli"; 14 rev = "refs/tags/v${version}"; 15 hash = "sha256-XPDaywSCvXc9jo8bNxaF9Pj6Vs+Hz0MxDPbbnRNW3VI="; 16 }; 17 18 vendorHash = "sha256-pN+HMsZ2FpxwF/yPfYGwJNj9i4fgnE3cKo3mti3KoR0="; 19 20 ldflags = [ 21 "-s" 22 "-w" 23 "-X=github.com/hetznercloud/cli/internal/version.Version=${version}" 24 ]; 25 26 nativeBuildInputs = [ installShellFiles ]; 27 28 postInstall = '' 29 for shell in bash fish zsh; do 30 $out/bin/hcloud completion $shell > hcloud.$shell 31 installShellCompletion hcloud.$shell 32 done 33 ''; 34 35 meta = with lib; { 36 changelog = "https://github.com/hetznercloud/cli/releases/tag/v${version}"; 37 description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers"; 38 mainProgram = "hcloud"; 39 homepage = "https://github.com/hetznercloud/cli"; 40 license = licenses.mit; 41 maintainers = with maintainers; [ zauberpony techknowlogick ]; 42 }; 43}