2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2007-08-31 13:14:05 +02:00
|
|
|
|
2018-11-12 22:04:36 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "netselect";
|
2018-11-12 22:04:36 +01:00
|
|
|
version = "0.4";
|
2018-09-04 22:28:32 +02:00
|
|
|
|
2018-11-12 22:04:36 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "apenwarr";
|
|
|
|
repo = "netselect";
|
2019-08-15 14:41:18 +02:00
|
|
|
rev = "${pname}-${version}";
|
2018-11-12 22:04:36 +01:00
|
|
|
sha256 = "1zncyvjzllrjbdvz7c50d1xjyhs9mwqfy92ndpfc5b3mxqslw4kx";
|
2007-08-31 13:14:05 +02:00
|
|
|
};
|
|
|
|
|
2018-11-12 22:04:36 +01: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 21:14:57 +02:00
|
|
|
'';
|
2018-09-04 22:28:32 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/apenwarr/netselect";
|
2007-08-31 13:14:05 +02:00
|
|
|
description = "An ultrafast intelligent parallelizing binary-search implementation of \"ping\"";
|
2018-09-04 22:28:32 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2007-08-31 13:14:05 +02:00
|
|
|
};
|
|
|
|
}
|