container: Gracefully report mount errors in the child process.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
index 41fed2a..7e0188b 100644 (file)
@@ -1,9 +1,15 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2012, 2014 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2014 David Thompson <davet@gnu.org>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
+;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 
 (define-module (gnu packages databases)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages avahi)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages openssl)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages check)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages rdf)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages jemalloc)
   #:use-module ((guix licenses)
-                #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style bsd-style
-                          public-domain))
+                #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
+                          bsd-2 bsd-3 public-domain))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix utils)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
 
+(define-public 4store
+  (package
+    (name "4store")
+    (version "1.1.6")
+    (source (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/garlik/4store/archive/v"
+                          version ".tar.gz"))
+      (file-name (string-append name "-" version ".tar.gz"))
+      (sha256
+       (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
+      (patches (list (search-patch "4store-fix-buildsystem.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("perl" ,perl)
+       ("python" ,python-2)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("rasqal" ,rasqal)
+       ("libxml2" ,libxml2)
+       ("raptor2" ,raptor2)
+       ("readline" ,readline)
+       ("avahi" ,avahi)
+       ("pcre" ,pcre)
+       ("cyrus-sasl" ,cyrus-sasl)
+       ("openssl" ,openssl)
+       ("util-linux" ,util-linux)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'generate-configure
+           (lambda _
+             (zero? (system* "./autogen.sh")))))))
+    ;; http://www.4store.org has been down for a while now.
+    (home-page "https://github.com/garlik/4store")
+    (synopsis "Clustered RDF storage and query engine")
+    (description "4store is a RDF/SPARQL store written in C, supporting
+either single machines or networked clusters.")
+      (license gpl3+)))
+
+(define-public gdbm
+  (package
+    (name "gdbm")
+    (version "1.11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gdbm/gdbm-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1hz3jgh3pd4qzp6jy0l8pd8x01g9abw7csnrlnj1a2sxy122z4cd"))))
+    (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/gdbm/")
+    (synopsis
+     "Hash library of database functions compatible with traditional dbm")
+    (description
+     "GDBM is a library for manipulating hashed databases.  It is used to
+store key/value pairs in a file in a manner similar to the Unix dbm library
+and provides interfaces to the traditional file format.")
+    (license gpl3+)))
+
 (define-public bdb
   (package
     (name "bdb")
                "doc"))                           ; 94 MiB of HTML docs
     (arguments
      '(#:tests? #f                            ; no check target available
-                #:phases
-                (alist-replace
-                 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let ((out (assoc-ref outputs "out"))
-                         (doc (assoc-ref outputs "doc")))
-                     ;; '--docdir' is not honored, so we need to patch.
-                     (substitute* "dist/Makefile.in"
-                       (("docdir[[:blank:]]*=.*")
-                        (string-append "docdir = " doc "/share/doc/bdb")))
-
-                     (zero?
-                      (system* "./dist/configure"
-                               (string-append "--prefix=" out)
-                               (string-append "CONFIG_SHELL=" (which "bash"))
-                               (string-append "SHELL=" (which "bash"))
-
-                               ;; The compatibility mode is needed by some packages,
-                               ;; notably iproute2.
-                               "--enable-compat185"))))
+       #:phases
+       (alist-replace
+        'configure
+        (lambda* (#:key outputs #:allow-other-keys)
+          (let ((out (assoc-ref outputs "out"))
+                (doc (assoc-ref outputs "doc")))
+            ;; '--docdir' is not honored, so we need to patch.
+            (substitute* "dist/Makefile.in"
+              (("docdir[[:blank:]]*=.*")
+               (string-append "docdir = " doc "/share/doc/bdb")))
+
+            (zero?
+             (system* "./dist/configure"
+                      (string-append "--prefix=" out)
+                      (string-append "CONFIG_SHELL=" (which "bash"))
+                      (string-append "SHELL=" (which "bash"))
+
+                      ;; The compatibility mode is needed by some packages,
+                      ;; notably iproute2.
+                      "--enable-compat185"
+
+                      ;; The following flag is needed so that the inclusion
+                      ;; of db_cxx.h into C++ files works; it leads to
+                      ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
+                      "--enable-cxx"))))
                  %standard-phases)))
     (synopsis "Berkeley database")
     (description
      "Berkeley DB is an embeddable database allowing developers the choice of
 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
-    (license (bsd-style "file://LICENSE"
-                        "See LICENSE in the distribution."))
+    (license (non-copyleft "file://LICENSE"
+                           "See LICENSE in the distribution."))
     (home-page
      "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
 
 (define-public mysql
   (package
     (name "mysql")
-    (version "5.1.73")
+    (version "5.7.12")
     (source (origin
              (method url-fetch)
-             (uri (string-append
-                   "http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-"
-                   version ".tar.gz"))
+             (uri (list (string-append
+                          "http://dev.mysql.com/get/Downloads/MySQL-"
+                          (version-major+minor version) "/"
+                          name "-" version ".tar.gz")
+                        (string-append
+                          "http://downloads.mysql.com/archives/get/file/"
+                          name "-" version ".tar.gz")))
              (sha256
               (base32
-               "1dfwi4ck0vq6sdci6gz0031s7zz5lc3pddqlgm0292s00l9y5sq5"))))
-    (build-system gnu-build-system)
+               "11qwbid666fspq143ymi86yva2b01lybaqh26k92rciasav3r11j"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       '("-DBUILD_CONFIG=mysql_release"
+         "-DWITH_SSL=system"
+         "-DWITH_ZLIB=system"
+         "-DDEFAULT_CHARSET=utf8"
+         "-DDEFAULT_COLLATION=utf8_general_ci"
+         "-DMYSQL_DATADIR=/var/lib/mysql"
+         "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+         "-DINSTALL_INFODIR=share/mysql/docs"
+         "-DINSTALL_MANDIR=share/man"
+         "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
+         "-DINSTALL_SCRIPTDIR=bin"
+         "-DINSTALL_INCLUDEDIR=include/mysql"
+         "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
+         "-DINSTALL_SUPPORTFILESDIR=share/mysql"
+         "-DINSTALL_MYSQLSHAREDIR=share/mysql"
+         "-DINSTALL_DOCDIR=share/mysql/docs"
+         "-DINSTALL_SHAREDIR=share/mysql"
+         ;; Get rid of test data.
+         "-DINSTALL_MYSQLTESTDIR="
+         "-DINSTALL_SQLBENCHDIR=")
+       #:phases (modify-phases %standard-phases
+                  (add-after
+                   'unpack 'patch-boost-version
+                   (lambda _
+                     ;; Mysql wants boost-1.59.0 specifically
+                     (substitute* "cmake/boost.cmake"
+                                  (("59") "60"))))
+                  (add-after
+                   'install 'remove-extra-binaries
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     (let ((out (assoc-ref outputs "out")))
+                       ;; Remove the 3 *_embedded files, which weigh in at
+                       ;; 14 MiB each.
+                       (for-each delete-file
+                                 (find-files (string-append out "/bin")
+                                             "_embedded$"))
+                       #t))))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("perl" ,perl)))
     (inputs
-     `(("procps" ,procps)
+     `(("boost" ,boost)
+       ("libaio" ,libaio)
+       ("ncurses" ,ncurses)
        ("openssl" ,openssl)
-       ("perl" ,perl)
-       ("zlib" ,zlib)
-       ("ncurses" ,ncurses)))
-    (arguments
-     '(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 ftw))                    ; for "rm -rf"
-       #:phases (alist-cons-after
-                 'install 'clean-up
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   ;; Remove the 112 MiB of tests that get installed.
-                   (let ((out (assoc-ref outputs "out")))
-                     (define (rm-rf dir)
-                       (file-system-fold (const #t) ; enter?
-                                         (lambda (file stat result) ; leaf
-                                           (delete-file file))
-                                         (const #t)               ; down
-                                         (lambda (dir stat result) ; up
-                                           (rmdir dir))
-                                         (const #t)
-                                         (lambda (file stat errno result)
-                                           (format (current-error-port)
-                                                   "error: ~a: ~a~%"
-                                                   file (strerror errno)))
-                                         #t
-                                         (string-append out "/" dir)))
-                     (rm-rf "mysql-test")
-                     (rm-rf "sql-bench")
-
-                     ;; Compress the 14 MiB Info file.
-                     (zero?
-                      (system* "gzip" "--best"
-                               (string-append out "/share/info/mysql.info")))))
-                 %standard-phases)))
+       ("zlib" ,zlib)))
     (home-page "http://www.mysql.com/")
     (synopsis "Fast, easy to use, and popular database")
     (description
@@ -147,18 +256,96 @@ management system that supports the standardized Structured Query
 Language.")
     (license gpl2)))
 
+(define-public mariadb
+  (package
+    (name "mariadb")
+    (version "10.1.12")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://downloads.mariadb.org/f/"
+                                  name "-" version "/source/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1rzlc2ns84x540asbkgdp9562haxhlszfpdqh64i9pz4q1m4cpvr"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       '("-DBUILD_CONFIG=mysql_release"
+         "-DDEFAULT_CHARSET=utf8"
+         "-DDEFAULT_COLLATION=utf8_general_ci"
+         "-DMYSQL_DATADIR=/var/lib/mysql"
+         "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+         "-DINSTALL_INFODIR=share/mysql/docs"
+         "-DINSTALL_MANDIR=share/man"
+         "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
+         "-DINSTALL_SCRIPTDIR=bin"
+         "-DINSTALL_INCLUDEDIR=include/mysql"
+         "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
+         "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
+         "-DINSTALL_MYSQLSHAREDIR=share/mysql"
+         "-DINSTALL_DOCDIR=share/mysql/docs"
+         "-DINSTALL_SHAREDIR=share/mysql")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'pre-configure
+          (lambda _
+            (setenv "CONFIG_SHELL" (which "sh"))
+            #t))
+         (add-after
+          'install 'post-install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out     (assoc-ref outputs "out"))
+                   (test    (assoc-ref outputs "test")))
+              (substitute* (string-append out "/bin/mysql_install_db")
+                (("basedir=\"\"")
+                 (string-append "basedir=\"" out "\"")))
+              ;; Remove unneeded files for testing.
+              (with-directory-excursion out
+                (for-each delete-file-recursively
+                          '("data" "mysql-test" "sql-bench"
+                            "share/man/man1/mysql-test-run.pl.1")))))))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("perl" ,perl)))
+    (inputs
+     `(("jemalloc" ,jemalloc)
+       ("libaio" ,libaio)
+       ("libxml2" ,libxml2)
+       ("ncurses" ,ncurses)
+       ("openssl" ,openssl)
+       ("pcre" ,pcre)
+       ("zlib" ,zlib)))
+    (home-page "https://mariadb.org/")
+    (synopsis "SQL database server")
+    (description
+     "MariaDB is a multi-user and multi-threaded SQL database server, designed
+as a drop-in replacement of MySQL.")
+    (license gpl2)))
+
 (define-public postgresql
   (package
     (name "postgresql")
-    (version "9.3.5")
+    (version "9.5.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://ftp.postgresql.org/pub/source/v"
-                                  version "/postgresql-" version ".tar.gz"))
+              (uri (string-append "https://ftp.postgresql.org/pub/source/v"
+                                  version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "08kga00izykgvnx7hn995wc4zjqslspapaa8z63045p1ya14mr4g"))))
+                "1d500d2qsdzysnis6qi84xchnz5xh8kx8sjfmkbsijwaqlfw11bk"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-/bin/sh
+                     (lambda _
+                       ;; Refer to the actual shell.
+                       (substitute* '("src/bin/pg_ctl/pg_ctl.c"
+                                      "src/bin/psql/command.c")
+                         (("/bin/sh") (which "sh")))
+                       #t)))))
     (inputs
      `(("readline" ,readline)
        ("zlib" ,zlib)))
