nixpkgs/pkgs/applications/networking/cluster/cmctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2022-02-03 10:52:15 +00:00
buildGoModule rec {
2022-02-03 10:52:15 +00:00
pname = "cmctl";
2022-04-11 04:46:37 +00:00
version = "1.8.0";
2022-02-03 10:52:15 +00:00
src = fetchFromGitHub {
owner = "cert-manager";
repo = "cert-manager";
rev = "v${version}";
2022-04-11 04:46:37 +00:00
sha256 = "sha256-h7GyzjVrfyMHY7yuNmmsym6KGKCQr5R71gjPBTUeMCg=";
2022-02-03 10:52:15 +00:00
};
2022-04-11 04:46:37 +00:00
vendorSha256 = "sha256-UYw9WdQ6VwzuuiOsa1yovkLZG7NmLYSW51p8UhmQMeI=";
2022-02-03 10:52:15 +00:00
subPackages = [ "cmd/ctl" ];
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
mv $out/bin/ctl $out/bin/cmctl
installShellCompletion --cmd cmctl \
--bash <($out/bin/cmctl completion bash) \
--fish <($out/bin/cmctl completion fish) \
--zsh <($out/bin/cmctl completion zsh)
'';
meta = with lib; {
description = "A CLI tool for managing Cert-Manager service on Kubernetes clusters";
downloadPage = "https://github.com/cert-manager/cert-manager";
license = licenses.asl20;
homepage = "https://cert-manager.io/";
maintainers = with maintainers; [ superherointj ];
};
}