nixpkgs/pkgs/applications/networking/iptraf-ng/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

49 lines
1.9 KiB
Nix

{ lib, stdenv, fetchFromGitHub, ncurses }:
stdenv.mkDerivation rec {
version = "1.2.1";
pname = "iptraf-ng";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1f91w1bjaayr6ld95z2q55ny983bb0m05k1jrw2bcddvcihaiqb1";
};
buildInputs = [ ncurses ];
makeFlags = [
"DESTDIR=$(out)"
"prefix=/usr"
"sbindir=/bin"
];
hardeningDisable = [ "format" ];
meta = with lib; {
description = "A console-based network monitoring utility (fork of iptraf)";
longDescription = ''
IPTraf-ng is a console-based network monitoring utility. IPTraf-ng
gathers data like TCP connection packet and byte counts, interface
statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
station packet and byte counts. IPTraf-ng features include an IP traffic
monitor which shows TCP flag information, packet and byte counts, ICMP
details, OSPF packet types, and oversized IP packet warnings; interface
statistics showing IP, TCP, UDP, ICMP, non-IP and other IP packet counts,
IP checksum errors, interface activity and packet size counts; a TCP and
UDP service monitor showing counts of incoming and outgoing packets for
common TCP and UDP application ports, a LAN statistics module that
discovers active hosts and displays statistics about their activity; TCP,
UDP and other protocol display filters so you can view just the traffic
you want; logging; support for Ethernet, FDDI, ISDN, SLIP, PPP, and
loopback interfaces; and utilization of the built-in raw socket interface
of the Linux kernel, so it can be used on a wide variety of supported
network cards.
'';
homepage = "https://github.com/iptraf-ng/iptraf-ng";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ devhell ];
};
}