depot/third_party/nixpkgs/pkgs/tools/networking/netselect/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

34 lines
834 B
Nix

{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "netselect";
version = "0.4";
src = fetchFromGitHub {
owner = "apenwarr";
repo = "netselect";
rev = "${pname}-${version}";
sha256 = "1zncyvjzllrjbdvz7c50d1xjyhs9mwqfy92ndpfc5b3mxqslw4kx";
};
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
'';
meta = with lib; {
homepage = "https://github.com/apenwarr/netselect";
description = "Ultrafast intelligent parallelizing binary-search implementation of \"ping\"";
license = licenses.bsd3;
platforms = platforms.linux;
};
}