nixpkgs/pkgs/development/tools/kubie/default.nix
2022-08-14 12:08:36 +00:00

30 lines
826 B
Nix

{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }:
rustPlatform.buildRustPackage rec {
pname = "kubie";
version = "0.18.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "sbstp";
repo = "kubie";
sha256 = "sha256-mAm3St5Uc715Y7PCs9mAIp+IYvEHGSoS5ASdWCNPq2A=";
};
cargoSha256 = "sha256-Z3W+XYhDriO+uWUIXAq3zv3GN0x9GFUc5C3ycrPz1e8=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
postInstall = ''
installShellCompletion completion/kubie.bash
'';
meta = with lib; {
description = "Shell independent context and namespace switcher for kubectl";
homepage = "https://github.com/sbstp/kubie";
license = with licenses; [ zlib ];
maintainers = with maintainers; [ illiusdope ];
};
}