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>
26 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
98 (uri (string-append "https://github.com/garlik/4store/archive/v"
100 (file-name (string-append name "-" version ".tar.gz"))
102 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
103 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
104 (build-system gnu-build-system)
108 ("autoconf" ,autoconf)
109 ("automake" ,automake)
110 ("gettext" ,gettext-minimal)
112 ("pcre" ,pcre "bin") ;for 'pcre-config'
113 ("pkg-config" ,pkg-config)))
119 ("readline" ,readline)
121 ("cyrus-sasl" ,cyrus-sasl)
123 ("util-linux" ,util-linux)))
126 (modify-phases %standard-phases
127 (add-after 'unpack 'generate-configure
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+)))
143 (uri (string-append "mirror://gnu/gdbm/gdbm-"
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")
152 "Hash library of database functions compatible with traditional dbm")
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+)))
165 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
169 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
170 (build-system gnu-build-system)
171 (outputs '("out" ; programs, libraries, headers
172 "doc")) ; 94 MiB of HTML docs
174 '(#:tests? #f ; no check target available
175 #:disallowed-references ("doc")
177 (modify-phases %standard-phases
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")))
188 (system* "./dist/configure"
189 (string-append "--prefix=" out)
190 (string-append "CONFIG_SHELL=" (which "bash"))
191 (string-append "SHELL=" (which "bash"))
193 ;; Remove 7 MiB of .a files.
196 ;; The compatibility mode is needed by some packages,
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")
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))
212 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
214 (define-public bdb-5.3
215 (package (inherit bdb)
218 (license (license:non-copyleft "file://LICENSE"
219 "See LICENSE in the distribution."))
222 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
226 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
228 `(#:tests? #f ; no check target available
229 #:disallowed-references ("doc")
231 (modify-phases %standard-phases
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")))
242 (system* "./dist/configure"
243 (string-append "--prefix=" out)
244 (string-append "CONFIG_SHELL=" (which "bash"))
245 (string-append "SHELL=" (which "bash"))
247 ;; Bdb doesn't recognize aarch64 as an architecture.
248 ,@(if (string=? "aarch64-linux" (%current-system))
249 '("--build=aarch64-unknown-linux-gnu")
252 ;; Remove 7 MiB of .a files.
255 ;; The compatibility mode is needed by some packages,
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"))))))))))
264 (define-public es-dump-restore
266 (name "es-dump-restore")
271 (uri (rubygems-uri "es_dump_restore" version))
274 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
275 (build-system ruby-build-system)
277 '(#:tests? #f ;; No testsuite.
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
287 (getenv "GEM_HOME")))))
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")
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)))
303 (define-public leveldb
309 (uri (string-append "https://github.com/google/leveldb"
310 "/archive/v" version ".tar.gz"))
311 (file-name (string-append name "-" version ".tar.gz"))
314 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
315 (build-system gnu-build-system)
317 '(#:make-flags (list "CC=gcc")
319 (modify-phases %standard-phases
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)
333 `(("snappy" ,snappy)))
334 (home-page "http://leveldb.org/")
335 (synopsis "Fast key-value storage library")
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)))
341 (define-public memcached
349 "https://memcached.org/files/memcached-" version ".tar.gz"))
351 (base32 "0chwc0g7wfvcad36z8pf2jbgygdnm9nm1l6pwjsn3d2b089gh0f0"))))
352 (build-system gnu-build-system)
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
361 (license license:bsd-3)))
363 (define-public mongodb
369 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
371 (file-name (string-append name "-" version ".tar.gz"))
373 (base32 "0gidwyvh3bdwmk2pccgkqkaln4ysgn8iwa7ihjzllsq0rdg95045"))
376 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
377 (build-system gnu-build-system)
379 `(("openssl" ,openssl)
381 ("yaml-cpp" ,yaml-cpp)
388 ("valgrind" ,valgrind)
392 (let ((common-options
393 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
396 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
397 ;; --use-system-boost
398 "--use-system-snappy"
400 "--use-system-valgrind"
401 ;; "--use-system-stemmer" TODO: Missing relevant package
403 "--disable-warnings-as-errors"
404 ,(format #f "--jobs=~a" (parallel-job-count))
406 (modify-phases %standard-phases
407 (delete 'configure) ; There is no configure phase
408 (add-after 'unpack 'scons-propagate-environment
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, "))
416 (add-after 'unpack 'create-version-file
418 (call-with-output-file "version.json"
420 (display ,(simple-format #f "{
426 (zero? (apply system*
429 "mongod" "mongo" "mongos")))))
431 (lambda* (#:key tests? #:allow-other-keys)
433 (zero? (apply system*
436 "dbtest" "unittests"))))))
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))
444 (home-page "https://www.mongodb.org/")
445 (synopsis "High performance and high availability document database")
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
461 (uri (list (string-append
462 "http://dev.mysql.com/get/Downloads/MySQL-"
463 (version-major+minor version) "/"
464 name "-" version ".tar.gz")
466 "http://downloads.mysql.com/archives/get/file/"
467 name "-" version ".tar.gz")))
470 "11v4g3igigv3zvknv67qml8in6fjrbs2vnr3q6bg6f62nydm95sk"))))
471 (build-system cmake-build-system)
474 '("-DBUILD_CONFIG=mysql_release"
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
496 'unpack 'patch-boost-version
498 ;; Mysql wants boost-1.59.0 specifically
499 (substitute* "cmake/boost.cmake"
501 ,(match (string-split (package-version boost) #\.)
502 ((_ minor . _) minor))))))
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
509 (for-each delete-file
510 (find-files (string-append out "/bin")
522 (home-page "http://www.mysql.com/")
523 (synopsis "Fast, easy to use, and popular database")
525 "MySQL is a fast, reliable, and easy to use relational database
526 management system that supports the standardized Structured Query
528 (license license:gpl2)))
530 (define-public mariadb
536 (uri (string-append "https://downloads.mariadb.org/f/"
537 name "-" version "/source/"
538 name "-" version ".tar.gz"))
541 "0ggpdcal0if9y6h9hp1yv2q65cbkjfl4p8rqk68a5pk7k75v325s"))))
542 (build-system cmake-build-system)
545 '("-DBUILD_CONFIG=mysql_release"
546 ;; Linking with libarchive fails, like this:
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
552 ;; For now, disable the features that that use libarchive (xtrabackup).
553 "-DWITH_LIBARCHIVE=OFF"
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")
570 (modify-phases %standard-phases
572 'configure 'pre-configure
574 (setenv "CONFIG_SHELL" (which "sh"))
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")
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")))))))))
593 `(("jemalloc" ,jemalloc)
600 (home-page "https://mariadb.org/")
601 (synopsis "SQL database server")
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)))
607 (define-public postgresql
613 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
614 version "/postgresql-" version ".tar.bz2"))
617 "1lbzwpmdxmk5bh0ix0rn72qbd52dq5cb55nzajscb0bvwa95abvi"))))
618 (build-system gnu-build-system)
620 `(#:configure-flags '("--with-uuid=e2fs")
622 (modify-phases %standard-phases
623 (add-before 'configure 'patch-/bin/sh
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")))
630 (add-after 'build 'build-contrib
632 (zero? (system* "make" "-C" "contrib"))))
633 (add-after 'install 'install-contrib
635 (zero? (system* "make" "-C" "contrib" "install")))))))
637 `(("readline" ,readline)
638 ("libuuid" ,util-linux)
640 (home-page "https://www.postgresql.org/")
641 (synopsis "Powerful object-relational database system")
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"))))
651 (define-public postgresql-9.6
658 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
659 version "/postgresql-" version ".tar.bz2"))
662 "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6"))))))
671 (uri (string-append "http://fallabs.com/" name "/"
672 name "-" version ".tar.gz"))
675 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
676 (build-system gnu-build-system)
678 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
679 (assoc-ref %outputs "out")
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+)))
691 (define-public recutils
697 (uri (string-append "mirror://gnu/recutils/recutils-"
701 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
702 (build-system gnu-build-system)
704 ;; Running tests in parallel leads to test failures and crashes in
706 (arguments '(#:parallel-tests? #f
708 (list (string-append "--with-bash-headers="
709 (assoc-ref %build-inputs "bash:include")
712 #:phases (modify-phases %standard-phases
713 (add-before 'build 'set-bash4.4-header-location
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 "
723 ;; Install to PREFIX/lib/bash to match Bash
724 ;; 4.4's search path.
726 "libdir = @libdir@/bash\n"))
729 (native-inputs `(("emacs" ,emacs-minimal)
731 ("bash:include" ,bash "include")
732 ("libuuid" ,util-linux)))
734 ;; TODO: Add more optional inputs.
735 (inputs `(("curl" ,curl)
736 ("libgcrypt" ,libgcrypt)
738 (synopsis "Manipulate plain text files as databases")
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/")))
748 (define-public rocksdb
754 (uri (string-append "https://github.com/facebook/rocksdb"
755 "/archive/v" version ".tar.gz"))
756 (file-name (string-append name "-" version ".tar.gz"))
759 "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb"))
760 (modules '((guix build utils)))
763 ;; TODO: unbundle gtest.
764 (delete-file "build_tools/gnu_parallel")
766 (build-system gnu-build-system)
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)
775 (or (string-prefix? "x86_64-linux" system)
776 (string-prefix? "aarch64-linux" system)))
778 (modify-phases %standard-phases
779 (add-after 'unpack 'patch-Makefile
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"))))
789 ;; The default target is only needed for tests and built on demand.
791 (add-before 'check 'disable-optimizations
793 ;; Prevent the build from passing '-march=native' to the compiler.
794 (setenv "PORTABLE" "1")
796 (add-before 'check 'disable-failing-tests
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:]]+\\\\") "\\"))
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)))))))
814 `(("parallel" ,parallel)
822 ("jemalloc" ,jemalloc)
826 (home-page "http://rocksdb.org/")
827 (synopsis "Persistent key-value store for fast storage")
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))))
839 (define-public sparql-query
841 (name "sparql-query")
845 (uri (string-append "https://github.com/tialaramex/"
846 name "/archive/" version ".tar.gz"))
848 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
849 (file-name (string-append name "-" version ".tar.gz"))))
850 (build-system gnu-build-system)
852 `(("readline" ,readline)
858 `(("pkg-config" ,pkg-config)))
860 `(#:make-flags '("CC=gcc")
862 (modify-phases %standard-phases
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
868 (substitute* "Makefile"
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
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")))))
883 (lambda* (#:key make-flags #:allow-other-keys)
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+))))
900 (define-public sqlite
906 (uri (let ((numeric-version
907 (match (string-split version #\.)
908 ((first-digit other-digits ...)
909 (string-append first-digit
912 (map (cut string-pad <> 2 #\0)
915 (string-append "https://sqlite.org/2017/sqlite-autoconf-"
916 numeric-version ".tar.gz")))
919 "1qxvzdjwzw6k0kqjfabj86rnq87xdbwbca7laxxdhnh0fmkm3pfp"))))
920 (build-system gnu-build-system)
921 (inputs `(("readline" ,readline)))
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")
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)))
939 ;; This is used by Clementine.
940 (define-public sqlite-with-fts3
941 (package (inherit sqlite)
942 (name "sqlite-with-fts3")
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")))))))
959 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
963 "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl"))))
964 (build-system gnu-build-system)
967 (modify-phases %standard-phases
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)))))))))
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")
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
988 (license license:lgpl3+)))
990 (define-public perl-dbi
997 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
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)))
1008 (define-public perl-dbix-class
1010 (name "perl-dbix-class")
1011 (version "0.082840")
1015 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1016 "DBIx-Class-" version ".tar.gz"))
1019 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
1020 (build-system perl-build-system)
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)))
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)))
1063 (define-public perl-dbix-class-cursor-cached
1065 (name "perl-dbix-class-cursor-cached")
1066 (version "1.001004")
1070 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1071 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1074 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1075 (build-system perl-build-system)
1077 `(("perl-cache-cache" ,perl-cache-cache)
1078 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1079 ("perl-module-install" ,perl-module-install)))
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)))
1089 (define-public perl-dbix-class-introspectablem2m
1091 (name "perl-dbix-class-introspectablem2m")
1092 (version "0.001002")
1096 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1097 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1100 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1101 (build-system perl-build-system)
1103 `(("perl-module-install" ,perl-module-install)))
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)))
1116 (define-public perl-dbix-class-schema-loader
1118 (name "perl-dbix-class-schema-loader")
1123 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1124 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1127 "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3"))))
1128 (build-system perl-build-system)
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)))
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)))
1172 (define-public perl-dbd-pg
1174 (name "perl-dbd-pg")
1179 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1180 "DBD-Pg-" version ".tar.gz"))
1183 "03m9w1cd0yyrbqwkwcl92j1cpmasmm69f3hwvcrlfsi5fnwsk63y"))))
1184 (build-system perl-build-system)
1186 `(("perl-dbi" ,perl-dbi)))
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)))
1196 (define-public perl-dbd-mysql
1198 (name "perl-dbd-mysql")
1203 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1204 "DBD-mysql-" version ".tar.gz"))
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))
1213 `(("perl-dbi" ,perl-dbi)
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)))
1221 (define-public perl-dbd-sqlite
1223 (name "perl-dbd-sqlite")
1228 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
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")))
1244 (define-public perl-sql-abstract
1246 (name "perl-sql-abstract")
1251 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1252 "SQL-Abstract-" version ".tar.gz"))
1255 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
1256 (build-system perl-build-system)
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)))
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)))
1277 (define-public perl-sql-splitstatement
1279 (name "perl-sql-splitstatement")
1284 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1285 "SQL-SplitStatement-" version ".tar.gz"))
1288 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1289 (build-system perl-build-system)
1291 `(("perl-test-exception" ,perl-test-exception)))
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)))
1303 (define-public perl-sql-tokenizer
1305 (name "perl-sql-tokenizer")
1310 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1311 "SQL-Tokenizer-" version ".tar.gz"))
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
1321 (license license:perl-license)))
1323 (define-public unixodbc
1331 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
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
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")))
1344 (define-public unqlite
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/"
1354 "unqlite-unofficial-" version ".tar.gz"))
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")
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)))
1370 (define-public redis
1376 (uri (string-append "http://download.redis.io/releases/redis-"
1380 "14bm8lkhylc93r4dgl7kkzzpw2xq7gr6w6h80n3jazqnx5mcsj90"))))
1381 (build-system gnu-build-system)
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"
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)))
1398 (define-public kyotocabinet
1400 (name "kyotocabinet")
1404 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1405 name "-" version ".tar.gz"))
1408 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1409 (build-system gnu-build-system)
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/")
1419 "Kyoto Cabinet is a modern implementation of the DBM database")
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+)))
1426 (define-public tokyocabinet
1428 (name "tokyocabinet")
1433 (uri (string-append "http://fallabs.com/tokyocabinet/"
1434 name "-" version ".tar.gz"))
1437 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1438 (build-system gnu-build-system)
1441 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1442 (string-append "LDFLAGS=-Wl,-rpath="
1443 (assoc-ref %outputs "out") "/lib"))))
1446 (home-page "http://fallabs.com/tokyocabinet/")
1447 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
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+)))
1457 (define-public wiredtiger
1464 "http://source.wiredtiger.com/releases/wiredtiger-"
1465 version ".tar.bz2"))
1468 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1469 (build-system gnu-build-system)
1471 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1473 (modify-phases %standard-phases
1474 (add-before 'check 'disable-test/fops
1476 ;; XXX: timed out after 3600 seconds of silence
1477 (substitute* "Makefile"
1483 (home-page "http://source.wiredtiger.com/")
1484 (synopsis "NoSQL data engine")
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"))))
1495 (define-public perl-db-file
1497 (name "perl-db-file")
1503 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1508 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
1509 (build-system perl-build-system)
1510 (inputs `(("bdb" ,bdb)))
1511 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1513 `(#:phases (modify-phases %standard-phases
1515 'configure 'modify-config.in
1516 (lambda* (#:key inputs #:allow-other-keys)
1517 (substitute* "config.in"
1518 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1520 (home-page "http://search.cpan.org/dist/DB_File")
1522 "Perl5 access to Berkeley DB version 1.x")
1524 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1525 (license license:perl-license)))
1533 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1534 "LMDB_" version ".tar.gz"))
1537 "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
1538 (build-system gnu-build-system)
1540 `(#:test-target "test"
1542 (modify-phases %standard-phases
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")))
1550 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1551 (synopsis "Lightning Memory-Mapped Database library")
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
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)))
1564 (define-public libpqxx
1571 "http://pqxx.org/download/software/libpqxx/"
1572 name "-" version ".tar.gz"))
1575 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1576 (build-system gnu-build-system)
1578 `(("python" ,python-2)))
1579 (inputs `(("postgresql" ,postgresql)))
1581 `(#:tests? #f ; # FAIL: 1
1583 (modify-phases %standard-phases
1584 (add-before 'configure 'fix-sed-command
1586 ;; Newer sed versions error out if double brackets are not used.
1587 (substitute* "configure"
1588 (("\\[:space:\\]") "[[:space:]]"))
1590 (synopsis "C++ connector for PostgreSQL")
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)))
1598 (define-public python-peewee
1600 (name "python-peewee")
1605 (uri (pypi-uri "peewee" version))
1608 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
1609 (build-system python-build-system)
1611 `(#:tests? #f)) ; Fails to import test data
1613 `(("python-cython" ,python-cython)))
1614 (home-page "https://github.com/coleifer/peewee/")
1615 (synopsis "Small object-relational mapping utility")
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)))
1624 (define-public python2-peewee
1625 (package-with-python2 python-peewee))
1627 (define-public sqlcipher
1634 (uri (string-append "https://github.com/sqlcipher/" name
1635 "/archive/v" version ".tar.gz"))
1637 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1638 (file-name (string-append name "-" version ".tar.gz"))))
1639 (build-system gnu-build-system)
1641 `(("libcrypto" ,openssl)
1642 ("libtcl8.6" ,tcl))) ; required for running the tests
1647 '("--enable-tempstore=yes"
1648 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1649 "LDFLAGS=-lcrypto -ltcl8.6"
1651 ;; tests cannot be run from the Makefile
1652 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1653 #:test-target "testfixture"
1655 (modify-phases %standard-phases
1656 (add-before 'check 'build-test-runner
1657 (assoc-ref %standard-phases 'check))
1661 (system* "./testfixture" "test/crypto.test")))))))
1662 (home-page "https://www.zetetic.net/sqlcipher/")
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
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))))
1677 (define-public python-pyodbc-c
1679 (name "python-pyodbc-c")
1684 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1685 "archive.tar.gz?ref=v" version))
1688 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1689 (file-name (string-append name "-" version ".tar.gz"))))
1690 (build-system python-build-system)
1692 `(("unixodbc" ,unixodbc)))
1694 `(;; No unit tests exist.
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
1700 (license (license:x11-style "file://LICENSE.TXT"))))
1702 (define-public python2-pyodbc-c
1703 (package-with-python2 python-pyodbc-c))
1705 (define-public mdbtools
1712 (uri (string-append "https://github.com/brianb/mdbtools/archive/"
1716 "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
1717 (file-name (string-append name "-" version ".tar.gz"))))
1718 (build-system gnu-build-system)
1722 `(("autoconf" ,autoconf)
1723 ("automake" ,automake)
1724 ("libtool" ,libtool)
1725 ("pkg-config" ,pkg-config)
1726 ("txt2man" ,txt2man)
1730 (modify-phases %standard-phases
1731 (add-after 'unpack 'autoreconf
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
1744 (define-public python-lmdb
1746 (name "python-lmdb")
1750 (uri (pypi-uri "lmdb" version))
1753 "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql"))
1754 (modules '((guix build utils)))
1756 ;; Delete bundled lmdb source files.
1757 '(for-each delete-file (list "lib/lmdb.h"
1761 (build-system python-build-system)
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"))
1774 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
1776 (home-page "https://github.com/dw/py-lmdb")
1777 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
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.")
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.
1787 (define-public python2-lmdb
1788 (package-with-python2 python-lmdb))
1790 (define-public python-orator
1792 (name "python-orator")
1796 (uri (pypi-uri "orator" version))
1799 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
1800 (build-system python-build-system)
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.
1808 (substitute* "setup.py"
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'"))
1816 `(("python-pytest-mock" ,python-pytest-mock)
1817 ("python-pytest" ,python-pytest)
1818 ("python-flexmock" ,python-flexmock)))
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")
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))))))
1840 (define-public python2-orator
1841 (package-with-python2 (strip-python2-variant python-orator)))
1843 (define-public virtuoso-ose
1845 (name "virtuoso-ose")
1851 "https://github.com/openlink/virtuoso-opensource/releases/"
1852 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
1854 (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002"))))
1855 (build-system gnu-build-system)
1857 `(#:tests? #f)) ; Tests require a network connection.
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)))