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" ,gettext-minimal)
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 "0wrvhyck95czhz553834i9im7ljvn8k2byakcinlji7zx43njcyp"))))
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 "1l3fqxlpxgl6nrcd4h6lpi2hsiv56yg83n3xrn704rmdch8mfpng"))))
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 "http://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 #:phases (modify-phases %standard-phases
411 (add-before 'build 'set-bash4.4-header-location
413 (substitute* "bash/Makefile.in"
414 ;; Adjust the header search path for Bash
415 ;; 4.4 in accordance with 'bash.pc'.
416 (("AM_CPPFLAGS = (.*)$" _ rest)
417 (string-append "AM_CPPFLAGS = "
418 "-I$(BASH_HEADERS)/include "
421 ;; Install to PREFIX/lib/bash to match Bash
422 ;; 4.4's search path.
424 "libdir = @libdir@/bash\n"))
427 (native-inputs `(("emacs" ,emacs-minimal)
429 ("bash:include" ,bash "include")
430 ("libuuid" ,util-linux)))
432 ;; TODO: Add more optional inputs.
433 (inputs `(("curl" ,curl)
434 ("libgcrypt" ,libgcrypt)
436 (synopsis "Manipulate plain text files as databases")
438 "GNU Recutils is a set of tools and libraries for creating and
439 manipulating text-based, human-editable databases. Despite being text-based,
440 databases created with Recutils carry all of the expected features such as
441 unique fields, primary keys, time stamps and more. Many different field
442 types are supported, as is encryption.")
444 (home-page "http://www.gnu.org/software/recutils/")))
446 (define-public sparql-query
448 (name "sparql-query")
452 (uri (string-append "https://github.com/tialaramex/"
453 name "/archive/" version ".tar.gz"))
455 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
456 (file-name (string-append name "-" version ".tar.gz"))))
457 (build-system gnu-build-system)
459 `(("readline" ,readline)
465 `(("pkg-config" ,pkg-config)))
467 `(#:make-flags '("CC=gcc")
469 (modify-phases %standard-phases
471 ;; The Makefile uses git to obtain versioning information. This phase
472 ;; substitutes the git invocation with the package version.
473 (add-after 'unpack 'remove-git-dependency
475 (substitute* "Makefile"
477 (string-append "gitrev = \"v" ,version "\"")))))
478 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
479 ;; This replacement does the same thing, except for using $PREFIX/bin
482 (lambda* (#:key outputs #:allow-other-keys)
483 (let* ((out (assoc-ref outputs "out"))
484 (bin (string-append out "/bin")))
485 (install-file "sparql-query" bin)
486 (system* "ln" "--symbolic"
487 (string-append bin "/sparql-query")
488 (string-append bin "/sparql-update")))))
490 (lambda* (#:key make-flags #:allow-other-keys)
492 (zero? (apply system* "make" `(,@make-flags "scan-test")))
493 (zero? (system "./scan-test"))))))))
494 (home-page "https://github.com/tialaramex/sparql-query/")
495 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
496 (description "Sparql-query is a command-line tool for accessing SPARQL
497 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
498 tools for interrogating SQL databases. For example, you can enter a query over
499 several lines, using a semi-colon at the end of a line to indicate the end of
500 your query. It also supports readline so that you can more easily recall and
501 edit previous queries, even across sessions. It can be used non-interactively,
502 for example from a shell script.")
503 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
504 ;; others (like sparql-query.c) contain a GPLv2+ license header.
505 (license (list gpl3+))))
507 (define-public sqlite
513 ;; TODO: Download from sqlite.org once this bug :
514 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
516 (uri (let ((numeric-version
517 (match (string-split version #\.)
518 ((first-digit other-digits ...)
519 (string-append first-digit
522 (map (cut string-pad <> 2 #\0)
527 "https://fossies.org/linux/misc/sqlite-autoconf-"
528 numeric-version ".tar.gz")
530 "http://distfiles.gentoo.org/distfiles/"
531 "/sqlite-autoconf-" numeric-version ".tar.gz"))
533 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
534 ;; below, returning 200 and showing an advertising page.
536 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
537 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
541 "19j73j44akqgc6m82wm98yvnmm3mfzmfqr8mp3n7n080d53q4wdw"))))
542 (build-system gnu-build-system)
543 (inputs `(("readline" ,readline)))
546 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
547 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
548 ;; to use the system SQLite unless these options are enabled.
549 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
550 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
551 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
552 (home-page "http://www.sqlite.org/")
553 (synopsis "The SQLite database management system")
555 "SQLite is a software library that implements a self-contained, serverless,
556 zero-configuration, transactional SQL database engine. SQLite is the most
557 widely deployed SQL database engine in the world. The source code for SQLite
558 is in the public domain.")
559 (license public-domain)))
567 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
571 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
572 (build-system gnu-build-system)
575 (modify-phases %standard-phases
577 (lambda* (#:key outputs #:allow-other-keys)
578 (let ((out (assoc-ref outputs "out")))
579 ;; The 'configure' script is a wrapper for Waf and
580 ;; doesn't recognize things like '--enable-fast-install'.
581 (zero? (system* "./configure"
582 (string-append "--prefix=" out)))))))))
584 `(;; TODO: Build the documentation.
585 ;; ("docbook-xsl" ,docbook-xsl)
586 ;; ("libxml2" ,libxml2)
587 ;; ("libxslt" ,libxslt)
588 ("python" ,python-2))) ;for the Waf build system
589 (home-page "https://tdb.samba.org/")
590 (synopsis "Trivial database")
592 "TDB is a Trivial Database. In concept, it is very much like GDBM,
593 and BSD's DB except that it allows multiple simultaneous writers and uses
594 locking internally to keep writers from trampling on each other. TDB is also
598 (define-public perl-dbi
605 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
609 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
610 (build-system perl-build-system)
611 (synopsis "Database independent interface for Perl")
612 (description "This package provides an database interface for Perl.")
613 (home-page "http://search.cpan.org/dist/DBI")
614 (license (package-license perl))))
616 (define-public perl-dbix-class
618 (name "perl-dbix-class")
623 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
624 "DBIx-Class-" version ".tar.gz"))
627 "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
628 (build-system perl-build-system)
630 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
631 ("perl-file-temp" ,perl-file-temp)
632 ("perl-package-stash" ,perl-package-stash)
633 ("perl-test-deep" ,perl-test-deep)
634 ("perl-test-exception" ,perl-test-exception)
635 ("perl-test-warn" ,perl-test-warn)))
637 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
638 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
639 ("perl-class-inspector" ,perl-class-inspector)
640 ("perl-config-any" ,perl-config-any)
641 ("perl-context-preserve" ,perl-context-preserve)
642 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
643 ("perl-data-page" ,perl-data-page)
644 ("perl-dbi" ,perl-dbi)
645 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
646 ("perl-hash-merge" ,perl-hash-merge)
647 ("perl-module-find" ,perl-module-find)
648 ("perl-moo" ,perl-moo)
649 ("perl-mro-compat" ,perl-mro-compat)
650 ("perl-namespace-clean" ,perl-namespace-clean)
651 ("perl-path-class" ,perl-path-class)
652 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
653 ("perl-scope-guard" ,perl-scope-guard)
654 ("perl-sql-abstract" ,perl-sql-abstract)
655 ("perl-sub-name" ,perl-sub-name)
656 ("perl-text-balanced" ,perl-text-balanced)
657 ("perl-try-tiny" ,perl-try-tiny)))
658 (home-page "http://search.cpan.org/dist/DBIx-Class")
659 (synopsis "Extensible and flexible object <-> relational mapper")
660 (description "An SQL to OO mapper with an object API inspired by
661 Class::DBI (with a compatibility layer as a springboard for porting) and a
662 resultset API that allows abstract encapsulation of database operations. It
663 aims to make representing queries in your code as perl-ish as possible while
664 still providing access to as many of the capabilities of the database as
665 possible, including retrieving related records from multiple tables in a
666 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
667 \"ORDER BY\" and \"HAVING\" support.")
668 (license (package-license perl))))
670 (define-public perl-dbix-class-cursor-cached
672 (name "perl-dbix-class-cursor-cached")
677 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
678 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
681 "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
682 (build-system perl-build-system)
684 `(("perl-cache-cache" ,perl-cache-cache)
685 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
687 `(("perl-carp-clan" ,perl-carp-clan)
688 ("perl-dbix-class" ,perl-dbix-class)))
689 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
690 (synopsis "Cursor with built-in caching support")
691 (description "DBIx::Class::Cursor::Cached provides a cursor class with
692 built-in caching support.")
693 (license (package-license perl))))
695 (define-public perl-dbix-class-introspectablem2m
697 (name "perl-dbix-class-introspectablem2m")
702 (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
703 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
706 "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
707 (build-system perl-build-system)
709 `(("perl-dbix-class" ,perl-dbix-class)))
710 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
711 (synopsis "Introspect many-to-many relationships")
712 (description "Because the many-to-many relationships are not real
713 relationships, they can not be introspected with DBIx::Class. Many-to-many
714 relationships are actually just a collection of convenience methods installed
715 to bridge two relationships. This DBIx::Class component can be used to store
716 all relevant information about these non-relationships so they can later be
717 introspected and examined.")
718 (license (package-license perl))))
720 (define-public perl-dbix-class-schema-loader
722 (name "perl-dbix-class-schema-loader")
727 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
728 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
731 "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
732 (build-system perl-build-system)
734 `(("perl-config-any" ,perl-config-any)
735 ("perl-config-general" ,perl-config-general)
736 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
737 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
738 ("perl-moose" ,perl-moose)
739 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
740 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
741 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
742 ("perl-test-deep" ,perl-test-deep)
743 ("perl-test-differences" ,perl-test-differences)
744 ("perl-test-exception" ,perl-test-exception)
745 ("perl-test-pod" ,perl-test-pod)
746 ("perl-test-warn" ,perl-test-warn)))
748 `(("perl-class-unload" ,perl-class-unload)
749 ("perl-class-inspector" ,perl-class-inspector)
750 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
751 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
752 ("perl-carp-clan" ,perl-carp-clan)
753 ("perl-data-dump" ,perl-data-dump)
754 ("perl-dbix-class" ,perl-dbix-class)
755 ("perl-hash-merge" ,perl-hash-merge)
756 ("perl-list-moreutils" ,perl-list-moreutils)
757 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
758 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
759 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
760 ("perl-namespace-clean" ,perl-namespace-clean)
761 ("perl-mro-compat" ,perl-mro-compat)
762 ("perl-scope-guard" ,perl-scope-guard)
763 ("perl-string-camelcase" ,perl-string-camelcase)
764 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
765 ("perl-sub-name" ,perl-sub-name)
766 ("perl-try-tiny" ,perl-try-tiny)))
767 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
768 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
769 (synopsis "Create a DBIx::Class::Schema based on a database")
770 (description "DBIx::Class::Schema::Loader automates the definition of a
771 DBIx::Class::Schema by scanning database table definitions and setting up the
772 columns, primary keys, unique constraints and relationships.")
773 (license (package-license perl))))
775 (define-public perl-dbd-pg
782 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
783 "DBD-Pg-" version ".tar.gz"))
786 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
787 (build-system perl-build-system)
789 `(("perl-dbi" ,perl-dbi)))
791 `(("perl-dbi" ,perl-dbi)
792 ("postgresql" ,postgresql)))
793 (home-page "http://search.cpan.org/dist/DBD-Pg")
794 (synopsis "DBI PostgreSQL interface")
795 (description "This package provides a PostgreSQL driver for the Perl5
796 @dfn{Database Interface} (DBI).")
797 (license (package-license perl))))
799 (define-public perl-dbd-mysql
801 (name "perl-dbd-mysql")
806 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
807 "DBD-mysql-" version ".tar.gz"))
810 "1z1wxnzhxfr9awjqb1d8pz9hf50shbk9ip2jmsmgdlwfyb78lmyz"))))
811 (build-system perl-build-system)
812 ;; Tests require running MySQL server
813 (arguments `(#:tests? #f))
815 `(("perl-dbi" ,perl-dbi)
817 (home-page "http://search.cpan.org/dist/DBD-mysql")
818 (synopsis "DBI MySQL interface")
819 (description "This package provides a MySQL driver for the Perl5
820 @dfn{Database Interface} (DBI).")
821 (license (package-license perl))))
823 (define-public perl-dbd-sqlite
825 (name "perl-dbd-sqlite")
830 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
834 "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
835 (build-system perl-build-system)
836 (inputs `(("sqlite" ,sqlite)))
837 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
838 (synopsis "SQlite interface for Perl")
839 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
840 the entire thing in the distribution. So in order to get a fast transaction
841 capable RDBMS working for your Perl project you simply have to install this
842 module, and nothing else.")
843 (license (package-license perl))
844 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
846 (define-public perl-sql-abstract
848 (name "perl-sql-abstract")
853 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
854 "SQL-Abstract-" version ".tar.gz"))
857 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
858 (build-system perl-build-system)
860 `(("perl-test-deep" ,perl-test-deep)
861 ("perl-test-exception" ,perl-test-exception)
862 ("perl-test-warn" ,perl-test-warn)))
864 `(("perl-hash-merge" ,perl-hash-merge)
865 ("perl-moo" ,perl-moo)
866 ("perl-mro-compat" ,perl-mro-compat)
867 ("perl-text-balanced" ,perl-text-balanced)))
868 (home-page "http://search.cpan.org/dist/SQL-Abstract")
869 (synopsis "Generate SQL from Perl data structures")
870 (description "This module was inspired by the excellent DBIx::Abstract.
871 While based on the concepts used by DBIx::Abstract, the concepts used have
872 been modified to make the SQL easier to generate from Perl data structures.
873 The underlying idea is for this module to do what you mean, based on the data
874 structures you provide it, so that you don't have to modify your code every
875 time your data changes.")
876 (license (package-license perl))))
878 (define-public perl-sql-splitstatement
880 (name "perl-sql-splitstatement")
885 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
886 "SQL-SplitStatement-" version ".tar.gz"))
889 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
890 (build-system perl-build-system)
892 `(("perl-test-exception" ,perl-test-exception)))
894 `(("perl-class-accessor" ,perl-class-accessor)
895 ("perl-list-moreutils" ,perl-list-moreutils)
896 ("perl-regexp-common" ,perl-regexp-common)
897 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
898 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
899 (synopsis "Split SQL code into atomic statements")
900 (description "This module tries to split any SQL code, even including
901 non-standard extensions, into the atomic statements it is composed of.")
902 (license (package-license perl))))
904 (define-public perl-sql-tokenizer
906 (name "perl-sql-tokenizer")
911 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
912 "SQL-Tokenizer-" version ".tar.gz"))
915 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
916 (build-system perl-build-system)
917 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
918 (synopsis "SQL tokenizer")
919 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
920 claim to be a parser or query verifier. It just creates sane tokens from a
922 (license (package-license perl))))
924 (define-public unixodbc
932 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
935 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
936 (build-system gnu-build-system)
937 (synopsis "Data source abstraction library")
938 (description "Unixodbc is a library providing an API with which to access
939 data sources. Data sources include SQL Servers and any software with an ODBC
942 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
943 (home-page "http://www.unixodbc.org")))
945 (define-public unqlite
951 ;; Contains bug fixes against the official release, and has an
952 ;; autotooled build system.
953 (uri (string-append "https://github.com/aidin36/tocc/releases/"
955 "unqlite-unofficial-" version ".tar.gz"))
958 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
959 (build-system gnu-build-system)
960 (arguments `(#:tests? #f)) ;No check target
961 (home-page "http://www.unqlite.org")
962 (synopsis "In-memory key/value and document store")
964 "UnQLite is an in-process software library which implements a
965 self-contained, serverless, zero-configuration, transactional NoSQL
966 database engine. UnQLite is a document store database similar to
967 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
968 similar to BerkeleyDB, LevelDB, etc.")
977 (uri (string-append "http://download.redis.io/releases/redis-"
981 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
982 (build-system gnu-build-system)
984 '(#:tests? #f ; tests related to master/slave and replication fail
985 #:phases (modify-phases %standard-phases
987 #:make-flags `("CC=gcc"
990 ,(string-append "PREFIX="
991 (assoc-ref %outputs "out")))))
992 (synopsis "Key-value cache and store")
993 (description "Redis is an advanced key-value cache and store. Redis
994 supports many data structures including strings, hashes, lists, sets, sorted
995 sets, bitmaps and hyperloglogs.")
996 (home-page "http://redis.io/")
999 (define-public kyotocabinet
1001 (name "kyotocabinet")
1005 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1006 name "-" version ".tar.gz"))
1009 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1010 (build-system gnu-build-system)
1014 (string-append "LDFLAGS=-Wl,-rpath="
1015 (assoc-ref %outputs "out") "/lib"))))
1016 (inputs `(("zlib" ,zlib)))
1017 (home-page "http://fallabs.com/kyotocabinet/")
1019 "Kyoto Cabinet is a modern implementation of the DBM database")
1021 "Kyoto Cabinet is a standalone file-based database that supports Hash
1022 and B+ Tree data storage models. It is a fast key-value lightweight
1023 database and supports many programming languages. It is a NoSQL database.")
1026 (define-public wiredtiger
1033 "http://source.wiredtiger.com/releases/wiredtiger-"
1034 version ".tar.bz2"))
1037 "1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"))))
1038 (build-system gnu-build-system)
1040 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1042 (modify-phases %standard-phases
1043 (add-before 'check 'disable-test/fops
1045 ;; XXX: timed out after 3600 seconds of silence
1046 (substitute* "Makefile"
1052 (home-page "http://source.wiredtiger.com/")
1053 (synopsis "NoSQL data engine")
1055 "WiredTiger is an extensible platform for data management. It supports
1056 row-oriented storage (where all columns of a row are stored together),
1057 column-oriented storage (where columns are stored in groups, allowing for
1058 more efficient access and storage of column subsets) and log-structured merge
1059 trees (LSM), for sustained throughput under random insert workloads.")
1060 (license gpl3) ; or GPL-2
1061 ;; configure.ac: WiredTiger requires a 64-bit build.
1062 (supported-systems '("x86_64-linux" "mips64el-linux"))))
1064 (define-public perl-db-file
1066 (name "perl-db-file")
1072 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1077 "0yp5d5zr8dk9g6xdh7ygi5bq63q7nxvhd58dk2i3ki4nb7yv2yh9"))))
1078 (build-system perl-build-system)
1079 (inputs `(("bdb" ,bdb)))
1080 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1082 `(#:phases (modify-phases %standard-phases
1084 'configure 'modify-config.in
1085 (lambda* (#:key inputs #:allow-other-keys)
1086 (substitute* "config.in"
1087 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1089 (home-page "http://search.cpan.org/dist/DB_File")
1091 "Perl5 access to Berkeley DB version 1.x")
1093 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1094 (license (package-license perl))))
1102 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1103 "LMDB_" version ".tar.gz"))
1106 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1107 (build-system gnu-build-system)
1109 `(#:test-target "test"
1111 (modify-phases %standard-phases
1113 (lambda* (#:key outputs #:allow-other-keys)
1114 (chdir (string-append
1115 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1116 (substitute* "Makefile"
1117 (("/usr/local") (assoc-ref outputs "out")))
1119 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1120 (synopsis "Lightning memory-mapped database library")
1121 (description "Lightning memory-mapped database library.")
1122 (license license:openldap2.8)))
1124 (define-public libpqxx
1131 "http://pqxx.org/download/software/libpqxx/"
1132 name "-" version ".tar.gz"))
1135 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1136 (build-system gnu-build-system)
1138 `(("python" ,python-2)))
1139 (inputs `(("postgresql" ,postgresql)))
1141 `(#:tests? #f)) ; # FAIL: 1
1142 (synopsis "C++ connector for PostgreSQL")
1144 "Libpqxx is a C++ library to enable user programs to communicate with the
1145 PostgreSQL database back-end. The database back-end can be local or it may be
1146 on another machine, accessed via TCP/IP.")
1147 (home-page "http://pqxx.org/")
1148 (license license:bsd-3)))
1150 (define-public python-peewee
1152 (name "python-peewee")
1157 (uri (pypi-uri "peewee" version))
1160 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1161 (build-system python-build-system)
1163 `(#:tests? #f)) ; Fails to import test data
1165 `(("python-cython" ,python-cython)))
1166 (home-page "https://github.com/coleifer/peewee/")
1167 (synopsis "Small object-relational mapping utility")
1169 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1170 handles converting between pythonic values and those used by databases, so you
1171 can use Python types in your code without having to worry. It has built-in
1172 support for sqlite, mysql and postgresql. If you already have a database, you
1173 can autogenerate peewee models using @code{pwiz}, a model generator.")
1174 (license license:expat)))
1176 (define-public python2-peewee
1177 (package-with-python2 python-peewee))
1179 (define-public sqlcipher
1186 (uri (string-append "https://github.com/sqlcipher/" name
1187 "/archive/v" version ".tar.gz"))
1189 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1190 (file-name (string-append name "-" version ".tar.gz"))))
1191 (build-system gnu-build-system)
1193 `(("libcrypto" ,openssl)
1194 ("libtcl8.6" ,tcl))) ; required for running the tests
1199 '("--enable-tempstore=yes"
1200 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1201 "LDFLAGS=-lcrypto -ltcl8.6"
1203 ;; tests cannot be run from the Makefile
1204 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1205 #:test-target "testfixture"
1207 (modify-phases %standard-phases
1208 (add-before 'check 'build-test-runner
1209 (assoc-ref %standard-phases 'check))
1213 (system* "./testfixture" "test/crypto.test")))))))
1214 (home-page "https://www.zetetic.net/sqlcipher/")
1216 "Library providing transparent encryption of SQLite database files")
1217 (description "SQLCipher is an implementation of SQLite, extended to
1218 provide transparent 256-bit AES encryption of database files. Pages are
1219 encrypted before being written to disk and are decrypted when read back. It’s
1220 well suited for protecting embedded application databases and for mobile
1223 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1224 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1225 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1226 ;; source files are in the public domain.
1227 (license (list license:public-domain license:bsd-3))))