mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
43 lines
1010 B
Nix
43 lines
1010 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "kubecfg";
|
|
version = "0.34.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kubecfg";
|
|
repo = "kubecfg";
|
|
rev = "v${version}";
|
|
hash = "sha256-zy7SuJ5ChR09CvZ362z6ZDRd/eIyqg06fpv+JP7C4T0=";
|
|
};
|
|
|
|
vendorHash = "sha256-TDXZy2I1sxMmtHiE5l9wgW1kJolFYsV5Otv3xfoErWM=";
|
|
|
|
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 = with lib; {
|
|
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 = licenses.asl20;
|
|
maintainers = with maintainers; [ benley qjoly ];
|
|
};
|
|
}
|