nixpkgs/pkgs/tools/system/bottom/default.nix
2021-12-24 02:03:44 +00:00

53 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, DiskArbitration
, Foundation
, IOKit
, installShellFiles
, libiconv
}:
rustPlatform.buildRustPackage rec {
pname = "bottom";
version = "0.6.6";
src = fetchFromGitHub {
owner = "ClementTsang";
repo = pname;
rev = version;
sha256 = "sha256-nE718NA3oLkBTTjewypYyUVRgTm4xiDTui5kEPYYCBc=";
};
prePatch = ''
rm .cargo/config.toml
'';
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
DiskArbitration
Foundation
IOKit
libiconv
];
cargoSha256 = "sha256-M6LgriXjhxlnoky+TNU7Eb15M+uTgbVKk3g/Sk90xsg=";
doCheck = false;
postInstall = ''
installShellCompletion $releaseDir/build/bottom-*/out/btm.{bash,fish} --zsh $releaseDir/build/bottom-*/out/_btm
'';
meta = with lib; {
description = "A cross-platform graphical process/system monitor with a customizable interface";
homepage = "https://github.com/ClementTsang/bottom";
license = licenses.mit;
maintainers = with maintainers; [ berbiche ];
platforms = platforms.unix;
mainProgram = "btm";
};
}