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