2022-10-06 18:32:54 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv, Libsystem }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "procs";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.14.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dalance";
|
2023-05-24 13:37:59 +00:00
|
|
|
repo = "procs";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Dp0XdARZrDrZ9QOv+V2ZKYV7J89t135ie5LSWz/KKHY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-EifER0wt2Nw7WrlVwc49tZHH/av4OkzTPYSzl9mVJI8=";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
2023-05-24 13:37:59 +00:00
|
|
|
$out/bin/procs --gen-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
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv Libsystem ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Modern replacement for ps written in Rust";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne sciencentistguy ];
|
|
|
|
mainProgram = "procs";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|