gnu: recutils: Adjust to Bash 4.4.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
CommitLineData
5f96f303 1;;; GNU Guix --- Functional package management for GNU
ff1f39e3 2;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
b86c013c 3;;; Copyright © 2012, 2014, 2015 Andreas Enge <andreas@enge.fr>
5f96f303 4;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
218a2106 5;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
8047d13d 6;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
e61fd0f0 7;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
77631745 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
b747a9db 9;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
b2476513 10;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
679b535b 11;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
4c6aa73b 12;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
0e1b262e 13;;; Copyright © 2016 David Craven <david@craven.ch>
fe71eee0 14;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
62ea44fc 15;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
5f96f303
LC
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32(define-module (gnu packages databases)
33 #:use-module (gnu packages)
4c6aa73b
RJ
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages avahi)
b747a9db 36 #:use-module (gnu packages bash)
23bbd7dd 37 #:use-module (gnu packages boost)
62ea44fc 38 #:use-module (gnu packages crypto)
4c6aa73b
RJ
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
5f96f303 41 #:use-module (gnu packages perl)
708155df 42 #:use-module (gnu packages language)
5f96f303 43 #:use-module (gnu packages linux)
62ea44fc 44 #:use-module (gnu packages tcl)
cc2b77df 45 #:use-module (gnu packages tls)
5f96f303
LC
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages emacs)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages curl)
4c6aa73b 53 #:use-module (gnu packages cyrus-sasl)
5f96f303 54 #:use-module (gnu packages gnupg)
db60b1d9 55 #:use-module (gnu packages python)
77631745 56 #:use-module (gnu packages pcre)
4c6aa73b
RJ
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages rdf)
77631745
SB
59 #:use-module (gnu packages xml)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages jemalloc)
5f96f303 62 #:use-module ((guix licenses)
6242b314 63 #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
463f6766 64 bsd-2 bsd-3 public-domain))
0e1b262e 65 #:use-module ((guix licenses) #:prefix license:)
5f96f303
LC
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix build-system gnu)
274da61d 69 #:use-module (guix build-system perl)
4d98bfaf 70 #:use-module (guix build-system python)
77631745 71 #:use-module (guix build-system cmake)
329d13b8 72 #:use-module (guix utils)
5f96f303
LC
73 #:use-module (srfi srfi-26)
74 #:use-module (ice-9 match))
75
4c6aa73b
RJ
76(define-public 4store
77 (package
78 (name "4store")
79 (version "1.1.6")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "https://github.com/garlik/4store/archive/v"
83 version ".tar.gz"))
84 (file-name (string-append name "-" version ".tar.gz"))
85 (sha256
86 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
87 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
88 (build-system gnu-build-system)
89 (native-inputs
90 `(("perl" ,perl)
91 ("python" ,python-2)
92 ("autoconf" ,autoconf)
93 ("automake" ,automake)
b94a6ca0 94 ("gettext" ,gettext-minimal)
4c6aa73b 95 ("libtool" ,libtool)
74c8b174 96 ("pcre" ,pcre "bin") ;for 'pcre-config'
4c6aa73b
RJ
97 ("pkg-config" ,pkg-config)))
98 (inputs
99 `(("glib" ,glib)
100 ("rasqal" ,rasqal)
101 ("libxml2" ,libxml2)
102 ("raptor2" ,raptor2)
103 ("readline" ,readline)
104 ("avahi" ,avahi)
4c6aa73b
RJ
105 ("cyrus-sasl" ,cyrus-sasl)
106 ("openssl" ,openssl)
107 ("util-linux" ,util-linux)))
108 (arguments
109 `(#:phases
110 (modify-phases %standard-phases
111 (add-before 'configure 'generate-configure
112 (lambda _
113 (zero? (system* "./autogen.sh")))))))
114 ;; http://www.4store.org has been down for a while now.
115 (home-page "https://github.com/garlik/4store")
116 (synopsis "Clustered RDF storage and query engine")
117 (description "4store is a RDF/SPARQL store written in C, supporting
118either single machines or networked clusters.")
119 (license gpl3+)))
120
b416aadf
LC
121(define-public gdbm
122 (package
123 (name "gdbm")
2135d1eb 124 (version "1.12")
b416aadf
LC
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/gdbm/gdbm-"
128 version ".tar.gz"))
129 (sha256
130 (base32
2135d1eb 131 "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
b416aadf
LC
132 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
133 (build-system gnu-build-system)
134 (home-page "http://www.gnu.org/software/gdbm/")
135 (synopsis
136 "Hash library of database functions compatible with traditional dbm")
137 (description
138 "GDBM is a library for manipulating hashed databases. It is used to
139store key/value pairs in a file in a manner similar to the Unix dbm library
140and provides interfaces to the traditional file format.")
141 (license gpl3+)))
142
5f96f303
LC
143(define-public bdb
144 (package
145 (name "bdb")
18e681bf 146 (version "6.2.23")
5f96f303
LC
147 (source (origin
148 (method url-fetch)
18e681bf
EF
149 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
150 version ".tar.gz"))
151 (sha256
152 (base32
153 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
5f96f303
LC
154 (build-system gnu-build-system)
155 (outputs '("out" ; programs, libraries, headers
156 "doc")) ; 94 MiB of HTML docs
157 (arguments
158 '(#:tests? #f ; no check target available
ff1f39e3 159 #:disallowed-references ("doc")
5bef7749
AE
160 #:phases
161 (alist-replace
162 'configure
163 (lambda* (#:key outputs #:allow-other-keys)
164 (let ((out (assoc-ref outputs "out"))
165 (doc (assoc-ref outputs "doc")))
166 ;; '--docdir' is not honored, so we need to patch.
167 (substitute* "dist/Makefile.in"
168 (("docdir[[:blank:]]*=.*")
169 (string-append "docdir = " doc "/share/doc/bdb")))
5f96f303 170
5bef7749
AE
171 (zero?
172 (system* "./dist/configure"
173 (string-append "--prefix=" out)
174 (string-append "CONFIG_SHELL=" (which "bash"))
175 (string-append "SHELL=" (which "bash"))
5f96f303 176
0e50d521
LC
177 ;; Remove 7 MiB of .a files.
178 "--disable-static"
179
5bef7749
AE
180 ;; The compatibility mode is needed by some packages,
181 ;; notably iproute2.
b86c013c
AE
182 "--enable-compat185"
183
184 ;; The following flag is needed so that the inclusion
185 ;; of db_cxx.h into C++ files works; it leads to
186 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
187 "--enable-cxx"))))
5f96f303 188 %standard-phases)))
35b9e423 189 (synopsis "Berkeley database")
5f96f303
LC
190 (description
191 "Berkeley DB is an embeddable database allowing developers the choice of
192SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
166191b3
LC
193 (license (non-copyleft "file://LICENSE"
194 "See LICENSE in the distribution."))
5f96f303
LC
195 (home-page
196 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
197
557fa39c
EF
198(define-public bdb-5.3
199 (package (inherit bdb)
200 (name "bdb")
201 (version "5.3.28")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
205 version ".tar.gz"))
206 (sha256
207 (base32
208 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
209
5f96f303
LC
210(define-public mysql
211 (package
212 (name "mysql")
362bc747 213 (version "5.7.15")
5f96f303
LC
214 (source (origin
215 (method url-fetch)
23bbd7dd
EF
216 (uri (list (string-append
217 "http://dev.mysql.com/get/Downloads/MySQL-"
218 (version-major+minor version) "/"
219 name "-" version ".tar.gz")
220 (string-append
221 "http://downloads.mysql.com/archives/get/file/"
222 name "-" version ".tar.gz")))
5f96f303
LC
223 (sha256
224 (base32
362bc747 225 "0mlrxcvkn6bf869hjw9fb6m24ak26ndffnd91b4mknmz8cqkb1ch"))))
329d13b8
SB
226 (build-system cmake-build-system)
227 (arguments
69419655 228 `(#:configure-flags
329d13b8
SB
229 '("-DBUILD_CONFIG=mysql_release"
230 "-DWITH_SSL=system"
231 "-DWITH_ZLIB=system"
232 "-DDEFAULT_CHARSET=utf8"
233 "-DDEFAULT_COLLATION=utf8_general_ci"
234 "-DMYSQL_DATADIR=/var/lib/mysql"
235 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
236 "-DINSTALL_INFODIR=share/mysql/docs"
237 "-DINSTALL_MANDIR=share/man"
238 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
239 "-DINSTALL_SCRIPTDIR=bin"
240 "-DINSTALL_INCLUDEDIR=include/mysql"
241 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
242 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
243 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
244 "-DINSTALL_DOCDIR=share/mysql/docs"
245 "-DINSTALL_SHAREDIR=share/mysql"
246 ;; Get rid of test data.
247 "-DINSTALL_MYSQLTESTDIR="
3f289db6
LC
248 "-DINSTALL_SQLBENCHDIR=")
249 #:phases (modify-phases %standard-phases
250 (add-after
23bbd7dd
EF
251 'unpack 'patch-boost-version
252 (lambda _
253 ;; Mysql wants boost-1.59.0 specifically
254 (substitute* "cmake/boost.cmake"
69419655
EB
255 (("59")
256 ,(match (string-split (package-version boost) #\.)
257 ((_ minor . _) minor))))))
6a52df50
LC
258 (add-after
259 'install 'remove-extra-binaries
260 (lambda* (#:key outputs #:allow-other-keys)
261 (let ((out (assoc-ref outputs "out")))
262 ;; Remove the 3 *_embedded files, which weigh in at
263 ;; 14 MiB each.
264 (for-each delete-file
265 (find-files (string-append out "/bin")
266 "_embedded$"))
3f289db6 267 #t))))))
329d13b8
SB
268 (native-inputs
269 `(("bison" ,bison)
270 ("perl" ,perl)))
5f96f303 271 (inputs
23bbd7dd
EF
272 `(("boost" ,boost)
273 ("libaio" ,libaio)
274 ("ncurses" ,ncurses)
5f96f303 275 ("openssl" ,openssl)
23bbd7dd 276 ("zlib" ,zlib)))
5f96f303 277 (home-page "http://www.mysql.com/")
9e771e3b 278 (synopsis "Fast, easy to use, and popular database")
5f96f303
LC
279 (description
280 "MySQL is a fast, reliable, and easy to use relational database
281management system that supports the standardized Structured Query
282Language.")
283 (license gpl2)))
284
77631745
SB
285(define-public mariadb
286 (package
287 (name "mariadb")
b5b2c11b 288 (version "10.1.17")
77631745
SB
289 (source (origin
290 (method url-fetch)
291 (uri (string-append "https://downloads.mariadb.org/f/"
292 name "-" version "/source/"
293 name "-" version ".tar.gz"))
294 (sha256
295 (base32
b5b2c11b 296 "1ddalhxxcn95qp5b50z213niylcd0s6bqphid0c7c624wg2mm92c"))))
77631745
SB
297 (build-system cmake-build-system)
298 (arguments
299 '(#:configure-flags
300 '("-DBUILD_CONFIG=mysql_release"
301 "-DDEFAULT_CHARSET=utf8"
302 "-DDEFAULT_COLLATION=utf8_general_ci"
303 "-DMYSQL_DATADIR=/var/lib/mysql"
304 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
305 "-DINSTALL_INFODIR=share/mysql/docs"
306 "-DINSTALL_MANDIR=share/man"
307 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
308 "-DINSTALL_SCRIPTDIR=bin"
309 "-DINSTALL_INCLUDEDIR=include/mysql"
310 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
311 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
312 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
313 "-DINSTALL_DOCDIR=share/mysql/docs"
314 "-DINSTALL_SHAREDIR=share/mysql")
315 #:phases
316 (modify-phases %standard-phases
317 (add-before
318 'configure 'pre-configure
319 (lambda _
320 (setenv "CONFIG_SHELL" (which "sh"))
77631745
SB
321 #t))
322 (add-after
323 'install 'post-install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let* ((out (assoc-ref outputs "out"))
326 (test (assoc-ref outputs "test")))
327 (substitute* (string-append out "/bin/mysql_install_db")
328 (("basedir=\"\"")
329 (string-append "basedir=\"" out "\"")))
330 ;; Remove unneeded files for testing.
331 (with-directory-excursion out
332 (for-each delete-file-recursively
333 '("data" "mysql-test" "sql-bench"
334 "share/man/man1/mysql-test-run.pl.1")))))))))
335 (native-inputs
336 `(("bison" ,bison)
337 ("perl" ,perl)))
338 (inputs
339 `(("jemalloc" ,jemalloc)
340 ("libaio" ,libaio)
341 ("libxml2" ,libxml2)
342 ("ncurses" ,ncurses)
343 ("openssl" ,openssl)
344 ("pcre" ,pcre)
345 ("zlib" ,zlib)))
346 (home-page "https://mariadb.org/")
347 (synopsis "SQL database server")
348 (description
349 "MariaDB is a multi-user and multi-threaded SQL database server, designed
350as a drop-in replacement of MySQL.")
351 (license gpl2)))
352
5f96f303
LC
353(define-public postgresql
354 (package
355 (name "postgresql")
2b895f69 356 (version "9.5.4")
5f96f303
LC
357 (source (origin
358 (method url-fetch)
dbeaf8f2 359 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
9020890b 360 version "/postgresql-" version ".tar.bz2"))
5f96f303
LC
361 (sha256
362 (base32
2b895f69 363 "1l3fqxlpxgl6nrcd4h6lpi2hsiv56yg83n3xrn704rmdch8mfpng"))))
5f96f303 364 (build-system gnu-build-system)
dd213082
JD
365 (arguments
366 `(#:phases
367 (modify-phases %standard-phases
368 (add-before 'configure 'patch-/bin/sh
369 (lambda _
370 ;; Refer to the actual shell.
371 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
372 "src/bin/psql/command.c")
373 (("/bin/sh") (which "sh")))
374 #t)))))
5f96f303
LC
375 (inputs
376 `(("readline" ,readline)
377 ("zlib" ,zlib)))
378 (home-page "http://www.postgresql.org/")
379 (synopsis "Powerful object-relational database system")
380 (description
381 "PostgreSQL is a powerful object-relational database system. It is fully
382ACID compliant, has full support for foreign keys, joins, views, triggers, and
383stored procedures (in multiple languages). It includes most SQL:2008 data
384types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
385TIMESTAMP. It also supports storage of binary large objects, including
386pictures, sounds, or video.")
387 (license (x11-style "file://COPYRIGHT"))))
388
389(define-public recutils
390 (package
391 (name "recutils")
392 (version "1.7")
393 (source (origin
394 (method url-fetch)
395 (uri (string-append "mirror://gnu/recutils/recutils-"
396 version ".tar.gz"))
397 (sha256
398 (base32
399 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
400 (build-system gnu-build-system)
401
402 ;; Running tests in parallel leads to test failures and crashes in
403 ;; torture/utils.
b747a9db
LF
404 (arguments '(#:parallel-tests? #f
405 #:configure-flags
406 (list (string-append "--with-bash-headers="
407 (assoc-ref %build-inputs "bash:include")
c21af659
LC
408 "/include/bash"))
409
410 #:phases (modify-phases %standard-phases
411 (add-before 'build 'set-bash4.4-header-location
412 (lambda _
413 (substitute* "bash/Makefile.in"
414 ;; Adjust the header search path for Bash
415 ;; 4.4 in accordance with 'bash.pc'.
416 (("AM_CPPFLAGS = (.*)$" _ rest)
417 (string-append "AM_CPPFLAGS = "
418 "-I$(BASH_HEADERS)/include "
419 rest))
420
421 ;; Install to PREFIX/lib/bash to match Bash
422 ;; 4.4's search path.
423 (("^libdir = .*$")
424 "libdir = @libdir@/bash\n"))
425 #t)))))
5f96f303 426
b8fc3622 427 (native-inputs `(("emacs" ,emacs-minimal)
7ae7ca0e 428 ("bc" ,bc)
b747a9db 429 ("bash:include" ,bash "include")
b3546174 430 ("libuuid" ,util-linux)))
5f96f303
LC
431
432 ;; TODO: Add more optional inputs.
5f96f303
LC
433 (inputs `(("curl" ,curl)
434 ("libgcrypt" ,libgcrypt)
435 ("check" ,check)))
436 (synopsis "Manipulate plain text files as databases")
437 (description
438 "GNU Recutils is a set of tools and libraries for creating and
439manipulating text-based, human-editable databases. Despite being text-based,
440databases created with Recutils carry all of the expected features such as
c5779c93
LC
441unique fields, primary keys, time stamps and more. Many different field
442types are supported, as is encryption.")
5f96f303
LC
443 (license gpl3+)
444 (home-page "http://www.gnu.org/software/recutils/")))
445
b92d02d9
RJ
446(define-public sparql-query
447 (package
448 (name "sparql-query")
449 (version "1.1")
450 (source (origin
451 (method url-fetch)
452 (uri (string-append "https://github.com/tialaramex/"
453 name "/archive/" version ".tar.gz"))
454 (sha256
455 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
456 (file-name (string-append name "-" version ".tar.gz"))))
457 (build-system gnu-build-system)
458 (inputs
459 `(("readline" ,readline)
460 ("ncurses" ,ncurses)
461 ("glib" ,glib)
462 ("libxml2" ,libxml2)
463 ("curl" ,curl)))
464 (native-inputs
465 `(("pkg-config" ,pkg-config)))
466 (arguments
467 `(#:make-flags '("CC=gcc")
468 #:phases
469 (modify-phases %standard-phases
470 (delete 'configure)
471 ;; The Makefile uses git to obtain versioning information. This phase
472 ;; substitutes the git invocation with the package version.
473 (add-after 'unpack 'remove-git-dependency
474 (lambda _
475 (substitute* "Makefile"
476 (("^gitrev :=.*$")
477 (string-append "gitrev = \"v" ,version "\"")))))
478 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
479 ;; This replacement does the same thing, except for using $PREFIX/bin
480 ;; instead.
481 (replace 'install
482 (lambda* (#:key outputs #:allow-other-keys)
483 (let* ((out (assoc-ref outputs "out"))
484 (bin (string-append out "/bin")))
485 (install-file "sparql-query" bin)
486 (system* "ln" "--symbolic"
487 (string-append bin "/sparql-query")
488 (string-append bin "/sparql-update")))))
489 (replace 'check
490 (lambda* (#:key make-flags #:allow-other-keys)
491 (and
492 (zero? (apply system* "make" `(,@make-flags "scan-test")))
493 (zero? (system "./scan-test"))))))))
494 (home-page "https://github.com/tialaramex/sparql-query/")
495 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
496 (description "Sparql-query is a command-line tool for accessing SPARQL
497endpoints over HTTP. It has been intentionally designed to 'feel' similar to
498tools for interrogating SQL databases. For example, you can enter a query over
499several lines, using a semi-colon at the end of a line to indicate the end of
500your query. It also supports readline so that you can more easily recall and
501edit previous queries, even across sessions. It can be used non-interactively,
502for example from a shell script.")
503 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
504 ;; others (like sparql-query.c) contain a GPLv2+ license header.
505 (license (list gpl3+))))
506
5f96f303
LC
507(define-public sqlite
508 (package
509 (name "sqlite")
a66a2a01 510 (version "3.14.1")
5f96f303
LC
511 (source (origin
512 (method url-fetch)
513 ;; TODO: Download from sqlite.org once this bug :
514 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
515 ;; has been fixed.
516 (uri (let ((numeric-version
517 (match (string-split version #\.)
518 ((first-digit other-digits ...)
519 (string-append first-digit
520 (string-pad-right
521 (string-concatenate
522 (map (cut string-pad <> 2 #\0)
523 other-digits))
524 6 #\0))))))
42e66649
SB
525 (list
526 (string-append
75710da6
LC
527 "https://fossies.org/linux/misc/sqlite-autoconf-"
528 numeric-version ".tar.gz")
42e66649 529 (string-append
75710da6
LC
530 "http://distfiles.gentoo.org/distfiles/"
531 "/sqlite-autoconf-" numeric-version ".tar.gz"))
6f96706d
LC
532
533 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
534 ;; below, returning 200 and showing an advertising page.
535 ;; (string-append
536 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
537 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
538 ))
5f96f303
LC
539 (sha256
540 (base32
a66a2a01 541 "19j73j44akqgc6m82wm98yvnmm3mfzmfqr8mp3n7n080d53q4wdw"))))
5f96f303 542 (build-system gnu-build-system)
8f1d22b7 543 (inputs `(("readline" ,readline)))
49689377
MW
544 (arguments
545 `(#:configure-flags
73dc727e
DC
546 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
547 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
548 ;; to use the system SQLite unless these options are enabled.
549 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
550 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
551 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
5f96f303
LC
552 (home-page "http://www.sqlite.org/")
553 (synopsis "The SQLite database management system")
554 (description
555 "SQLite is a software library that implements a self-contained, serverless,
35b9e423
EB
556zero-configuration, transactional SQL database engine. SQLite is the most
557widely deployed SQL database engine in the world. The source code for SQLite
558is in the public domain.")
5f96f303 559 (license public-domain)))
db60b1d9
LC
560
561(define-public tdb
562 (package
563 (name "tdb")
1abd0904 564 (version "1.3.11")
db60b1d9
LC
565 (source (origin
566 (method url-fetch)
ca473fc2 567 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
db60b1d9
LC
568 version ".tar.gz"))
569 (sha256
570 (base32
1abd0904 571 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
db60b1d9
LC
572 (build-system gnu-build-system)
573 (arguments
6ccb7814
EF
574 '(#:phases
575 (modify-phases %standard-phases
576 (replace 'configure
577 (lambda* (#:key outputs #:allow-other-keys)
578 (let ((out (assoc-ref outputs "out")))
579 ;; The 'configure' script is a wrapper for Waf and
580 ;; doesn't recognize things like '--enable-fast-install'.
581 (zero? (system* "./configure"
582 (string-append "--prefix=" out)))))))))
db60b1d9
LC
583 (native-inputs
584 `(;; TODO: Build the documentation.
585 ;; ("docbook-xsl" ,docbook-xsl)
586 ;; ("libxml2" ,libxml2)
587 ;; ("libxslt" ,libxslt)
588 ("python" ,python-2))) ;for the Waf build system
1abd0904 589 (home-page "https://tdb.samba.org/")
35b9e423 590 (synopsis "Trivial database")
db60b1d9
LC
591 (description
592 "TDB is a Trivial Database. In concept, it is very much like GDBM,
593and BSD's DB except that it allows multiple simultaneous writers and uses
594locking internally to keep writers from trampling on each other. TDB is also
595extremely small.")
596 (license lgpl3+)))
274da61d
LC
597
598(define-public perl-dbi
599 (package
600 (name "perl-dbi")
6138dede 601 (version "1.636")
274da61d
LC
602 (source (origin
603 (method url-fetch)
604 (uri (string-append
605 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
606 version ".tar.gz"))
607 (sha256
608 (base32
6138dede 609 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
274da61d
LC
610 (build-system perl-build-system)
611 (synopsis "Database independent interface for Perl")
612 (description "This package provides an database interface for Perl.")
6138dede 613 (home-page "http://search.cpan.org/dist/DBI")
274da61d
LC
614 (license (package-license perl))))
615
feae3395
EB
616(define-public perl-dbix-class
617 (package
618 (name "perl-dbix-class")
619 (version "0.082810")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
624 "DBIx-Class-" version ".tar.gz"))
625 (sha256
626 (base32
627 "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
628 (build-system perl-build-system)
629 (native-inputs
630 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
631 ("perl-file-temp" ,perl-file-temp)
632 ("perl-package-stash" ,perl-package-stash)
633 ("perl-test-deep" ,perl-test-deep)
634 ("perl-test-exception" ,perl-test-exception)
635 ("perl-test-warn" ,perl-test-warn)))
636 (propagated-inputs
637 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
638 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
639 ("perl-class-inspector" ,perl-class-inspector)
640 ("perl-config-any" ,perl-config-any)
641 ("perl-context-preserve" ,perl-context-preserve)
642 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
643 ("perl-data-page" ,perl-data-page)
644 ("perl-dbi" ,perl-dbi)
645 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
646 ("perl-hash-merge" ,perl-hash-merge)
647 ("perl-module-find" ,perl-module-find)
648 ("perl-moo" ,perl-moo)
649 ("perl-mro-compat" ,perl-mro-compat)
650 ("perl-namespace-clean" ,perl-namespace-clean)
651 ("perl-path-class" ,perl-path-class)
652 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
653 ("perl-scope-guard" ,perl-scope-guard)
654 ("perl-sql-abstract" ,perl-sql-abstract)
655 ("perl-sub-name" ,perl-sub-name)
656 ("perl-text-balanced" ,perl-text-balanced)
657 ("perl-try-tiny" ,perl-try-tiny)))
658 (home-page "http://search.cpan.org/dist/DBIx-Class")
659 (synopsis "Extensible and flexible object <-> relational mapper")
660 (description "An SQL to OO mapper with an object API inspired by
661Class::DBI (with a compatibility layer as a springboard for porting) and a
662resultset API that allows abstract encapsulation of database operations. It
663aims to make representing queries in your code as perl-ish as possible while
664still providing access to as many of the capabilities of the database as
665possible, including retrieving related records from multiple tables in a
666single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
667\"ORDER BY\" and \"HAVING\" support.")
e61fd0f0
EB
668 (license (package-license perl))))
669
4e4039e5
EB
670(define-public perl-dbix-class-cursor-cached
671 (package
672 (name "perl-dbix-class-cursor-cached")
673 (version "1.001002")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
678 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
679 (sha256
680 (base32
681 "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
682 (build-system perl-build-system)
683 (native-inputs
684 `(("perl-cache-cache" ,perl-cache-cache)
685 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
686 (propagated-inputs
687 `(("perl-carp-clan" ,perl-carp-clan)
688 ("perl-dbix-class" ,perl-dbix-class)))
689 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
690 (synopsis "Cursor with built-in caching support")
691 (description "DBIx::Class::Cursor::Cached provides a cursor class with
692built-in caching support.")
693 (license (package-license perl))))
694
e61fd0f0
EB
695(define-public perl-dbix-class-introspectablem2m
696 (package
697 (name "perl-dbix-class-introspectablem2m")
698 (version "0.001001")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
703 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
704 (sha256
705 (base32
706 "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
707 (build-system perl-build-system)
708 (propagated-inputs
709 `(("perl-dbix-class" ,perl-dbix-class)))
710 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
711 (synopsis "Introspect many-to-many relationships")
712 (description "Because the many-to-many relationships are not real
713relationships, they can not be introspected with DBIx::Class. Many-to-many
714relationships are actually just a collection of convenience methods installed
715to bridge two relationships. This DBIx::Class component can be used to store
716all relevant information about these non-relationships so they can later be
717introspected and examined.")
708155df
EB
718 (license (package-license perl))))
719
720(define-public perl-dbix-class-schema-loader
721 (package
722 (name "perl-dbix-class-schema-loader")
723 (version "0.07042")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
728 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
729 (sha256
730 (base32
731 "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
732 (build-system perl-build-system)
733 (native-inputs
734 `(("perl-config-any" ,perl-config-any)
735 ("perl-config-general" ,perl-config-general)
736 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
737 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
738 ("perl-moose" ,perl-moose)
739 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
740 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
741 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
742 ("perl-test-deep" ,perl-test-deep)
743 ("perl-test-differences" ,perl-test-differences)
744 ("perl-test-exception" ,perl-test-exception)
745 ("perl-test-pod" ,perl-test-pod)
746 ("perl-test-warn" ,perl-test-warn)))
747 (propagated-inputs
748 `(("perl-class-unload" ,perl-class-unload)
749 ("perl-class-inspector" ,perl-class-inspector)
750 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
751 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
752 ("perl-carp-clan" ,perl-carp-clan)
753 ("perl-data-dump" ,perl-data-dump)
754 ("perl-dbix-class" ,perl-dbix-class)
755 ("perl-hash-merge" ,perl-hash-merge)
756 ("perl-list-moreutils" ,perl-list-moreutils)
757 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
758 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
759 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
760 ("perl-namespace-clean" ,perl-namespace-clean)
761 ("perl-mro-compat" ,perl-mro-compat)
762 ("perl-scope-guard" ,perl-scope-guard)
763 ("perl-string-camelcase" ,perl-string-camelcase)
764 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
765 ("perl-sub-name" ,perl-sub-name)
766 ("perl-try-tiny" ,perl-try-tiny)))
767 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
768 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
769 (synopsis "Create a DBIx::Class::Schema based on a database")
770 (description "DBIx::Class::Schema::Loader automates the definition of a
771DBIx::Class::Schema by scanning database table definitions and setting up the
772columns, primary keys, unique constraints and relationships.")
274da61d
LC
773 (license (package-license perl))))
774
186eb132
EB
775(define-public perl-dbd-pg
776 (package
777 (name "perl-dbd-pg")
778 (version "3.5.1")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
783 "DBD-Pg-" version ".tar.gz"))
784 (sha256
785 (base32
786 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
787 (build-system perl-build-system)
788 (native-inputs
789 `(("perl-dbi" ,perl-dbi)))
790 (propagated-inputs
791 `(("perl-dbi" ,perl-dbi)
792 ("postgresql" ,postgresql)))
793 (home-page "http://search.cpan.org/dist/DBD-Pg")
794 (synopsis "DBI PostgreSQL interface")
f33e71fc
LC
795 (description "This package provides a PostgreSQL driver for the Perl5
796@dfn{Database Interface} (DBI).")
186eb132
EB
797 (license (package-license perl))))
798
4b7857a4
RW
799(define-public perl-dbd-mysql
800 (package
801 (name "perl-dbd-mysql")
85358aef 802 (version "4.037")
4b7857a4
RW
803 (source
804 (origin
805 (method url-fetch)
d2600150 806 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
4b7857a4
RW
807 "DBD-mysql-" version ".tar.gz"))
808 (sha256
809 (base32
85358aef 810 "1z1wxnzhxfr9awjqb1d8pz9hf50shbk9ip2jmsmgdlwfyb78lmyz"))))
4b7857a4
RW
811 (build-system perl-build-system)
812 ;; Tests require running MySQL server
813 (arguments `(#:tests? #f))
814 (propagated-inputs
815 `(("perl-dbi" ,perl-dbi)
816 ("mysql" ,mysql)))
817 (home-page "http://search.cpan.org/dist/DBD-mysql")
818 (synopsis "DBI MySQL interface")
819 (description "This package provides a MySQL driver for the Perl5
820@dfn{Database Interface} (DBI).")
821 (license (package-license perl))))
822
274da61d
LC
823(define-public perl-dbd-sqlite
824 (package
825 (name "perl-dbd-sqlite")
826 (version "1.42")
827 (source (origin
828 (method url-fetch)
829 (uri (string-append
830 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
831 version ".tar.gz"))
832 (sha256
833 (base32
834 "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
835 (build-system perl-build-system)
836 (inputs `(("sqlite" ,sqlite)))
837 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
838 (synopsis "SQlite interface for Perl")
839 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
840the entire thing in the distribution. So in order to get a fast transaction
841capable RDBMS working for your Perl project you simply have to install this
842module, and nothing else.")
843 (license (package-license perl))
844 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
14e84b2d 845
dd90952e
EB
846(define-public perl-sql-abstract
847 (package
848 (name "perl-sql-abstract")
849 (version "1.81")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
854 "SQL-Abstract-" version ".tar.gz"))
855 (sha256
856 (base32
857 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
858 (build-system perl-build-system)
859 (native-inputs
860 `(("perl-test-deep" ,perl-test-deep)
861 ("perl-test-exception" ,perl-test-exception)
862 ("perl-test-warn" ,perl-test-warn)))
863 (propagated-inputs
864 `(("perl-hash-merge" ,perl-hash-merge)
865 ("perl-moo" ,perl-moo)
866 ("perl-mro-compat" ,perl-mro-compat)
867 ("perl-text-balanced" ,perl-text-balanced)))
868 (home-page "http://search.cpan.org/dist/SQL-Abstract")
869 (synopsis "Generate SQL from Perl data structures")
870 (description "This module was inspired by the excellent DBIx::Abstract.
871While based on the concepts used by DBIx::Abstract, the concepts used have
872been modified to make the SQL easier to generate from Perl data structures.
873The underlying idea is for this module to do what you mean, based on the data
874structures you provide it, so that you don't have to modify your code every
e881752c 875time your data changes.")
dd90952e 876 (license (package-license perl))))
14e84b2d 877
b4dcb026
EB
878(define-public perl-sql-splitstatement
879 (package
880 (name "perl-sql-splitstatement")
881 (version "1.00020")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
886 "SQL-SplitStatement-" version ".tar.gz"))
887 (sha256
888 (base32
889 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
890 (build-system perl-build-system)
891 (native-inputs
892 `(("perl-test-exception" ,perl-test-exception)))
893 (propagated-inputs
894 `(("perl-class-accessor" ,perl-class-accessor)
895 ("perl-list-moreutils" ,perl-list-moreutils)
896 ("perl-regexp-common" ,perl-regexp-common)
897 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
898 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
899 (synopsis "Split SQL code into atomic statements")
900 (description "This module tries to split any SQL code, even including
901non-standard extensions, into the atomic statements it is composed of.")
902 (license (package-license perl))))
903
718c89c1
EB
904(define-public perl-sql-tokenizer
905 (package
906 (name "perl-sql-tokenizer")
907 (version "0.24")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
912 "SQL-Tokenizer-" version ".tar.gz"))
913 (sha256
914 (base32
915 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
916 (build-system perl-build-system)
917 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
918 (synopsis "SQL tokenizer")
919 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
920claim to be a parser or query verifier. It just creates sane tokens from a
921valid SQL query.")
922 (license (package-license perl))))
923
14e84b2d
JD
924(define-public unixodbc
925 (package
926 (name "unixodbc")
3fef0a2f 927 (version "2.3.4")
14e84b2d
JD
928 (source (origin
929 (method url-fetch)
e881752c 930 (uri
14e84b2d 931 (string-append
3fef0a2f
EF
932 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
933 version ".tar.gz"))
14e84b2d 934 (sha256
3fef0a2f 935 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
14e84b2d
JD
936 (build-system gnu-build-system)
937 (synopsis "Data source abstraction library")
938 (description "Unixodbc is a library providing an API with which to access
939data sources. Data sources include SQL Servers and any software with an ODBC
940Driver.")
e881752c 941 (license lgpl2.1+)
14e84b2d
JD
942 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
943 (home-page "http://www.unixodbc.org")))
b4a9c924
EB
944
945(define-public unqlite
946 (package
947 (name "unqlite")
948 (version "1.1.6")
949 (source (origin
950 (method url-fetch)
951 ;; Contains bug fixes against the official release, and has an
952 ;; autotooled build system.
953 (uri (string-append "https://github.com/aidin36/tocc/releases/"
954 "download/v1.0.0/"
955 "unqlite-unofficial-" version ".tar.gz"))
956 (sha256
957 (base32
958 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
959 (build-system gnu-build-system)
960 (arguments `(#:tests? #f)) ;No check target
961 (home-page "http://www.unqlite.org")
962 (synopsis "In-memory key/value and document store")
963 (description
964 "UnQLite is an in-process software library which implements a
965self-contained, serverless, zero-configuration, transactional NoSQL
966database engine. UnQLite is a document store database similar to
967MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
69b4ffcf 968similar to BerkeleyDB, LevelDB, etc.")
b4a9c924 969 (license bsd-2)))
463f6766
DT
970
971(define-public redis
972 (package
973 (name "redis")
b25f060f 974 (version "3.2.4")
463f6766
DT
975 (source (origin
976 (method url-fetch)
977 (uri (string-append "http://download.redis.io/releases/redis-"
978 version".tar.gz"))
979 (sha256
980 (base32
b25f060f 981 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
463f6766
DT
982 (build-system gnu-build-system)
983 (arguments
984 '(#:tests? #f ; tests related to master/slave and replication fail
985 #:phases (modify-phases %standard-phases
986 (delete 'configure))
987 #:make-flags `("CC=gcc"
988 "MALLOC=libc"
b25f060f 989 "LDFLAGS=-ldl"
463f6766
DT
990 ,(string-append "PREFIX="
991 (assoc-ref %outputs "out")))))
992 (synopsis "Key-value cache and store")
993 (description "Redis is an advanced key-value cache and store. Redis
994supports many data structures including strings, hashes, lists, sets, sorted
995sets, bitmaps and hyperloglogs.")
996 (home-page "http://redis.io/")
997 (license bsd-3)))
a65e2a02 998
999(define-public kyotocabinet
1000 (package
1001 (name "kyotocabinet")
1002 (version "1.2.76")
1003 (source (origin
1004 (method url-fetch)
1005 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1006 name "-" version ".tar.gz"))
1007 (sha256
1008 (base32
1009 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1010 (build-system gnu-build-system)
1011 (arguments
1012 `(#:configure-flags
1013 (list
1014 (string-append "LDFLAGS=-Wl,-rpath="
1015 (assoc-ref %outputs "out") "/lib"))))
1016 (inputs `(("zlib" ,zlib)))
1017 (home-page "http://fallabs.com/kyotocabinet/")
1018 (synopsis
1019 "Kyoto Cabinet is a modern implementation of the DBM database")
1020 (description
1021 "Kyoto Cabinet is a standalone file-based database that supports Hash
1022and B+ Tree data storage models. It is a fast key-value lightweight
1023database and supports many programming languages. It is a NoSQL database.")
1024 (license gpl3+)))
6242b314
SB
1025
1026(define-public wiredtiger
1027 (package
1028 (name "wiredtiger")
1029 (version "2.8.0")
1030 (source (origin
1031 (method url-fetch)
1032 (uri (string-append
1033 "http://source.wiredtiger.com/releases/wiredtiger-"
1034 version ".tar.bz2"))
1035 (sha256
1036 (base32
1037 "1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"))))
1038 (build-system gnu-build-system)
1039 (arguments
1040 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1041 #:phases
1042 (modify-phases %standard-phases
1043 (add-before 'check 'disable-test/fops
1044 (lambda _
1045 ;; XXX: timed out after 3600 seconds of silence
1046 (substitute* "Makefile"
1047 (("test/fops") ""))
1048 #t)))))
1049 (inputs
1050 `(("lz4" ,lz4)
1051 ("zlib" ,zlib)))
1052 (home-page "http://source.wiredtiger.com/")
1053 (synopsis "NoSQL data engine")
1054 (description
1055 "WiredTiger is an extensible platform for data management. It supports
1056row-oriented storage (where all columns of a row are stored together),
1057column-oriented storage (where columns are stored in groups, allowing for
1058more efficient access and storage of column subsets) and log-structured merge
1059trees (LSM), for sustained throughput under random insert workloads.")
1060 (license gpl3) ; or GPL-2
1061 ;; configure.ac: WiredTiger requires a 64-bit build.
1062 (supported-systems '("x86_64-linux" "mips64el-linux"))))
90c2ee88
DM
1063
1064(define-public perl-db-file
1065 (package
1066 (name "perl-db-file")
1067 (version "1.838")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (string-append
1072 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1073 version
1074 ".tar.gz"))
1075 (sha256
1076 (base32
1077 "0yp5d5zr8dk9g6xdh7ygi5bq63q7nxvhd58dk2i3ki4nb7yv2yh9"))))
1078 (build-system perl-build-system)
1079 (inputs `(("bdb" ,bdb)))
1080 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1081 (arguments
1082 `(#:phases (modify-phases %standard-phases
1083 (add-before
1084 'configure 'modify-config.in
1085 (lambda* (#:key inputs #:allow-other-keys)
1086 (substitute* "config.in"
1087 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1088 #t)))))
1089 (home-page "http://search.cpan.org/dist/DB_File")
1090 (synopsis
1091 "Perl5 access to Berkeley DB version 1.x")
1092 (description
1093 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1094 (license (package-license perl))))
0e1b262e
DC
1095
1096(define-public lmdb
1097 (package
1098 (name "lmdb")
1099 (version "0.9.18")
1100 (source (origin
1101 (method url-fetch)
1102 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1103 "LMDB_" version ".tar.gz"))
1104 (sha256
1105 (base32
1106 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1107 (build-system gnu-build-system)
1108 (arguments
1109 `(#:test-target "test"
1110 #:phases
1111 (modify-phases %standard-phases
1112 (replace 'configure
1113 (lambda* (#:key outputs #:allow-other-keys)
1114 (chdir (string-append
1115 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1116 (substitute* "Makefile"
1117 (("/usr/local") (assoc-ref outputs "out")))
1118 #t)))))
1119 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1120 (synopsis "Lightning memory-mapped database library")
1121 (description "Lightning memory-mapped database library.")
1122 (license license:openldap2.8)))
fe71eee0
JN
1123
1124(define-public libpqxx
1125 (package
1126 (name "libpqxx")
1127 (version "4.0.1")
1128 (source (origin
1129 (method url-fetch)
1130 (uri (string-append
1131 "http://pqxx.org/download/software/libpqxx/"
1132 name "-" version ".tar.gz"))
1133 (sha256
1134 (base32
1135 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1136 (build-system gnu-build-system)
1137 (native-inputs
1138 `(("python" ,python-2)))
1139 (inputs `(("postgresql" ,postgresql)))
1140 (arguments
1141 `(#:tests? #f)) ; # FAIL: 1
1142 (synopsis "C++ connector for PostgreSQL")
1143 (description
1144 "Libpqxx is a C++ library to enable user programs to communicate with the
1145PostgreSQL database back-end. The database back-end can be local or it may be
1146on another machine, accessed via TCP/IP.")
1147 (home-page "http://pqxx.org/")
1148 (license license:bsd-3)))
4d98bfaf
EF
1149
1150(define-public python-peewee
1151 (package
1152 (name "python-peewee")
1153 (version "2.8.3")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "peewee" version))
1158 (sha256
1159 (base32
1160 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1161 (build-system python-build-system)
1162 (arguments
1163 `(#:tests? #f)) ; Fails to import test data
1164 (native-inputs
1165 `(("python-cython" ,python-cython)))
1166 (home-page "https://github.com/coleifer/peewee/")
1167 (synopsis "Small object-relational mapping utility")
1168 (description
1169 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1170handles converting between pythonic values and those used by databases, so you
1171can use Python types in your code without having to worry. It has built-in
1172support for sqlite, mysql and postgresql. If you already have a database, you
1173can autogenerate peewee models using @code{pwiz}, a model generator.")
1174 (license license:expat)))
1175
1176(define-public python2-peewee
1177 (package-with-python2 python-peewee))
62ea44fc
AP
1178
1179(define-public sqlcipher
1180 (package
1181 (name "sqlcipher")
1182 (version "3.3.1")
1183 (source
1184 (origin
1185 (method url-fetch)
1186 (uri (string-append "https://github.com/sqlcipher/" name
1187 "/archive/v" version ".tar.gz"))
1188 (sha256
1189 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1190 (file-name (string-append name "-" version ".tar.gz"))))
1191 (build-system gnu-build-system)
1192 (inputs
1193 `(("libcrypto" ,openssl)
1194 ("libtcl8.6" ,tcl))) ; required for running the tests
1195 (native-inputs
1196 `(("tcl" ,tcl)))
1197 (arguments
1198 '(#:configure-flags
1199 '("--enable-tempstore=yes"
1200 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1201 "LDFLAGS=-lcrypto -ltcl8.6"
1202 "--disable-tcl")
1203 ;; tests cannot be run from the Makefile
1204 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1205 #:test-target "testfixture"
1206 #:phases
1207 (modify-phases %standard-phases
1208 (add-before 'check 'build-test-runner
1209 (assoc-ref %standard-phases 'check))
1210 (replace 'check
1211 (lambda _
1212 (zero?
1213 (system* "./testfixture" "test/crypto.test")))))))
1214 (home-page "https://www.zetetic.net/sqlcipher/")
1215 (synopsis
1216 "Library providing transparent encryption of SQLite database files")
1217 (description "SQLCipher is an implementation of SQLite, extended to
1218provide transparent 256-bit AES encryption of database files. Pages are
1219encrypted before being written to disk and are decrypted when read back. It’s
1220well suited for protecting embedded application databases and for mobile
1221development.")
1222 ;; The source files
1223 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1224 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1225 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1226 ;; source files are in the public domain.
1227 (license (list license:public-domain license:bsd-3))))