nixpkgs/pkgs/by-name/he/hetzner-kube/package.nix

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

50 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-07-10 16:03:58 +00:00
buildGoModule rec {
pname = "hetzner-kube";
2020-03-14 06:36:24 +00:00
version = "0.5.1";
2018-07-10 16:03:58 +00:00
src = fetchFromGitHub {
owner = "xetys";
repo = "hetzner-kube";
2019-09-08 23:38:31 +00:00
rev = version;
2023-08-17 02:13:36 +00:00
hash = "sha256-XHvR+31yq0o3txMBHh2rCh2peDlG5Kh3hdl0LGm9D8c=";
2018-07-10 16:03:58 +00:00
};
2021-05-16 08:59:58 +00:00
patches = [
# Use $HOME instead of the OS user database.
# Upstream PR: https://github.com/xetys/hetzner-kube/pull/346
# Unfortunately, the PR patch does not apply against release.
./fix-home.patch
];
2023-08-17 02:13:36 +00:00
vendorHash = "sha256-sIjSu9U+uNc5dgt9Qg328W/28nX4F5d5zjUb7Y1xAso=";
2018-07-10 16:03:58 +00:00
doCheck = false;
2021-08-26 06:45:51 +00:00
ldflags = [
"-X github.com/xetys/hetzner-kube/cmd.version=${version}"
];
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
2021-05-16 08:59:58 +00:00
# Need a writable home, because it fails if unable to write config.
export HOME=$TMP
$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 = {
2018-07-10 16:03:58 +00:00
description = "CLI tool for provisioning Kubernetes clusters on Hetzner Cloud";
mainProgram = "hetzner-kube";
2020-03-14 06:36:24 +00:00
homepage = "https://github.com/xetys/hetzner-kube";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ eliasp ];
2018-07-10 16:03:58 +00:00
};
}