Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 37 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "dhcping"; 9 version = "1.2"; 10 11 src = fetchurl { 12 sha256 = "0sk4sg3hn88n44dxikipf3ggfj3ixrp22asb7nry9p0bkfaqdvrj"; 13 url = "https://www.mavetju.org/download/dhcping-${version}.tar.gz"; 14 }; 15 16 enableParallelBuilding = true; 17 18 doCheck = true; 19 20 meta = with lib; { 21 description = "Send DHCP request to find out if a DHCP server is running"; 22 longDescription = '' 23 dhcping sends either a DHCPREQUEST or DHCPINFORM packet to the server 24 and waits for an answer. Then, if a DHCPREQUEST was send, it will send 25 a DHCPRELEASE back to the server. 26 27 This program should be installed setuid root or ran by root only, as it 28 requires the privileges to bind itself to port 68 (bootpc). Root 29 privileges are dropped as soon as the program has bound itself to that 30 port. 31 ''; 32 homepage = "http://www.mavetju.org/unix/general.php"; 33 license = licenses.bsd2; 34 platforms = platforms.unix; 35 mainProgram = "dhcping"; 36 }; 37}