diff --git a/pkgs/by-name/ph/phraze/package.nix b/pkgs/by-name/ph/phraze/package.nix index f227669535c8..0159f2e5ec58 100644 --- a/pkgs/by-name/ph/phraze/package.nix +++ b/pkgs/by-name/ph/phraze/package.nix @@ -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";