571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, ncurses, libpcap }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nethogs";
|
|
version = "0.8.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "raboof";
|
|
repo = "nethogs";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-+yVMyGSBIBWYjA9jaGWvrcsNPbJ6S4ax9H1BhWHYUUU=";
|
|
};
|
|
|
|
buildInputs = [ ncurses libpcap ];
|
|
|
|
makeFlags = [ "VERSION=${version}" "nethogs" ];
|
|
|
|
installFlags = [ "PREFIX=$(out)" "sbin=$(out)/bin" ];
|
|
|
|
meta = with lib; {
|
|
description = "Small 'net top' tool, grouping bandwidth by process";
|
|
longDescription = ''
|
|
NetHogs is a small 'net top' tool. Instead of breaking the traffic down
|
|
per protocol or per subnet, like most tools do, it groups bandwidth by
|
|
process. NetHogs does not rely on a special kernel module to be loaded.
|
|
If there's suddenly a lot of network traffic, you can fire up NetHogs
|
|
and immediately see which PID is causing this. This makes it easy to
|
|
identify programs that have gone wild and are suddenly taking up your
|
|
bandwidth.
|
|
'';
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://github.com/raboof/nethogs#readme";
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.rycee ];
|
|
mainProgram = "nethogs";
|
|
};
|
|
}
|