My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/tools/hcloud/default.nix

36 lines
949 B

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hcloud";
version = "1.29.5";
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-a+AXWr/60VFdNk+UkDYRXo5ib8LvaCVpjNi1GFrRVho=";
};
vendorSha256 = "sha256-iJnjmfP9BcT+OXotbS2+OSWGxQaMXwdlR1WTi04FesM=";
ldflags = [
"-s" "-w"
"-X github.com/hetznercloud/cli/internal/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash 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 ];
};
}