Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 38 lines 841 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "netselect"; 9 version = "0.4"; 10 11 src = fetchFromGitHub { 12 owner = "apenwarr"; 13 repo = "netselect"; 14 rev = "${pname}-${version}"; 15 sha256 = "1zncyvjzllrjbdvz7c50d1xjyhs9mwqfy92ndpfc5b3mxqslw4kx"; 16 }; 17 18 postPatch = '' 19 substituteInPlace netselect-apt \ 20 --replace "/usr/bin/" "" 21 ''; 22 23 makeFlags = [ "PREFIX=$(out)" ]; 24 25 installPhase = '' 26 runHook preInstall 27 install -Dm555 -t $out/bin netselect netselect-apt 28 install -Dm444 -t $out/share/man/man1 *.1 29 runHook postInstall 30 ''; 31 32 meta = with lib; { 33 homepage = "https://github.com/apenwarr/netselect"; 34 description = "Ultrafast intelligent parallelizing binary-search implementation of \"ping\""; 35 license = licenses.bsd3; 36 platforms = platforms.linux; 37 }; 38}