2017-03-13 05:22:29 +01:00
|
|
|
{stdenv, fetchurl, autoreconfHook, pkgconfig, ncurses
|
2016-09-13 19:42:55 +02:00
|
|
|
, withGtk ? false, gtk2 ? null}:
|
2011-01-10 16:57:23 +01:00
|
|
|
|
2016-09-13 19:42:55 +02:00
|
|
|
assert withGtk -> gtk2 != null;
|
2015-03-23 12:54:34 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName="mtr";
|
2017-03-13 05:22:29 +01:00
|
|
|
version="0.87";
|
2015-03-23 12:54:34 +01:00
|
|
|
name="${baseName}-${version}";
|
2017-03-13 05:22:29 +01:00
|
|
|
|
2015-03-23 12:54:34 +01:00
|
|
|
src = fetchurl {
|
2011-01-10 16:57:23 +01:00
|
|
|
url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz";
|
2017-03-13 05:22:29 +01:00
|
|
|
sha256 = "17zi99n8bdqrwrnbfyjn327jz4gxx287wrq3vk459c933p34ff8r";
|
2011-01-10 16:57:23 +01:00
|
|
|
};
|
|
|
|
|
2017-06-20 22:15:20 +02:00
|
|
|
preConfigure = "substituteInPlace Makefile.in --replace ' install-exec-hook' ''";
|
|
|
|
|
2015-03-23 12:54:34 +01:00
|
|
|
configureFlags = optionalString (!withGtk) "--without-gtk";
|
2011-01-10 16:57:23 +01:00
|
|
|
|
2017-03-13 05:22:29 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ] ++ optional withGtk gtk2;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2014-04-14 19:56:52 +02:00
|
|
|
|
2011-01-10 16:57:23 +01:00
|
|
|
meta = {
|
2015-03-23 12:54:34 +01:00
|
|
|
homepage = http://www.bitwizard.nl/mtr/;
|
2011-01-10 16:57:23 +01:00
|
|
|
description = "A network diagnostics tool";
|
2017-03-13 05:22:29 +01:00
|
|
|
maintainers = with maintainers; [ koral orivej raskin ];
|
2015-03-23 12:54:34 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2;
|
2011-01-10 16:57:23 +01:00
|
|
|
};
|
2015-03-23 12:54:34 +01:00
|
|
|
}
|