2021-03-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "procs";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.13.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dalance";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-/xq1aLdr672v4iAXXLcu47QcsdbLErn3VN/w3sYo9y0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
cargoSha256 = "sha256-BykfUGKBiqr3DoYcqKpY3R84LAuJ19D94xnZcQGKwuI=";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
LIBCLANG_PATH = lib.optionals stdenv.isDarwin "${stdenv.cc.cc.lib}/lib/";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
2021-09-18 10:52:07 +00:00
|
|
|
$out/bin/procs --completion $shell
|
2021-02-05 17:12:51 +00:00
|
|
|
done
|
2021-09-18 10:52:07 +00:00
|
|
|
installShellCompletion procs.{bash,fish} --zsh _procs
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A modern replacement for ps written in Rust";
|
|
|
|
homepage = "https://github.com/dalance/procs";
|
2021-09-18 10:52:07 +00:00
|
|
|
changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne SuperSandro2000 sciencentistguy ];
|
|
|
|
broken = stdenv.isDarwin && stdenv.isx86_64;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|