evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / cm / cmctl / package.nix
blobb103450942c759ac0d62c8ff03cd87bf798f8984
1 { lib
2 , stdenv
3 , buildGoModule
4 , fetchFromGitHub
5 , installShellFiles
6 , nix-update-script
7 }:
9 buildGoModule rec {
10   pname = "cmctl";
11   version = "1.14.7";
13   src = fetchFromGitHub {
14     owner = "cert-manager";
15     repo = "cert-manager";
16     rev = "v${version}";
17     hash = "sha256-ZvrR8k1jiyAMUKM9VA6vKH2uhMKnd22OQe08CIlxXjs=";
18   };
20   sourceRoot = "${src.name}/cmd/ctl";
22   vendorHash = "sha256-qaSzAPNVe25Fbbfqy0OFFnMJ21IlWuoJKwnT7y2wmOs=";
24   ldflags = [
25     "-s"
26     "-w"
27     "-X github.com/cert-manager/cert-manager/cmd/ctl/pkg/build.name=cmctl"
28     "-X github.com/cert-manager/cert-manager/cmd/ctl/pkg/build/commands.registerCompletion=true"
29     "-X github.com/cert-manager/cert-manager/pkg/util.AppVersion=v${version}"
30     "-X github.com/cert-manager/cert-manager/pkg/util.AppGitCommit=${src.rev}"
31   ];
33   nativeBuildInputs = [
34     installShellFiles
35   ];
37   # Trusted by this computer: no: x509: “cert-manager” certificate is not trusted
38   doCheck = !stdenv.hostPlatform.isDarwin;
40   postInstall = ''
41     mv $out/bin/ctl $out/bin/cmctl
42   '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
43     installShellCompletion --cmd cmctl \
44       --bash <($out/bin/cmctl completion bash) \
45       --fish <($out/bin/cmctl completion fish) \
46       --zsh <($out/bin/cmctl completion zsh)
47   '';
49   passthru.updateScript = nix-update-script { };
51   meta = with lib; {
52     description = "CLI tool for managing cert-manager service on Kubernetes clusters";
53     mainProgram = "cmctl";
54     longDescription = ''
55       cert-manager adds certificates and certificate issuers as resource types
56       in Kubernetes clusters, and simplifies the process of obtaining, renewing
57       and using those certificates.
59       It can issue certificates from a variety of supported sources, including
60       Let's Encrypt, HashiCorp Vault, and Venafi as well as private PKI, and it
61       ensures certificates remain valid and up to date, attempting to renew
62       certificates at an appropriate time before expiry.
63     '';
64     downloadPage = "https://github.com/cert-manager/cert-manager";
65     license = licenses.asl20;
66     homepage = "https://cert-manager.io/";
67     maintainers = with maintainers; [ joshvanl ];
68   };