summary refs log tree commit diff
path: root/pkgs/tools/networking/mtr/default.nix
blob: af5155695f48cc39ae09f6a2c190cb28304aef43 (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
{stdenv, fetchurl, ncurses, autoconf
, withGtk ? false, gtk ? null}:

assert withGtk -> gtk != null;

with stdenv.lib;
stdenv.mkDerivation rec {
  baseName="mtr";
  version="0.86";
  name="${baseName}-${version}";
  
  src = fetchurl {
    url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz";
    sha256 = "01lcy89q3i9g4kz4liy6m7kcq1zyvmbc63rqidgw67341f94inf5";
  };

  configureFlags = optionalString (!withGtk) "--without-gtk";

  buildInputs = [ autoconf ncurses ] ++ optional withGtk gtk;

  meta = {
    homepage = http://www.bitwizard.nl/mtr/;
    description = "A network diagnostics tool";
    maintainers = [ maintainers.koral maintainers.raskin ];
    platforms = platforms.unix;
    license = licenses.gpl2;
  };
}