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