mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
42 lines
1.0 KiB
Nix
42 lines
1.0 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "hetzner-kube";
|
|
version = "0.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "xetys";
|
|
repo = "hetzner-kube";
|
|
rev = version;
|
|
sha256 = "1iqgpmljqx6rhmvsir2675waj78amcfiw08knwvlmavjgpxx2ysw";
|
|
};
|
|
|
|
vendorSha256 = "1jh2f66ys6rmrrwrf5zqfprgcvziyq6l4z8bfqwxgf1ysnxx525h";
|
|
|
|
doCheck = false;
|
|
|
|
buildFlagsArray = ''
|
|
-ldflags=
|
|
-X github.com/xetys/hetzner-kube/cmd.version=${version}
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = ''
|
|
$out/bin/hetzner-kube completion bash > hetzner-kube
|
|
$out/bin/hetzner-kube completion zsh > _hetzner-kube
|
|
installShellCompletion --zsh _hetzner-kube
|
|
installShellCompletion --bash hetzner-kube
|
|
'';
|
|
|
|
meta = {
|
|
description = "A CLI tool for provisioning Kubernetes clusters on Hetzner Cloud";
|
|
homepage = "https://github.com/xetys/hetzner-kube";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ eliasp ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|