2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
|
|
|
, IOKit
|
|
|
|
, installShellFiles
|
|
|
|
, libiconv
|
|
|
|
}:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bottom";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.6.8";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ClementTsang";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-zmiYVLaXKHH+MObO75wOiGkDetKy4bVLe7IAqiO2ER8=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
prePatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
DiskArbitration
|
|
|
|
Foundation
|
|
|
|
IOKit
|
|
|
|
libiconv
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
cargoSha256 = "sha256-GMG6YBm/jA5D7wxC2gczMn/6Lkqiq/toSPNf86kgOys=";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion $releaseDir/build/bottom-*/out/btm.{bash,fish} --zsh $releaseDir/build/bottom-*/out/_btm
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 09:15:18 +00:00
|
|
|
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;
|
2021-05-20 23:08:51 +00:00
|
|
|
mainProgram = "btm";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
}
|