blob: 6ae9b8eef5a1d729101788f31c913a576afd9af6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "cilium-cli";
version = "0.16.9";
src = fetchFromGitHub {
owner = "cilium";
repo = pname;
rev = "v${version}";
hash = "sha256-aER0VLYkHV0mPM4uBaKLPVmQ+Re5KUm8/01l87wMnF8=";
};
vendorHash = null;
subPackages = [ "cmd/cilium" ];
ldflags = [
"-s" "-w"
"-X github.com/cilium/cilium-cli/defaults.CLIVersion=${version}"
];
# Required to workaround install check error:
# 2022/06/25 10:36:22 Unable to start gops: mkdir /homeless-shelter: permission denied
HOME = "$TMPDIR";
doInstallCheck = true;
installCheckPhase = ''
$out/bin/cilium version --client | grep ${version} > /dev/null
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd cilium \
--bash <($out/bin/cilium completion bash) \
--fish <($out/bin/cilium completion fish) \
--zsh <($out/bin/cilium completion zsh)
'';
meta = {
changelog = "https://github.com/cilium/cilium-cli/releases/tag/v${version}";
description = "CLI to install, manage & troubleshoot Kubernetes clusters running Cilium";
license = lib.licenses.asl20;
homepage = "https://www.cilium.io/";
maintainers = with lib.maintainers; [ bryanasdev000 humancalico qjoly superherointj ];
mainProgram = "cilium";
};
}
|