2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2018-08-12 09:24:42 +00:00
|
|
|
|
2020-06-12 16:19:54 +00:00
|
|
|
buildGoModule rec {
|
2018-11-04 23:32:52 +00:00
|
|
|
pname = "kubectx";
|
2021-07-07 00:18:33 +00:00
|
|
|
version = "0.9.4";
|
2018-08-12 09:24:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ahmetb";
|
2018-11-04 23:32:52 +00:00
|
|
|
repo = pname;
|
2018-08-12 09:24:42 +00:00
|
|
|
rev = "v${version}";
|
2021-07-07 00:18:33 +00:00
|
|
|
sha256 = "sha256-WY0zFt76mvdzk/s2Rzqys8n+DVw6qg7V6Y8JncOUVCM=";
|
2018-08-12 09:24:42 +00:00
|
|
|
};
|
|
|
|
|
2022-08-02 23:08:08 +00:00
|
|
|
patches = [
|
|
|
|
./bump-golang-x-sys.patch
|
|
|
|
];
|
|
|
|
|
2023-09-13 04:44:46 +00:00
|
|
|
vendorHash = "sha256-p4KUBmJw6hWG1J2qwg4QBbh6Vo1cr/HQz0IqytIDJjU=";
|
2018-10-03 10:58:06 +00:00
|
|
|
|
2020-06-12 16:19:54 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-10-03 10:58:06 +00:00
|
|
|
|
2022-11-23 16:24:58 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2020-06-12 16:19:54 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion completion/*
|
2018-08-12 09:24:42 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2018-08-12 09:24:42 +00:00
|
|
|
description = "Fast way to switch between clusters and namespaces in kubectl!";
|
|
|
|
license = licenses.asl20;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ahmetb/kubectx";
|
2020-06-12 16:19:54 +00:00
|
|
|
maintainers = with maintainers; [ jlesquembre ];
|
2018-08-12 09:24:42 +00:00
|
|
|
};
|
|
|
|
}
|