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