nixpkgs/pkgs/tools/admin/procs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.1 KiB
Nix
Raw Normal View History

2022-10-06 05:37:35 +00:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv, Libsystem }:
2019-05-08 17:01:20 +00:00
rustPlatform.buildRustPackage rec {
pname = "procs";
2023-05-21 22:07:49 +00:00
version = "0.14.0";
2019-05-08 17:01:20 +00:00
src = fetchFromGitHub {
owner = "dalance";
2023-05-21 22:07:49 +00:00
repo = "procs";
2019-05-08 17:01:20 +00:00
rev = "v${version}";
2023-05-21 22:07:49 +00:00
hash = "sha256-DoH9XxPRKGd+tex8MdbtkhM+V8C1wDMv/GZcB4aMCPc=";
2019-05-08 17:01:20 +00:00
};
2023-05-21 22:07:49 +00:00
cargoHash = "sha256-B+LpUErsvtLYn+Xvq4KNBpLR9WYe38yMWHUNsd9jIs8=";
2019-05-08 17:01:20 +00:00
2023-05-27 20:25:16 +00:00
nativeBuildInputs = [ installShellFiles ]
++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ];
2021-01-28 16:17:09 +00:00
postInstall = ''
for shell in bash fish zsh; do
2023-05-21 22:07:49 +00:00
$out/bin/procs --gen-completion $shell
2021-01-28 16:17:09 +00:00
done
2021-09-04 07:00:00 +00:00
installShellCompletion procs.{bash,fish} --zsh _procs
2021-01-28 16:17:09 +00:00
'';
2022-10-06 05:37:35 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv Libsystem ];
2019-05-08 17:01:20 +00:00
meta = with lib; {
2019-05-08 17:01:20 +00:00
description = "A modern replacement for ps written in Rust";
homepage = "https://github.com/dalance/procs";
2021-09-04 07:00:00 +00:00
changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md";
2020-02-18 01:23:19 +00:00
license = licenses.mit;
2023-07-23 17:30:22 +00:00
maintainers = with maintainers; [ Br1ght0ne sciencentistguy ];
mainProgram = "procs";
2019-05-08 17:01:20 +00:00
};
}