1{stdenv, fetchurl, ncurses, autoconf
2, withGtk ? false, gtk ? null}:
3
4assert withGtk -> gtk != null;
5
6with stdenv.lib;
7stdenv.mkDerivation rec {
8 baseName="mtr";
9 version="0.86";
10 name="${baseName}-${version}";
11
12 src = fetchurl {
13 url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz";
14 sha256 = "01lcy89q3i9g4kz4liy6m7kcq1zyvmbc63rqidgw67341f94inf5";
15 };
16
17 configureFlags = optionalString (!withGtk) "--without-gtk";
18
19 buildInputs = [ autoconf ncurses ] ++ optional withGtk gtk;
20
21 meta = {
22 homepage = http://www.bitwizard.nl/mtr/;
23 description = "A network diagnostics tool";
24 maintainers = [ maintainers.koral maintainers.raskin ];
25 platforms = platforms.unix;
26 license = licenses.gpl2;
27 };
28}
29