depot/third_party/nixpkgs/pkgs/development/tools/hcloud/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

36 lines
954 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hcloud";
version = "1.30.2";
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-1ay0cW1zBCfaLIWvJGW7A/OeDc4l7OldnQHvrGeqXjE=";
};
vendorSha256 = "sha256-DoCiyaEPh+QyKgC3PJ5oivJTlcKzscaphXET9et8T1g=";
ldflags = [
"-s" "-w"
"-X github.com/hetznercloud/cli/internal/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/hcloud completion $shell > hcloud.$shell
installShellCompletion hcloud.$shell
done
'';
meta = {
description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
homepage = "https://github.com/hetznercloud/cli";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.zauberpony ];
};
}