2021-03-25 08:39:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv }:
|
2019-05-08 18:01:20 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "procs";
|
2021-12-27 05:33:08 +00:00
|
|
|
version = "0.11.13";
|
2019-05-08 18:01:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dalance";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-27 05:33:08 +00:00
|
|
|
sha256 = "sha256-OgV4iqtGpia8l+GCySDD+aRIk1mNnJCB0OqZzITTj2I=";
|
2019-05-08 18:01:20 +01:00
|
|
|
};
|
|
|
|
|
2021-12-27 05:33:08 +00:00
|
|
|
cargoSha256 = "sha256-d5GsCzigR5A1pJnvs6rjqMJqUB+H52Gaa1SzkHK5X+Y=";
|
2019-05-08 18:01:20 +01:00
|
|
|
|
2021-01-28 16:17:09 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
2021-09-04 08:00:00 +01:00
|
|
|
$out/bin/procs --completion $shell
|
2021-01-28 16:17:09 +00:00
|
|
|
done
|
2021-09-04 08:00:00 +01:00
|
|
|
installShellCompletion procs.{bash,fish} --zsh _procs
|
2021-01-28 16:17:09 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-25 08:39:32 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
|
2019-05-08 18:01:20 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-08 18:01:20 +01:00
|
|
|
description = "A modern replacement for ps written in Rust";
|
|
|
|
homepage = "https://github.com/dalance/procs";
|
2021-09-04 08:00:00 +01:00
|
|
|
changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md";
|
2020-02-18 01:23:19 +00:00
|
|
|
license = licenses.mit;
|
2021-12-16 12:55:32 +00:00
|
|
|
maintainers = with maintainers; [ dalance Br1ght0ne SuperSandro2000 ];
|
2019-05-08 18:01:20 +01:00
|
|
|
};
|
|
|
|
}
|