2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2007-08-31 12:14:05 +01:00
|
|
|
|
2018-11-12 21:04:36 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "netselect";
|
2018-11-12 21:04:36 +00:00
|
|
|
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";
|
2019-08-15 13:41:18 +01:00
|
|
|
rev = "${pname}-${version}";
|
2018-11-12 21:04:36 +00:00
|
|
|
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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|