at 23.11-beta 36 lines 1.1 kB view raw
1{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv, Libsystem }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "procs"; 5 version = "0.14.3"; 6 7 src = fetchFromGitHub { 8 owner = "dalance"; 9 repo = "procs"; 10 rev = "v${version}"; 11 hash = "sha256-uVbYYJgxYATEmNrMuxA7RYDJWip/paWDCf5An1VGVDo="; 12 }; 13 14 cargoHash = "sha256-eaerc6cUF35XYFTNn0upydkOIC9M1BRweknrixIEvuk="; 15 16 nativeBuildInputs = [ installShellFiles ] 17 ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; 18 19 postInstall = '' 20 for shell in bash fish zsh; do 21 $out/bin/procs --gen-completion $shell 22 done 23 installShellCompletion procs.{bash,fish} --zsh _procs 24 ''; 25 26 buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv Libsystem ]; 27 28 meta = with lib; { 29 description = "A modern replacement for ps written in Rust"; 30 homepage = "https://github.com/dalance/procs"; 31 changelog = "https://github.com/dalance/procs/raw/v${version}/CHANGELOG.md"; 32 license = licenses.mit; 33 maintainers = with maintainers; [ Br1ght0ne sciencentistguy ]; 34 mainProgram = "procs"; 35 }; 36}