2025-06-03 16:15:50 +02:00

47 lines
1.0 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "kubecfg";
version = "0.36.0";
src = fetchFromGitHub {
owner = "kubecfg";
repo = "kubecfg";
rev = "v${version}";
hash = "sha256-27xek+rLJK7jbqi9QDuWdA9KrO5QXUPAj9IRXVxiS8Q=";
};
vendorHash = "sha256-nAjm4AotRYZGRv05A+dviNq6Moo53Zo/bOiQf972ZF8=";
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)
'';
meta = {
description = "Tool for managing Kubernetes resources as code";
mainProgram = "kubecfg";
homepage = "https://github.com/kubecfg/kubecfg";
changelog = "https://github.com/kubecfg/kubecfg/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
benley
qjoly
];
};
}