From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 2/2] gnu: Add nmap. Date: Mon, 14 Mar 2016 18:50:56 -0400 Message-ID: References: Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afbKL-00085E-8u for guix-devel@gnu.org; Mon, 14 Mar 2016 18:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afbKH-0007k9-7Y for guix-devel@gnu.org; Mon, 14 Mar 2016 18:51:05 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:50943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afbKH-0007jt-4k for guix-devel@gnu.org; Mon, 14 Mar 2016 18:51:01 -0400 Received: from jasmine.lan (c-69-249-5-231.hsd1.pa.comcast.net [69.249.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C72FC0001C for ; Mon, 14 Mar 2016 18:50:59 -0400 (EDT) In-Reply-To: In-Reply-To: References: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/admin.scm (nmap): New variable. --- gnu/packages/admin.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 69802e9..2415a8d 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -64,7 +64,9 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages python) #:use-module (gnu packages man) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages pcre) + #:use-module (gnu packages lua)) (define-public dmd ;; Deprecated. Kept around "just in case." @@ -1497,3 +1499,55 @@ for writing audit records to the disk. Viewing the logs is done with the @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is done with the @code{auditctl} utility.") (license license:gpl2+))) + +(define-public nmap + (package + (name "nmap") + (version "7.01") + (source (origin + (method url-fetch) + (uri (string-append "https://nmap.org/dist/nmap-" + version ".tar.bz2")) + (sha256 + (base32 + "01bpc820fmjl1vd08a3j9fpa84psaa7c3cxc8wpzabms8ckcs7yg")) + (modules '((guix build utils))) + (snippet + '(map delete-file-recursively + ;; Remove bundled lua, pcap, and pcre libraries. + ;; FIXME: Removed bundled liblinear once packaged. + '("liblua" + "libpcap" + "libpcre" + ;; Remove pre-compiled binaries. + "mswin32"))))) + (build-system gnu-build-system) + ;; TODO: Build "zenmap" GUI interface in "gui" output. + (arguments + `(#:configure-flags + (list (string-append "--prefix=" (assoc-ref %outputs "out")) + "--without-ncat" + "--without-nmap-update" + "--without-zenmap"))) + (inputs + `(;("liblinear" ,liblinear) + ("libpcap" ,libpcap) + ("lua" ,lua) + ("openssl" ,openssl) + ("pcre" ,pcre) + ;; For 'ndiff' + ("python-2" ,python-2))) + (synopsis "Network discovery and auditing tool") + (description "Nmap is a network discovery and auditing tool. It provides +several features for probing computer networks, including host discovery, +service, and operating system detection. These features are extensible by +scripts that provide more advanced service detection, vulnerability detection, +and other features. Nmap is also capable of adapting to network conditions +including latency and congestion during a scan.") + (home-page "https://nmap.org") + ;; The nmap license is based on the GPL 2.0, with several exceptions and + ;; modifications. It is incompatible with the GPL 2.0. + ;; Nmap's source tarball bundles the source code of many of its + ;; dependencies. This package uses nmap's modified version of libdnet and + ;; liblinear, which both use a 3-clause BSD license. + (license (list license:nmap license:bsd-3)))) -- 2.6.3