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)
38 (uri (string-append "http://oligarchy.co.uk/xapian/" version
39 "/xapian-core-" version ".tar.xz"))
41 (base32 "16i063xzwxdrqy32vlr292lljb65hkg3xx0i2m0qx2v00pcn4b3n"))))
42 (build-system gnu-build-system)
43 (inputs `(("zlib" ,zlib)
44 ("util-linux" ,util-linux)))
46 `(#:phases (alist-cons-after
47 'unpack 'patch-remotetcp-harness
49 (substitute* "tests/harness/backendmanager_remotetcp.cc"
50 (("/bin/sh") (which "bash"))))
52 (synopsis "Search Engine Library")
54 "Xapian is a highly adaptable toolkit which allows developers to easily
55 add advanced indexing and search facilities to their own applications. It
56 supports the Probabilistic Information Retrieval model and also supports a
57 rich set of boolean query operators.")
58 (home-page "http://xapian.org/")
59 (license (list gpl2+ bsd-3 x11))))
61 (define-public libtocc
68 (uri (string-append "https://github.com/aidin36/tocc/releases/download/"
69 "v" version "/tocc-" version ".tar.gz"))
72 "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068"))))
73 (build-system gnu-build-system)
74 (native-inputs `(("catch" ,catch-framework)))
75 (inputs `(("unqlite" ,unqlite)))
77 `(#:phases (modify-phases %standard-phases
79 'configure 'chdir-source
80 (lambda _ (chdir "libtocc/src")))
84 (with-directory-excursion "../tests"
85 (and (zero? (system* "./configure"
86 (string-append "CONFIG_SHELL="
88 (string-append "SHELL="
92 "LDFLAGS=-L../src/.libs "
93 "-Wl,-rpath=../src/.libs")))
94 (zero? (system* "make"))
95 (zero? (system* "./libtocctests")))))))))
96 (home-page "http://t-o-c-c.com/")
97 (synopsis "Tool for Obsessive Compulsive Classifiers")
99 "libtocc is the engine of the Tocc project, a tag-based file management
100 system. The goal of Tocc is to provide a better system for classifying files
101 that is more flexible than classic file systems that are based on a tree of
102 files and directories.")
108 (version (package-version libtocc))
109 (source (package-source libtocc))
110 (build-system gnu-build-system)
112 `(("libtocc" ,libtocc)
113 ("unqlite" ,unqlite)))
115 `(#:tests? #f ;No tests
116 #:phases (modify-phases %standard-phases
118 'unpack 'chdir-source
119 (lambda _ (chdir "cli/src"))))))
120 (home-page "http://t-o-c-c.com/")
121 (synopsis "Command-line interface to libtocc")
123 "Tocc is a tag-based file management system. This package contains the
124 command line tool for interacting with libtocc.")
134 (uri (string-append "mirror://gnu/bool/bool-"
138 "1frdmgrmb509fxbdpsxxw3lvvwv7xm1pavqrqgm4jg698iix6xfw"))))
139 (build-system gnu-build-system)
140 (home-page "https://www.gnu.org/software/bool")
141 (synopsis "Finding text and HTML files that match boolean expressions")
143 "GNU Bool is a utility to perform text searches on files using Boolean
144 expressions. For example, a search for \"hello AND world\" would return a
145 file containing the phrase \"Hello, world!\". It supports both AND and OR
146 statements, as well as the NEAR statement to search for the occurrence of
147 words in close proximity to each other. It handles context gracefully,
148 accounting for new lines and paragraph changes. It also has robust support
149 for parsing HTML files.")
152 ;;; search.scm ends here