2021-05-11 01:13:19 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-01-06 17:11:55 +00:00
|
|
|
, fetchFromGitHub
|
2021-05-11 01:13:19 +01:00
|
|
|
, installShellFiles
|
2023-01-06 17:11:55 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-09-18 20:58:14 +01:00
|
|
|
, bottom
|
|
|
|
, testers
|
2021-05-11 01:13:19 +01:00
|
|
|
}:
|
2020-09-30 17:44:06 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bottom";
|
2023-08-27 03:40:55 +01:00
|
|
|
version = "0.9.6";
|
2020-09-30 17:44:06 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ClementTsang";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-08-27 03:40:55 +01:00
|
|
|
hash = "sha256-czOYEZevZD7GfExmqwB7vhLXl6+etag1PjZFA2G9aGA=";
|
2020-09-30 17:44:06 +01:00
|
|
|
};
|
|
|
|
|
2023-08-27 03:40:55 +01:00
|
|
|
cargoHash = "sha256-RDOGf1jujZikcRXRtL71BUGgmZyt7vQOTk1LkKpXDuo=";
|
2020-12-20 01:57:09 +00:00
|
|
|
|
2020-11-27 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-05-11 01:13:19 +01:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-05-10 15:14:04 +01:00
|
|
|
darwin.apple_sdk_11_0.frameworks.Foundation
|
2021-05-11 01:13:19 +01:00
|
|
|
];
|
2020-09-30 17:44:06 +01:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-27 04:20:00 +00:00
|
|
|
postInstall = ''
|
2023-01-06 17:11:55 +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-27 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-06 17:11:55 +00:00
|
|
|
BTM_GENERATE = true;
|
|
|
|
|
2023-09-18 20:58:14 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = bottom;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-30 17:44:06 +01:00
|
|
|
description = "A cross-platform graphical process/system monitor with a customizable interface";
|
|
|
|
homepage = "https://github.com/ClementTsang/bottom";
|
2023-01-06 17:11:55 +00:00
|
|
|
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
|
2020-09-30 17:44:06 +01:00
|
|
|
license = licenses.mit;
|
2023-01-06 17:11:55 +00:00
|
|
|
maintainers = with maintainers; [ berbiche figsoda ];
|
2021-05-09 03:42:26 +01:00
|
|
|
mainProgram = "btm";
|
2020-09-30 17:44:06 +01:00
|
|
|
};
|
|
|
|
}
|