jwt-cli: install shell completion
This commit is contained in:
parent
fcc28ac90a
commit
efc32e7a1c
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
|
||||
{ lib, stdenv, fetchFromGitHub, installShellFiles, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "jwt-cli";
|
||||
@ -13,8 +13,17 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-DXyjdwVJUQpOz/Pctl35D00oSgrfehUg8wYyLdttiew=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd jwt \
|
||||
--bash <($out/bin/jwt completion bash) \
|
||||
--fish <($out/bin/jwt completion fish) \
|
||||
--zsh <($out/bin/jwt completion zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/jwt --version > /dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user