evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ci / cilium-cli / package.nix
blobb8c6111d1465386985c4dc61f4a1505dce9a6183
2   lib,
3   buildGoModule,
4   cilium-cli,
5   fetchFromGitHub,
6   installShellFiles,
7   testers,
8 }:
10 buildGoModule rec {
11   pname = "cilium-cli";
12   version = "0.16.19";
14   src = fetchFromGitHub {
15     owner = "cilium";
16     repo = "cilium-cli";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-I5HC1H517oCizZf2mcHOKmgJqnvPjkNVfDy2/9Kkw44=";
19   };
21   nativeBuildInputs = [ installShellFiles ];
23   vendorHash = null;
25   subPackages = [ "cmd/cilium" ];
27   ldflags = [
28     "-s" "-w"
29     "-X=github.com/cilium/cilium-cli/defaults.CLIVersion=${version}"
30   ];
32   # Required to workaround install check error:
33   # 2022/06/25 10:36:22 Unable to start gops: mkdir /homeless-shelter: permission denied
34   HOME = "$TMPDIR";
36   postInstall = ''
37     installShellCompletion --cmd cilium \
38       --bash <($out/bin/cilium completion bash) \
39       --fish <($out/bin/cilium completion fish) \
40       --zsh <($out/bin/cilium completion zsh)
41   '';
43   passthru.tests.version = testers.testVersion {
44     package = cilium-cli;
45     command = "cilium version --client";
46     version = "${version}";
47   };
49   meta = {
50     description = "CLI to install, manage & troubleshoot Kubernetes clusters running Cilium";
51     homepage = "https://www.cilium.io/";
52     changelog = "https://github.com/cilium/cilium-cli/releases/tag/v${version}";
53     license = lib.licenses.asl20;
54     maintainers = with lib.maintainers; [ bryanasdev000 humancalico qjoly ];
55     mainProgram = "cilium";
56   };