2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "kubie";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.21.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "sbstp";
|
|
|
|
repo = "kubie";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "sha256-fkIKb2fcml9E2sSJwhYPrqiThFgpNYh1CampQu8RT4k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
cargoHash = "sha256-zZwSLMuuaQ8Ht6Ux/wrqB/VEHCvBqTQGvg+RSr8+AiQ=";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion completion/kubie.bash
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "Shell independent context and namespace switcher for kubectl";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/sbstp/kubie";
|
|
|
|
license = with licenses; [ zlib ];
|
|
|
|
maintainers = with maintainers; [ illiusdope ];
|
|
|
|
};
|
|
|
|
}
|