2018-11-12 21:04:36 +00:00
|
|
|
{ stdenv, fetchFromGitHub }:
|
2007-08-31 12:14:05 +01:00
|
|
|
|
2018-11-12 21:04:36 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "netselect-${version}";
|
|
|
|
version = "0.4";
|
2018-09-04 21:28:32 +01:00
|
|
|
|
2018-11-12 21:04:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "apenwarr";
|
|
|
|
repo = "netselect";
|
|
|
|
rev = name;
|
|
|
|
sha256 = "1zncyvjzllrjbdvz7c50d1xjyhs9mwqfy92ndpfc5b3mxqslw4kx";
|
2007-08-31 12:14:05 +01:00
|
|
|
};
|
|
|
|
|
2018-11-12 21:04:36 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace netselect-apt \
|
|
|
|
--replace "/usr/bin/" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm555 -t $out/bin netselect netselect-apt
|
|
|
|
install -Dm444 -t $out/share/man/man1 *.1
|
|
|
|
runHook postInstall
|
2017-06-28 20:14:57 +01:00
|
|
|
'';
|
2018-09-04 21:28:32 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/apenwarr/netselect;
|
2007-08-31 12:14:05 +01:00
|
|
|
description = "An ultrafast intelligent parallelizing binary-search implementation of \"ping\"";
|
2018-09-04 21:28:32 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2007-08-31 12:14:05 +01:00
|
|
|
};
|
|
|
|
}
|