gnu: ocaml: Fix CVE-2015-8869.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
CommitLineData
5f96f303 1;;; GNU Guix --- Functional package management for GNU
2d32d153 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
b86c013c 3;;; Copyright © 2012, 2014, 2015 Andreas Enge <andreas@enge.fr>
5f96f303
LC
4;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
5;;; Copyright © 2014 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>
a65e2a02 11;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
5f96f303
LC
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages databases)
29 #:use-module (gnu packages)
b747a9db 30 #:use-module (gnu packages bash)
23bbd7dd 31 #:use-module (gnu packages boost)
5f96f303 32 #:use-module (gnu packages perl)
708155df 33 #:use-module (gnu packages language)
5f96f303 34 #:use-module (gnu packages linux)
cc2b77df 35 #:use-module (gnu packages tls)
5f96f303
LC
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages readline)
39 #:use-module (gnu packages emacs)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages algebra)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages gnupg)
db60b1d9 44 #:use-module (gnu packages python)
77631745
SB
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages xml)
47 #:use-module (gnu packages bison)
48 #:use-module (gnu packages jemalloc)
5f96f303 49 #:use-module ((guix licenses)
166191b3 50 #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
463f6766 51 bsd-2 bsd-3 public-domain))
5f96f303
LC
52 #:use-module (guix packages)
53 #:use-module (guix download)
54 #:use-module (guix build-system gnu)
274da61d 55 #:use-module (guix build-system perl)
77631745 56 #:use-module (guix build-system cmake)
329d13b8 57 #:use-module (guix utils)
5f96f303
LC
58 #:use-module (srfi srfi-26)
59 #:use-module (ice-9 match))
60
b416aadf
LC
61(define-public gdbm
62 (package
63 (name "gdbm")
64 (version "1.11")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "mirror://gnu/gdbm/gdbm-"
68 version ".tar.gz"))
69 (sha256
70 (base32
71 "1hz3jgh3pd4qzp6jy0l8pd8x01g9abw7csnrlnj1a2sxy122z4cd"))))
72 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
73 (build-system gnu-build-system)
74 (home-page "http://www.gnu.org/software/gdbm/")
75 (synopsis
76 "Hash library of database functions compatible with traditional dbm")
77 (description
78 "GDBM is a library for manipulating hashed databases. It is used to
79store key/value pairs in a file in a manner similar to the Unix dbm library
80and provides interfaces to the traditional file format.")
81 (license gpl3+)))
82
5f96f303
LC
83(define-public bdb
84 (package
85 (name "bdb")
86 (version "5.3.21")
87 (source (origin
88 (method url-fetch)
89 (uri (string-append "http://download.oracle.com/berkeley-db/db-" version
90 ".tar.gz"))
91 (sha256 (base32
92 "1f2g2612lf8djbwbwhxsvmffmf9d7693kh2l20195pqp0f9jmnfx"))))
93 (build-system gnu-build-system)
94 (outputs '("out" ; programs, libraries, headers
95 "doc")) ; 94 MiB of HTML docs
96 (arguments
97 '(#:tests? #f ; no check target available
5bef7749
AE
98 #:phases
99 (alist-replace
100 'configure
101 (lambda* (#:key outputs #:allow-other-keys)
102 (let ((out (assoc-ref outputs "out"))
103 (doc (assoc-ref outputs "doc")))
104 ;; '--docdir' is not honored, so we need to patch.
105 (substitute* "dist/Makefile.in"
106 (("docdir[[:blank:]]*=.*")
107 (string-append "docdir = " doc "/share/doc/bdb")))
5f96f303 108
5bef7749
AE
109 (zero?
110 (system* "./dist/configure"
111 (string-append "--prefix=" out)
112 (string-append "CONFIG_SHELL=" (which "bash"))
113 (string-append "SHELL=" (which "bash"))
5f96f303 114
5bef7749
AE
115 ;; The compatibility mode is needed by some packages,
116 ;; notably iproute2.
b86c013c
AE
117 "--enable-compat185"
118
119 ;; The following flag is needed so that the inclusion
120 ;; of db_cxx.h into C++ files works; it leads to
121 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
122 "--enable-cxx"))))
5f96f303 123 %standard-phases)))
35b9e423 124 (synopsis "Berkeley database")
5f96f303
LC
125 (description
126 "Berkeley DB is an embeddable database allowing developers the choice of
127SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
166191b3
LC
128 (license (non-copyleft "file://LICENSE"
129 "See LICENSE in the distribution."))
5f96f303
LC
130 (home-page
131 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
132
133(define-public mysql
134 (package
135 (name "mysql")
5d88b4f8 136 (version "5.7.12")
5f96f303
LC
137 (source (origin
138 (method url-fetch)
23bbd7dd
EF
139 (uri (list (string-append
140 "http://dev.mysql.com/get/Downloads/MySQL-"
141 (version-major+minor version) "/"
142 name "-" version ".tar.gz")
143 (string-append
144 "http://downloads.mysql.com/archives/get/file/"
145 name "-" version ".tar.gz")))
5f96f303
LC
146 (sha256
147 (base32
5d88b4f8 148 "11qwbid666fspq143ymi86yva2b01lybaqh26k92rciasav3r11j"))))
329d13b8
SB
149 (build-system cmake-build-system)
150 (arguments
151 '(#:configure-flags
152 '("-DBUILD_CONFIG=mysql_release"
153 "-DWITH_SSL=system"
154 "-DWITH_ZLIB=system"
155 "-DDEFAULT_CHARSET=utf8"
156 "-DDEFAULT_COLLATION=utf8_general_ci"
157 "-DMYSQL_DATADIR=/var/lib/mysql"
158 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
159 "-DINSTALL_INFODIR=share/mysql/docs"
160 "-DINSTALL_MANDIR=share/man"
161 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
162 "-DINSTALL_SCRIPTDIR=bin"
163 "-DINSTALL_INCLUDEDIR=include/mysql"
164 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
165 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
166 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
167 "-DINSTALL_DOCDIR=share/mysql/docs"
168 "-DINSTALL_SHAREDIR=share/mysql"
169 ;; Get rid of test data.
170 "-DINSTALL_MYSQLTESTDIR="
3f289db6
LC
171 "-DINSTALL_SQLBENCHDIR=")
172 #:phases (modify-phases %standard-phases
173 (add-after
23bbd7dd
EF
174 'unpack 'patch-boost-version
175 (lambda _
176 ;; Mysql wants boost-1.59.0 specifically
177 (substitute* "cmake/boost.cmake"
178 (("59") "60"))))
6a52df50
LC
179 (add-after
180 'install 'remove-extra-binaries
181 (lambda* (#:key outputs #:allow-other-keys)
182 (let ((out (assoc-ref outputs "out")))
183 ;; Remove the 3 *_embedded files, which weigh in at
184 ;; 14 MiB each.
185 (for-each delete-file
186 (find-files (string-append out "/bin")
187 "_embedded$"))
3f289db6 188 #t))))))
329d13b8
SB
189 (native-inputs
190 `(("bison" ,bison)
191 ("perl" ,perl)))
5f96f303 192 (inputs
23bbd7dd
EF
193 `(("boost" ,boost)
194 ("libaio" ,libaio)
195 ("ncurses" ,ncurses)
5f96f303 196 ("openssl" ,openssl)
23bbd7dd 197 ("zlib" ,zlib)))
5f96f303 198 (home-page "http://www.mysql.com/")
9e771e3b 199 (synopsis "Fast, easy to use, and popular database")
5f96f303
LC
200 (description
201 "MySQL is a fast, reliable, and easy to use relational database
202management system that supports the standardized Structured Query
203Language.")
204 (license gpl2)))
205
77631745
SB
206(define-public mariadb
207 (package
208 (name "mariadb")
e3bf5d2c 209 (version "10.1.12")
77631745
SB
210 (source (origin
211 (method url-fetch)
212 (uri (string-append "https://downloads.mariadb.org/f/"
213 name "-" version "/source/"
214 name "-" version ".tar.gz"))
215 (sha256
216 (base32
e3bf5d2c 217 "1rzlc2ns84x540asbkgdp9562haxhlszfpdqh64i9pz4q1m4cpvr"))))
77631745
SB
218 (build-system cmake-build-system)
219 (arguments
220 '(#:configure-flags
221 '("-DBUILD_CONFIG=mysql_release"
222 "-DDEFAULT_CHARSET=utf8"
223 "-DDEFAULT_COLLATION=utf8_general_ci"
224 "-DMYSQL_DATADIR=/var/lib/mysql"
225 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
226 "-DINSTALL_INFODIR=share/mysql/docs"
227 "-DINSTALL_MANDIR=share/man"
228 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
229 "-DINSTALL_SCRIPTDIR=bin"
230 "-DINSTALL_INCLUDEDIR=include/mysql"
231 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
232 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
233 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
234 "-DINSTALL_DOCDIR=share/mysql/docs"
235 "-DINSTALL_SHAREDIR=share/mysql")
236 #:phases
237 (modify-phases %standard-phases
238 (add-before
239 'configure 'pre-configure
240 (lambda _
241 (setenv "CONFIG_SHELL" (which "sh"))
77631745
SB
242 #t))
243 (add-after
244 'install 'post-install
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let* ((out (assoc-ref outputs "out"))
247 (test (assoc-ref outputs "test")))
248 (substitute* (string-append out "/bin/mysql_install_db")
249 (("basedir=\"\"")
250 (string-append "basedir=\"" out "\"")))
251 ;; Remove unneeded files for testing.
252 (with-directory-excursion out
253 (for-each delete-file-recursively
254 '("data" "mysql-test" "sql-bench"
255 "share/man/man1/mysql-test-run.pl.1")))))))))
256 (native-inputs
257 `(("bison" ,bison)
258 ("perl" ,perl)))
259 (inputs
260 `(("jemalloc" ,jemalloc)
261 ("libaio" ,libaio)
262 ("libxml2" ,libxml2)
263 ("ncurses" ,ncurses)
264 ("openssl" ,openssl)
265 ("pcre" ,pcre)
266 ("zlib" ,zlib)))
267 (home-page "https://mariadb.org/")
268 (synopsis "SQL database server")
269 (description
270 "MariaDB is a multi-user and multi-threaded SQL database server, designed
271as a drop-in replacement of MySQL.")
272 (license gpl2)))
273
5f96f303
LC
274(define-public postgresql
275 (package
276 (name "postgresql")
dbeaf8f2 277 (version "9.5.2")
5f96f303
LC
278 (source (origin
279 (method url-fetch)
dbeaf8f2 280 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
9020890b 281 version "/postgresql-" version ".tar.bz2"))
5f96f303
LC
282 (sha256
283 (base32
dbeaf8f2 284 "0hbwwhh0pz0a6vf8j5bskiq7gmz9rwc9ywcqyhg5asshckj35lgq"))))
5f96f303 285 (build-system gnu-build-system)
dd213082
JD
286 (arguments
287 `(#:phases
288 (modify-phases %standard-phases
289 (add-before 'configure 'patch-/bin/sh
290 (lambda _
291 ;; Refer to the actual shell.
292 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
293 "src/bin/psql/command.c")
294 (("/bin/sh") (which "sh")))
295 #t)))))
5f96f303
LC
296 (inputs
297 `(("readline" ,readline)
298 ("zlib" ,zlib)))
299 (home-page "http://www.postgresql.org/")
300 (synopsis "Powerful object-relational database system")
301 (description
302 "PostgreSQL is a powerful object-relational database system. It is fully
303ACID compliant, has full support for foreign keys, joins, views, triggers, and
304stored procedures (in multiple languages). It includes most SQL:2008 data
305types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
306TIMESTAMP. It also supports storage of binary large objects, including
307pictures, sounds, or video.")
308 (license (x11-style "file://COPYRIGHT"))))
309
310(define-public recutils
311 (package
312 (name "recutils")
313 (version "1.7")
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "mirror://gnu/recutils/recutils-"
317 version ".tar.gz"))
318 (sha256
319 (base32
320 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
321 (build-system gnu-build-system)
322
323 ;; Running tests in parallel leads to test failures and crashes in
324 ;; torture/utils.
b747a9db
LF
325 (arguments '(#:parallel-tests? #f
326 #:configure-flags
327 (list (string-append "--with-bash-headers="
328 (assoc-ref %build-inputs "bash:include")
329 "/include/bash"))))
5f96f303 330
2d32d153 331 (native-inputs `(("emacs" ,emacs-no-x)
7ae7ca0e 332 ("bc" ,bc)
b747a9db 333 ("bash:include" ,bash "include")
b3546174 334 ("libuuid" ,util-linux)))
5f96f303
LC
335
336 ;; TODO: Add more optional inputs.
5f96f303
LC
337 (inputs `(("curl" ,curl)
338 ("libgcrypt" ,libgcrypt)
339 ("check" ,check)))
340 (synopsis "Manipulate plain text files as databases")
341 (description
342 "GNU Recutils is a set of tools and libraries for creating and
343manipulating text-based, human-editable databases. Despite being text-based,
344databases created with Recutils carry all of the expected features such as
c5779c93
LC
345unique fields, primary keys, time stamps and more. Many different field
346types are supported, as is encryption.")
5f96f303
LC
347 (license gpl3+)
348 (home-page "http://www.gnu.org/software/recutils/")))
349
350(define-public sqlite
351 (package
352 (name "sqlite")
b2476513 353 (version "3.10.0")
5f96f303
LC
354 (source (origin
355 (method url-fetch)
356 ;; TODO: Download from sqlite.org once this bug :
357 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
358 ;; has been fixed.
359 (uri (let ((numeric-version
360 (match (string-split version #\.)
361 ((first-digit other-digits ...)
362 (string-append first-digit
363 (string-pad-right
364 (string-concatenate
365 (map (cut string-pad <> 2 #\0)
366 other-digits))
367 6 #\0))))))
42e66649
SB
368 (list
369 (string-append
75710da6
LC
370 "https://fossies.org/linux/misc/sqlite-autoconf-"
371 numeric-version ".tar.gz")
42e66649 372 (string-append
75710da6
LC
373 "http://distfiles.gentoo.org/distfiles/"
374 "/sqlite-autoconf-" numeric-version ".tar.gz"))
6f96706d
LC
375
376 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
377 ;; below, returning 200 and showing an advertising page.
378 ;; (string-append
379 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
380 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
381 ))
5f96f303
LC
382 (sha256
383 (base32
b2476513 384 "0hhhv6si0pyf5i8bv7a71953m0b4gk6s3j2h09caf7vif0njkk23"))))
5f96f303 385 (build-system gnu-build-system)
8f1d22b7 386 (inputs `(("readline" ,readline)))
49689377
MW
387 (arguments
388 `(#:configure-flags
389 ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to
390 ;; CFLAGS. GNU Icecat will refuse to use the system SQLite unless these
391 ;; options are enabled.
392 '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY")))
5f96f303
LC
393 (home-page "http://www.sqlite.org/")
394 (synopsis "The SQLite database management system")
395 (description
396 "SQLite is a software library that implements a self-contained, serverless,
35b9e423
EB
397zero-configuration, transactional SQL database engine. SQLite is the most
398widely deployed SQL database engine in the world. The source code for SQLite
399is in the public domain.")
5f96f303 400 (license public-domain)))
db60b1d9
LC
401
402(define-public tdb
403 (package
404 (name "tdb")
ca473fc2 405 (version "1.3.8")
db60b1d9
LC
406 (source (origin
407 (method url-fetch)
ca473fc2 408 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
db60b1d9
LC
409 version ".tar.gz"))
410 (sha256
411 (base32
ca473fc2 412 "1cg6gmpgn36dd4bsp3j9k3hyrm87d8hdigqyyqxw5jga4w2aq186"))))
db60b1d9
LC
413 (build-system gnu-build-system)
414 (arguments
415 '(#:phases (alist-replace
416 'configure
417 (lambda* (#:key outputs #:allow-other-keys)
418 (let ((out (assoc-ref outputs "out")))
419 ;; The 'configure' script is a wrapper for Waf and
420 ;; doesn't recognize things like '--enable-fast-install'.
421 (zero? (system* "./configure"
422 (string-append "--prefix=" out)))))
423 %standard-phases)))
424 (native-inputs
425 `(;; TODO: Build the documentation.
426 ;; ("docbook-xsl" ,docbook-xsl)
427 ;; ("libxml2" ,libxml2)
428 ;; ("libxslt" ,libxslt)
429 ("python" ,python-2))) ;for the Waf build system
430 (home-page "http://tdb.samba.org/")
35b9e423 431 (synopsis "Trivial database")
db60b1d9
LC
432 (description
433 "TDB is a Trivial Database. In concept, it is very much like GDBM,
434and BSD's DB except that it allows multiple simultaneous writers and uses
435locking internally to keep writers from trampling on each other. TDB is also
436extremely small.")
437 (license lgpl3+)))
274da61d
LC
438
439(define-public perl-dbi
440 (package
441 (name "perl-dbi")
442 (version "1.631")
443 (source (origin
444 (method url-fetch)
445 (uri (string-append
446 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
447 version ".tar.gz"))
448 (sha256
449 (base32
450 "04fmrnchhwi7jx4niaiv93vmi343hdm3xj04w9zr2m9hhqh782np"))))
451 (build-system perl-build-system)
452 (synopsis "Database independent interface for Perl")
453 (description "This package provides an database interface for Perl.")
454 (home-page "http://search.cpan.org/~timb/DBI-1.631/DBI.pm")
455 (license (package-license perl))))
456
feae3395
EB
457(define-public perl-dbix-class
458 (package
459 (name "perl-dbix-class")
460 (version "0.082810")
461 (source
462 (origin
463 (method url-fetch)
464 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
465 "DBIx-Class-" version ".tar.gz"))
466 (sha256
467 (base32
468 "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
469 (build-system perl-build-system)
470 (native-inputs
471 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
472 ("perl-file-temp" ,perl-file-temp)
473 ("perl-package-stash" ,perl-package-stash)
474 ("perl-test-deep" ,perl-test-deep)
475 ("perl-test-exception" ,perl-test-exception)
476 ("perl-test-warn" ,perl-test-warn)))
477 (propagated-inputs
478 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
479 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
480 ("perl-class-inspector" ,perl-class-inspector)
481 ("perl-config-any" ,perl-config-any)
482 ("perl-context-preserve" ,perl-context-preserve)
483 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
484 ("perl-data-page" ,perl-data-page)
485 ("perl-dbi" ,perl-dbi)
486 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
487 ("perl-hash-merge" ,perl-hash-merge)
488 ("perl-module-find" ,perl-module-find)
489 ("perl-moo" ,perl-moo)
490 ("perl-mro-compat" ,perl-mro-compat)
491 ("perl-namespace-clean" ,perl-namespace-clean)
492 ("perl-path-class" ,perl-path-class)
493 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
494 ("perl-scope-guard" ,perl-scope-guard)
495 ("perl-sql-abstract" ,perl-sql-abstract)
496 ("perl-sub-name" ,perl-sub-name)
497 ("perl-text-balanced" ,perl-text-balanced)
498 ("perl-try-tiny" ,perl-try-tiny)))
499 (home-page "http://search.cpan.org/dist/DBIx-Class")
500 (synopsis "Extensible and flexible object <-> relational mapper")
501 (description "An SQL to OO mapper with an object API inspired by
502Class::DBI (with a compatibility layer as a springboard for porting) and a
503resultset API that allows abstract encapsulation of database operations. It
504aims to make representing queries in your code as perl-ish as possible while
505still providing access to as many of the capabilities of the database as
506possible, including retrieving related records from multiple tables in a
507single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
508\"ORDER BY\" and \"HAVING\" support.")
e61fd0f0
EB
509 (license (package-license perl))))
510
4e4039e5
EB
511(define-public perl-dbix-class-cursor-cached
512 (package
513 (name "perl-dbix-class-cursor-cached")
514 (version "1.001002")
515 (source
516 (origin
517 (method url-fetch)
518 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
519 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
520 (sha256
521 (base32
522 "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
523 (build-system perl-build-system)
524 (native-inputs
525 `(("perl-cache-cache" ,perl-cache-cache)
526 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
527 (propagated-inputs
528 `(("perl-carp-clan" ,perl-carp-clan)
529 ("perl-dbix-class" ,perl-dbix-class)))
530 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
531 (synopsis "Cursor with built-in caching support")
532 (description "DBIx::Class::Cursor::Cached provides a cursor class with
533built-in caching support.")
534 (license (package-license perl))))
535
e61fd0f0
EB
536(define-public perl-dbix-class-introspectablem2m
537 (package
538 (name "perl-dbix-class-introspectablem2m")
539 (version "0.001001")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
544 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
545 (sha256
546 (base32
547 "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
548 (build-system perl-build-system)
549 (propagated-inputs
550 `(("perl-dbix-class" ,perl-dbix-class)))
551 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
552 (synopsis "Introspect many-to-many relationships")
553 (description "Because the many-to-many relationships are not real
554relationships, they can not be introspected with DBIx::Class. Many-to-many
555relationships are actually just a collection of convenience methods installed
556to bridge two relationships. This DBIx::Class component can be used to store
557all relevant information about these non-relationships so they can later be
558introspected and examined.")
708155df
EB
559 (license (package-license perl))))
560
561(define-public perl-dbix-class-schema-loader
562 (package
563 (name "perl-dbix-class-schema-loader")
564 (version "0.07042")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
569 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
570 (sha256
571 (base32
572 "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
573 (build-system perl-build-system)
574 (native-inputs
575 `(("perl-config-any" ,perl-config-any)
576 ("perl-config-general" ,perl-config-general)
577 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
578 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
579 ("perl-moose" ,perl-moose)
580 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
581 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
582 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
583 ("perl-test-deep" ,perl-test-deep)
584 ("perl-test-differences" ,perl-test-differences)
585 ("perl-test-exception" ,perl-test-exception)
586 ("perl-test-pod" ,perl-test-pod)
587 ("perl-test-warn" ,perl-test-warn)))
588 (propagated-inputs
589 `(("perl-class-unload" ,perl-class-unload)
590 ("perl-class-inspector" ,perl-class-inspector)
591 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
592 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
593 ("perl-carp-clan" ,perl-carp-clan)
594 ("perl-data-dump" ,perl-data-dump)
595 ("perl-dbix-class" ,perl-dbix-class)
596 ("perl-hash-merge" ,perl-hash-merge)
597 ("perl-list-moreutils" ,perl-list-moreutils)
598 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
599 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
600 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
601 ("perl-namespace-clean" ,perl-namespace-clean)
602 ("perl-mro-compat" ,perl-mro-compat)
603 ("perl-scope-guard" ,perl-scope-guard)
604 ("perl-string-camelcase" ,perl-string-camelcase)
605 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
606 ("perl-sub-name" ,perl-sub-name)
607 ("perl-try-tiny" ,perl-try-tiny)))
608 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
609 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
610 (synopsis "Create a DBIx::Class::Schema based on a database")
611 (description "DBIx::Class::Schema::Loader automates the definition of a
612DBIx::Class::Schema by scanning database table definitions and setting up the
613columns, primary keys, unique constraints and relationships.")
274da61d
LC
614 (license (package-license perl))))
615
186eb132
EB
616(define-public perl-dbd-pg
617 (package
618 (name "perl-dbd-pg")
619 (version "3.5.1")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
624 "DBD-Pg-" version ".tar.gz"))
625 (sha256
626 (base32
627 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
628 (build-system perl-build-system)
629 (native-inputs
630 `(("perl-dbi" ,perl-dbi)))
631 (propagated-inputs
632 `(("perl-dbi" ,perl-dbi)
633 ("postgresql" ,postgresql)))
634 (home-page "http://search.cpan.org/dist/DBD-Pg")
635 (synopsis "DBI PostgreSQL interface")
636 (description "")
637 (license (package-license perl))))
638
4b7857a4
RW
639(define-public perl-dbd-mysql
640 (package
641 (name "perl-dbd-mysql")
642 (version "4.033")
643 (source
644 (origin
645 (method url-fetch)
646 (uri (string-append "mirror://cpan/authors/id/C/CA/CAPTTOFU/"
647 "DBD-mysql-" version ".tar.gz"))
648 (sha256
649 (base32
650 "0769xakykps0cx368g4vaips4w3bjk383rianiavq7sq6g6bp66c"))))
651 (build-system perl-build-system)
652 ;; Tests require running MySQL server
653 (arguments `(#:tests? #f))
654 (propagated-inputs
655 `(("perl-dbi" ,perl-dbi)
656 ("mysql" ,mysql)))
657 (home-page "http://search.cpan.org/dist/DBD-mysql")
658 (synopsis "DBI MySQL interface")
659 (description "This package provides a MySQL driver for the Perl5
660@dfn{Database Interface} (DBI).")
661 (license (package-license perl))))
662
274da61d
LC
663(define-public perl-dbd-sqlite
664 (package
665 (name "perl-dbd-sqlite")
666 (version "1.42")
667 (source (origin
668 (method url-fetch)
669 (uri (string-append
670 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
671 version ".tar.gz"))
672 (sha256
673 (base32
674 "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
675 (build-system perl-build-system)
676 (inputs `(("sqlite" ,sqlite)))
677 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
678 (synopsis "SQlite interface for Perl")
679 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
680the entire thing in the distribution. So in order to get a fast transaction
681capable RDBMS working for your Perl project you simply have to install this
682module, and nothing else.")
683 (license (package-license perl))
684 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
14e84b2d 685
dd90952e
EB
686(define-public perl-sql-abstract
687 (package
688 (name "perl-sql-abstract")
689 (version "1.81")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
694 "SQL-Abstract-" version ".tar.gz"))
695 (sha256
696 (base32
697 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
698 (build-system perl-build-system)
699 (native-inputs
700 `(("perl-test-deep" ,perl-test-deep)
701 ("perl-test-exception" ,perl-test-exception)
702 ("perl-test-warn" ,perl-test-warn)))
703 (propagated-inputs
704 `(("perl-hash-merge" ,perl-hash-merge)
705 ("perl-moo" ,perl-moo)
706 ("perl-mro-compat" ,perl-mro-compat)
707 ("perl-text-balanced" ,perl-text-balanced)))
708 (home-page "http://search.cpan.org/dist/SQL-Abstract")
709 (synopsis "Generate SQL from Perl data structures")
710 (description "This module was inspired by the excellent DBIx::Abstract.
711While based on the concepts used by DBIx::Abstract, the concepts used have
712been modified to make the SQL easier to generate from Perl data structures.
713The underlying idea is for this module to do what you mean, based on the data
714structures you provide it, so that you don't have to modify your code every
e881752c 715time your data changes.")
dd90952e 716 (license (package-license perl))))
14e84b2d 717
b4dcb026
EB
718(define-public perl-sql-splitstatement
719 (package
720 (name "perl-sql-splitstatement")
721 (version "1.00020")
722 (source
723 (origin
724 (method url-fetch)
725 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
726 "SQL-SplitStatement-" version ".tar.gz"))
727 (sha256
728 (base32
729 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
730 (build-system perl-build-system)
731 (native-inputs
732 `(("perl-test-exception" ,perl-test-exception)))
733 (propagated-inputs
734 `(("perl-class-accessor" ,perl-class-accessor)
735 ("perl-list-moreutils" ,perl-list-moreutils)
736 ("perl-regexp-common" ,perl-regexp-common)
737 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
738 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
739 (synopsis "Split SQL code into atomic statements")
740 (description "This module tries to split any SQL code, even including
741non-standard extensions, into the atomic statements it is composed of.")
742 (license (package-license perl))))
743
718c89c1
EB
744(define-public perl-sql-tokenizer
745 (package
746 (name "perl-sql-tokenizer")
747 (version "0.24")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
752 "SQL-Tokenizer-" version ".tar.gz"))
753 (sha256
754 (base32
755 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
756 (build-system perl-build-system)
757 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
758 (synopsis "SQL tokenizer")
759 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
760claim to be a parser or query verifier. It just creates sane tokens from a
761valid SQL query.")
762 (license (package-license perl))))
763
14e84b2d
JD
764(define-public unixodbc
765 (package
766 (name "unixodbc")
767 (version "2.3.2")
768 (source (origin
769 (method url-fetch)
e881752c 770 (uri
14e84b2d
JD
771 (string-append
772 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" version ".tar.gz"))
773 (sha256
774 (base32 "16jw5fq7wgfky6ak1h2j2pqx99jivsdl4q8aq6immpr55xs5jd4w"))))
775 (build-system gnu-build-system)
776 (synopsis "Data source abstraction library")
777 (description "Unixodbc is a library providing an API with which to access
778data sources. Data sources include SQL Servers and any software with an ODBC
779Driver.")
e881752c 780 (license lgpl2.1+)
14e84b2d
JD
781 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
782 (home-page "http://www.unixodbc.org")))
b4a9c924
EB
783
784(define-public unqlite
785 (package
786 (name "unqlite")
787 (version "1.1.6")
788 (source (origin
789 (method url-fetch)
790 ;; Contains bug fixes against the official release, and has an
791 ;; autotooled build system.
792 (uri (string-append "https://github.com/aidin36/tocc/releases/"
793 "download/v1.0.0/"
794 "unqlite-unofficial-" version ".tar.gz"))
795 (sha256
796 (base32
797 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
798 (build-system gnu-build-system)
799 (arguments `(#:tests? #f)) ;No check target
800 (home-page "http://www.unqlite.org")
801 (synopsis "In-memory key/value and document store")
802 (description
803 "UnQLite is an in-process software library which implements a
804self-contained, serverless, zero-configuration, transactional NoSQL
805database engine. UnQLite is a document store database similar to
806MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
69b4ffcf 807similar to BerkeleyDB, LevelDB, etc.")
b4a9c924 808 (license bsd-2)))
463f6766
DT
809
810(define-public redis
811 (package
812 (name "redis")
4da5fe6f 813 (version "3.0.7")
463f6766
DT
814 (source (origin
815 (method url-fetch)
816 (uri (string-append "http://download.redis.io/releases/redis-"
817 version".tar.gz"))
818 (sha256
819 (base32
4da5fe6f 820 "08vzfdr67gp3lvk770qpax2c5g2sx8hn6p64jn3jddrvxb2939xj"))))
463f6766
DT
821 (build-system gnu-build-system)
822 (arguments
823 '(#:tests? #f ; tests related to master/slave and replication fail
824 #:phases (modify-phases %standard-phases
825 (delete 'configure))
826 #:make-flags `("CC=gcc"
827 "MALLOC=libc"
828 ,(string-append "PREFIX="
829 (assoc-ref %outputs "out")))))
830 (synopsis "Key-value cache and store")
831 (description "Redis is an advanced key-value cache and store. Redis
832supports many data structures including strings, hashes, lists, sets, sorted
833sets, bitmaps and hyperloglogs.")
834 (home-page "http://redis.io/")
835 (license bsd-3)))
a65e2a02 836
837(define-public kyotocabinet
838 (package
839 (name "kyotocabinet")
840 (version "1.2.76")
841 (source (origin
842 (method url-fetch)
843 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
844 name "-" version ".tar.gz"))
845 (sha256
846 (base32
847 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
848 (build-system gnu-build-system)
849 (arguments
850 `(#:configure-flags
851 (list
852 (string-append "LDFLAGS=-Wl,-rpath="
853 (assoc-ref %outputs "out") "/lib"))))
854 (inputs `(("zlib" ,zlib)))
855 (home-page "http://fallabs.com/kyotocabinet/")
856 (synopsis
857 "Kyoto Cabinet is a modern implementation of the DBM database")
858 (description
859 "Kyoto Cabinet is a standalone file-based database that supports Hash
860and B+ Tree data storage models. It is a fast key-value lightweight
861database and supports many programming languages. It is a NoSQL database.")
862 (license gpl3+)))