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 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
12 ;;; Copyright © 2016 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>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages databases)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages avahi)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages crypto)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages language)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages tcl)
45 #:use-module (gnu packages tls)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages emacs)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages cyrus-sasl)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages rdf)
59 #:use-module (gnu packages xml)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages jemalloc)
62 #:use-module ((guix licenses)
63 #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
64 bsd-2 bsd-3 public-domain))
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system perl)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix utils)
73 #:use-module (srfi srfi-26)
74 #:use-module (ice-9 match))
82 (uri (string-append "https://github.com/garlik/4store/archive/v"
84 (file-name (string-append name "-" version ".tar.gz"))
86 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
87 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
88 (build-system gnu-build-system)
92 ("autoconf" ,autoconf)
93 ("automake" ,automake)
94 ("gettext" ,gnu-gettext)
96 ("pcre" ,pcre "bin") ;for 'pcre-config'
97 ("pkg-config" ,pkg-config)))
103 ("readline" ,readline)
105 ("cyrus-sasl" ,cyrus-sasl)
107 ("util-linux" ,util-linux)))
110 (modify-phases %standard-phases
111 (add-before 'configure 'generate-configure
113 (zero? (system* "./autogen.sh")))))))
114 ;; http://www.4store.org has been down for a while now.
115 (home-page "https://github.com/garlik/4store")
116 (synopsis "Clustered RDF storage and query engine")
117 (description "4store is a RDF/SPARQL store written in C, supporting
118 either single machines or networked clusters.")
127 (uri (string-append "mirror://gnu/gdbm/gdbm-"
131 "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
132 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
133 (build-system gnu-build-system)
134 (home-page "http://www.gnu.org/software/gdbm/")
136 "Hash library of database functions compatible with traditional dbm")
138 "GDBM is a library for manipulating hashed databases. It is used to
139 store key/value pairs in a file in a manner similar to the Unix dbm library
140 and provides interfaces to the traditional file format.")
149 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
153 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
154 (build-system gnu-build-system)
155 (outputs '("out" ; programs, libraries, headers
156 "doc")) ; 94 MiB of HTML docs
158 '(#:tests? #f ; no check target available
159 #:disallowed-references ("doc")
163 (lambda* (#:key outputs #:allow-other-keys)
164 (let ((out (assoc-ref outputs "out"))
165 (doc (assoc-ref outputs "doc")))
166 ;; '--docdir' is not honored, so we need to patch.
167 (substitute* "dist/Makefile.in"
168 (("docdir[[:blank:]]*=.*")
169 (string-append "docdir = " doc "/share/doc/bdb")))
172 (system* "./dist/configure"
173 (string-append "--prefix=" out)
174 (string-append "CONFIG_SHELL=" (which "bash"))
175 (string-append "SHELL=" (which "bash"))
177 ;; Remove 7 MiB of .a files.
180 ;; The compatibility mode is needed by some packages,
184 ;; The following flag is needed so that the inclusion
185 ;; of db_cxx.h into C++ files works; it leads to
186 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
189 (synopsis "Berkeley database")
191 "Berkeley DB is an embeddable database allowing developers the choice of
192 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
193 (license (non-copyleft "file://LICENSE"
194 "See LICENSE in the distribution."))
196 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
198 (define-public bdb-5.3
199 (package (inherit bdb)
204 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
208 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
216 (uri (list (string-append
217 "http://dev.mysql.com/get/Downloads/MySQL-"
218 (version-major+minor version) "/"
219 name "-" version ".tar.gz")
221 "http://downloads.mysql.com/archives/get/file/"
222 name "-" version ".tar.gz")))
225 "198qhd9bdm0fnpp307mgby2aar92yzya0937kxi7bcpdfjcvada9"))))
226 (build-system cmake-build-system)
229 '("-DBUILD_CONFIG=mysql_release"
232 "-DDEFAULT_CHARSET=utf8"
233 "-DDEFAULT_COLLATION=utf8_general_ci"
234 "-DMYSQL_DATADIR=/var/lib/mysql"
235 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
236 "-DINSTALL_INFODIR=share/mysql/docs"
237 "-DINSTALL_MANDIR=share/man"
238 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
239 "-DINSTALL_SCRIPTDIR=bin"
240 "-DINSTALL_INCLUDEDIR=include/mysql"
241 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
242 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
243 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
244 "-DINSTALL_DOCDIR=share/mysql/docs"
245 "-DINSTALL_SHAREDIR=share/mysql"
246 ;; Get rid of test data.
247 "-DINSTALL_MYSQLTESTDIR="
248 "-DINSTALL_SQLBENCHDIR=")
249 #:phases (modify-phases %standard-phases
251 'unpack 'patch-boost-version
253 ;; Mysql wants boost-1.59.0 specifically
254 (substitute* "cmake/boost.cmake"
256 ,(match (string-split (package-version boost) #\.)
257 ((_ minor . _) minor))))))
259 'install 'remove-extra-binaries
260 (lambda* (#:key outputs #:allow-other-keys)
261 (let ((out (assoc-ref outputs "out")))
262 ;; Remove the 3 *_embedded files, which weigh in at
264 (for-each delete-file
265 (find-files (string-append out "/bin")
277 (home-page "http://www.mysql.com/")
278 (synopsis "Fast, easy to use, and popular database")
280 "MySQL is a fast, reliable, and easy to use relational database
281 management system that supports the standardized Structured Query
285 (define-public mariadb
291 (uri (string-append "https://downloads.mariadb.org/f/"
292 name "-" version "/source/"
293 name "-" version ".tar.gz"))
296 "108s4mimdbmgmmn5pcr9a405j70cyny9adzv49s75lg22krp74sv"))))
297 (build-system cmake-build-system)
300 '("-DBUILD_CONFIG=mysql_release"
301 "-DDEFAULT_CHARSET=utf8"
302 "-DDEFAULT_COLLATION=utf8_general_ci"
303 "-DMYSQL_DATADIR=/var/lib/mysql"
304 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
305 "-DINSTALL_INFODIR=share/mysql/docs"
306 "-DINSTALL_MANDIR=share/man"
307 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
308 "-DINSTALL_SCRIPTDIR=bin"
309 "-DINSTALL_INCLUDEDIR=include/mysql"
310 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
311 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
312 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
313 "-DINSTALL_DOCDIR=share/mysql/docs"
314 "-DINSTALL_SHAREDIR=share/mysql")
316 (modify-phases %standard-phases
318 'configure 'pre-configure
320 (setenv "CONFIG_SHELL" (which "sh"))
323 'install 'post-install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let* ((out (assoc-ref outputs "out"))
326 (test (assoc-ref outputs "test")))
327 (substitute* (string-append out "/bin/mysql_install_db")
329 (string-append "basedir=\"" out "\"")))
330 ;; Remove unneeded files for testing.
331 (with-directory-excursion out
332 (for-each delete-file-recursively
333 '("data" "mysql-test" "sql-bench"
334 "share/man/man1/mysql-test-run.pl.1")))))))))
339 `(("jemalloc" ,jemalloc)
346 (home-page "https://mariadb.org/")
347 (synopsis "SQL database server")
349 "MariaDB is a multi-user and multi-threaded SQL database server, designed
350 as a drop-in replacement of MySQL.")
353 (define-public postgresql
359 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
360 version "/postgresql-" version ".tar.bz2"))
363 "157kf6mdazmxfmd11f0akya2xcz6sfgprn7yqc26dpklps855ih2"))))
364 (build-system gnu-build-system)
367 (modify-phases %standard-phases
368 (add-before 'configure 'patch-/bin/sh
370 ;; Refer to the actual shell.
371 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
372 "src/bin/psql/command.c")
373 (("/bin/sh") (which "sh")))
376 `(("readline" ,readline)
378 (home-page "https://www.postgresql.org/")
379 (synopsis "Powerful object-relational database system")
381 "PostgreSQL is a powerful object-relational database system. It is fully
382 ACID compliant, has full support for foreign keys, joins, views, triggers, and
383 stored procedures (in multiple languages). It includes most SQL:2008 data
384 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
385 TIMESTAMP. It also supports storage of binary large objects, including
386 pictures, sounds, or video.")
387 (license (x11-style "file://COPYRIGHT"))))
389 (define-public recutils
395 (uri (string-append "mirror://gnu/recutils/recutils-"
399 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
400 (build-system gnu-build-system)
402 ;; Running tests in parallel leads to test failures and crashes in
404 (arguments '(#:parallel-tests? #f
406 (list (string-append "--with-bash-headers="
407 (assoc-ref %build-inputs "bash:include")
410 (native-inputs `(("emacs" ,emacs-minimal)
412 ("bash:include" ,bash "include")
413 ("libuuid" ,util-linux)))
415 ;; TODO: Add more optional inputs.
416 (inputs `(("curl" ,curl)
417 ("libgcrypt" ,libgcrypt)
419 (synopsis "Manipulate plain text files as databases")
421 "GNU Recutils is a set of tools and libraries for creating and
422 manipulating text-based, human-editable databases. Despite being text-based,
423 databases created with Recutils carry all of the expected features such as
424 unique fields, primary keys, time stamps and more. Many different field
425 types are supported, as is encryption.")
427 (home-page "http://www.gnu.org/software/recutils/")))
429 (define-public sparql-query
431 (name "sparql-query")
435 (uri (string-append "https://github.com/tialaramex/"
436 name "/archive/" version ".tar.gz"))
438 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
439 (file-name (string-append name "-" version ".tar.gz"))))
440 (build-system gnu-build-system)
442 `(("readline" ,readline)
448 `(("pkg-config" ,pkg-config)))
450 `(#:make-flags '("CC=gcc")
452 (modify-phases %standard-phases
454 ;; The Makefile uses git to obtain versioning information. This phase
455 ;; substitutes the git invocation with the package version.
456 (add-after 'unpack 'remove-git-dependency
458 (substitute* "Makefile"
460 (string-append "gitrev = \"v" ,version "\"")))))
461 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
462 ;; This replacement does the same thing, except for using $PREFIX/bin
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let* ((out (assoc-ref outputs "out"))
467 (bin (string-append out "/bin")))
468 (install-file "sparql-query" bin)
469 (system* "ln" "--symbolic"
470 (string-append bin "/sparql-query")
471 (string-append bin "/sparql-update")))))
473 (lambda* (#:key make-flags #:allow-other-keys)
475 (zero? (apply system* "make" `(,@make-flags "scan-test")))
476 (zero? (system "./scan-test"))))))))
477 (home-page "https://github.com/tialaramex/sparql-query/")
478 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
479 (description "Sparql-query is a command-line tool for accessing SPARQL
480 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
481 tools for interrogating SQL databases. For example, you can enter a query over
482 several lines, using a semi-colon at the end of a line to indicate the end of
483 your query. It also supports readline so that you can more easily recall and
484 edit previous queries, even across sessions. It can be used non-interactively,
485 for example from a shell script.")
486 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
487 ;; others (like sparql-query.c) contain a GPLv2+ license header.
488 (license (list gpl3+))))
490 (define-public sqlite
496 ;; TODO: Download from sqlite.org once this bug :
497 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
499 (uri (let ((numeric-version
500 (match (string-split version #\.)
501 ((first-digit other-digits ...)
502 (string-append first-digit
505 (map (cut string-pad <> 2 #\0)
510 "https://fossies.org/linux/misc/sqlite-autoconf-"
511 numeric-version ".tar.gz")
513 "http://distfiles.gentoo.org/distfiles/"
514 "/sqlite-autoconf-" numeric-version ".tar.gz"))
516 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
517 ;; below, returning 200 and showing an advertising page.
519 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
520 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
524 "1fwss0i2lixv39b27gkqiibdd2syym90wh3qbiaxnfgxk867f07x"))))
525 (build-system gnu-build-system)
526 (inputs `(("readline" ,readline)))
529 ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to
530 ;; CFLAGS. GNU Icecat will refuse to use the system SQLite unless these
531 ;; options are enabled.
532 '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY")))
533 (home-page "http://www.sqlite.org/")
534 (synopsis "The SQLite database management system")
536 "SQLite is a software library that implements a self-contained, serverless,
537 zero-configuration, transactional SQL database engine. SQLite is the most
538 widely deployed SQL database engine in the world. The source code for SQLite
539 is in the public domain.")
540 (license public-domain)))
548 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
552 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
553 (build-system gnu-build-system)
556 (modify-phases %standard-phases
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let ((out (assoc-ref outputs "out")))
560 ;; The 'configure' script is a wrapper for Waf and
561 ;; doesn't recognize things like '--enable-fast-install'.
562 (zero? (system* "./configure"
563 (string-append "--prefix=" out)))))))))
565 `(;; TODO: Build the documentation.
566 ;; ("docbook-xsl" ,docbook-xsl)
567 ;; ("libxml2" ,libxml2)
568 ;; ("libxslt" ,libxslt)
569 ("python" ,python-2))) ;for the Waf build system
570 (home-page "https://tdb.samba.org/")
571 (synopsis "Trivial database")
573 "TDB is a Trivial Database. In concept, it is very much like GDBM,
574 and BSD's DB except that it allows multiple simultaneous writers and uses
575 locking internally to keep writers from trampling on each other. TDB is also
579 (define-public perl-dbi
586 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
590 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
591 (build-system perl-build-system)
592 (synopsis "Database independent interface for Perl")
593 (description "This package provides an database interface for Perl.")
594 (home-page "http://search.cpan.org/dist/DBI")
595 (license (package-license perl))))
597 (define-public perl-dbix-class
599 (name "perl-dbix-class")
604 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
605 "DBIx-Class-" version ".tar.gz"))
608 "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
609 (build-system perl-build-system)
611 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
612 ("perl-file-temp" ,perl-file-temp)
613 ("perl-package-stash" ,perl-package-stash)
614 ("perl-test-deep" ,perl-test-deep)
615 ("perl-test-exception" ,perl-test-exception)
616 ("perl-test-warn" ,perl-test-warn)))
618 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
619 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
620 ("perl-class-inspector" ,perl-class-inspector)
621 ("perl-config-any" ,perl-config-any)
622 ("perl-context-preserve" ,perl-context-preserve)
623 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
624 ("perl-data-page" ,perl-data-page)
625 ("perl-dbi" ,perl-dbi)
626 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
627 ("perl-hash-merge" ,perl-hash-merge)
628 ("perl-module-find" ,perl-module-find)
629 ("perl-moo" ,perl-moo)
630 ("perl-mro-compat" ,perl-mro-compat)
631 ("perl-namespace-clean" ,perl-namespace-clean)
632 ("perl-path-class" ,perl-path-class)
633 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
634 ("perl-scope-guard" ,perl-scope-guard)
635 ("perl-sql-abstract" ,perl-sql-abstract)
636 ("perl-sub-name" ,perl-sub-name)
637 ("perl-text-balanced" ,perl-text-balanced)
638 ("perl-try-tiny" ,perl-try-tiny)))
639 (home-page "http://search.cpan.org/dist/DBIx-Class")
640 (synopsis "Extensible and flexible object <-> relational mapper")
641 (description "An SQL to OO mapper with an object API inspired by
642 Class::DBI (with a compatibility layer as a springboard for porting) and a
643 resultset API that allows abstract encapsulation of database operations. It
644 aims to make representing queries in your code as perl-ish as possible while
645 still providing access to as many of the capabilities of the database as
646 possible, including retrieving related records from multiple tables in a
647 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
648 \"ORDER BY\" and \"HAVING\" support.")
649 (license (package-license perl))))
651 (define-public perl-dbix-class-cursor-cached
653 (name "perl-dbix-class-cursor-cached")
658 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
659 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
662 "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
663 (build-system perl-build-system)
665 `(("perl-cache-cache" ,perl-cache-cache)
666 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
668 `(("perl-carp-clan" ,perl-carp-clan)
669 ("perl-dbix-class" ,perl-dbix-class)))
670 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
671 (synopsis "Cursor with built-in caching support")
672 (description "DBIx::Class::Cursor::Cached provides a cursor class with
673 built-in caching support.")
674 (license (package-license perl))))
676 (define-public perl-dbix-class-introspectablem2m
678 (name "perl-dbix-class-introspectablem2m")
683 (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
684 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
687 "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
688 (build-system perl-build-system)
690 `(("perl-dbix-class" ,perl-dbix-class)))
691 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
692 (synopsis "Introspect many-to-many relationships")
693 (description "Because the many-to-many relationships are not real
694 relationships, they can not be introspected with DBIx::Class. Many-to-many
695 relationships are actually just a collection of convenience methods installed
696 to bridge two relationships. This DBIx::Class component can be used to store
697 all relevant information about these non-relationships so they can later be
698 introspected and examined.")
699 (license (package-license perl))))
701 (define-public perl-dbix-class-schema-loader
703 (name "perl-dbix-class-schema-loader")
708 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
709 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
712 "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
713 (build-system perl-build-system)
715 `(("perl-config-any" ,perl-config-any)
716 ("perl-config-general" ,perl-config-general)
717 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
718 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
719 ("perl-moose" ,perl-moose)
720 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
721 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
722 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
723 ("perl-test-deep" ,perl-test-deep)
724 ("perl-test-differences" ,perl-test-differences)
725 ("perl-test-exception" ,perl-test-exception)
726 ("perl-test-pod" ,perl-test-pod)
727 ("perl-test-warn" ,perl-test-warn)))
729 `(("perl-class-unload" ,perl-class-unload)
730 ("perl-class-inspector" ,perl-class-inspector)
731 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
732 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
733 ("perl-carp-clan" ,perl-carp-clan)
734 ("perl-data-dump" ,perl-data-dump)
735 ("perl-dbix-class" ,perl-dbix-class)
736 ("perl-hash-merge" ,perl-hash-merge)
737 ("perl-list-moreutils" ,perl-list-moreutils)
738 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
739 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
740 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
741 ("perl-namespace-clean" ,perl-namespace-clean)
742 ("perl-mro-compat" ,perl-mro-compat)
743 ("perl-scope-guard" ,perl-scope-guard)
744 ("perl-string-camelcase" ,perl-string-camelcase)
745 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
746 ("perl-sub-name" ,perl-sub-name)
747 ("perl-try-tiny" ,perl-try-tiny)))
748 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
749 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
750 (synopsis "Create a DBIx::Class::Schema based on a database")
751 (description "DBIx::Class::Schema::Loader automates the definition of a
752 DBIx::Class::Schema by scanning database table definitions and setting up the
753 columns, primary keys, unique constraints and relationships.")
754 (license (package-license perl))))
756 (define-public perl-dbd-pg
763 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
764 "DBD-Pg-" version ".tar.gz"))
767 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
768 (build-system perl-build-system)
770 `(("perl-dbi" ,perl-dbi)))
772 `(("perl-dbi" ,perl-dbi)
773 ("postgresql" ,postgresql)))
774 (home-page "http://search.cpan.org/dist/DBD-Pg")
775 (synopsis "DBI PostgreSQL interface")
776 (description "This package provides a PostgreSQL driver for the Perl5
777 @dfn{Database Interface} (DBI).")
778 (license (package-license perl))))
780 (define-public perl-dbd-mysql
782 (name "perl-dbd-mysql")
787 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
788 "DBD-mysql-" version ".tar.gz"))
791 "1z1wxnzhxfr9awjqb1d8pz9hf50shbk9ip2jmsmgdlwfyb78lmyz"))))
792 (build-system perl-build-system)
793 ;; Tests require running MySQL server
794 (arguments `(#:tests? #f))
796 `(("perl-dbi" ,perl-dbi)
798 (home-page "http://search.cpan.org/dist/DBD-mysql")
799 (synopsis "DBI MySQL interface")
800 (description "This package provides a MySQL driver for the Perl5
801 @dfn{Database Interface} (DBI).")
802 (license (package-license perl))))
804 (define-public perl-dbd-sqlite
806 (name "perl-dbd-sqlite")
811 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
815 "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
816 (build-system perl-build-system)
817 (inputs `(("sqlite" ,sqlite)))
818 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
819 (synopsis "SQlite interface for Perl")
820 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
821 the entire thing in the distribution. So in order to get a fast transaction
822 capable RDBMS working for your Perl project you simply have to install this
823 module, and nothing else.")
824 (license (package-license perl))
825 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
827 (define-public perl-sql-abstract
829 (name "perl-sql-abstract")
834 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
835 "SQL-Abstract-" version ".tar.gz"))
838 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
839 (build-system perl-build-system)
841 `(("perl-test-deep" ,perl-test-deep)
842 ("perl-test-exception" ,perl-test-exception)
843 ("perl-test-warn" ,perl-test-warn)))
845 `(("perl-hash-merge" ,perl-hash-merge)
846 ("perl-moo" ,perl-moo)
847 ("perl-mro-compat" ,perl-mro-compat)
848 ("perl-text-balanced" ,perl-text-balanced)))
849 (home-page "http://search.cpan.org/dist/SQL-Abstract")
850 (synopsis "Generate SQL from Perl data structures")
851 (description "This module was inspired by the excellent DBIx::Abstract.
852 While based on the concepts used by DBIx::Abstract, the concepts used have
853 been modified to make the SQL easier to generate from Perl data structures.
854 The underlying idea is for this module to do what you mean, based on the data
855 structures you provide it, so that you don't have to modify your code every
856 time your data changes.")
857 (license (package-license perl))))
859 (define-public perl-sql-splitstatement
861 (name "perl-sql-splitstatement")
866 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
867 "SQL-SplitStatement-" version ".tar.gz"))
870 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
871 (build-system perl-build-system)
873 `(("perl-test-exception" ,perl-test-exception)))
875 `(("perl-class-accessor" ,perl-class-accessor)
876 ("perl-list-moreutils" ,perl-list-moreutils)
877 ("perl-regexp-common" ,perl-regexp-common)
878 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
879 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
880 (synopsis "Split SQL code into atomic statements")
881 (description "This module tries to split any SQL code, even including
882 non-standard extensions, into the atomic statements it is composed of.")
883 (license (package-license perl))))
885 (define-public perl-sql-tokenizer
887 (name "perl-sql-tokenizer")
892 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
893 "SQL-Tokenizer-" version ".tar.gz"))
896 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
897 (build-system perl-build-system)
898 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
899 (synopsis "SQL tokenizer")
900 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
901 claim to be a parser or query verifier. It just creates sane tokens from a
903 (license (package-license perl))))
905 (define-public unixodbc
913 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
916 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
917 (build-system gnu-build-system)
918 (synopsis "Data source abstraction library")
919 (description "Unixodbc is a library providing an API with which to access
920 data sources. Data sources include SQL Servers and any software with an ODBC
923 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
924 (home-page "http://www.unixodbc.org")))
926 (define-public unqlite
932 ;; Contains bug fixes against the official release, and has an
933 ;; autotooled build system.
934 (uri (string-append "https://github.com/aidin36/tocc/releases/"
936 "unqlite-unofficial-" version ".tar.gz"))
939 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
940 (build-system gnu-build-system)
941 (arguments `(#:tests? #f)) ;No check target
942 (home-page "http://www.unqlite.org")
943 (synopsis "In-memory key/value and document store")
945 "UnQLite is an in-process software library which implements a
946 self-contained, serverless, zero-configuration, transactional NoSQL
947 database engine. UnQLite is a document store database similar to
948 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
949 similar to BerkeleyDB, LevelDB, etc.")
958 (uri (string-append "http://download.redis.io/releases/redis-"
962 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
963 (build-system gnu-build-system)
965 '(#:tests? #f ; tests related to master/slave and replication fail
966 #:phases (modify-phases %standard-phases
968 #:make-flags `("CC=gcc"
971 ,(string-append "PREFIX="
972 (assoc-ref %outputs "out")))))
973 (synopsis "Key-value cache and store")
974 (description "Redis is an advanced key-value cache and store. Redis
975 supports many data structures including strings, hashes, lists, sets, sorted
976 sets, bitmaps and hyperloglogs.")
977 (home-page "http://redis.io/")
980 (define-public kyotocabinet
982 (name "kyotocabinet")
986 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
987 name "-" version ".tar.gz"))
990 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
991 (build-system gnu-build-system)
995 (string-append "LDFLAGS=-Wl,-rpath="
996 (assoc-ref %outputs "out") "/lib"))))
997 (inputs `(("zlib" ,zlib)))
998 (home-page "http://fallabs.com/kyotocabinet/")
1000 "Kyoto Cabinet is a modern implementation of the DBM database")
1002 "Kyoto Cabinet is a standalone file-based database that supports Hash
1003 and B+ Tree data storage models. It is a fast key-value lightweight
1004 database and supports many programming languages. It is a NoSQL database.")
1007 (define-public wiredtiger
1014 "http://source.wiredtiger.com/releases/wiredtiger-"
1015 version ".tar.bz2"))
1018 "1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"))))
1019 (build-system gnu-build-system)
1021 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1023 (modify-phases %standard-phases
1024 (add-before 'check 'disable-test/fops
1026 ;; XXX: timed out after 3600 seconds of silence
1027 (substitute* "Makefile"
1033 (home-page "http://source.wiredtiger.com/")
1034 (synopsis "NoSQL data engine")
1036 "WiredTiger is an extensible platform for data management. It supports
1037 row-oriented storage (where all columns of a row are stored together),
1038 column-oriented storage (where columns are stored in groups, allowing for
1039 more efficient access and storage of column subsets) and log-structured merge
1040 trees (LSM), for sustained throughput under random insert workloads.")
1041 (license gpl3) ; or GPL-2
1042 ;; configure.ac: WiredTiger requires a 64-bit build.
1043 (supported-systems '("x86_64-linux" "mips64el-linux"))))
1045 (define-public perl-db-file
1047 (name "perl-db-file")
1053 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1058 "0yp5d5zr8dk9g6xdh7ygi5bq63q7nxvhd58dk2i3ki4nb7yv2yh9"))))
1059 (build-system perl-build-system)
1060 (inputs `(("bdb" ,bdb)))
1061 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1063 `(#:phases (modify-phases %standard-phases
1065 'configure 'modify-config.in
1066 (lambda* (#:key inputs #:allow-other-keys)
1067 (substitute* "config.in"
1068 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1070 (home-page "http://search.cpan.org/dist/DB_File")
1072 "Perl5 access to Berkeley DB version 1.x")
1074 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1075 (license (package-license perl))))
1083 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1084 "LMDB_" version ".tar.gz"))
1087 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1088 (build-system gnu-build-system)
1090 `(#:test-target "test"
1092 (modify-phases %standard-phases
1094 (lambda* (#:key outputs #:allow-other-keys)
1095 (chdir (string-append
1096 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1097 (substitute* "Makefile"
1098 (("/usr/local") (assoc-ref outputs "out")))
1100 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1101 (synopsis "Lightning memory-mapped database library")
1102 (description "Lightning memory-mapped database library.")
1103 (license license:openldap2.8)))
1105 (define-public libpqxx
1112 "http://pqxx.org/download/software/libpqxx/"
1113 name "-" version ".tar.gz"))
1116 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1117 (build-system gnu-build-system)
1119 `(("python" ,python-2)))
1120 (inputs `(("postgresql" ,postgresql)))
1122 `(#:tests? #f)) ; # FAIL: 1
1123 (synopsis "C++ connector for PostgreSQL")
1125 "Libpqxx is a C++ library to enable user programs to communicate with the
1126 PostgreSQL database back-end. The database back-end can be local or it may be
1127 on another machine, accessed via TCP/IP.")
1128 (home-page "http://pqxx.org/")
1129 (license license:bsd-3)))
1131 (define-public python-peewee
1133 (name "python-peewee")
1138 (uri (pypi-uri "peewee" version))
1141 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1142 (build-system python-build-system)
1144 `(#:tests? #f)) ; Fails to import test data
1146 `(("python-cython" ,python-cython)))
1147 (home-page "https://github.com/coleifer/peewee/")
1148 (synopsis "Small object-relational mapping utility")
1150 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1151 handles converting between pythonic values and those used by databases, so you
1152 can use Python types in your code without having to worry. It has built-in
1153 support for sqlite, mysql and postgresql. If you already have a database, you
1154 can autogenerate peewee models using @code{pwiz}, a model generator.")
1155 (license license:expat)))
1157 (define-public python2-peewee
1158 (package-with-python2 python-peewee))
1160 (define-public sqlcipher
1167 (uri (string-append "https://github.com/sqlcipher/" name
1168 "/archive/v" version ".tar.gz"))
1170 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1171 (file-name (string-append name "-" version ".tar.gz"))))
1172 (build-system gnu-build-system)
1174 `(("libcrypto" ,openssl)
1175 ("libtcl8.6" ,tcl))) ; required for running the tests
1180 '("--enable-tempstore=yes"
1181 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1182 "LDFLAGS=-lcrypto -ltcl8.6"
1184 ;; tests cannot be run from the Makefile
1185 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1186 #:test-target "testfixture"
1188 (modify-phases %standard-phases
1189 (add-before 'check 'build-test-runner
1190 (assoc-ref %standard-phases 'check))
1194 (system* "./testfixture" "test/crypto.test")))))))
1195 (home-page "https://www.zetetic.net/sqlcipher/")
1197 "Library providing transparent encryption of SQLite database files")
1198 (description "SQLCipher is an implementation of SQLite, extended to
1199 provide transparent 256-bit AES encryption of database files. Pages are
1200 encrypted before being written to disk and are decrypted when read back. It’s
1201 well suited for protecting embedded application databases and for mobile
1204 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1205 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1206 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1207 ;; source files are in the public domain.
1208 (license (list license:public-domain license:bsd-3))))