1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages search)
21 #:use-module ((guix licenses)
22 #:select (gpl2+ gpl3+ bsd-3 x11))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages check)
28 #:use-module (gnu packages databases)
29 #:use-module (gnu packages linux))
37 (uri (string-append "http://oligarchy.co.uk/xapian/" version
38 "/xapian-core-" version ".tar.xz"))
40 (base32 "0grd2s6gf8yzqwdaa50g57j9d81mxkrrpkyldm2shgyizdc8gx33"))))
41 (build-system gnu-build-system)
42 (inputs `(("zlib" ,zlib)
43 ("util-linux" ,util-linux)))
45 `(#:phases (alist-cons-after
46 'unpack 'patch-remotetcp-harness
48 (substitute* "tests/harness/backendmanager_remotetcp.cc"
49 (("/bin/sh") (which "bash"))))
51 (synopsis "Search Engine Library")
53 "Xapian is a highly adaptable toolkit which allows developers to easily
54 add advanced indexing and search facilities to their own applications. It
55 supports the Probabilistic Information Retrieval model and also supports a
56 rich set of boolean query operators.")
57 (home-page "http://xapian.org/")
58 (license (list gpl2+ bsd-3 x11))))
60 (define-public libtocc
67 (uri (string-append "https://github.com/aidin36/tocc/releases/download/"
68 "v" version "/tocc-" version ".tar.gz"))
71 "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068"))))
72 (build-system gnu-build-system)
73 (native-inputs `(("catch" ,catch-framework)))
74 (inputs `(("unqlite" ,unqlite)))
76 `(#:phases (modify-phases %standard-phases
78 'configure 'chdir-source
79 (lambda _ (chdir "libtocc/src")))
83 (with-directory-excursion "../tests"
84 (and (zero? (system* "./configure"
85 (string-append "CONFIG_SHELL="
87 (string-append "SHELL="
91 "LDFLAGS=-L../src/.libs "
92 "-Wl,-rpath=../src/.libs")))
93 (zero? (system* "make"))
94 (zero? (system* "./libtocctests")))))))))
95 (home-page "http://t-o-c-c.com/")
96 (synopsis "Tool for Obsessive Compulsive Classifiers")
98 "libtocc is the engine of the Tocc project, a tag-based file management
99 system. The goal of Tocc is to provide a better system for classifying files
100 that is more flexible than classic file systems that are based on a tree of
101 files and directories.")
107 (version (package-version libtocc))
108 (source (package-source libtocc))
109 (build-system gnu-build-system)
111 `(("libtocc" ,libtocc)
112 ("unqlite" ,unqlite)))
114 `(#:tests? #f ;No tests
115 #:phases (modify-phases %standard-phases
117 'unpack 'chdir-source
118 (lambda _ (chdir "cli/src"))))))
119 (home-page "http://t-o-c-c.com/")
120 (synopsis "Command-line interface to libtocc")
122 "Tocc is a tag-based file management system. This package contains the
123 command line tool for interacting with libtocc.")
133 (uri (string-append "mirror://gnu/bool/bool-"
137 "1frdmgrmb509fxbdpsxxw3lvvwv7xm1pavqrqgm4jg698iix6xfw"))))
138 (build-system gnu-build-system)
139 (home-page "https://www.gnu.org/software/bool")
140 (synopsis "Finding text and HTML files that match boolean expressions")
142 "GNU Bool is a utility to perform text searches on files using Boolean
143 expressions. For example, a search for \"hello AND world\" would return a
144 file containing the phrase \"Hello, world!\". It supports both AND and OR
145 statements, as well as the NEAR statement to search for the occurrence of
146 words in close proximity to each other. It handles context gracefully,
147 accounting for new lines and paragraph changes. It also has robust support
148 for parsing HTML files.")
151 ;;; search.scm ends here