2020-05-19 10:20:00 +01:00
|
|
|
{ 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";
|
2020-05-19 10:15:47 +01:00
|
|
|
version = "0.9.1";
|
2020-03-07 18:55:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "sbstp";
|
|
|
|
repo = "kubie";
|
2020-05-19 10:15:47 +01:00
|
|
|
sha256 = "0q1dxry10iaf7zx6vyr0da4ihqx7l8dlyhlqm8qqfz913h2wam8c";
|
2020-03-07 18:55:51 +00:00
|
|
|
};
|
|
|
|
|
2020-05-19 10:15:47 +01:00
|
|
|
cargoSha256 = "13zs2xz3s4732zxsimg7b22d9707ln4gpscznxi13cjkf5as9gbz";
|
2020-03-07 18:55:51 +00:00
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2020-05-19 10:20:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion completion/kubie.bash
|
2020-04-28 17:53:55 +01:00
|
|
|
'';
|
|
|
|
|
2020-03-07 18:55:51 +00:00
|
|
|
meta = with stdenv.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 ];
|
|
|
|
};
|
|
|
|
}
|