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