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-10-21 13:19:33 +01:00
|
|
|
version = "0.21.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-09-23 02:55:27 +01:00
|
|
|
sha256 = "sha256-Wu7+Xmb7ha3OG37DzLg2+/Sr9hB5oD3OIkC9h9Fa4QA=";
|
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;
|
|
|
|
};
|
|
|
|
}
|