nixpkgs/pkgs/os-specific/linux/ftop/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

38 lines
1.2 KiB
Nix

{ 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;
};
}