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

36 lines
978 B
Nix
Raw Normal View History

2020-06-27 10:20:00 +01:00
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-02-02 23:36:02 +00:00
buildGoModule rec {
pname = "hcloud";
2020-09-05 01:23:57 +01:00
version = "1.19.1";
2019-07-30 10:20:46 +01:00
2018-02-02 23:36:02 +00:00
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
2020-09-05 01:23:57 +01:00
sha256 = "0iq04jfqvmwlm6947kzz4c3a33lvwxvj42z179rc3126b5v7bq54";
2018-02-02 23:36:02 +00:00
};
2020-06-27 10:20:00 +01:00
nativeBuildInputs = [ installShellFiles ];
2020-09-05 01:23:57 +01:00
vendorSha256 = "1svwrb5wyz5d8fgx36bpypnfq4hmpfxyd197cla9wnqpbkia7n5r";
2018-10-17 22:23:56 +01:00
doCheck = false;
2020-06-27 10:20:00 +01:00
buildFlagsArray = [ "-ldflags=-s -w -X github.com/hetznercloud/cli/cli.Version=${version}" ];
2018-02-02 23:36:02 +00:00
postInstall = ''
2020-06-27 10:20:00 +01:00
for shell in bash zsh; do
$out/bin/hcloud completion $shell > hcloud.$shell
installShellCompletion hcloud.$shell
done
'';
2018-02-02 23:36:02 +00: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-02 23:36:02 +00:00
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.zauberpony ];
};
2020-06-27 10:20:00 +01:00
}