gnu: bool: Synchronize synopsis and description with upstream.
[guix.git] / gnu / packages / search.scm
blobe7f8aae881c95406f8f0f7e30810a31187a51ebd
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>
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/>.
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)
30   #:export (xapian))
32 (define-public xapian
33   (package
34     (name "xapian")
35     (version "1.2.18")
36     (source (origin
37               (method url-fetch)
38               (uri (string-append "http://oligarchy.co.uk/xapian/" version
39                                   "/xapian-core-" version ".tar.xz"))
40               (sha256
41                (base32 "16i063xzwxdrqy32vlr292lljb65hkg3xx0i2m0qx2v00pcn4b3n"))))
42     (build-system gnu-build-system)
43     (inputs `(("zlib" ,zlib)
44               ("util-linux" ,util-linux)))
45     (arguments
46      `(#:phases (alist-cons-after
47                  'unpack 'patch-remotetcp-harness
48                  (lambda _
49                    (substitute* "tests/harness/backendmanager_remotetcp.cc"
50                      (("/bin/sh") (which "bash"))))
51                  %standard-phases)))
52     (synopsis "Search Engine Library")
53     (description
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
62   (package
63     (name "libtocc")
64     (version "1.0.1")
65     (source
66      (origin
67        (method url-fetch)
68        (uri (string-append "https://github.com/aidin36/tocc/releases/download/"
69                            "v" version "/tocc-" version ".tar.gz"))
70        (sha256
71         (base32
72          "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068"))))
73     (build-system gnu-build-system)
74     (native-inputs `(("catch" ,catch-framework)))
75     (inputs `(("unqlite" ,unqlite)))
76     (arguments
77      `(#:phases (modify-phases %standard-phases
78                   (add-before
79                    'configure 'chdir-source
80                    (lambda _ (chdir "libtocc/src")))
81                   (replace
82                    'check
83                    (lambda _
84                      (with-directory-excursion "../tests"
85                        (and (zero? (system* "./configure"
86                                             (string-append "CONFIG_SHELL="
87                                                            (which "sh"))
88                                             (string-append "SHELL="
89                                                            (which "sh"))
90                                             "CPPFLAGS=-I../src"
91                                             (string-append
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")
98     (description
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.")
103     (license gpl3+)))
105 (define-public tocc
106   (package
107     (name "tocc")
108     (version (package-version libtocc))
109     (source (package-source libtocc))
110     (build-system gnu-build-system)
111     (inputs
112      `(("libtocc" ,libtocc)
113        ("unqlite" ,unqlite)))
114     (arguments
115      `(#:tests? #f                      ;No tests
116        #:phases (modify-phases %standard-phases
117                   (add-after
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")
122     (description
123      "Tocc is a tag-based file management system.  This package contains the
124 command line tool for interacting with libtocc.")
125     (license gpl3+)))
127 (define-public bool
128   (package
129     (name "bool")
130     (version "0.2.2")
131     (source
132      (origin
133        (method url-fetch)
134        (uri (string-append "mirror://gnu/bool/bool-"
135                            version ".tar.xz"))
136        (sha256
137         (base32
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")
142     (description
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.")
150     (license gpl3+)))
152 ;;; search.scm ends here