2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }:
|
2020-03-07 18:55:51 +00:00
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-03-07 18:55:51 +00:00
|
|
|
pname = "kubie";
|
2021-06-07 05:25:48 +01:00
|
|
|
version = "0.15.0";
|
2020-03-07 18:55:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "sbstp";
|
|
|
|
repo = "kubie";
|
2021-06-07 05:25:48 +01:00
|
|
|
sha256 = "sha256-uNlKxcU1iCR4JzNfBatEeKMMdu9ZqvOqna0sGrcwK30=";
|
2020-03-07 18:55:51 +00:00
|
|
|
};
|
|
|
|
|
2021-06-07 05:25:48 +01:00
|
|
|
cargoSha256 = "sha256-4Xo17HlYvJLf90R0gS9EFJSJKmNHClXqAJTx9mY29KA=";
|
2020-03-07 18:55:51 +00:00
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2020-05-19 10:20:00 +01:00
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion completion/kubie.bash
|
2020-04-28 17:53:55 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-19 10:20:00 +01:00
|
|
|
description = "Shell independent context and namespace switcher for kubectl";
|
2020-03-07 18:55:51 +00:00
|
|
|
homepage = "https://github.com/sbstp/kubie";
|
|
|
|
license = with licenses; [ zlib ];
|
|
|
|
maintainers = with maintainers; [ illiusdope ];
|
|
|
|
};
|
|
|
|
}
|