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