2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-01-11 07:51:40 +00:00
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, installShellFiles
|
2023-01-11 07:51:40 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-10-09 19:29:22 +00:00
|
|
|
, bottom
|
|
|
|
, testers
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bottom";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.9.6";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ClementTsang";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-czOYEZevZD7GfExmqwB7vhLXl6+etag1PjZFA2G9aGA=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-RDOGf1jujZikcRXRtL71BUGgmZyt7vQOTk1LkKpXDuo=";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-05-24 13:37:59 +00:00
|
|
|
darwin.apple_sdk_11_0.frameworks.Foundation
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
postInstall = ''
|
2023-01-11 07:51:40 +00:00
|
|
|
installManPage target/tmp/bottom/manpage/btm.1
|
|
|
|
installShellCompletion \
|
|
|
|
target/tmp/bottom/completion/btm.{bash,fish} \
|
|
|
|
--zsh target/tmp/bottom/completion/_btm
|
2020-11-30 08:33:03 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
BTM_GENERATE = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = bottom;
|
|
|
|
};
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
|
2020-10-07 09:15:18 +00:00
|
|
|
license = licenses.mit;
|
2023-01-11 07:51:40 +00:00
|
|
|
maintainers = with maintainers; [ berbiche figsoda ];
|
2021-05-20 23:08:51 +00:00
|
|
|
mainProgram = "btm";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
}
|