phraze: install man page and shell completions

This commit is contained in:
Donovan Glover 2024-07-31 16:20:12 -04:00
parent 4c5f6a1636
commit b6fdaa940f
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -5,6 +5,7 @@
nix-update-script,
phraze,
rustPlatform,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
@ -22,6 +23,8 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-jsQlcGRZqa4HHUS3Xc9OZUbI6pHalt9A3fVaz+Th1l0=";
nativeBuildInputs = [ installShellFiles ];
passthru = {
updateScript = nix-update-script { };
tests = {
@ -29,6 +32,15 @@ rustPlatform.buildRustPackage rec {
};
};
postInstall = ''
installManPage target/man/phraze.1
installShellCompletion --cmd phraze \
--bash target/completions/phraze.bash \
--fish target/completions/phraze.fish \
--zsh target/completions/_phraze
'';
meta = {
description = "Generate random passphrases";
homepage = "https://github.com/sts10/phraze";