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/tools/admin | |
parent | 86a911f4140e49e45cc204c5bbd6ff37e4e4e862 (diff) | |
download | nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar.gz nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar.bz2 nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar.lz nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar.xz nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.tar.zst nixlib-e0634a39a579ce3ee2da48e0ead421ebf49cccbf.zip |
procs: add shell completions
Diffstat (limited to 'pkgs/tools/admin')
-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 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; { |