Files
nixpkgs/pkgs/by-name/ku/kubecfg/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.1 KiB
Nix

{
lib,
stdenv,
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 = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
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
];
};
}