2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, darwin, installShellFiles }:
|
2020-09-30 16:44:06 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bottom";
|
2021-01-31 04:04:38 +00:00
|
|
|
version = "0.5.7";
|
2020-09-30 16:44:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ClementTsang";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-01-31 04:04:38 +00:00
|
|
|
sha256 = "sha256-9L7FtYIaWSOwNQ8zOLvxjt51o8A5MqqfF/iIyJs2TJA=";
|
2020-09-30 16:44:06 +00:00
|
|
|
};
|
|
|
|
|
2020-12-20 01:57:09 +00:00
|
|
|
prePatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
2020-11-27 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.IOKit;
|
2020-09-30 16:44:06 +00:00
|
|
|
|
2021-01-31 04:04:38 +00:00
|
|
|
cargoSha256 = "sha256-4oH1A88Qn0c6hkE/1b6mTrEIph8xT98j+DkP9/5JALs=";
|
2020-09-30 16:44:06 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-27 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion $releaseDir/build/bottom-*/out/btm.{bash,fish} --zsh $releaseDir/build/bottom-*/out/_btm
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-30 16:44:06 +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;
|
|
|
|
};
|
|
|
|
}
|