3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/admin/procs/default.nix
2021-03-25 04:39:32 -04:00

35 lines
968 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "procs";
version = "0.11.4";
src = fetchFromGitHub {
owner = "dalance";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jqcI0ne6fZkgr4bWJ0ysVNvB7q9ErYbsmZoXI38XUng=";
};
cargoSha256 = "sha256-0s5MeWX+rXTyftwg6sReNMRgBzhUMIdHu5buKwg1Yi4=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/procs --completion $shell > procs.$shell
installShellCompletion procs.$shell
done
'';
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
meta = with lib; {
description = "A modern replacement for ps written in Rust";
homepage = "https://github.com/dalance/procs";
license = licenses.mit;
maintainers = with maintainers; [ dalance Br1ght0ne ];
platforms = with platforms; linux ++ darwin;
};
}