diff options
author | Daniël de Kok <me@danieldk.eu> | 2021-01-28 17:17:09 +0100 |
---|---|---|
committer | Daniël de Kok <me@danieldk.eu> | 2021-01-28 17:17:09 +0100 |
commit | e0634a39a579ce3ee2da48e0ead421ebf49cccbf (patch) | |
tree | 7502640aec8e71767e52539aec0ebc63493582b8 /pkgs | |
parent | 86a911f4140e49e45cc204c5bbd6ff37e4e4e862 (diff) |
procs: add shell completions
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/admin/procs/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/tools/admin/procs/default.nix b/pkgs/tools/admin/procs/default.nix index 9ce66e3c2d714..c413934590874 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; { |