Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "hcloud";
|
|
version = "1.54.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hetznercloud";
|
|
repo = "cli";
|
|
tag = "v${version}";
|
|
hash = "sha256-PpCEdhEjfd7d8DdU2ABAjL8O98cLR20xWwhcESJK4uI=";
|
|
};
|
|
|
|
vendorHash = "sha256-tJwd/qLs0QvnjKi0B2NBTosGt7qCzJCHxZ5LYJB4vjA=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/hetznercloud/cli/internal/version.Version=${version}"
|
|
];
|
|
|
|
subPackages = [ "cmd/hcloud" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
for shell in bash fish zsh; do
|
|
$out/bin/hcloud completion $shell > hcloud.$shell
|
|
installShellCompletion hcloud.$shell
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/hetznercloud/cli/releases/tag/v${version}";
|
|
description = "Command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
|
|
mainProgram = "hcloud";
|
|
homepage = "https://github.com/hetznercloud/cli";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
zauberpony
|
|
techknowlogick
|
|
];
|
|
};
|
|
}
|