summary refs log tree commit diff
path: root/pkgs/tools/system/htop/default.nix
blob: 992067da50f4e9d44457f11148830d7dacfc2dee (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, python }:

stdenv.mkDerivation rec {
  name = "htop-${version}";
  version = "2.1.0";

  src = fetchurl {
    url = "http://hisham.hm/htop/releases/${version}/${name}.tar.gz";
    sha256 = "0j07z0xm2gj1vzvbgh4323k4db9mr7drd7gw95mmpqi61ncvwq1j";
  };

  nativeBuildInputs = [ python ];
  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 ];
  };
}