1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "kubectx";
10 version = "0.9.5";
11
12 src = fetchFromGitHub {
13 owner = "ahmetb";
14 repo = "kubectx";
15 rev = "v${version}";
16 hash = "sha256-HVmtUhdMjbkyMpTgbsr5Mm286F9Q7zbc5rOxi7OBZEg=";
17 };
18
19 vendorHash = "sha256-3xetjviMuH+Nev12DB2WN2Wnmw1biIDAckUSGVRHQwM=";
20
21 nativeBuildInputs = [ installShellFiles ];
22
23 ldflags = [
24 "-s"
25 "-w"
26 "-X main.version=${version}"
27 ];
28
29 postInstall = ''
30 installShellCompletion completion/*
31 '';
32
33 meta = with lib; {
34 description = "Fast way to switch between clusters and namespaces in kubectl";
35 license = licenses.asl20;
36 homepage = "https://github.com/ahmetb/kubectx";
37 maintainers = with maintainers; [ jlesquembre ];
38 };
39}