1{ stdenv, fetchurl, ncurses }:
2
3stdenv.mkDerivation rec {
4 name = "ftop-${version}";
5 version = "1.0";
6
7 src = fetchurl {
8 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ftop/${name}.tar.bz2";
9 sha256 = "3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82";
10 };
11
12 buildInputs = [ ncurses ];
13
14 patches = [
15 ./ftop-fix_buffer_overflow.patch
16 ./ftop-fix_printf_format.patch
17 ];
18 patchFlags = [ "-p0" ];
19
20 postPatch = ''
21 substituteInPlace configure --replace "curses" "ncurses"
22 '';
23
24 meta = with stdenv.lib; {
25 description = "Show progress of open files and file systems";
26 homepage = https://code.google.com/archive/p/ftop/;
27 license = licenses.gpl3Plus;
28 longDescription = ''
29 ftop is to files what top is to processes. The progress of all open files
30 and file systems can be monitored. If run as a regular user, the set of
31 open files will be limited to those in that user's processes (which is
32 generally all that is of interest to the user).
33 As with top, the items are displayed in order from most to least active.
34 '';
35 platforms = platforms.linux;
36 };
37}