Merge pull request #111022 from danieldk/procs-completions
procs: add shell completions
This commit is contained in:
commit
3666a66ee0
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "procs";
|
pname = "procs";
|
||||||
@ -13,6 +13,15 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoSha256 = "sha256-ilSDLbPQnmhQcNbtKCpUNmyZY0JUY/Ksg0sj/t7veT0=";
|
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;
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user