gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / search.scm
index e9e7481..0d603ad 100644 (file)
@@ -3,8 +3,9 @@
 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
+;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 
 (define-module (gnu packages search)
   #:use-module ((guix licenses)
-                #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11))
+                #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages check)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages less)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml))
 (define-public xapian
   (package
     (name "xapian")
-    (version "1.4.5")
+    (version "1.4.18")
     ;; Note: When updating Xapian, remember to update xapian-bindings below.
     (source (origin
               (method url-fetch)
               (uri (string-append "https://oligarchy.co.uk/xapian/" version
                                   "/xapian-core-" version ".tar.xz"))
               (sha256
-               (base32 "0axhqrj202hbll9mcx1qdm8gsqj19216w3z02gyjbycxvr9gkdc5"))))
+               (base32 "0xsb4ihf3p767f0zx9p4janwni6r9sg5j6lry0002i8hmnsdnv8r"))))
     (build-system gnu-build-system)
     (inputs `(("zlib" ,zlib)
-              ("util-linux" ,util-linux)))
+              ("util-linux" ,util-linux "lib")))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -91,7 +98,7 @@ rich set of boolean query operators.")
                                   "/xapian-bindings-" version ".tar.xz"))
               (sha256
                (base32
-                "0cwx39764w24xd25w271had4w78lnw1dgz36yvlw1g3i19rqcy34"))))
+                "13ziql8027glgihgvnbsa75vkcn82g83mbihj60zf0njj170clpy"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-python3")
@@ -101,14 +108,39 @@ rich set of boolean query operators.")
                             "/lib/python" ,(version-major+minor
                                             (package-version python))
                             "/site-packages/xapian"))))
+    (native-inputs
+     `(("python-sphinx" ,python-sphinx))) ;for documentation
     (inputs
      `(("python" ,python)
-       ("python-sphinx" ,python-sphinx) ; for documentation
        ("xapian" ,xapian)
        ("zlib" ,zlib)))
     (synopsis "Python bindings for the Xapian search engine library")
     (license gpl2+)))
 
+(define-public perl-search-xapian
+  (package
+    (name "perl-search-xapian")
+    (version "1.2.25.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/O/OL/OLLY/"
+                           "Search-Xapian-" version ".tar.gz"))
+       (sha256
+        (base32 "1pbl8pbgmbs3i8yik4p63g4pd9bhn0dp3d7l667dkvw0kccl66c7"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-devel-leak" ,perl-devel-leak)))
+    (inputs
+     `(("xapian" ,xapian)))
+    (home-page "https://metacpan.org/release/Search-Xapian")
+    (synopsis "Perl XS frontend to the Xapian C++ search library")
+    (description
+     "Search::Xapian wraps most methods of most Xapian classes.  The missing
+classes and methods should be added in the future.  It also provides a
+simplified, more 'perlish' interface to some common operations.")
+    (license perl-license)))
+
 (define-public libtocc
   (package
     (name "libtocc")
@@ -220,7 +252,7 @@ for parsing HTML files.")
      `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                               (assoc-ref %outputs "out")
                                               "/lib"))))
-    (home-page "http://fallabs.com/hyperestraier")
+    (home-page "https://fallabs.com/hyperestraier")
     (synopsis "Full-text search system")
     (description "Hyper Estraier can be used to integrate full-text
 search into applications, using either the provided command line and CGI
@@ -242,7 +274,7 @@ interfaces, or a C API.")
     (home-page "https://pagure.io/mlocate")
     (synopsis "Locate files on the file system")
     (description
-     "mlocate is a locate/updatedb implementation.  The 'm' stands for
+     "mlocate is a locate/updatedb implementation.  The @code{m} stands for
 \"merging\": @code{updatedb} reuses the existing database to avoid rereading
 most of the file system, which makes it faster and does not trash the system
 caches as much.  The locate(1) utility is intended to be completely compatible
@@ -385,4 +417,59 @@ online libraries.  It provides fast search of document text and
 bibliographic data and simple document and bibtex retrieval.")
     (license gpl3+)))
 
+(define-public ugrep
+  (package
+    (name "ugrep")
+    (version "3.1.11")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Genivia/ugrep")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32 "1g3sxnrcaz1jxwa8nwrxpr63g4y0ha5zcf10053ciy9wjh6wqs1w"))
+              (file-name (string-append name "-" version "-checkout"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (delete-file-recursively "bin")  ;; pre-build executables
+                  (for-each delete-file (find-files "tests" "^archive\\..*"))
+                  (for-each delete-file (find-files "tests" "^.*\\.pdf$"))
+                  (for-each delete-file (find-files "tests" "^.*\\.class$"))
+                  #t))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("less" ,less)
+       ("lz4" ,lz4)
+       ("lzip" ,lzip)  ;; lzma
+       ("pcre2" ,pcre2)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f                  ; no way to rebuild the binary input files
+       #:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             ;; Unpatch shebangs in tests.
+             (substitute* '("tests/Hello.bat"
+                            "tests/Hello.sh")
+               (("#!/gnu/store/.*/bin/sh") "#!/bin/sh")))))))
+    (home-page "https://github.com/Genivia/ugrep/")
+    (synopsis "Faster grep with an interactive query UI")
+    (description "Ugrep is a ultra fast searcher of file systems, text
+and binary files, source code, archives, compressed files, documents, and
+more.
+
+While still being compatible with the standard GNU/BSD grep command-line
+options, ugrep supports fuzzy search as well as structured and (adjustable)
+colored output, piped through \"less\" for pagination.  An interactive query
+UI allows refinement and has a built-in help (press F1).  Ugrep implements
+multi-threaded and other techniques to speed up search, pattern-matching and
+decompression.  Many pre-defined regexps ease searching e.g. C typdefs or XML
+attributes.  Results can be output in several structured or self-defined
+formats.")
+    (license bsd-3)))
+
 ;;; search.scm ends here