doc: "filesystem" -> "file system"
[jackhill/guix/guix.git] / gnu / packages / search.scm
CommitLineData
98e7fc9b
MW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
b9b3440b 3;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
98e7fc9b
MW
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages search)
21 #:use-module ((guix licenses)
b9b3440b 22 #:select (gpl2 gpl2+ gpl3+ bsd-3 x11))
98e7fc9b
MW
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
a2319d2c 26 #:use-module (gnu packages)
98e7fc9b 27 #:use-module (gnu packages compression)
065b7954
EB
28 #:use-module (gnu packages check)
29 #:use-module (gnu packages databases)
a2319d2c
EB
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages web)
33 #:use-module (gnu packages xml))
98e7fc9b
MW
34
35(define-public xapian
36 (package
37 (name "xapian")
b2a22244 38 (version "1.2.21")
98e7fc9b
MW
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "http://oligarchy.co.uk/xapian/" version
42 "/xapian-core-" version ".tar.xz"))
43 (sha256
b2a22244 44 (base32 "0grd2s6gf8yzqwdaa50g57j9d81mxkrrpkyldm2shgyizdc8gx33"))))
98e7fc9b
MW
45 (build-system gnu-build-system)
46 (inputs `(("zlib" ,zlib)
47 ("util-linux" ,util-linux)))
48 (arguments
49 `(#:phases (alist-cons-after
50 'unpack 'patch-remotetcp-harness
51 (lambda _
52 (substitute* "tests/harness/backendmanager_remotetcp.cc"
53 (("/bin/sh") (which "bash"))))
54 %standard-phases)))
55 (synopsis "Search Engine Library")
56 (description
57 "Xapian is a highly adaptable toolkit which allows developers to easily
58add advanced indexing and search facilities to their own applications. It
59supports the Probabilistic Information Retrieval model and also supports a
60rich set of boolean query operators.")
61 (home-page "http://xapian.org/")
62 (license (list gpl2+ bsd-3 x11))))
63
065b7954
EB
64(define-public libtocc
65 (package
66 (name "libtocc")
67 (version "1.0.1")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/aidin36/tocc/releases/download/"
72 "v" version "/tocc-" version ".tar.gz"))
73 (sha256
74 (base32
75 "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068"))))
76 (build-system gnu-build-system)
77 (native-inputs `(("catch" ,catch-framework)))
78 (inputs `(("unqlite" ,unqlite)))
79 (arguments
80 `(#:phases (modify-phases %standard-phases
81 (add-before
f8503e2b 82 'configure 'chdir-source
065b7954
EB
83 (lambda _ (chdir "libtocc/src")))
84 (replace
f8503e2b 85 'check
065b7954
EB
86 (lambda _
87 (with-directory-excursion "../tests"
88 (and (zero? (system* "./configure"
89 (string-append "CONFIG_SHELL="
90 (which "sh"))
91 (string-append "SHELL="
92 (which "sh"))
93 "CPPFLAGS=-I../src"
e91d1d31
LC
94 (string-append
95 "LDFLAGS=-L../src/.libs "
96 "-Wl,-rpath=../src/.libs")))
065b7954
EB
97 (zero? (system* "make"))
98 (zero? (system* "./libtocctests")))))))))
99 (home-page "http://t-o-c-c.com/")
100 (synopsis "Tool for Obsessive Compulsive Classifiers")
101 (description
102 "libtocc is the engine of the Tocc project, a tag-based file management
103system. The goal of Tocc is to provide a better system for classifying files
104that is more flexible than classic file systems that are based on a tree of
105files and directories.")
106 (license gpl3+)))
107
108(define-public tocc
109 (package
110 (name "tocc")
111 (version (package-version libtocc))
112 (source (package-source libtocc))
113 (build-system gnu-build-system)
114 (inputs
115 `(("libtocc" ,libtocc)
116 ("unqlite" ,unqlite)))
117 (arguments
118 `(#:tests? #f ;No tests
119 #:phases (modify-phases %standard-phases
120 (add-after
f8503e2b 121 'unpack 'chdir-source
065b7954
EB
122 (lambda _ (chdir "cli/src"))))))
123 (home-page "http://t-o-c-c.com/")
124 (synopsis "Command-line interface to libtocc")
125 (description
126 "Tocc is a tag-based file management system. This package contains the
127command line tool for interacting with libtocc.")
128 (license gpl3+)))
129
6ad2e17e
EB
130(define-public bool
131 (package
132 (name "bool")
133 (version "0.2.2")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnu/bool/bool-"
138 version ".tar.xz"))
139 (sha256
140 (base32
141 "1frdmgrmb509fxbdpsxxw3lvvwv7xm1pavqrqgm4jg698iix6xfw"))))
142 (build-system gnu-build-system)
143 (home-page "https://www.gnu.org/software/bool")
04bdcdb6 144 (synopsis "Finding text and HTML files that match boolean expressions")
6ad2e17e 145 (description
04bdcdb6
LC
146 "GNU Bool is a utility to perform text searches on files using Boolean
147expressions. For example, a search for \"hello AND world\" would return a
148file containing the phrase \"Hello, world!\". It supports both AND and OR
149statements, as well as the NEAR statement to search for the occurrence of
150words in close proximity to each other. It handles context gracefully,
151accounting for new lines and paragraph changes. It also has robust support
152for parsing HTML files.")
6ad2e17e
EB
153 (license gpl3+)))
154
b9b3440b
EB
155(define-public mlocate
156 (package
157 (name "mlocate")
158 (version "0.26")
159 (source (origin
160 (method url-fetch)
161 (uri (string-append "https://fedorahosted.org/releases/m/l/"
162 "mlocate/mlocate-" version ".tar.xz"))
163 (sha256
164 (base32
165 "0gi6y52gkakhhlnzy0p6izc36nqhyfx5830qirhvk3qrzrwxyqrh"))))
166 (build-system gnu-build-system)
167 (home-page "https://fedorahosted.org/mlocate/")
8f65585b 168 (synopsis "Locate files on the file system")
b9b3440b
EB
169 (description
170 "mlocate is a locate/updatedb implementation. The 'm' stands for
171\"merging\": @code{updatedb} reuses the existing database to avoid rereading
172most of the file system, which makes it faster and does not trash the system
173caches as much. The locate(1) utility is intended to be completely compatible
174with slocate, and attempts to be compatible to GNU locate when it does not
175conflict with slocate compatibility.")
176 (license gpl2)))
177
a2319d2c
EB
178(define-public swish-e
179 (package
180 (name "swish-e")
181 (version "2.4.7")
182 (source (origin
183 (method url-fetch)
184 (uri (list (string-append "http://swish-e.org/distribution/"
185 "swish-e-" version ".tar.gz")
186 ;; The upstream swish-e.org appears to be down... so
187 ;; use debian's copy as a fallback.
188 (string-append "http://http.debian.net/debian/pool/"
189 "main/s/swish-e/swish-e_" version
190 ".orig.tar.gz")))
191 (file-name (string-append name "-" version ".tar.gz"))
192 (sha256
193 (base32
194 "0qkrk7z25yp9hynj21vxkyn7yi8gcagcfxnass5cgczcz0gm9pax"))
195 (patches (search-patches "swish-e-search.patch"
196 "swish-e-format-security.patch"))))
197 (build-system gnu-build-system)
198 ;; Several other packages and perl modules may be installed alongside
199 ;; swish-e to extend its features at runtime, but are not required for
200 ;; building: xpdf, catdoc, MP3::Tag, Spreadsheet::ParseExcel,
201 ;; HTML::Entities.
202 (inputs
203 `(("libxml" ,libxml2)
204 ("zlib" ,zlib)
205 ("perl" ,perl)
206 ("perl-uri" ,perl-uri)
207 ("perl-html-parser" ,perl-html-parser)
208 ("perl-html-tagset" ,perl-html-tagset)
209 ("perl-mime-types" ,perl-mime-types)))
210 (arguments
211 `(#:phases (modify-phases %standard-phases
212 (add-after 'install 'wrap-programs
213 (lambda* (#:key inputs outputs #:allow-other-keys)
214 (let* ((out (assoc-ref outputs "out")))
215 (for-each
216 (lambda (program)
217 (wrap-program program
218 `("PERL5LIB" ":" prefix
219 ,(map (lambda (i)
220 (string-append (assoc-ref inputs i)
221 "/lib/perl5/site_perl"))
222 ;; These perl modules have no propagated
223 ;; inputs, so no further analysis needed.
224 '("perl-uri"
225 "perl-html-parser"
226 "perl-html-tagset"
227 "perl-mime-types")))))
228 (list (string-append out "/lib/swish-e/swishspider")
229 (string-append out "/bin/swish-filter-test")))
230 #t))))))
231 (home-page "http://swish-e.org")
232 (synopsis "Web indexing system")
233 (description
234 "Swish-e is Simple Web Indexing System for Humans - Enhanced. Swish-e
235can quickly and easily index directories of files or remote web sites and
236search the generated indexes.")
237 (license gpl2+))) ;with exception
238
98e7fc9b 239;;; search.scm ends here