gnu: rocksdb: Disable failing test.
[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>
9a9d6d78 10;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
bdc11dc4 11;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
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>
b9f771a7 16;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
259a94e9 17;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
5f96f303
LC
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages databases)
35 #:use-module (gnu packages)
06a035db 36 #:use-module (gnu packages algebra)
4c6aa73b
RJ
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages avahi)
77e52190 39 #:use-module (gnu packages base)
b747a9db 40 #:use-module (gnu packages bash)
06a035db 41 #:use-module (gnu packages bison)
23bbd7dd 42 #:use-module (gnu packages boost)
06a035db
MB
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
62ea44fc 45 #:use-module (gnu packages crypto)
06a035db
MB
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages cyrus-sasl)
48 #:use-module (gnu packages emacs)
4c6aa73b
RJ
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages glib)
06a035db
MB
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages jemalloc)
708155df 53 #:use-module (gnu packages language)
5f96f303 54 #:use-module (gnu packages linux)
5f96f303 55 #:use-module (gnu packages ncurses)
d3c6ad0a 56 #:use-module (gnu packages parallel)
77631745 57 #:use-module (gnu packages pcre)
06a035db 58 #:use-module (gnu packages perl)
4c6aa73b 59 #:use-module (gnu packages pkg-config)
d3c6ad0a 60 #:use-module (gnu packages popt)
06a035db 61 #:use-module (gnu packages python)
4c6aa73b 62 #:use-module (gnu packages rdf)
06a035db
MB
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages tls)
77631745 66 #:use-module (gnu packages xml)
0e1b262e 67 #:use-module ((guix licenses) #:prefix license:)
5f96f303
LC
68 #:use-module (guix packages)
69 #:use-module (guix download)
70 #:use-module (guix build-system gnu)
274da61d 71 #:use-module (guix build-system perl)
4d98bfaf 72 #:use-module (guix build-system python)
77631745 73 #:use-module (guix build-system cmake)
329d13b8 74 #:use-module (guix utils)
5f96f303
LC
75 #:use-module (srfi srfi-26)
76 #:use-module (ice-9 match))
77
4c6aa73b
RJ
78(define-public 4store
79 (package
80 (name "4store")
81 (version "1.1.6")
82 (source (origin
83 (method url-fetch)
84 (uri (string-append "https://github.com/garlik/4store/archive/v"
85 version ".tar.gz"))
86 (file-name (string-append name "-" version ".tar.gz"))
87 (sha256
88 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
89 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
90 (build-system gnu-build-system)
91 (native-inputs
92 `(("perl" ,perl)
93 ("python" ,python-2)
94 ("autoconf" ,autoconf)
95 ("automake" ,automake)
b94a6ca0 96 ("gettext" ,gettext-minimal)
4c6aa73b 97 ("libtool" ,libtool)
74c8b174 98 ("pcre" ,pcre "bin") ;for 'pcre-config'
4c6aa73b
RJ
99 ("pkg-config" ,pkg-config)))
100 (inputs
101 `(("glib" ,glib)
102 ("rasqal" ,rasqal)
103 ("libxml2" ,libxml2)
104 ("raptor2" ,raptor2)
105 ("readline" ,readline)
106 ("avahi" ,avahi)
4c6aa73b
RJ
107 ("cyrus-sasl" ,cyrus-sasl)
108 ("openssl" ,openssl)
109 ("util-linux" ,util-linux)))
110 (arguments
111 `(#:phases
112 (modify-phases %standard-phases
113 (add-before 'configure 'generate-configure
114 (lambda _
115 (zero? (system* "./autogen.sh")))))))
116 ;; http://www.4store.org has been down for a while now.
117 (home-page "https://github.com/garlik/4store")
118 (synopsis "Clustered RDF storage and query engine")
119 (description "4store is a RDF/SPARQL store written in C, supporting
120either single machines or networked clusters.")
ba8b9f8d 121 (license license:gpl3+)))
4c6aa73b 122
b416aadf
LC
123(define-public gdbm
124 (package
125 (name "gdbm")
2135d1eb 126 (version "1.12")
b416aadf
LC
127 (source (origin
128 (method url-fetch)
129 (uri (string-append "mirror://gnu/gdbm/gdbm-"
130 version ".tar.gz"))
131 (sha256
132 (base32
2135d1eb 133 "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
b416aadf
LC
134 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
135 (build-system gnu-build-system)
6fd52309 136 (home-page "http://www.gnu.org.ua/software/gdbm")
b416aadf
LC
137 (synopsis
138 "Hash library of database functions compatible with traditional dbm")
139 (description
140 "GDBM is a library for manipulating hashed databases. It is used to
141store key/value pairs in a file in a manner similar to the Unix dbm library
142and provides interfaces to the traditional file format.")
ba8b9f8d 143 (license license:gpl3+)))
b416aadf 144
5f96f303
LC
145(define-public bdb
146 (package
147 (name "bdb")
18e681bf 148 (version "6.2.23")
5f96f303
LC
149 (source (origin
150 (method url-fetch)
18e681bf
EF
151 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
152 version ".tar.gz"))
153 (sha256
154 (base32
155 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
5f96f303
LC
156 (build-system gnu-build-system)
157 (outputs '("out" ; programs, libraries, headers
158 "doc")) ; 94 MiB of HTML docs
159 (arguments
160 '(#:tests? #f ; no check target available
ff1f39e3 161 #:disallowed-references ("doc")
5bef7749
AE
162 #:phases
163 (alist-replace
164 'configure
165 (lambda* (#:key outputs #:allow-other-keys)
166 (let ((out (assoc-ref outputs "out"))
167 (doc (assoc-ref outputs "doc")))
168 ;; '--docdir' is not honored, so we need to patch.
169 (substitute* "dist/Makefile.in"
170 (("docdir[[:blank:]]*=.*")
171 (string-append "docdir = " doc "/share/doc/bdb")))
5f96f303 172
5bef7749
AE
173 (zero?
174 (system* "./dist/configure"
175 (string-append "--prefix=" out)
176 (string-append "CONFIG_SHELL=" (which "bash"))
177 (string-append "SHELL=" (which "bash"))
5f96f303 178
0e50d521
LC
179 ;; Remove 7 MiB of .a files.
180 "--disable-static"
181
5bef7749
AE
182 ;; The compatibility mode is needed by some packages,
183 ;; notably iproute2.
b86c013c
AE
184 "--enable-compat185"
185
186 ;; The following flag is needed so that the inclusion
187 ;; of db_cxx.h into C++ files works; it leads to
188 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
189 "--enable-cxx"))))
5f96f303 190 %standard-phases)))
35b9e423 191 (synopsis "Berkeley database")
5f96f303
LC
192 (description
193 "Berkeley DB is an embeddable database allowing developers the choice of
194SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
a24fda81
MB
195 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
196 ;; files are covered by the 3-clause BSD license.
ba8b9f8d 197 (license (list license:agpl3+ license:bsd-3))
5f96f303
LC
198 (home-page
199 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
200
557fa39c
EF
201(define-public bdb-5.3
202 (package (inherit bdb)
203 (name "bdb")
204 (version "5.3.28")
ba8b9f8d
MB
205 (license (license:non-copyleft "file://LICENSE"
206 "See LICENSE in the distribution."))
557fa39c
EF
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
210 version ".tar.gz"))
211 (sha256
212 (base32
9a9d6d78
EF
213 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
214 (arguments
215 `(#:tests? #f ; no check target available
216 #:disallowed-references ("doc")
217 #:phases
218 (alist-replace
219 'configure
220 (lambda* (#:key outputs #:allow-other-keys)
221 (let ((out (assoc-ref outputs "out"))
222 (doc (assoc-ref outputs "doc")))
223 ;; '--docdir' is not honored, so we need to patch.
224 (substitute* "dist/Makefile.in"
225 (("docdir[[:blank:]]*=.*")
226 (string-append "docdir = " doc "/share/doc/bdb")))
227
228 (zero?
229 (system* "./dist/configure"
230 (string-append "--prefix=" out)
231 (string-append "CONFIG_SHELL=" (which "bash"))
232 (string-append "SHELL=" (which "bash"))
233
234 ;; Bdb doesn't recognize aarch64 as an architecture.
235 ,@(if (string=? "aarch64-linux" (%current-system))
236 '("--build=aarch64-unknown-linux-gnu")
237 '())
238
239 ;; Remove 7 MiB of .a files.
240 "--disable-static"
241
242 ;; The compatibility mode is needed by some packages,
243 ;; notably iproute2.
244 "--enable-compat185"
245
246 ;; The following flag is needed so that the inclusion
247 ;; of db_cxx.h into C++ files works; it leads to
248 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
249 "--enable-cxx"))))
250 %standard-phases)))))
557fa39c 251
b9f771a7
MB
252(define-public leveldb
253 (package
254 (name "leveldb")
04c88363 255 (version "1.20")
b9f771a7
MB
256 (source (origin
257 (method url-fetch)
258 (uri (string-append "https://github.com/google/leveldb"
259 "/archive/v" version ".tar.gz"))
260 (file-name (string-append name "-" version ".tar.gz"))
261 (sha256
262 (base32
04c88363 263 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
b9f771a7
MB
264 (build-system gnu-build-system)
265 (arguments
266 '(#:make-flags (list "CC=gcc")
267 #:phases
268 (modify-phases %standard-phases
269 (delete 'configure)
270 (replace 'install
271 ;; There is no install target, so we do it here.
272 (lambda* (#:key outputs #:allow-other-keys)
273 (let* ((out (assoc-ref outputs "out"))
274 (lib (string-append out "/lib"))
275 (include (string-append out "/include")))
276 (for-each (lambda (file)
277 (install-file file lib))
278 (find-files "out-shared" "^libleveldb\\.so.*$"))
279 (copy-recursively "include" include)
280 #t))))))
281 (inputs
282 `(("snappy" ,snappy)))
283 (home-page "http://leveldb.org/")
284 (synopsis "Fast key-value storage library")
285 (description
286 "LevelDB is a fast key-value storage library that provides an ordered
287mapping from string keys to string values.")
ba8b9f8d 288 (license license:bsd-3)))
b9f771a7 289
5f96f303
LC
290(define-public mysql
291 (package
292 (name "mysql")
ab71ea93 293 (version "5.7.18")
5f96f303
LC
294 (source (origin
295 (method url-fetch)
23bbd7dd
EF
296 (uri (list (string-append
297 "http://dev.mysql.com/get/Downloads/MySQL-"
298 (version-major+minor version) "/"
299 name "-" version ".tar.gz")
300 (string-append
301 "http://downloads.mysql.com/archives/get/file/"
302 name "-" version ".tar.gz")))
5f96f303
LC
303 (sha256
304 (base32
ab71ea93 305 "18m1mr55k9zmvnyqs0wr50csqsz3scs09fykh60wsml6c3np2p8b"))))
329d13b8
SB
306 (build-system cmake-build-system)
307 (arguments
69419655 308 `(#:configure-flags
329d13b8
SB
309 '("-DBUILD_CONFIG=mysql_release"
310 "-DWITH_SSL=system"
311 "-DWITH_ZLIB=system"
312 "-DDEFAULT_CHARSET=utf8"
313 "-DDEFAULT_COLLATION=utf8_general_ci"
314 "-DMYSQL_DATADIR=/var/lib/mysql"
315 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
316 "-DINSTALL_INFODIR=share/mysql/docs"
317 "-DINSTALL_MANDIR=share/man"
318 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
319 "-DINSTALL_SCRIPTDIR=bin"
320 "-DINSTALL_INCLUDEDIR=include/mysql"
321 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
322 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
323 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
324 "-DINSTALL_DOCDIR=share/mysql/docs"
325 "-DINSTALL_SHAREDIR=share/mysql"
326 ;; Get rid of test data.
327 "-DINSTALL_MYSQLTESTDIR="
3f289db6
LC
328 "-DINSTALL_SQLBENCHDIR=")
329 #:phases (modify-phases %standard-phases
330 (add-after
23bbd7dd
EF
331 'unpack 'patch-boost-version
332 (lambda _
333 ;; Mysql wants boost-1.59.0 specifically
334 (substitute* "cmake/boost.cmake"
69419655
EB
335 (("59")
336 ,(match (string-split (package-version boost) #\.)
337 ((_ minor . _) minor))))))
6a52df50
LC
338 (add-after
339 'install 'remove-extra-binaries
340 (lambda* (#:key outputs #:allow-other-keys)
341 (let ((out (assoc-ref outputs "out")))
342 ;; Remove the 3 *_embedded files, which weigh in at
343 ;; 14 MiB each.
344 (for-each delete-file
345 (find-files (string-append out "/bin")
346 "_embedded$"))
b4f67b7e
EF
347 #t))))
348 ;; On aarch64 the test suite runs out of memory and fails.
349 ,@(if (string-prefix? "aarch64-linux"
350 (or (%current-target-system) (%current-system)))
351 '(#:tests? #f)
352 '())))
329d13b8
SB
353 (native-inputs
354 `(("bison" ,bison)
355 ("perl" ,perl)))
5f96f303 356 (inputs
23bbd7dd
EF
357 `(("boost" ,boost)
358 ("libaio" ,libaio)
359 ("ncurses" ,ncurses)
5f96f303 360 ("openssl" ,openssl)
23bbd7dd 361 ("zlib" ,zlib)))
5f96f303 362 (home-page "http://www.mysql.com/")
9e771e3b 363 (synopsis "Fast, easy to use, and popular database")
5f96f303
LC
364 (description
365 "MySQL is a fast, reliable, and easy to use relational database
366management system that supports the standardized Structured Query
367Language.")
ba8b9f8d 368 (license license:gpl2)))
5f96f303 369
77631745
SB
370(define-public mariadb
371 (package
372 (name "mariadb")
bd102157 373 (version "10.1.22")
77631745
SB
374 (source (origin
375 (method url-fetch)
376 (uri (string-append "https://downloads.mariadb.org/f/"
377 name "-" version "/source/"
378 name "-" version ".tar.gz"))
379 (sha256
380 (base32
bd102157 381 "1kk674mx2bf22yivvzv1al5gdg9kyxar47m282bylb6kg8p5gc5w"))))
77631745
SB
382 (build-system cmake-build-system)
383 (arguments
384 '(#:configure-flags
385 '("-DBUILD_CONFIG=mysql_release"
386 "-DDEFAULT_CHARSET=utf8"
387 "-DDEFAULT_COLLATION=utf8_general_ci"
388 "-DMYSQL_DATADIR=/var/lib/mysql"
389 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
390 "-DINSTALL_INFODIR=share/mysql/docs"
391 "-DINSTALL_MANDIR=share/man"
392 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
393 "-DINSTALL_SCRIPTDIR=bin"
394 "-DINSTALL_INCLUDEDIR=include/mysql"
395 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
396 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
397 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
398 "-DINSTALL_DOCDIR=share/mysql/docs"
399 "-DINSTALL_SHAREDIR=share/mysql")
400 #:phases
401 (modify-phases %standard-phases
402 (add-before
403 'configure 'pre-configure
404 (lambda _
405 (setenv "CONFIG_SHELL" (which "sh"))
77631745
SB
406 #t))
407 (add-after
408 'install 'post-install
409 (lambda* (#:key outputs #:allow-other-keys)
410 (let* ((out (assoc-ref outputs "out"))
411 (test (assoc-ref outputs "test")))
412 (substitute* (string-append out "/bin/mysql_install_db")
413 (("basedir=\"\"")
414 (string-append "basedir=\"" out "\"")))
415 ;; Remove unneeded files for testing.
416 (with-directory-excursion out
417 (for-each delete-file-recursively
418 '("data" "mysql-test" "sql-bench"
419 "share/man/man1/mysql-test-run.pl.1")))))))))
420 (native-inputs
421 `(("bison" ,bison)
422 ("perl" ,perl)))
423 (inputs
424 `(("jemalloc" ,jemalloc)
425 ("libaio" ,libaio)
426 ("libxml2" ,libxml2)
427 ("ncurses" ,ncurses)
428 ("openssl" ,openssl)
429 ("pcre" ,pcre)
430 ("zlib" ,zlib)))
431 (home-page "https://mariadb.org/")
432 (synopsis "SQL database server")
433 (description
434 "MariaDB is a multi-user and multi-threaded SQL database server, designed
435as a drop-in replacement of MySQL.")
ba8b9f8d 436 (license license:gpl2)))
77631745 437
5f96f303
LC
438(define-public postgresql
439 (package
440 (name "postgresql")
b9d38ad1 441 (version "9.6.2")
5f96f303
LC
442 (source (origin
443 (method url-fetch)
dbeaf8f2 444 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
9020890b 445 version "/postgresql-" version ".tar.bz2"))
5f96f303
LC
446 (sha256
447 (base32
b9d38ad1 448 "1jahzqqw5inyvmacic2ihhj5f8z50lapci2fwws91h719ccbb1q1"))))
5f96f303 449 (build-system gnu-build-system)
dd213082
JD
450 (arguments
451 `(#:phases
452 (modify-phases %standard-phases
453 (add-before 'configure 'patch-/bin/sh
454 (lambda _
455 ;; Refer to the actual shell.
456 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
457 "src/bin/psql/command.c")
458 (("/bin/sh") (which "sh")))
459 #t)))))
5f96f303
LC
460 (inputs
461 `(("readline" ,readline)
462 ("zlib" ,zlib)))
d887f420 463 (home-page "https://www.postgresql.org/")
5f96f303
LC
464 (synopsis "Powerful object-relational database system")
465 (description
466 "PostgreSQL is a powerful object-relational database system. It is fully
467ACID compliant, has full support for foreign keys, joins, views, triggers, and
468stored procedures (in multiple languages). It includes most SQL:2008 data
469types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
470TIMESTAMP. It also supports storage of binary large objects, including
471pictures, sounds, or video.")
ba8b9f8d 472 (license (license:x11-style "file://COPYRIGHT"))))
5f96f303 473
259a94e9
TD
474(define-public qdbm
475 (package
476 (name "qdbm")
477 (version "1.8.78")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (string-append "http://fallabs.com/" name "/"
482 name "-" version ".tar.gz"))
483 (sha256
484 (base32
485 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
486 (build-system gnu-build-system)
487 (arguments
488 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
489 (assoc-ref %outputs "out")
490 "/lib"))))
491 (home-page "http://fallabs.com/qdbm")
492 (synopsis "Key-value database")
493 (description "QDBM is a library of routines for managing a
494database. The database is a simple data file containing key-value
495pairs. Every key and value is serial bytes with variable length.
496Binary data as well as character strings can be used as a key or a
497value. There is no concept of data tables or data types. Records are
498organized in a hash table or B+ tree.")
499 (license license:lgpl2.1+)))
500
5f96f303
LC
501(define-public recutils
502 (package
503 (name "recutils")
504 (version "1.7")
505 (source (origin
506 (method url-fetch)
507 (uri (string-append "mirror://gnu/recutils/recutils-"
508 version ".tar.gz"))
509 (sha256
510 (base32
511 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
512 (build-system gnu-build-system)
513
514 ;; Running tests in parallel leads to test failures and crashes in
515 ;; torture/utils.
b747a9db
LF
516 (arguments '(#:parallel-tests? #f
517 #:configure-flags
518 (list (string-append "--with-bash-headers="
519 (assoc-ref %build-inputs "bash:include")
c21af659
LC
520 "/include/bash"))
521
522 #:phases (modify-phases %standard-phases
523 (add-before 'build 'set-bash4.4-header-location
524 (lambda _
525 (substitute* "bash/Makefile.in"
526 ;; Adjust the header search path for Bash
527 ;; 4.4 in accordance with 'bash.pc'.
528 (("AM_CPPFLAGS = (.*)$" _ rest)
529 (string-append "AM_CPPFLAGS = "
530 "-I$(BASH_HEADERS)/include "
531 rest))
532
533 ;; Install to PREFIX/lib/bash to match Bash
534 ;; 4.4's search path.
535 (("^libdir = .*$")
536 "libdir = @libdir@/bash\n"))
537 #t)))))
5f96f303 538
b8fc3622 539 (native-inputs `(("emacs" ,emacs-minimal)
7ae7ca0e 540 ("bc" ,bc)
b747a9db 541 ("bash:include" ,bash "include")
b3546174 542 ("libuuid" ,util-linux)))
5f96f303
LC
543
544 ;; TODO: Add more optional inputs.
5f96f303
LC
545 (inputs `(("curl" ,curl)
546 ("libgcrypt" ,libgcrypt)
547 ("check" ,check)))
548 (synopsis "Manipulate plain text files as databases")
549 (description
550 "GNU Recutils is a set of tools and libraries for creating and
551manipulating text-based, human-editable databases. Despite being text-based,
552databases created with Recutils carry all of the expected features such as
c5779c93
LC
553unique fields, primary keys, time stamps and more. Many different field
554types are supported, as is encryption.")
ba8b9f8d 555 (license license:gpl3+)
6fd52309 556 (home-page "https://www.gnu.org/software/recutils/")))
5f96f303 557
d3c6ad0a
MB
558(define-public rocksdb
559 (package
560 (name "rocksdb")
2e93ee5f 561 (version "5.2.1")
d3c6ad0a
MB
562 (source (origin
563 (method url-fetch)
564 (uri (string-append "https://github.com/facebook/rocksdb"
565 "/archive/v" version ".tar.gz"))
566 (file-name (string-append name "-" version ".tar.gz"))
567 (sha256
568 (base32
2e93ee5f 569 "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb"))
d3c6ad0a
MB
570 (modules '((guix build utils)))
571 (snippet
572 '(begin
573 ;; TODO: unbundle gtest.
574 (delete-file "build_tools/gnu_parallel")
575 #t))))
576 (build-system gnu-build-system)
577 (arguments
578 '(#:make-flags (list "CC=gcc"
579 ;; Make the resulting library position-independent so the
580 ;; static version can be included in shared objects.
581 "EXTRA_CXXFLAGS=-fPIC"
582 (string-append "INSTALL_PATH="
583 (assoc-ref %outputs "out")))
584 #:phases
585 (modify-phases %standard-phases
586 (add-after 'unpack 'patch-Makefile
587 (lambda _
588 (substitute* "Makefile"
589 (("build_tools/gnu_parallel") "parallel")
590 (("#!/bin/sh") (string-append "#!" (which "sh"))))
591 #t))
592 (delete 'configure)
593 (add-before 'check 'disable-failing-tests
594 (lambda _
595 (substitute* "Makefile"
bf144793
MB
596 ;; This test fails with GCC-5 and is unmaintained.
597 ;; https://github.com/facebook/rocksdb/issues/2148
598 (("^[[:blank:]]+spatial_db_test[[:blank:]]+\\\\") "\\")
d3c6ad0a
MB
599 ;; These tests reliably fail due to "Too many open files".
600 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
601 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
602 #t))
603 (add-after
604 'check 'build-release-libraries
605 ;; The 'check' target depends on the default target which is compiled
606 ;; with debug symbols. The 'install' target depends on shared and
607 ;; static release targets so we build them here for clarity.
608 ;; TODO: Add debug output.
609 (lambda* (#:key (make-flags '()) #:allow-other-keys)
610 ;; Prevent the build from adding machine-specific optimizations.
611 ;; This does not work if passed as a make flag...
612 (setenv "PORTABLE" "1")
613 (and (zero? (apply system* "make" "static_lib" make-flags))
614 (zero? (apply system* "make" "shared_lib" make-flags)))))
615 (add-after 'install 'delete-static-library
616 (lambda* (#:key outputs #:allow-other-keys)
617 (let* ((out (assoc-ref outputs "out"))
618 (lib (string-append out "/lib")))
619 (for-each (lambda (file)
620 (delete-file file))
621 (find-files lib "\\.l?a$"))
622 #t))))))
623 (native-inputs
624 `(("parallel" ,parallel)
625 ("perl" ,perl)
626 ("procps" ,procps)
77e52190
MB
627 ("python" ,python-2)
628 ("which" ,which)))
d3c6ad0a
MB
629 (inputs
630 `(("bzip2" ,bzip2)
631 ("gflags" ,gflags)
632 ("jemalloc" ,jemalloc)
633 ("lz4" ,lz4)
634 ("snappy" ,snappy)
635 ("zlib" ,zlib)))
636 (home-page "http://rocksdb.org/")
637 (synopsis "Persistent key-value store for fast storage")
638 (description
639 "RocksDB is a library that forms the core building block for a fast
640key-value server, especially suited for storing data on flash drives. It
641has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
642between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
643(RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
644compactions, making it specially suitable for storing multiple terabytes of
645data in a single database. RocksDB is partially based on @code{LevelDB}.")
646 ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0.
ba8b9f8d 647 (license (list license:bsd-3 license:asl2.0))))
d3c6ad0a 648
b92d02d9
RJ
649(define-public sparql-query
650 (package
651 (name "sparql-query")
652 (version "1.1")
653 (source (origin
654 (method url-fetch)
655 (uri (string-append "https://github.com/tialaramex/"
656 name "/archive/" version ".tar.gz"))
657 (sha256
658 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
659 (file-name (string-append name "-" version ".tar.gz"))))
660 (build-system gnu-build-system)
661 (inputs
662 `(("readline" ,readline)
663 ("ncurses" ,ncurses)
664 ("glib" ,glib)
665 ("libxml2" ,libxml2)
666 ("curl" ,curl)))
667 (native-inputs
668 `(("pkg-config" ,pkg-config)))
669 (arguments
670 `(#:make-flags '("CC=gcc")
671 #:phases
672 (modify-phases %standard-phases
673 (delete 'configure)
674 ;; The Makefile uses git to obtain versioning information. This phase
675 ;; substitutes the git invocation with the package version.
676 (add-after 'unpack 'remove-git-dependency
677 (lambda _
678 (substitute* "Makefile"
679 (("^gitrev :=.*$")
680 (string-append "gitrev = \"v" ,version "\"")))))
681 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
682 ;; This replacement does the same thing, except for using $PREFIX/bin
683 ;; instead.
684 (replace 'install
685 (lambda* (#:key outputs #:allow-other-keys)
686 (let* ((out (assoc-ref outputs "out"))
687 (bin (string-append out "/bin")))
688 (install-file "sparql-query" bin)
689 (system* "ln" "--symbolic"
690 (string-append bin "/sparql-query")
691 (string-append bin "/sparql-update")))))
692 (replace 'check
693 (lambda* (#:key make-flags #:allow-other-keys)
694 (and
695 (zero? (apply system* "make" `(,@make-flags "scan-test")))
696 (zero? (system "./scan-test"))))))))
697 (home-page "https://github.com/tialaramex/sparql-query/")
698 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
699 (description "Sparql-query is a command-line tool for accessing SPARQL
700endpoints over HTTP. It has been intentionally designed to 'feel' similar to
701tools for interrogating SQL databases. For example, you can enter a query over
702several lines, using a semi-colon at the end of a line to indicate the end of
703your query. It also supports readline so that you can more easily recall and
704edit previous queries, even across sessions. It can be used non-interactively,
705for example from a shell script.")
706 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
707 ;; others (like sparql-query.c) contain a GPLv2+ license header.
ba8b9f8d 708 (license (list license:gpl3+))))
b92d02d9 709
5f96f303
LC
710(define-public sqlite
711 (package
712 (name "sqlite")
8a68a353 713 (version "3.17.0")
5f96f303
LC
714 (source (origin
715 (method url-fetch)
5f96f303
LC
716 (uri (let ((numeric-version
717 (match (string-split version #\.)
718 ((first-digit other-digits ...)
719 (string-append first-digit
720 (string-pad-right
721 (string-concatenate
722 (map (cut string-pad <> 2 #\0)
723 other-digits))
724 6 #\0))))))
e58db46b 725 (string-append "https://sqlite.org/2017/sqlite-autoconf-"
3ad8cb41 726 numeric-version ".tar.gz")))
5f96f303
LC
727 (sha256
728 (base32
8a68a353 729 "0k472gq0p706jq4529p60znvw02hdf172qxgbdv59q0n7anqbr54"))))
5f96f303 730 (build-system gnu-build-system)
8f1d22b7 731 (inputs `(("readline" ,readline)))
49689377
MW
732 (arguments
733 `(#:configure-flags
73dc727e
DC
734 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
735 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
736 ;; to use the system SQLite unless these options are enabled.
737 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
738 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
739 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
3ad8cb41 740 (home-page "https://www.sqlite.org/")
5f96f303
LC
741 (synopsis "The SQLite database management system")
742 (description
743 "SQLite is a software library that implements a self-contained, serverless,
35b9e423
EB
744zero-configuration, transactional SQL database engine. SQLite is the most
745widely deployed SQL database engine in the world. The source code for SQLite
746is in the public domain.")
ba8b9f8d 747 (license license:public-domain)))
db60b1d9
LC
748
749(define-public tdb
750 (package
751 (name "tdb")
1abd0904 752 (version "1.3.11")
db60b1d9
LC
753 (source (origin
754 (method url-fetch)
ca473fc2 755 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
db60b1d9
LC
756 version ".tar.gz"))
757 (sha256
758 (base32
1abd0904 759 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
db60b1d9
LC
760 (build-system gnu-build-system)
761 (arguments
6ccb7814
EF
762 '(#:phases
763 (modify-phases %standard-phases
764 (replace 'configure
765 (lambda* (#:key outputs #:allow-other-keys)
766 (let ((out (assoc-ref outputs "out")))
767 ;; The 'configure' script is a wrapper for Waf and
768 ;; doesn't recognize things like '--enable-fast-install'.
769 (zero? (system* "./configure"
770 (string-append "--prefix=" out)))))))))
db60b1d9
LC
771 (native-inputs
772 `(;; TODO: Build the documentation.
773 ;; ("docbook-xsl" ,docbook-xsl)
774 ;; ("libxml2" ,libxml2)
775 ;; ("libxslt" ,libxslt)
776 ("python" ,python-2))) ;for the Waf build system
1abd0904 777 (home-page "https://tdb.samba.org/")
35b9e423 778 (synopsis "Trivial database")
db60b1d9
LC
779 (description
780 "TDB is a Trivial Database. In concept, it is very much like GDBM,
781and BSD's DB except that it allows multiple simultaneous writers and uses
782locking internally to keep writers from trampling on each other. TDB is also
783extremely small.")
ba8b9f8d 784 (license license:lgpl3+)))
274da61d
LC
785
786(define-public perl-dbi
787 (package
788 (name "perl-dbi")
6138dede 789 (version "1.636")
274da61d
LC
790 (source (origin
791 (method url-fetch)
792 (uri (string-append
793 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
794 version ".tar.gz"))
795 (sha256
796 (base32
6138dede 797 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
274da61d
LC
798 (build-system perl-build-system)
799 (synopsis "Database independent interface for Perl")
800 (description "This package provides an database interface for Perl.")
6138dede 801 (home-page "http://search.cpan.org/dist/DBI")
274da61d
LC
802 (license (package-license perl))))
803
feae3395
EB
804(define-public perl-dbix-class
805 (package
806 (name "perl-dbix-class")
5d78d746 807 (version "0.082840")
feae3395
EB
808 (source
809 (origin
810 (method url-fetch)
811 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
812 "DBIx-Class-" version ".tar.gz"))
813 (sha256
814 (base32
5d78d746 815 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
feae3395
EB
816 (build-system perl-build-system)
817 (native-inputs
818 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
819 ("perl-file-temp" ,perl-file-temp)
820 ("perl-package-stash" ,perl-package-stash)
821 ("perl-test-deep" ,perl-test-deep)
822 ("perl-test-exception" ,perl-test-exception)
823 ("perl-test-warn" ,perl-test-warn)))
824 (propagated-inputs
825 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
826 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
827 ("perl-class-inspector" ,perl-class-inspector)
828 ("perl-config-any" ,perl-config-any)
829 ("perl-context-preserve" ,perl-context-preserve)
830 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
831 ("perl-data-page" ,perl-data-page)
832 ("perl-dbi" ,perl-dbi)
833 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
834 ("perl-hash-merge" ,perl-hash-merge)
835 ("perl-module-find" ,perl-module-find)
836 ("perl-moo" ,perl-moo)
837 ("perl-mro-compat" ,perl-mro-compat)
838 ("perl-namespace-clean" ,perl-namespace-clean)
839 ("perl-path-class" ,perl-path-class)
840 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
841 ("perl-scope-guard" ,perl-scope-guard)
842 ("perl-sql-abstract" ,perl-sql-abstract)
843 ("perl-sub-name" ,perl-sub-name)
844 ("perl-text-balanced" ,perl-text-balanced)
845 ("perl-try-tiny" ,perl-try-tiny)))
846 (home-page "http://search.cpan.org/dist/DBIx-Class")
847 (synopsis "Extensible and flexible object <-> relational mapper")
848 (description "An SQL to OO mapper with an object API inspired by
849Class::DBI (with a compatibility layer as a springboard for porting) and a
850resultset API that allows abstract encapsulation of database operations. It
851aims to make representing queries in your code as perl-ish as possible while
852still providing access to as many of the capabilities of the database as
853possible, including retrieving related records from multiple tables in a
854single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
855\"ORDER BY\" and \"HAVING\" support.")
e61fd0f0
EB
856 (license (package-license perl))))
857
4e4039e5
EB
858(define-public perl-dbix-class-cursor-cached
859 (package
860 (name "perl-dbix-class-cursor-cached")
180cb81b 861 (version "1.001004")
4e4039e5
EB
862 (source
863 (origin
864 (method url-fetch)
865 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
866 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
867 (sha256
868 (base32
180cb81b 869 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
4e4039e5
EB
870 (build-system perl-build-system)
871 (native-inputs
872 `(("perl-cache-cache" ,perl-cache-cache)
873 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
874 (propagated-inputs
875 `(("perl-carp-clan" ,perl-carp-clan)
876 ("perl-dbix-class" ,perl-dbix-class)))
877 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
878 (synopsis "Cursor with built-in caching support")
879 (description "DBIx::Class::Cursor::Cached provides a cursor class with
880built-in caching support.")
881 (license (package-license perl))))
882
e61fd0f0
EB
883(define-public perl-dbix-class-introspectablem2m
884 (package
885 (name "perl-dbix-class-introspectablem2m")
7a462b80 886 (version "0.001002")
e61fd0f0
EB
887 (source
888 (origin
889 (method url-fetch)
68a9d6df 890 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
e61fd0f0
EB
891 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
892 (sha256
893 (base32
7a462b80 894 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
e61fd0f0
EB
895 (build-system perl-build-system)
896 (propagated-inputs
897 `(("perl-dbix-class" ,perl-dbix-class)))
898 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
899 (synopsis "Introspect many-to-many relationships")
900 (description "Because the many-to-many relationships are not real
901relationships, they can not be introspected with DBIx::Class. Many-to-many
902relationships are actually just a collection of convenience methods installed
903to bridge two relationships. This DBIx::Class component can be used to store
904all relevant information about these non-relationships so they can later be
905introspected and examined.")
708155df
EB
906 (license (package-license perl))))
907
908(define-public perl-dbix-class-schema-loader
909 (package
910 (name "perl-dbix-class-schema-loader")
ebd2dbbf 911 (version "0.07046")
708155df
EB
912 (source
913 (origin
914 (method url-fetch)
915 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
916 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
917 (sha256
918 (base32
ebd2dbbf 919 "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3"))))
708155df
EB
920 (build-system perl-build-system)
921 (native-inputs
922 `(("perl-config-any" ,perl-config-any)
923 ("perl-config-general" ,perl-config-general)
924 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
925 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
926 ("perl-moose" ,perl-moose)
927 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
928 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
929 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
930 ("perl-test-deep" ,perl-test-deep)
931 ("perl-test-differences" ,perl-test-differences)
932 ("perl-test-exception" ,perl-test-exception)
933 ("perl-test-pod" ,perl-test-pod)
934 ("perl-test-warn" ,perl-test-warn)))
935 (propagated-inputs
936 `(("perl-class-unload" ,perl-class-unload)
937 ("perl-class-inspector" ,perl-class-inspector)
938 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
939 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
940 ("perl-carp-clan" ,perl-carp-clan)
941 ("perl-data-dump" ,perl-data-dump)
942 ("perl-dbix-class" ,perl-dbix-class)
943 ("perl-hash-merge" ,perl-hash-merge)
944 ("perl-list-moreutils" ,perl-list-moreutils)
945 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
946 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
947 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
948 ("perl-namespace-clean" ,perl-namespace-clean)
949 ("perl-mro-compat" ,perl-mro-compat)
950 ("perl-scope-guard" ,perl-scope-guard)
951 ("perl-string-camelcase" ,perl-string-camelcase)
952 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
953 ("perl-sub-name" ,perl-sub-name)
954 ("perl-try-tiny" ,perl-try-tiny)))
955 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
956 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
957 (synopsis "Create a DBIx::Class::Schema based on a database")
958 (description "DBIx::Class::Schema::Loader automates the definition of a
959DBIx::Class::Schema by scanning database table definitions and setting up the
960columns, primary keys, unique constraints and relationships.")
274da61d
LC
961 (license (package-license perl))))
962
186eb132
EB
963(define-public perl-dbd-pg
964 (package
965 (name "perl-dbd-pg")
4d40c6aa 966 (version "3.5.3")
186eb132
EB
967 (source
968 (origin
969 (method url-fetch)
970 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
971 "DBD-Pg-" version ".tar.gz"))
972 (sha256
973 (base32
4d40c6aa 974 "03m9w1cd0yyrbqwkwcl92j1cpmasmm69f3hwvcrlfsi5fnwsk63y"))))
186eb132
EB
975 (build-system perl-build-system)
976 (native-inputs
977 `(("perl-dbi" ,perl-dbi)))
978 (propagated-inputs
979 `(("perl-dbi" ,perl-dbi)
980 ("postgresql" ,postgresql)))
981 (home-page "http://search.cpan.org/dist/DBD-Pg")
982 (synopsis "DBI PostgreSQL interface")
f33e71fc
LC
983 (description "This package provides a PostgreSQL driver for the Perl5
984@dfn{Database Interface} (DBI).")
186eb132
EB
985 (license (package-license perl))))
986
4b7857a4
RW
987(define-public perl-dbd-mysql
988 (package
989 (name "perl-dbd-mysql")
7c635ed6 990 (version "4.041")
4b7857a4
RW
991 (source
992 (origin
993 (method url-fetch)
7c635ed6 994 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
4b7857a4
RW
995 "DBD-mysql-" version ".tar.gz"))
996 (sha256
997 (base32
7c635ed6 998 "0h4h6zwzj8fwh9ljb8svnsa0a3ch4p10hp59kpdibdb4qh8xwxs7"))))
4b7857a4
RW
999 (build-system perl-build-system)
1000 ;; Tests require running MySQL server
1001 (arguments `(#:tests? #f))
1002 (propagated-inputs
1003 `(("perl-dbi" ,perl-dbi)
1004 ("mysql" ,mysql)))
1005 (home-page "http://search.cpan.org/dist/DBD-mysql")
1006 (synopsis "DBI MySQL interface")
1007 (description "This package provides a MySQL driver for the Perl5
1008@dfn{Database Interface} (DBI).")
1009 (license (package-license perl))))
1010
274da61d
LC
1011(define-public perl-dbd-sqlite
1012 (package
1013 (name "perl-dbd-sqlite")
2273b751 1014 (version "1.54")
274da61d
LC
1015 (source (origin
1016 (method url-fetch)
1017 (uri (string-append
1018 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1019 version ".tar.gz"))
1020 (sha256
1021 (base32
2273b751 1022 "0sbj9lx9syzpknvjv8cz9jndg32qz775vy2prgq305npv3dsca9r"))))
274da61d
LC
1023 (build-system perl-build-system)
1024 (inputs `(("sqlite" ,sqlite)))
1025 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1026 (synopsis "SQlite interface for Perl")
1027 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1028the entire thing in the distribution. So in order to get a fast transaction
1029capable RDBMS working for your Perl project you simply have to install this
1030module, and nothing else.")
1031 (license (package-license perl))
1032 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
14e84b2d 1033
dd90952e
EB
1034(define-public perl-sql-abstract
1035 (package
1036 (name "perl-sql-abstract")
1037 (version "1.81")
1038 (source
1039 (origin
1040 (method url-fetch)
1041 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1042 "SQL-Abstract-" version ".tar.gz"))
1043 (sha256
1044 (base32
1045 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
1046 (build-system perl-build-system)
1047 (native-inputs
1048 `(("perl-test-deep" ,perl-test-deep)
1049 ("perl-test-exception" ,perl-test-exception)
1050 ("perl-test-warn" ,perl-test-warn)))
1051 (propagated-inputs
1052 `(("perl-hash-merge" ,perl-hash-merge)
1053 ("perl-moo" ,perl-moo)
1054 ("perl-mro-compat" ,perl-mro-compat)
1055 ("perl-text-balanced" ,perl-text-balanced)))
1056 (home-page "http://search.cpan.org/dist/SQL-Abstract")
1057 (synopsis "Generate SQL from Perl data structures")
1058 (description "This module was inspired by the excellent DBIx::Abstract.
1059While based on the concepts used by DBIx::Abstract, the concepts used have
1060been modified to make the SQL easier to generate from Perl data structures.
1061The underlying idea is for this module to do what you mean, based on the data
1062structures you provide it, so that you don't have to modify your code every
e881752c 1063time your data changes.")
dd90952e 1064 (license (package-license perl))))
14e84b2d 1065
b4dcb026
EB
1066(define-public perl-sql-splitstatement
1067 (package
1068 (name "perl-sql-splitstatement")
1069 (version "1.00020")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1074 "SQL-SplitStatement-" version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1078 (build-system perl-build-system)
1079 (native-inputs
1080 `(("perl-test-exception" ,perl-test-exception)))
1081 (propagated-inputs
1082 `(("perl-class-accessor" ,perl-class-accessor)
1083 ("perl-list-moreutils" ,perl-list-moreutils)
1084 ("perl-regexp-common" ,perl-regexp-common)
1085 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1086 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
1087 (synopsis "Split SQL code into atomic statements")
1088 (description "This module tries to split any SQL code, even including
1089non-standard extensions, into the atomic statements it is composed of.")
1090 (license (package-license perl))))
1091
718c89c1
EB
1092(define-public perl-sql-tokenizer
1093 (package
1094 (name "perl-sql-tokenizer")
1095 (version "0.24")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1100 "SQL-Tokenizer-" version ".tar.gz"))
1101 (sha256
1102 (base32
1103 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1104 (build-system perl-build-system)
1105 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
1106 (synopsis "SQL tokenizer")
1107 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1108claim to be a parser or query verifier. It just creates sane tokens from a
1109valid SQL query.")
1110 (license (package-license perl))))
1111
14e84b2d
JD
1112(define-public unixodbc
1113 (package
1114 (name "unixodbc")
3fef0a2f 1115 (version "2.3.4")
14e84b2d
JD
1116 (source (origin
1117 (method url-fetch)
e881752c 1118 (uri
14e84b2d 1119 (string-append
3fef0a2f
EF
1120 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1121 version ".tar.gz"))
14e84b2d 1122 (sha256
3fef0a2f 1123 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
14e84b2d
JD
1124 (build-system gnu-build-system)
1125 (synopsis "Data source abstraction library")
1126 (description "Unixodbc is a library providing an API with which to access
1127data sources. Data sources include SQL Servers and any software with an ODBC
1128Driver.")
ba8b9f8d 1129 (license license:lgpl2.1+)
14e84b2d
JD
1130 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1131 (home-page "http://www.unixodbc.org")))
b4a9c924
EB
1132
1133(define-public unqlite
1134 (package
1135 (name "unqlite")
1136 (version "1.1.6")
1137 (source (origin
1138 (method url-fetch)
1139 ;; Contains bug fixes against the official release, and has an
1140 ;; autotooled build system.
1141 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1142 "download/v1.0.0/"
1143 "unqlite-unofficial-" version ".tar.gz"))
1144 (sha256
1145 (base32
1146 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1147 (build-system gnu-build-system)
1148 (arguments `(#:tests? #f)) ;No check target
1149 (home-page "http://www.unqlite.org")
1150 (synopsis "In-memory key/value and document store")
1151 (description
1152 "UnQLite is an in-process software library which implements a
1153self-contained, serverless, zero-configuration, transactional NoSQL
1154database engine. UnQLite is a document store database similar to
1155MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
69b4ffcf 1156similar to BerkeleyDB, LevelDB, etc.")
ba8b9f8d 1157 (license license:bsd-2)))
463f6766
DT
1158
1159(define-public redis
1160 (package
1161 (name "redis")
b25f060f 1162 (version "3.2.4")
463f6766
DT
1163 (source (origin
1164 (method url-fetch)
1165 (uri (string-append "http://download.redis.io/releases/redis-"
1166 version".tar.gz"))
1167 (sha256
1168 (base32
b25f060f 1169 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
463f6766
DT
1170 (build-system gnu-build-system)
1171 (arguments
1172 '(#:tests? #f ; tests related to master/slave and replication fail
1173 #:phases (modify-phases %standard-phases
1174 (delete 'configure))
1175 #:make-flags `("CC=gcc"
1176 "MALLOC=libc"
b25f060f 1177 "LDFLAGS=-ldl"
463f6766
DT
1178 ,(string-append "PREFIX="
1179 (assoc-ref %outputs "out")))))
1180 (synopsis "Key-value cache and store")
1181 (description "Redis is an advanced key-value cache and store. Redis
1182supports many data structures including strings, hashes, lists, sets, sorted
1183sets, bitmaps and hyperloglogs.")
1184 (home-page "http://redis.io/")
ba8b9f8d 1185 (license license:bsd-3)))
a65e2a02 1186
1187(define-public kyotocabinet
1188 (package
1189 (name "kyotocabinet")
1190 (version "1.2.76")
1191 (source (origin
1192 (method url-fetch)
1193 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1194 name "-" version ".tar.gz"))
1195 (sha256
1196 (base32
1197 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1198 (build-system gnu-build-system)
1199 (arguments
1200 `(#:configure-flags
1201 (list
1202 (string-append "LDFLAGS=-Wl,-rpath="
1203 (assoc-ref %outputs "out") "/lib"))))
1204 (inputs `(("zlib" ,zlib)))
1205 (home-page "http://fallabs.com/kyotocabinet/")
1206 (synopsis
1207 "Kyoto Cabinet is a modern implementation of the DBM database")
1208 (description
1209 "Kyoto Cabinet is a standalone file-based database that supports Hash
1210and B+ Tree data storage models. It is a fast key-value lightweight
1211database and supports many programming languages. It is a NoSQL database.")
ba8b9f8d 1212 (license license:gpl3+)))
6242b314 1213
bdc11dc4 1214(define-public tokyocabinet
1215 (package
1216 (name "tokyocabinet")
1217 (version "1.4.48")
1218 (source
1219 (origin
1220 (method url-fetch)
1221 (uri (string-append "http://fallabs.com/tokyocabinet/"
1222 name "-" version ".tar.gz"))
1223 (sha256
1224 (base32
1225 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1226 (build-system gnu-build-system)
1227 (arguments
1228 `(#:configure-flags
1229 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1230 (string-append "LDFLAGS=-Wl,-rpath="
1231 (assoc-ref %outputs "out") "/lib"))))
1232 (inputs
1233 `(("zlib" ,zlib)))
1234 (home-page "http://fallabs.com/tokyocabinet/")
1235 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1236 (description
1237 "Tokyo Cabinet is a library of routines for managing a database.
1238The database is a simple data file containing records, each is a pair of a
1239key and a value. Every key and value is serial bytes with variable length.
1240Both binary data and character string can be used as a key and a value.
1241There is neither concept of data tables nor data types. Records are
1242organized in hash table, B+ tree, or fixed-length array.")
1243 (license license:lgpl2.1+)))
1244
6242b314
SB
1245(define-public wiredtiger
1246 (package
1247 (name "wiredtiger")
81e95821 1248 (version "2.9.1")
6242b314
SB
1249 (source (origin
1250 (method url-fetch)
1251 (uri (string-append
1252 "http://source.wiredtiger.com/releases/wiredtiger-"
1253 version ".tar.bz2"))
1254 (sha256
1255 (base32
81e95821 1256 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
6242b314
SB
1257 (build-system gnu-build-system)
1258 (arguments
1259 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1260 #:phases
1261 (modify-phases %standard-phases
1262 (add-before 'check 'disable-test/fops
1263 (lambda _
1264 ;; XXX: timed out after 3600 seconds of silence
1265 (substitute* "Makefile"
1266 (("test/fops") ""))
1267 #t)))))
1268 (inputs
1269 `(("lz4" ,lz4)
1270 ("zlib" ,zlib)))
1271 (home-page "http://source.wiredtiger.com/")
1272 (synopsis "NoSQL data engine")
1273 (description
1274 "WiredTiger is an extensible platform for data management. It supports
1275row-oriented storage (where all columns of a row are stored together),
1276column-oriented storage (where columns are stored in groups, allowing for
1277more efficient access and storage of column subsets) and log-structured merge
1278trees (LSM), for sustained throughput under random insert workloads.")
ba8b9f8d 1279 (license license:gpl3) ; or GPL-2
6242b314
SB
1280 ;; configure.ac: WiredTiger requires a 64-bit build.
1281 (supported-systems '("x86_64-linux" "mips64el-linux"))))
90c2ee88
DM
1282
1283(define-public perl-db-file
1284 (package
1285 (name "perl-db-file")
dd0cfb37 1286 (version "1.840")
90c2ee88
DM
1287 (source
1288 (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1292 version
1293 ".tar.gz"))
1294 (sha256
1295 (base32
dd0cfb37 1296 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
90c2ee88
DM
1297 (build-system perl-build-system)
1298 (inputs `(("bdb" ,bdb)))
1299 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1300 (arguments
1301 `(#:phases (modify-phases %standard-phases
1302 (add-before
1303 'configure 'modify-config.in
1304 (lambda* (#:key inputs #:allow-other-keys)
1305 (substitute* "config.in"
1306 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1307 #t)))))
1308 (home-page "http://search.cpan.org/dist/DB_File")
1309 (synopsis
1310 "Perl5 access to Berkeley DB version 1.x")
1311 (description
1312 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1313 (license (package-license perl))))
0e1b262e
DC
1314
1315(define-public lmdb
1316 (package
1317 (name "lmdb")
1318 (version "0.9.18")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1322 "LMDB_" version ".tar.gz"))
1323 (sha256
1324 (base32
1325 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1326 (build-system gnu-build-system)
1327 (arguments
1328 `(#:test-target "test"
1329 #:phases
1330 (modify-phases %standard-phases
1331 (replace 'configure
1332 (lambda* (#:key outputs #:allow-other-keys)
1333 (chdir (string-append
1334 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1335 (substitute* "Makefile"
1336 (("/usr/local") (assoc-ref outputs "out")))
1337 #t)))))
1338 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1339 (synopsis "Lightning memory-mapped database library")
1340 (description "Lightning memory-mapped database library.")
1341 (license license:openldap2.8)))
fe71eee0
JN
1342
1343(define-public libpqxx
1344 (package
1345 (name "libpqxx")
1346 (version "4.0.1")
1347 (source (origin
1348 (method url-fetch)
1349 (uri (string-append
1350 "http://pqxx.org/download/software/libpqxx/"
1351 name "-" version ".tar.gz"))
1352 (sha256
1353 (base32
1354 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1355 (build-system gnu-build-system)
1356 (native-inputs
1357 `(("python" ,python-2)))
1358 (inputs `(("postgresql" ,postgresql)))
1359 (arguments
5ac097e2
MB
1360 `(#:tests? #f ; # FAIL: 1
1361 #:phases
1362 (modify-phases %standard-phases
1363 (add-before 'configure 'fix-sed-command
1364 (lambda _
1365 ;; Newer sed versions error out if double brackets are not used.
1366 (substitute* "configure"
1367 (("\\[:space:\\]") "[[:space:]]"))
1368 #t)))))
fe71eee0
JN
1369 (synopsis "C++ connector for PostgreSQL")
1370 (description
1371 "Libpqxx is a C++ library to enable user programs to communicate with the
1372PostgreSQL database back-end. The database back-end can be local or it may be
1373on another machine, accessed via TCP/IP.")
1374 (home-page "http://pqxx.org/")
1375 (license license:bsd-3)))
4d98bfaf
EF
1376
1377(define-public python-peewee
1378 (package
1379 (name "python-peewee")
1380 (version "2.8.3")
1381 (source
1382 (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "peewee" version))
1385 (sha256
1386 (base32
1387 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1388 (build-system python-build-system)
1389 (arguments
1390 `(#:tests? #f)) ; Fails to import test data
1391 (native-inputs
1392 `(("python-cython" ,python-cython)))
1393 (home-page "https://github.com/coleifer/peewee/")
1394 (synopsis "Small object-relational mapping utility")
1395 (description
1396 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1397handles converting between pythonic values and those used by databases, so you
1398can use Python types in your code without having to worry. It has built-in
1399support for sqlite, mysql and postgresql. If you already have a database, you
1400can autogenerate peewee models using @code{pwiz}, a model generator.")
1401 (license license:expat)))
1402
1403(define-public python2-peewee
1404 (package-with-python2 python-peewee))
62ea44fc
AP
1405
1406(define-public sqlcipher
1407 (package
1408 (name "sqlcipher")
1409 (version "3.3.1")
1410 (source
1411 (origin
1412 (method url-fetch)
1413 (uri (string-append "https://github.com/sqlcipher/" name
1414 "/archive/v" version ".tar.gz"))
1415 (sha256
1416 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1417 (file-name (string-append name "-" version ".tar.gz"))))
1418 (build-system gnu-build-system)
1419 (inputs
1420 `(("libcrypto" ,openssl)
1421 ("libtcl8.6" ,tcl))) ; required for running the tests
1422 (native-inputs
1423 `(("tcl" ,tcl)))
1424 (arguments
1425 '(#:configure-flags
1426 '("--enable-tempstore=yes"
1427 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1428 "LDFLAGS=-lcrypto -ltcl8.6"
1429 "--disable-tcl")
1430 ;; tests cannot be run from the Makefile
1431 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1432 #:test-target "testfixture"
1433 #:phases
1434 (modify-phases %standard-phases
1435 (add-before 'check 'build-test-runner
1436 (assoc-ref %standard-phases 'check))
1437 (replace 'check
1438 (lambda _
1439 (zero?
1440 (system* "./testfixture" "test/crypto.test")))))))
1441 (home-page "https://www.zetetic.net/sqlcipher/")
1442 (synopsis
1443 "Library providing transparent encryption of SQLite database files")
1444 (description "SQLCipher is an implementation of SQLite, extended to
1445provide transparent 256-bit AES encryption of database files. Pages are
1446encrypted before being written to disk and are decrypted when read back. It’s
1447well suited for protecting embedded application databases and for mobile
1448development.")
1449 ;; The source files
1450 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1451 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1452 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1453 ;; source files are in the public domain.
1454 (license (list license:public-domain license:bsd-3))))
98d403bb
DM
1455
1456(define-public python-pyodbc-c
1457 (package
1458 (name "python-pyodbc-c")
c6b6a74e 1459 (version "3.1.4")
98d403bb
DM
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1464 "archive.tar.gz?ref=v" version))
1465 (sha256
1466 (base32
c6b6a74e 1467 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
98d403bb
DM
1468 (file-name (string-append name "-" version ".tar.gz"))))
1469 (build-system python-build-system)
1470 (inputs
1471 `(("unixodbc" ,unixodbc)))
1472 (arguments
1473 `(;; No unit tests exist.
1474 #:tests? #f))
1475 (home-page "https://github.com/mkleehammer/pyodbc")
1476 (synopsis "Python ODBC Library")
1477 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1478for ODBC.")
1479 (license (license:x11-style "file://LICENSE.TXT"))))
1480
1481(define-public python2-pyodbc-c
1482 (package-with-python2 python-pyodbc-c))