3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/cluster/kubecfg/default.nix

34 lines
897 B
Nix
Raw Normal View History

{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
2017-10-03 02:26:39 +01:00
buildGoPackage rec {
2019-08-13 22:52:01 +01:00
pname = "kubecfg";
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
ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
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";
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;
};
}