summary refs log tree commit diff
path: root/pkgs/tools/system/htop/default.nix
blob: 1b68273a570085f813585e89956eded1d3f38229 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, fetchurl, stdenv, ncurses,
IOKit, python3 }:

stdenv.mkDerivation rec {
  pname = "htop";
  version = "2.2.0";

  src = fetchurl {
    url = "https://hisham.hm/htop/releases/${version}/${pname}-${version}.tar.gz";
    sha256 = "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr";
  };

  nativeBuildInputs = [ python3 ];
  buildInputs =
    [ ncurses ] ++
    lib.optionals stdenv.isDarwin [ IOKit ];

  prePatch = ''
    patchShebangs scripts/MakeHeader.py
  '';

  meta = with stdenv.lib; {
    description = "An interactive process viewer for Linux";
    homepage = https://hisham.hm/htop/;
    license = licenses.gpl2Plus;
    platforms = with platforms; linux ++ freebsd ++ openbsd ++ darwin;
    maintainers = with maintainers; [ rob relrod ];
  };
}