zoekt: 3.7.2-2-unstable-2024-10-24 -> 3.7.2-2-unstable-2024-12-09 (#363818)
[NixPkgs.git] / pkgs / tools / system / bottom / default.nix
blobf042b7067f4ec20421ab8cd4c31f7e4a9c739b88
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   installShellFiles,
6   stdenv,
7   darwin,
8   bottom,
9   testers,
12 rustPlatform.buildRustPackage rec {
13   pname = "bottom";
14   version = "0.10.2";
16   src = fetchFromGitHub {
17     owner = "ClementTsang";
18     repo = pname;
19     rev = version;
20     hash = "sha256-hm0Xfd/iW+431HflvZErjzeZtSdXVb/ReoNIeETJ5Ik=";
21   };
23   cargoHash = "sha256-FQbJx6ijX8kE4qxT7OQ7FwxLKJB5/moTKhBK0bfvBas=";
25   nativeBuildInputs = [ installShellFiles ];
27   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
28     darwin.apple_sdk_11_0.frameworks.Foundation
29   ];
31   doCheck = false;
33   postInstall = ''
34     installManPage target/tmp/bottom/manpage/btm.1
35     installShellCompletion \
36       target/tmp/bottom/completion/btm.{bash,fish} \
37       --zsh target/tmp/bottom/completion/_btm
39     install -Dm444 desktop/bottom.desktop -t $out/share/applications
40   '';
42   BTM_GENERATE = true;
44   passthru.tests.version = testers.testVersion {
45     package = bottom;
46   };
48   meta = with lib; {
49     description = "Cross-platform graphical process/system monitor with a customizable interface";
50     homepage = "https://github.com/ClementTsang/bottom";
51     changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
52     license = licenses.mit;
53     maintainers = with maintainers; [
54       berbiche
55       figsoda
56     ];
57     mainProgram = "btm";
58   };