diff options
author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2025-05-10 23:22:48 +0300 |
---|---|---|
committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2025-05-10 23:26:13 +0300 |
commit | 2d2a921e998a8e68f227eb430b3a5409ecac46ac (patch) | |
tree | 2666251ce1c2a90f232306b2f498c081337e4fef /gnu/packages/admin.scm | |
parent | 770c9078faf9e5ea9e9dbbbd7573a5025c2f905f (diff) |
gnu: nmap: Update to 7.96.
* gnu/packages/admin.scm (nmap): Update to 7.96.
[inputs]: Remove lua, pcre, and python-2; add lua-5.4, pcre2, perl, and
python-wrapper.
[native-inputs]: Add python-pypa-build, python-setuptools, and python-wheel.
[arguments]: Use GEXPs. Remove "patch-Makefile" phase. Add
"patch-Makefile.in" phase. Update "install" phase.
Change-Id: I31da6982da6ced4489e6f330d5e7eeabe1e648cc
Diffstat (limited to 'gnu/packages/admin.scm')
-rw-r--r-- | gnu/packages/admin.scm | 106 |
1 files changed, 60 insertions, 46 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 8fee710c7f..541ef053f9 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -3744,14 +3744,14 @@ rules is done with the @code{auditctl} utility.") (define-public nmap (package (name "nmap") - (version "7.93") + (version "7.96") (source (origin (method url-fetch) (uri (string-append "https://nmap.org/dist/nmap-" version ".tar.bz2")) (sha256 (base32 - "0lb6s4nmmicfnc221mzgx2w51dcd4b2dhx22pabcqnp2jd3zxg2m")) + "12lcvyzfl1hblbklcss44dr92fr86w0z1y1a90yilv5n5x7pmblq")) (modules '((guix build utils))) (snippet '(begin @@ -3766,55 +3766,69 @@ rules is done with the @code{auditctl} utility.") (build-system gnu-build-system) (outputs '("out" "ndiff")) ; TODO Add zenmap output (arguments - `(#:configure-flags '("--without-zenmap") - #:phases - (modify-phases %standard-phases - (add-after 'configure 'patch-Makefile - (lambda _ - (substitute* "Makefile" - ;; Do not attempt to build lua. - (("build-dnet build-lua") "build-dnet")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (define (make out . args) - (apply invoke "make" - (string-append "prefix=" out) - args)) - (define (python-path dir) - (string-append dir "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages")) - (let ((out (assoc-ref outputs "out")) - (ndiff (assoc-ref outputs "ndiff"))) - (for-each mkdir-p (list out ndiff)) - (make out - "install-nmap" - "install-nse" - "install-ncat" - "install-nping") - (make ndiff "install-ndiff") - (wrap-program (string-append ndiff "/bin/ndiff") - `("GUIX_PYTHONPATH" prefix - (,(python-path ndiff))))))) - ;; These are the tests that do not require network access. - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" - "check-nse" - "check-ndiff" - "check-dns"))))) - ;; Nmap can't cope with out-of-source building. - #:out-of-source? #f)) + (list + #:configure-flags #~(list "--without-zenmap") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-Makefile.in + (lambda _ + (substitute* "Makefile.in" + (("\\$\\(PYTHON\\) -m build \\$\\(NDIFFDIR\\)/") + "$(PYTHON) -m build --wheel --no-isolation $(NDIFFDIR)/") + (("\\$\\(PYTHON\\) -m pip install \\$\\(NDIFFDIR\\).*") + (string-append "pip" + " --no-cache-dir" + " --no-input" + " install" + " --no-build-isolation" + " --no-deps" + " --prefix" + " $(prefix)" + " $(NDIFFDIR)/\n"))))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (make out . args) + (apply invoke "make" + (string-append "PYTHON=" + (search-input-file inputs "/bin/python")) + (string-append "CC=" #$(cc-for-target)) + (string-append "prefix=" out) + args)) + (define (python-path dir) + (string-append dir "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages")) + (let ((ndiff (assoc-ref outputs "ndiff"))) + (for-each mkdir-p (list #$output ndiff)) + (make #$output + "install-nmap" + "install-nse" + "install-ncat" + "install-nping") + (make ndiff "install-ndiff") + (wrap-program (string-append ndiff "/bin/ndiff") + `("GUIX_PYTHONPATH" prefix + (,(python-path ndiff))))))) + ;; These are the tests that do not require network access. + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" + "check-nse" + "check-ndiff"))))) + ;; Nmap can't cope with out-of-source building. + #:out-of-source? #f)) + (native-inputs (list python-pypa-build python-setuptools python-wheel)) (inputs (list bash-minimal ;for wrap-program libpcap - lua + lua-5.4 openssl-3.0 - pcre + pcre2 zlib ; for NSE compression - python-2)) ; for ndiff + perl + python-wrapper)) ; for ndiff (home-page "https://nmap.org/") (synopsis "Network discovery and security auditing tool") (description |