summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ftop/default.nix
blob: abd6d788461982dce928a3d97efd883d23c608a3 (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
30
31
32
33
34
35
36
37
{ lib, stdenv, fetchurl, ncurses }:

stdenv.mkDerivation rec {
  pname = "ftop";
  version = "1.0";

  src = fetchurl {
    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ftop/${pname}-${version}.tar.bz2";
    sha256 = "3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82";
  };

  buildInputs = [ ncurses ];

  patches = [
    ./ftop-fix_buffer_overflow.patch
    ./ftop-fix_printf_format.patch
  ];
  patchFlags = [ "-p0" ];

  postPatch = ''
    substituteInPlace configure --replace "curses" "ncurses"
  '';

  meta = with lib; {
    description = "Show progress of open files and file systems";
    homepage = "https://code.google.com/archive/p/ftop/";
    license = licenses.gpl3Plus;
    longDescription = ''
      ftop is to files what top is to processes. The progress of all open files
      and file systems can be monitored. If run as a regular user, the set of
      open files will be limited to those in that user's processes (which is
      generally all that is of interest to the user).
      As with top, the items are displayed in order from most to least active.
    '';
    platforms = platforms.linux;
  };
}