···11+{ stdenv, fetchurl, ncurses }:
22+33+stdenv.mkDerivation rec {
44+ name = "ftop-1.0";
55+66+ src = fetchurl {
77+ url = "http://ftop.googlecode.com/files/${name}.tar.bz2";
88+ sha256 = "3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82";
99+ };
1010+1111+ buildInputs = [ ncurses ];
1212+1313+ patches = [
1414+ ./ftop-fix_buffer_overflow.patch
1515+ ./ftop-fix_printf_format.patch
1616+ ];
1717+ patchFlags = "-p0";
1818+1919+ postPatch = ''
2020+ substituteInPlace configure --replace "curses" "ncurses"
2121+ '';
2222+2323+ meta = with stdenv.lib; {
2424+ description = "Show progress of open files and file systems";
2525+ homepage = https://code.google.com/p/ftop/;
2626+ license = with licenses; gpl3Plus;
2727+ longDescription = ''
2828+ Ftop is to files what top is to processes. The progress of all open files
2929+ and file systems can be monitored. If run as a regular user, the set of
3030+ open files will be limited to those in that user's processes (which is
3131+ generally all that is of interest to the user).
3232+ As with top, the items are displayed in order from most to least active.
3333+ '';
3434+ maintainers = with maintainers; [ nckx ];
3535+ platforms = with platforms; linux;
3636+ };
3737+}