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