mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 16:53:40 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
ncurses,
|
|
libpcap,
|
|
automake,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "iftop";
|
|
version = "1.0pre4";
|
|
|
|
src = fetchurl {
|
|
url = "http://ex-parrot.com/pdw/iftop/download/iftop-${version}.tar.gz";
|
|
sha256 = "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp";
|
|
};
|
|
|
|
# Explicitly link against libgcc_s, to work around the infamous
|
|
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
|
LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s";
|
|
|
|
preConfigure = ''
|
|
cp ${automake}/share/automake*/config.{sub,guess} config
|
|
'';
|
|
|
|
buildInputs = [
|
|
ncurses
|
|
libpcap
|
|
];
|
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
# gcc-10. Otherwise build fails as:
|
|
# ld: tui.o:/build/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash';
|
|
# iftop.o:/build/iftop-1.0pre4/ui_common.h:41: first defined here
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
passthru.tests = { inherit (nixosTests) iftop; };
|
|
|
|
meta = with lib; {
|
|
description = "Display bandwidth usage on a network interface";
|
|
longDescription = ''
|
|
iftop does for network usage what top(1) does for CPU usage. It listens
|
|
to network traffic on a named interface and displays a table of current
|
|
bandwidth usage by pairs of hosts.
|
|
'';
|
|
license = licenses.gpl2Plus;
|
|
homepage = "http://ex-parrot.com/pdw/iftop/";
|
|
platforms = platforms.unix;
|
|
maintainers = [ ];
|
|
mainProgram = "iftop";
|
|
};
|
|
}
|