@@ -188,15 +375,18 @@ pictures, sounds, or video.")
 
     ;; Running tests in parallel leads to test failures and crashes in
     ;; torture/utils.
-    (arguments '(#:parallel-tests? #f))
+    (arguments '(#:parallel-tests? #f
+                 #:configure-flags
+                 (list (string-append "--with-bash-headers="
+                                      (assoc-ref %build-inputs "bash:include")
+                                      "/include/bash"))))
 
-    (native-inputs `(("emacs" ,emacs)
-                     ("bc" ,bc)))
+    (native-inputs `(("emacs" ,emacs-minimal)
+                     ("bc" ,bc)
+                     ("bash:include" ,bash "include")
+                     ("libuuid" ,util-linux)))
 
     ;; TODO: Add more optional inputs.
-    ;; FIXME: Our Bash doesn't have development headers (need for the 'readrec'
-    ;; built-in command), but it's not clear how to get them installed.
-    ;; See <https://lists.gnu.org/archive/html/bug-bash/2014-03/msg00125.html>.
     (inputs `(("curl" ,curl)
               ("libgcrypt" ,libgcrypt)
               ("check" ,check)))
@@ -213,7 +403,7 @@ types are supported, as is encryption.")
 (define-public sqlite
   (package
    (name "sqlite")
-   (version "3.8.8.3")
+   (version "3.10.0")
    (source (origin
             (method url-fetch)
             ;; TODO: Download from sqlite.org once this bug :
@@ -228,12 +418,23 @@ types are supported, as is encryption.")
                                             (map (cut string-pad <> 2 #\0)
                                                  other-digits))
                                            6 #\0))))))
-                   (string-append
-                    "mirror://sourceforge/sqlite.mirror/SQLite%20" version
-                    "/sqlite-autoconf-" numeric-version ".tar.gz")))
+                   (list
+                    (string-append
+                     "https://fossies.org/linux/misc/sqlite-autoconf-"
+                     numeric-version ".tar.gz")
+                    (string-append
+                     "http://distfiles.gentoo.org/distfiles/"
+                     "/sqlite-autoconf-" numeric-version ".tar.gz"))
+
+                   ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
+                   ;; below, returning 200 and showing an advertising page.
+                   ;; (string-append
+                   ;;  "mirror://sourceforge/sqlite.mirror/SQLite%20" version
+                   ;;  "/sqlite-autoconf-" numeric-version ".tar.gz")
+                   ))
             (sha256
              (base32
-              "04dl53iv5q0srv4jcgjfzsrdzkq6dg1sgmlmpw9lrd4xrmj6jmvl"))))
+              "0hhhv6si0pyf5i8bv7a71953m0b4gk6s3j2h09caf7vif0njkk23"))))
    (build-system gnu-build-system)
    (inputs `(("readline" ,readline)))
    (arguments
@@ -254,14 +455,14 @@ is in the public domain.")
 (define-public tdb
   (package
     (name "tdb")
-    (version "1.3.0")
+    (version "1.3.9")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://samba.org/ftp/tdb/tdb-"
+              (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "085sd2kii72fr0c4pdc7c7m0xk34nc66wnjp21c83dss826y9gh4"))))
+                "1ll4q17scax1arg12faj8p25jq1f7q9irc3pwla0ziymwqkgf0bi"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-replace
@@ -306,6 +507,212 @@ extremely small.")
     (home-page "http://search.cpan.org/~timb/DBI-1.631/DBI.pm")
     (license (package-license perl))))
 
