2017-09-14 10:13:47 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, ncurses
|
|
|
|
, withGtk ? false, gtk2 ? null }:
|
2011-01-10 15:57:23 +00:00
|
|
|
|
2016-09-13 17:42:55 +00:00
|
|
|
assert withGtk -> gtk2 != null;
|
2015-03-23 11:54:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-09-14 10:13:47 +00:00
|
|
|
name="mtr-${version}";
|
|
|
|
version="0.92";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "traviscross";
|
|
|
|
repo = "mtr";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0ca2ml846cv0zzkpd8y7ah6i9b3czrr8wlxja3cray94ybwb294d";
|
2011-01-10 15:57:23 +00:00
|
|
|
};
|
|
|
|
|
2017-09-14 10:13:47 +00:00
|
|
|
preConfigure = ''
|
|
|
|
echo ${version} > .tarball-version
|
|
|
|
|
|
|
|
./bootstrap.sh
|
|
|
|
|
|
|
|
substituteInPlace Makefile.in --replace ' install-exec-hook' ""
|
|
|
|
'';
|
2017-06-20 20:15:20 +00:00
|
|
|
|
2017-09-14 10:13:47 +00:00
|
|
|
configureFlags = stdenv.lib.optionalString (!withGtk) "--without-gtk";
|
2011-01-10 15:57:23 +00:00
|
|
|
|
2017-03-13 04:22:29 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
|
2017-09-14 10:13:47 +00:00
|
|
|
buildInputs = [ ncurses ] ++ stdenv.lib.optional withGtk gtk2;
|
2017-03-13 04:22:29 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2014-04-14 17:56:52 +00:00
|
|
|
|
2017-09-14 10:13:47 +00:00
|
|
|
meta = with stdenv.lib; {
|
2011-01-10 15:57:23 +00:00
|
|
|
description = "A network diagnostics tool";
|
2017-09-14 10:13:47 +00:00
|
|
|
homepage = http://www.bitwizard.nl/mtr/;
|
|
|
|
license = licenses.gpl2;
|
2017-03-13 04:22:29 +00:00
|
|
|
maintainers = with maintainers; [ koral orivej raskin ];
|
2017-09-14 10:13:47 +00:00
|
|
|
platforms = platforms.unix;
|
2011-01-10 15:57:23 +00:00
|
|
|
};
|
2015-03-23 11:54:34 +00:00
|
|
|
}
|