2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hcloud";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.44.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hetznercloud";
|
|
|
|
repo = "cli";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-Nzav7ESJAQHgQA8dR17Emvjsxk39Omi0UB5PMsrJmRA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
vendorHash = "sha256-/Ca7oVLdWIribKBVHGiWfLte+YcKzPGu2DzZ/lTvTQM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
ldflags = [
|
2023-10-09 19:29:22 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/hetznercloud/cli/internal/version.Version=${version}"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postInstall = ''
|
2022-07-14 12:49:19 +00:00
|
|
|
for shell in bash fish zsh; do
|
2020-07-18 16:06:22 +00:00
|
|
|
$out/bin/hcloud completion $shell > hcloud.$shell
|
|
|
|
installShellCompletion hcloud.$shell
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/hetznercloud/cli/releases/tag/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "hcloud";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/hetznercloud/cli";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zauberpony techknowlogick ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
}
|