summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-01-03 20:35:12 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-01-03 20:38:52 +0100
commit6862e5c636a4626f2dcf380ad0a7593c437848d7 (patch)
tree6e1264a80bfedb2e8ac102174d1713695f0fa4f8 /pkgs
parent82419575aa66135e83971f92896435d87f206b5a (diff)
downloadnixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar.gz
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar.bz2
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar.lz
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar.xz
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.tar.zst
nixpkgs-6862e5c636a4626f2dcf380ad0a7593c437848d7.zip
dhcping: init at 1.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/networking/dhcping/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/networking/dhcping/default.nix b/pkgs/tools/networking/dhcping/default.nix
new file mode 100644
index 00000000000..53d87b2e3fa
--- /dev/null
+++ b/pkgs/tools/networking/dhcping/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl }:
+
+let version = "1.2"; in
+stdenv.mkDerivation {
+  name = "dhcping-${version}";
+
+  src = fetchurl {
+    sha256 = "0sk4sg3hn88n44dxikipf3ggfj3ixrp22asb7nry9p0bkfaqdvrj";
+    url = "http://www.mavetju.org/download/dhcping-${version}.tar.gz";
+  };
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    inherit version;
+    description = "Send DHCP request to find out if a DHCP server is running";
+    longDescription = ''
+      dhcping sends either a DHCPREQUEST or DHCPINFORM packet to the server
+      and waits for an answer. Then, if a DHCPREQUEST was send, it will send
+      a DHCPRELEASE back to the server.
+
+      This program should be installed setuid root or ran by root only, as it
+      requires the privileges to bind itself to port 68 (bootpc). Root
+      privileges are dropped as soon as the program has bound itself to that
+      port.
+    '';
+    homepage = http://www.mavetju.org/unix/general.php;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ nckx ];
+  };
+ }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 731089c20b5..ffbcf390405 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1291,6 +1291,8 @@ let
 
   dhcpcd = callPackage ../tools/networking/dhcpcd { };
 
+  dhcping = callPackage ../tools/networking/dhcping { };
+
   di = callPackage ../tools/system/di { };
 
   diffoscope = callPackage ../tools/misc/diffoscope {