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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-02-02 23:36:02 +00:00
buildGoModule rec {
pname = "hcloud";
2023-05-20 05:25:09 +00:00
version = "1.34.0";
2019-07-30 09:20:46 +00:00
2018-02-02 23:36:02 +00:00
src = fetchFromGitHub {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
2023-05-20 05:25:09 +00:00
sha256 = "sha256-9jiRCatd6rWbzrekBgBU6yW56xz3x0jyzdcpB7TI7zI=";
2018-02-02 23:36:02 +00:00
};
2023-05-20 05:25:09 +00:00
vendorHash = "sha256-Q9le/jbWkABlobn4qG/h48HEDYAPSkiy1N9YlUo6swQ=";
2018-10-17 21:23:56 +00:00
ldflags = [
"-s" "-w"
2022-04-26 13:21:52 +00:00
"-X github.com/hetznercloud/cli/internal/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
2018-02-02 23:36:02 +00:00
postInstall = ''
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-02-02 23:36:02 +00:00
meta = {
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";
homepage = "https://github.com/hetznercloud/cli";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.zauberpony ];
2018-02-02 23:36:02 +00:00
};
2020-06-27 09:20:00 +00:00
}