2021-03-25 09:39:32 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv }:
|
2019-05-08 19:01:20 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "procs";
|
2022-07-29 15:44:57 +02:00
|
|
|
version = "0.13.0";
|
2019-05-08 19:01:20 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dalance";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-07-29 15:44:57 +02:00
|
|
|
sha256 = "sha256-O5q+T6GO03Wf26CLyEgS45h7O38HsVZ+EJi8TgFcNaI=";
|
2019-05-08 19:01:20 +02:00
|
|
|
};
|
|
|
|
|
2022-07-29 15:44:57 +02:00
|
|
|
cargoSha256 = "sha256-JZsDKeiF/Mg4P6dLaN+8+TLHnCsB97d9TDn4cSdzZZE=";
|
2019-05-08 19:01:20 +02:00
|
|
|
|
2021-01-28 17:17:09 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-05-30 14:12:40 +02:00
|
|
|
LIBCLANG_PATH = lib.optionals stdenv.isDarwin "${stdenv.cc.cc.lib}/lib/";
|
|
|
|
|
2021-01-28 17:17:09 +01:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
2021-09-04 09:00:00 +02:00
|
|
|
$out/bin/procs --completion $shell
|
2021-01-28 17:17:09 +01:00
|
|
|
done
|
2021-09-04 09:00:00 +02:00
|
|
|
installShellCompletion procs.{bash,fish} --zsh _procs
|
2021-01-28 17:17:09 +01:00
|
|
|
'';
|
|
|
|
|
2021-03-25 09:39:32 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
|
2019-05-08 19:01:20 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-05-08 19:01:20 +02:00
|
|
|
description = "A modern replacement for ps written in Rust";
|
|
|
|
homepage = "https://github.com/dalance/procs";
|
2021-09-04 09:00:00 +02:00
|
|
|
changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md";
|
2020-02-18 02:23:19 +01:00
|
|
|
license = licenses.mit;
|
2022-05-30 14:12:40 +02:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne SuperSandro2000 sciencentistguy ];
|
|
|
|
broken = stdenv.isDarwin && stdenv.isx86_64;
|
2019-05-08 19:01:20 +02:00
|
|
|
};
|
|
|
|
}
|