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