+(define-public perl-dbix-class
+  (package
+    (name "perl-dbix-class")
+    (version "0.082810")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
+                           "DBIx-Class-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
+       ("perl-file-temp" ,perl-file-temp)
+       ("perl-package-stash" ,perl-package-stash)
+       ("perl-test-deep" ,perl-test-deep)
+       ("perl-test-exception" ,perl-test-exception)
+       ("perl-test-warn" ,perl-test-warn)))
+    (propagated-inputs
+     `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
+       ("perl-class-c3-componentised" ,perl-class-c3-componentised)
+       ("perl-class-inspector" ,perl-class-inspector)
+       ("perl-config-any" ,perl-config-any)
+       ("perl-context-preserve" ,perl-context-preserve)
+       ("perl-data-dumper-concise" ,perl-data-dumper-concise)
+       ("perl-data-page" ,perl-data-page)
+       ("perl-dbi" ,perl-dbi)
+       ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
+       ("perl-hash-merge" ,perl-hash-merge)
+       ("perl-module-find" ,perl-module-find)
+       ("perl-moo" ,perl-moo)
+       ("perl-mro-compat" ,perl-mro-compat)
+       ("perl-namespace-clean" ,perl-namespace-clean)
+       ("perl-path-class" ,perl-path-class)
+       ("perl-scalar-list-utils" ,perl-scalar-list-utils)
+       ("perl-scope-guard" ,perl-scope-guard)
+       ("perl-sql-abstract" ,perl-sql-abstract)
+       ("perl-sub-name" ,perl-sub-name)
+       ("perl-text-balanced" ,perl-text-balanced)
+       ("perl-try-tiny" ,perl-try-tiny)))
+    (home-page "http://search.cpan.org/dist/DBIx-Class")
+    (synopsis "Extensible and flexible object <-> relational mapper")
+    (description "An SQL to OO mapper with an object API inspired by
+Class::DBI (with a compatibility layer as a springboard for porting) and a
+resultset API that allows abstract encapsulation of database operations.  It
+aims to make representing queries in your code as perl-ish as possible while
+still providing access to as many of the capabilities of the database as
+possible, including retrieving related records from multiple tables in a
+single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
+\"ORDER BY\" and \"HAVING\" support.")
+    (license (package-license perl))))
+
+(define-public perl-dbix-class-cursor-cached
+  (package
+    (name "perl-dbix-class-cursor-cached")
+    (version "1.001002")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
+                           "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
+       (sha256
+        (base32
+         "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-cache-cache" ,perl-cache-cache)
+       ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
+    (propagated-inputs
+     `(("perl-carp-clan" ,perl-carp-clan)
+       ("perl-dbix-class" ,perl-dbix-class)))
+    (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
+    (synopsis "Cursor with built-in caching support")
+    (description "DBIx::Class::Cursor::Cached provides a cursor class with
+built-in caching support.")
+    (license (package-license perl))))
+
+(define-public perl-dbix-class-introspectablem2m
+  (package
+    (name "perl-dbix-class-introspectablem2m")
+    (version "0.001001")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
+                           "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-dbix-class" ,perl-dbix-class)))
+    (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
+    (synopsis "Introspect many-to-many relationships")
+    (description "Because the many-to-many relationships are not real
+relationships, they can not be introspected with DBIx::Class.  Many-to-many
+relationships are actually just a collection of convenience methods installed
+to bridge two relationships.  This DBIx::Class component can be used to store
+all relevant information about these non-relationships so they can later be
+introspected and examined.")
+    (license (package-license perl))))
+
+(define-public perl-dbix-class-schema-loader
+  (package
+    (name "perl-dbix-class-schema-loader")
+    (version "0.07042")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
+                           "DBIx-Class-Schema-Loader-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-config-any" ,perl-config-any)
+       ("perl-config-general" ,perl-config-general)
+       ("perl-dbd-sqlite" ,perl-dbd-sqlite)
+       ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
+       ("perl-moose" ,perl-moose)
+       ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
+       ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
+       ("perl-namespace-autoclean" ,perl-namespace-autoclean)
+       ("perl-test-deep" ,perl-test-deep)
+       ("perl-test-differences" ,perl-test-differences)
+       ("perl-test-exception" ,perl-test-exception)
+       ("perl-test-pod" ,perl-test-pod)
+       ("perl-test-warn" ,perl-test-warn)))
+    (propagated-inputs
+     `(("perl-class-unload" ,perl-class-unload)
+       ("perl-class-inspector" ,perl-class-inspector)
+       ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
+       ("perl-class-c3-componentised" ,perl-class-c3-componentised)
+       ("perl-carp-clan" ,perl-carp-clan)
+       ("perl-data-dump" ,perl-data-dump)
+       ("perl-dbix-class" ,perl-dbix-class)
+       ("perl-hash-merge" ,perl-hash-merge)
+       ("perl-list-moreutils" ,perl-list-moreutils)
+       ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
+       ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
+       ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
+       ("perl-namespace-clean" ,perl-namespace-clean)
+       ("perl-mro-compat" ,perl-mro-compat)
+       ("perl-scope-guard" ,perl-scope-guard)
+       ("perl-string-camelcase" ,perl-string-camelcase)
+       ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
+       ("perl-sub-name" ,perl-sub-name)
+       ("perl-try-tiny" ,perl-try-tiny)))
+    (arguments `(#:tests? #f))          ;TODO: t/20invocations.t fails
+    (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
+    (synopsis "Create a DBIx::Class::Schema based on a database")
+    (description "DBIx::Class::Schema::Loader automates the definition of a
+DBIx::Class::Schema by scanning database table definitions and setting up the
+columns, primary keys, unique constraints and relationships.")
+    (license (package-license perl))))
+
+(define-public perl-dbd-pg
+  (package
+    (name "perl-dbd-pg")
+    (version "3.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
+                           "DBD-Pg-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-dbi" ,perl-dbi)))
+    (propagated-inputs
+     `(("perl-dbi" ,perl-dbi)
+       ("postgresql" ,postgresql)))
+    (home-page "http://search.cpan.org/dist/DBD-Pg")
+    (synopsis "DBI PostgreSQL interface")
+    (description "")
+    (license (package-license perl))))
+
+(define-public perl-dbd-mysql
+  (package
+    (name "perl-dbd-mysql")
+    (version "4.033")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/C/CA/CAPTTOFU/"
+                           "DBD-mysql-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0769xakykps0cx368g4vaips4w3bjk383rianiavq7sq6g6bp66c"))))
+    (build-system perl-build-system)
+    ;; Tests require running MySQL server
+    (arguments `(#:tests? #f))
+    (propagated-inputs
+     `(("perl-dbi" ,perl-dbi)
+       ("mysql" ,mysql)))
+    (home-page "http://search.cpan.org/dist/DBD-mysql")
+    (synopsis "DBI MySQL interface")
+    (description "This package provides a MySQL driver for the Perl5
+@dfn{Database Interface} (DBI).")
+    (license (package-license perl))))
+
 (define-public perl-dbd-sqlite
   (package
     (name "perl-dbd-sqlite")
@@ -329,23 +736,219 @@ module, and nothing else.")
     (license (package-license perl))
     (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
 
+(define-public perl-sql-abstract
+  (package
+    (name "perl-sql-abstract")
+    (version "1.81")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
+                           "SQL-Abstract-" version ".tar.gz"))
+       (sha256
+        (base32
+         "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-test-deep" ,perl-test-deep)
+       ("perl-test-exception" ,perl-test-exception)
+       ("perl-test-warn" ,perl-test-warn)))
+    (propagated-inputs
+     `(("perl-hash-merge" ,perl-hash-merge)
+       ("perl-moo" ,perl-moo)
+       ("perl-mro-compat" ,perl-mro-compat)
+       ("perl-text-balanced" ,perl-text-balanced)))
+    (home-page "http://search.cpan.org/dist/SQL-Abstract")
+    (synopsis "Generate SQL from Perl data structures")
+    (description "This module was inspired by the excellent DBIx::Abstract.
+While based on the concepts used by DBIx::Abstract, the concepts used have
+been modified to make the SQL easier to generate from Perl data structures.
+The underlying idea is for this module to do what you mean, based on the data
+structures you provide it, so that you don't have to modify your code every
+time your data changes.")
+    (license (package-license perl))))
+
+(define-public perl-sql-splitstatement
+  (package
+    (name "perl-sql-splitstatement")
+    (version "1.00020")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
+                           "SQL-SplitStatement-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-test-exception" ,perl-test-exception)))
+    (propagated-inputs
+     `(("perl-class-accessor" ,perl-class-accessor)
+       ("perl-list-moreutils" ,perl-list-moreutils)
+       ("perl-regexp-common" ,perl-regexp-common)
+       ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
+    (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
+    (synopsis "Split SQL code into atomic statements")
+    (description "This module tries to split any SQL code, even including
+non-standard extensions, into the atomic statements it is composed of.")
+    (license (package-license perl))))
+
+(define-public perl-sql-tokenizer
+  (package
+    (name "perl-sql-tokenizer")
+    (version "0.24")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
+                           "SQL-Tokenizer-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
+    (synopsis "SQL tokenizer")
+    (description "SQL::Tokenizer is a tokenizer for SQL queries.  It does not
+claim to be a parser or query verifier.  It just creates sane tokens from a
+valid SQL query.")
+    (license (package-license perl))))
 
 (define-public unixodbc
   (package
    (name "unixodbc")
-   (version "2.3.2")
+   (version "2.3.4")
    (source (origin
             (method url-fetch)
-            (uri 
+            (uri
              (string-append
-              "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" version ".tar.gz"))
+              "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
+              version ".tar.gz"))
             (sha256
-             (base32 "16jw5fq7wgfky6ak1h2j2pqx99jivsdl4q8aq6immpr55xs5jd4w"))))
+             (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
    (build-system gnu-build-system)
    (synopsis "Data source abstraction library")
    (description "Unixodbc is a library providing an API with which to access
 data sources.  Data sources include SQL Servers and any software with an ODBC
 Driver.")
-   (license lgpl2.1+) 
+   (license lgpl2.1+)
    ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
    (home-page "http://www.unixodbc.org")))
+
+(define-public unqlite
+  (package
+    (name "unqlite")
+    (version "1.1.6")
+    (source (origin
+              (method url-fetch)
+              ;; Contains bug fixes against the official release, and has an
+              ;; autotooled build system.
+              (uri (string-append "https://github.com/aidin36/tocc/releases/"
+                                  "download/v1.0.0/"
+                                  "unqlite-unofficial-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
+    (build-system gnu-build-system)
+    (arguments `(#:tests? #f))          ;No check target
+    (home-page "http://www.unqlite.org")
+    (synopsis "In-memory key/value and document store")
+    (description
+     "UnQLite is an in-process software library which implements a
+self-contained, serverless, zero-configuration, transactional NoSQL
+database engine.  UnQLite is a document store database similar to
+MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
+similar to BerkeleyDB, LevelDB, etc.")
+    (license bsd-2)))
+
+(define-public redis
+  (package
+    (name "redis")
+    (version "3.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://download.redis.io/releases/redis-"
+                                  version".tar.gz"))
+              (sha256
+               (base32
+                "0ql7zp061xr66a1dzpa6a0ijm8zm133dd364va7q5h8avkrim7wq"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; tests related to master/slave and replication fail
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))
+       #:make-flags `("CC=gcc"
+                      "MALLOC=libc"
+                      ,(string-append "PREFIX="
+                                      (assoc-ref %outputs "out")))))
+    (synopsis "Key-value cache and store")
+    (description "Redis is an advanced key-value cache and store.  Redis
+supports many data structures including strings, hashes, lists, sets, sorted
+sets, bitmaps and hyperloglogs.")
+    (home-page "http://redis.io/")
+    (license bsd-3)))
+
+(define-public kyotocabinet
+  (package
+    (name "kyotocabinet")
+    (version "1.2.76")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "LDFLAGS=-Wl,-rpath="
+                       (assoc-ref %outputs "out") "/lib"))))
+    (inputs `(("zlib" ,zlib)))
+    (home-page "http://fallabs.com/kyotocabinet/")
+    (synopsis
+     "Kyoto Cabinet is a modern implementation of the DBM database")
+    (description
+     "Kyoto Cabinet is a standalone file-based database that supports Hash
+and B+ Tree data storage models.  It is a fast key-value lightweight
+database and supports many programming languages.  It is a NoSQL database.")
+    (license gpl3+)))
+
+(define-public wiredtiger
+  (package
+    (name "wiredtiger")
+    (version "2.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://source.wiredtiger.com/releases/wiredtiger-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--enable-lz4" "--enable-zlib")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-test/fops
+           (lambda _
+             ;; XXX: timed out after 3600 seconds of silence
+             (substitute* "Makefile"
+               (("test/fops") ""))
+             #t)))))
+    (inputs
+     `(("lz4" ,lz4)
+       ("zlib" ,zlib)))
+    (home-page "http://source.wiredtiger.com/")
+    (synopsis "NoSQL data engine")
+    (description
+     "WiredTiger is an extensible platform for data management.  It supports
+row-oriented storage (where all columns of a row are stored together),
+column-oriented storage (where columns are stored in groups, allowing for
+more efficient access and storage of column subsets) and log-structured merge
+trees (LSM), for sustained throughput under random insert workloads.")
+    (license gpl3) ; or GPL-2
+    ;; configure.ac: WiredTiger requires a 64-bit build.
+    (supported-systems '("x86_64-linux" "mips64el-linux"))))