nixpkgs/pkgs/tools/admin/procs/default.nix
2021-09-04 19:53:22 +09:00

35 lines
969 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "procs";
version = "0.11.9";
src = fetchFromGitHub {
owner = "dalance";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zqRjMCyFT7knI1/zH+RF1pA/OKaDhJZLLjWJhfmqopE=";
};
cargoSha256 = "sha256-W/ZMDbHC1VsllTSxCt77n4eb8Xgfj9YNx5NG5u+D+qA=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/procs --completion $shell
done
installShellCompletion procs.{bash,fish} --zsh _procs
'';
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
meta = with lib; {
description = "A modern replacement for ps written in Rust";
homepage = "https://github.com/dalance/procs";
license = licenses.mit;
maintainers = with maintainers; [ dalance Br1ght0ne ];
platforms = with platforms; linux ++ darwin;
};
}