depot/third_party/nixpkgs/pkgs/tools/admin/procs/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

36 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv, Libsystem }:
rustPlatform.buildRustPackage rec {
pname = "procs";
version = "0.14.5";
src = fetchFromGitHub {
owner = "dalance";
repo = "procs";
rev = "v${version}";
hash = "sha256-9kxJrvlaEoEkPPoU4/9IlX2TvDUG9VZwtb4a3N9rAsc=";
};
cargoHash = "sha256-2g+6FmcO4t9tjLq7xkBaLAgbzQoBgskr8csM/1tHbWI=";
nativeBuildInputs = [ installShellFiles ]
++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/procs --gen-completion $shell
done
installShellCompletion procs.{bash,fish} --zsh _procs
'';
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv Libsystem ];
meta = with lib; {
description = "Modern replacement for ps written in Rust";
homepage = "https://github.com/dalance/procs";
changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne sciencentistguy ];
mainProgram = "procs";
};
}