2023-08-28 07:20:23 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2018-02-02 23:36:02 +00:00
|
|
|
|
2019-12-01 13:03:15 +00:00
|
|
|
buildGoModule rec {
|
2019-07-30 10:12:24 +00:00
|
|
|
pname = "hcloud";
|
2023-10-24 06:35:16 +00:00
|
|
|
version = "1.38.3";
|
2019-07-30 09:20:46 +00:00
|
|
|
|
2018-02-02 23:36:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hetznercloud";
|
|
|
|
repo = "cli";
|
2023-08-28 07:20:23 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-24 06:35:16 +00:00
|
|
|
hash = "sha256-argcQvt4875TNOX5P5sOF41u6GcFq79gnH41To73foM=";
|
2018-02-02 23:36:02 +00:00
|
|
|
};
|
|
|
|
|
2023-10-24 06:35:16 +00:00
|
|
|
vendorHash = "sha256-RXojFeT80oroBSweyb0eYo+LC/JTi1F3LmQ10XpnEXA=";
|
2018-10-17 21:23:56 +00:00
|
|
|
|
2022-04-25 22:08:54 +00:00
|
|
|
ldflags = [
|
2023-08-28 07:20:23 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/hetznercloud/cli/internal/version.Version=${version}"
|
2022-04-25 22:08:54 +00:00
|
|
|
];
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2022-04-25 22:08:54 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-02-02 23:36:02 +00:00
|
|
|
|
2018-09-03 15:21:43 +00:00
|
|
|
postInstall = ''
|
2022-07-06 12:28:46 +00:00
|
|
|
for shell in bash fish zsh; do
|
2020-06-27 09:20:00 +00:00
|
|
|
$out/bin/hcloud completion $shell > hcloud.$shell
|
|
|
|
installShellCompletion hcloud.$shell
|
|
|
|
done
|
2018-09-03 15:21:43 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-24 06:34:00 +00:00
|
|
|
meta = with lib; {
|
2023-04-12 11:47:46 +00:00
|
|
|
changelog = "https://github.com/hetznercloud/cli/releases/tag/v${version}";
|
2018-02-02 23:36:02 +00:00
|
|
|
description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
|
2019-07-30 10:12:24 +00:00
|
|
|
homepage = "https://github.com/hetznercloud/cli";
|
2023-10-24 06:34:00 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zauberpony techknowlogick ];
|
2018-02-02 23:36:02 +00:00
|
|
|
};
|
2020-06-27 09:20:00 +00:00
|
|
|
}
|