diff --git a/pkgs/tools/admin/procs/default.nix b/pkgs/tools/admin/procs/default.nix index 9ce66e3c2d71..c41393459087 100644 --- a/pkgs/tools/admin/procs/default.nix +++ b/pkgs/tools/admin/procs/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }: +{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }: rustPlatform.buildRustPackage rec { pname = "procs"; @@ -13,6 +13,15 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-ilSDLbPQnmhQcNbtKCpUNmyZY0JUY/Ksg0sj/t7veT0="; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + for shell in bash fish zsh; do + $out/bin/procs --completion $shell > procs.$shell + installShellCompletion procs.$shell + done + ''; + buildInputs = lib.optional stdenv.isDarwin Security; meta = with lib; {