depot/third_party/nixpkgs/pkgs/tools/system/bottom/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

47 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "bottom";
version = "0.9.3";
src = fetchFromGitHub {
owner = "ClementTsang";
repo = pname;
rev = version;
hash = "sha256-hKgk2wIfFvYOKYo90rzGlntvRRWId4UUgSevY1KLhik=";
};
cargoHash = "sha256-2iMjxjObh3V+HM79y8hQF+i7eQ+sjNl3kDopCbCsSZg=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Foundation
];
doCheck = false;
postInstall = ''
installManPage target/tmp/bottom/manpage/btm.1
installShellCompletion \
target/tmp/bottom/completion/btm.{bash,fish} \
--zsh target/tmp/bottom/completion/_btm
'';
BTM_GENERATE = true;
meta = with lib; {
description = "A cross-platform graphical process/system monitor with a customizable interface";
homepage = "https://github.com/ClementTsang/bottom";
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ berbiche figsoda ];
mainProgram = "btm";
};
}