mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "hcloud";
|
|
version = "1.69.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hetznercloud";
|
|
repo = "cli";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-YsfG24cbUXBred1hKZolQcUYaFCCOR2swELwiSfUheg=";
|
|
};
|
|
|
|
vendorHash = "sha256-2vEcJr0aHLTQFIb6gsutbZfQH+u+Ed/IP9Tdqqmspuk=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/hetznercloud/cli/internal/version.Version=${finalAttrs.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${finalAttrs.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
|
|
];
|
|
};
|
|
})
|