nixpkgs-suyu/pkgs/development/tools/hcloud/default.nix

36 lines
978 B
Nix
Raw Normal View History

2020-06-27 11:20:00 +02:00
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-02-03 00:36:02 +01:00
buildGoModule rec {
pname = "hcloud";
2020-11-11 09:50:56 +01:00
version = "1.20.0";
2019-07-30 11:20:46 +02:00
2018-02-03 00:36:02 +01:00
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
2020-11-11 09:50:56 +01:00
sha256 = "0sjshcppcfdfz29nsrzvrciypcb4r7fbl2sqhlkcq948b7k3jk8b";
2018-02-03 00:36:02 +01:00
};
2020-06-27 11:20:00 +02:00
nativeBuildInputs = [ installShellFiles ];
2020-11-11 09:50:56 +01:00
vendorSha256 = "0q6jm2ghwrbjxn76i8wz72xjdmwfvl5dn8n4zilyjjx9vvllwdjw";
2018-10-17 23:23:56 +02:00
doCheck = false;
2020-06-27 11:20:00 +02:00
buildFlagsArray = [ "-ldflags=-s -w -X github.com/hetznercloud/cli/cli.Version=${version}" ];
2018-02-03 00:36:02 +01:00
postInstall = ''
2020-06-27 11:20:00 +02:00
for shell in bash zsh; do
$out/bin/hcloud completion $shell > hcloud.$shell
installShellCompletion hcloud.$shell
done
'';
2018-02-03 00:36:02 +01:00
meta = {
description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
homepage = "https://github.com/hetznercloud/cli";
2018-02-03 00:36:02 +01:00
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.zauberpony ];
};
2020-06-27 11:20:00 +02:00
}