2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv, Libsystem }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "procs";
|
|
version = "0.14.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dalance";
|
|
repo = "procs";
|
|
rev = "v${version}";
|
|
hash = "sha256-uVbYYJgxYATEmNrMuxA7RYDJWip/paWDCf5An1VGVDo=";
|
|
};
|
|
|
|
cargoHash = "sha256-eaerc6cUF35XYFTNn0upydkOIC9M1BRweknrixIEvuk=";
|
|
|
|
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 = "A 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";
|
|
};
|
|
}
|