summary refs log tree commit diff
path: root/pkgs/applications/networking/iptraf/default.nix
blob: 344af6a0312009a1c96f51ae0c7685a5500ecfec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{lib, stdenv, fetchurl, ncurses}:

stdenv.mkDerivation {
  name = "iptraf-3.0.1";

  src = fetchurl {
    url = "ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.1.tar.gz";
    sha256 = "12n059j9iihhpf6spmlaspqzxz3wqan6kkpnhmlj08jdijpnk84m";
  };

  hardeningDisable = [ "format" ];

  patchPhase = ''
    sed -i -e 's,#include <linux/if_tr.h>,#include <netinet/if_tr.h>,' src/*
  '';

  preConfigure = "cd src";

  installPhase = ''
    mkdir -p $out/bin
    cp iptraf $out/bin
  '';

  buildInputs = [ncurses];

  meta = {
    homepage = "http://iptraf.seul.org/";
    license = lib.licenses.gpl2Plus;
    description = "Console-based network statistics utility for Linux";
    platforms = lib.platforms.linux;
    broken = true; # required isdn headers have been removed from the linux kernel
  };
}