mtr: 0.87 -> 0.92

+22 -16
+22 -16
pkgs/tools/networking/mtr/default.nix
··· 1 - {stdenv, fetchurl, autoreconfHook, pkgconfig, ncurses 2 - , withGtk ? false, gtk2 ? null}: 1 + { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, ncurses 2 + , withGtk ? false, gtk2 ? null }: 3 3 4 4 assert withGtk -> gtk2 != null; 5 5 6 - with stdenv.lib; 7 6 stdenv.mkDerivation rec { 8 - baseName="mtr"; 9 - version="0.87"; 10 - name="${baseName}-${version}"; 7 + name="mtr-${version}"; 8 + version="0.92"; 11 9 12 - src = fetchurl { 13 - url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz"; 14 - sha256 = "17zi99n8bdqrwrnbfyjn327jz4gxx287wrq3vk459c933p34ff8r"; 10 + src = fetchFromGitHub { 11 + owner = "traviscross"; 12 + repo = "mtr"; 13 + rev = "v${version}"; 14 + sha256 = "0ca2ml846cv0zzkpd8y7ah6i9b3czrr8wlxja3cray94ybwb294d"; 15 15 }; 16 16 17 - preConfigure = "substituteInPlace Makefile.in --replace ' install-exec-hook' ''"; 17 + preConfigure = '' 18 + echo ${version} > .tarball-version 18 19 19 - configureFlags = optionalString (!withGtk) "--without-gtk"; 20 + ./bootstrap.sh 21 + 22 + substituteInPlace Makefile.in --replace ' install-exec-hook' "" 23 + ''; 24 + 25 + configureFlags = stdenv.lib.optionalString (!withGtk) "--without-gtk"; 20 26 21 27 nativeBuildInputs = [ autoreconfHook pkgconfig ]; 22 28 23 - buildInputs = [ ncurses ] ++ optional withGtk gtk2; 29 + buildInputs = [ ncurses ] ++ stdenv.lib.optional withGtk gtk2; 24 30 25 31 enableParallelBuilding = true; 26 32 27 - meta = { 28 - homepage = http://www.bitwizard.nl/mtr/; 33 + meta = with stdenv.lib; { 29 34 description = "A network diagnostics tool"; 35 + homepage = http://www.bitwizard.nl/mtr/; 36 + license = licenses.gpl2; 30 37 maintainers = with maintainers; [ koral orivej raskin ]; 31 - platforms = platforms.unix; 32 - license = licenses.gpl2; 38 + platforms = platforms.unix; 33 39 }; 34 40 }