2021-10-21 13:19:33 +01:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2017-10-03 02:26:39 +01:00
|
|
|
|
2021-10-21 13:19:33 +01:00
|
|
|
buildGoPackage rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "kubecfg";
|
2021-11-03 07:58:50 +00:00
|
|
|
version = "0.22.0";
|
2017-10-03 02:26:39 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-06-26 19:57:37 +01:00
|
|
|
owner = "bitnami";
|
2017-10-03 02:26:39 +01:00
|
|
|
repo = "kubecfg";
|
|
|
|
rev = "v${version}";
|
2021-11-03 07:58:50 +00:00
|
|
|
sha256 = "sha256-8U/A4F4DboS46ftpuk5fQGT2Y0V+X0y0L3/o4x8qpnY=";
|
2017-10-03 02:26:39 +01:00
|
|
|
};
|
|
|
|
|
2019-06-26 19:57:37 +01:00
|
|
|
goPackagePath = "github.com/bitnami/kubecfg";
|
2017-10-03 02:26:39 +01:00
|
|
|
|
2021-10-20 10:01:26 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
|
2021-10-20 09:37:40 +01:00
|
|
|
|
2021-10-21 13:19:33 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd kubecfg \
|
|
|
|
--bash <($out/bin/kubecfg completion --shell=bash) \
|
|
|
|
--zsh <($out/bin/kubecfg completion --shell=zsh)
|
|
|
|
'';
|
|
|
|
|
2017-10-03 02:26:39 +01:00
|
|
|
meta = {
|
|
|
|
description = "A tool for managing Kubernetes resources as code";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bitnami/kubecfg";
|
2017-10-03 02:26:39 +01:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ benley ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|