1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013, 2017 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 © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
11 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
15 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
18 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
19 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
20 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
22 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
23 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
24 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
25 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
26 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
34 ;;; This file is part of GNU Guix.
36 ;;; GNU Guix is free software; you can redistribute it and/or modify it
37 ;;; under the terms of the GNU General Public License as published by
38 ;;; the Free Software Foundation; either version 3 of the License, or (at
39 ;;; your option) any later version.
41 ;;; GNU Guix is distributed in the hope that it will be useful, but
42 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 ;;; GNU General Public License for more details.
46 ;;; You should have received a copy of the GNU General Public License
47 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49 (define-module (gnu packages databases)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages avahi)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages boost)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages crypto)
61 #:use-module (gnu packages curl)
62 #:use-module (gnu packages cyrus-sasl)
63 #:use-module (gnu packages emacs)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gnupg)
67 #:use-module (gnu packages guile)
68 #:use-module (gnu packages time)
69 #:use-module (gnu packages jemalloc)
70 #:use-module (gnu packages language)
71 #:use-module (gnu packages libevent)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages man)
74 #:use-module (gnu packages ncurses)
75 #:use-module (gnu packages parallel)
76 #:use-module (gnu packages pcre)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages perl-check)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages popt)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages rdf)
83 #:use-module (gnu packages readline)
84 #:use-module (gnu packages ruby)
85 #:use-module (gnu packages serialization)
86 #:use-module (gnu packages statistics)
87 #:use-module (gnu packages tcl)
88 #:use-module (gnu packages tls)
89 #:use-module (gnu packages valgrind)
90 #:use-module (gnu packages xml)
91 #:use-module ((guix licenses) #:prefix license:)
92 #:use-module (guix packages)
93 #:use-module (guix download)
94 #:use-module (guix git-download)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system perl)
97 #:use-module (guix build-system python)
98 #:use-module (guix build-system ruby)
99 #:use-module (guix build-system cmake)
100 #:use-module (guix build-system r)
101 #:use-module (guix build-system scons)
102 #:use-module ((guix build utils) #:hide (which))
103 #:use-module (guix utils)
104 #:use-module (srfi srfi-1)
105 #:use-module (srfi srfi-26)
106 #:use-module (ice-9 match))
108 (define-public 4store
114 (uri (string-append "https://github.com/garlik/4store/archive/v"
116 (file-name (string-append name "-" version ".tar.gz"))
118 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
119 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
120 (build-system gnu-build-system)
124 ("autoconf" ,autoconf)
125 ("automake" ,automake)
126 ("gettext" ,gettext-minimal)
128 ("pcre" ,pcre "bin") ;for 'pcre-config'
129 ("pkg-config" ,pkg-config)))
135 ("readline" ,readline)
137 ("cyrus-sasl" ,cyrus-sasl)
139 ("util-linux" ,util-linux)))
142 (modify-phases %standard-phases
143 (add-after 'unpack 'generate-configure
145 (zero? (system* "sh" "autogen.sh")))))))
146 ;; http://www.4store.org has been down for a while now.
147 (home-page "https://github.com/garlik/4store")
148 (synopsis "Clustered RDF storage and query engine")
149 (description "4store is a RDF/SPARQL store written in C, supporting
150 either single machines or networked clusters.")
151 (license license:gpl3+)))
159 (uri (string-append "mirror://gnu/gdbm/gdbm-"
163 "0lx201q20dvc70f8a3c9s7s18z15inlxvbffph97ngvrgnyjq9cx"))))
164 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
165 (build-system gnu-build-system)
166 (home-page "http://www.gnu.org.ua/software/gdbm")
168 "Hash library of database functions compatible with traditional dbm")
170 "GDBM is a library for manipulating hashed databases. It is used to
171 store key/value pairs in a file in a manner similar to the Unix dbm library
172 and provides interfaces to the traditional file format.")
173 (license license:gpl3+)))
181 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
185 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
186 (build-system gnu-build-system)
187 (outputs '("out" ; programs, libraries, headers
188 "doc")) ; 94 MiB of HTML docs
190 '(#:tests? #f ; no check target available
191 #:disallowed-references ("doc")
193 (modify-phases %standard-phases
195 (lambda* (#:key outputs #:allow-other-keys)
196 (let ((out (assoc-ref outputs "out"))
197 (doc (assoc-ref outputs "doc")))
198 ;; '--docdir' is not honored, so we need to patch.
199 (substitute* "dist/Makefile.in"
200 (("docdir[[:blank:]]*=.*")
201 (string-append "docdir = " doc "/share/doc/bdb")))
204 (system* "./dist/configure"
205 (string-append "--prefix=" out)
206 (string-append "CONFIG_SHELL=" (which "bash"))
207 (string-append "SHELL=" (which "bash"))
209 ;; Remove 7 MiB of .a files.
212 ;; The compatibility mode is needed by some packages,
216 ;; The following flag is needed so that the inclusion
217 ;; of db_cxx.h into C++ files works; it leads to
218 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
219 "--enable-cxx"))))))))
220 (synopsis "Berkeley database")
222 "Berkeley DB is an embeddable database allowing developers the choice of
223 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
224 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
225 ;; files are covered by the 3-clause BSD license.
226 (license (list license:agpl3+ license:bsd-3))
228 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
230 (define-public bdb-5.3
231 (package (inherit bdb)
234 (license (license:non-copyleft "file://LICENSE"
235 "See LICENSE in the distribution."))
238 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
242 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
244 `(#:tests? #f ; no check target available
245 #:disallowed-references ("doc")
247 (modify-phases %standard-phases
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out"))
251 (doc (assoc-ref outputs "doc")))
252 ;; '--docdir' is not honored, so we need to patch.
253 (substitute* "dist/Makefile.in"
254 (("docdir[[:blank:]]*=.*")
255 (string-append "docdir = " doc "/share/doc/bdb")))
258 (system* "./dist/configure"
259 (string-append "--prefix=" out)
260 (string-append "CONFIG_SHELL=" (which "bash"))
261 (string-append "SHELL=" (which "bash"))
263 ;; Bdb doesn't recognize aarch64 as an architecture.
264 ,@(if (string=? "aarch64-linux" (%current-system))
265 '("--build=aarch64-unknown-linux-gnu")
268 ;; Remove 7 MiB of .a files.
271 ;; The compatibility mode is needed by some packages,
275 ;; The following flag is needed so that the inclusion
276 ;; of db_cxx.h into C++ files works; it leads to
277 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
278 "--enable-cxx"))))))))))
280 (define-public es-dump-restore
282 (name "es-dump-restore")
287 (uri (rubygems-uri "es_dump_restore" version))
290 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
291 (build-system ruby-build-system)
293 '(#:tests? #f ;; No testsuite.
295 (modify-phases %standard-phases
296 (add-after 'install 'wrap-bin-es_dump_restore
297 (lambda* (#:key outputs #:allow-other-keys)
298 (wrap-program (string-append (assoc-ref outputs "out")
299 "/bin/es_dump_restore")
300 `("GEM_PATH" ":" prefix (,(string-append
303 (getenv "GEM_HOME")))))
306 `(("ruby-httpclient" ,ruby-httpclient)
307 ("ruby-multi-json" ,ruby-multi-json)
308 ("ruby-progress_bar" ,ruby-progress_bar)
309 ("ruby-rubyzip" ,ruby-rubyzip)
310 ("ruby-thor" ,ruby-thor)))
311 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
313 "This package provides a utility for dumping the contents of an
314 ElasticSearch index to a compressed file and restoring the dumpfile back to an
315 ElasticSearch server")
316 (home-page "https://github.com/patientslikeme/es_dump_restore")
317 (license license:expat)))
319 (define-public leveldb
325 (uri (string-append "https://github.com/google/leveldb"
326 "/archive/v" version ".tar.gz"))
327 (file-name (string-append name "-" version ".tar.gz"))
330 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
331 (build-system gnu-build-system)
333 '(#:make-flags (list "CC=gcc")
335 (modify-phases %standard-phases
338 ;; There is no install target, so we do it here.
339 (lambda* (#:key outputs #:allow-other-keys)
340 (let* ((out (assoc-ref outputs "out"))
341 (lib (string-append out "/lib"))
342 (include (string-append out "/include")))
343 (for-each (lambda (file)
344 (install-file file lib))
345 (find-files "out-shared" "^libleveldb\\.so.*$"))
346 (copy-recursively "include" include)
349 `(("snappy" ,snappy)))
350 (home-page "http://leveldb.org/")
351 (synopsis "Fast key-value storage library")
353 "LevelDB is a fast key-value storage library that provides an ordered
354 mapping from string keys to string values.")
355 (license license:bsd-3)))
357 (define-public memcached
365 "https://memcached.org/files/memcached-" version ".tar.gz"))
367 (base32 "0chwc0g7wfvcad36z8pf2jbgygdnm9nm1l6pwjsn3d2b089gh0f0"))))
368 (build-system gnu-build-system)
370 `(("libevent" ,libevent)
371 ("cyrus-sasl" ,cyrus-sasl)))
372 (home-page "https://memcached.org/")
373 (synopsis "In memory caching service")
374 (description "Memcached is a in memory key value store. It has a small
375 and generic API, and was originally intended for use with dynamic web
377 (license license:bsd-3)))
379 (define-public mongodb
385 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
387 (file-name (string-append name "-" version ".tar.gz"))
389 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
390 (modules '((guix build utils)))
393 (for-each (lambda (dir)
394 (delete-file-recursively
395 (string-append "src/third_party/" dir)))
396 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
397 "valgrind-3.11.0" "wiredtiger"
398 "yaml-cpp-0.5.3" "zlib-1.2.8"))))
401 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
402 (build-system scons-build-system)
404 `(("openssl" ,openssl)
406 ,@(match (%current-system)
407 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
408 `(("wiredtiger" ,wiredtiger)))
410 ("yaml-cpp" ,yaml-cpp)
414 `(("valgrind" ,valgrind)
416 ("python" ,python2-minimal)
417 ("python2-pymongo" ,python2-pymongo)
418 ("python2-pyyaml" ,python2-pyyaml)
421 `(#:scons ,scons-python2
423 (let ((common-options
424 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
426 ;; wiredtiger is 64-bit only
427 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
429 '("i686-linux" "armhf-linux"))
431 ``"--use-system-wiredtiger")
433 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
434 ;; --use-system-boost
435 "--use-system-snappy"
437 "--use-system-valgrind"
438 ;; "--use-system-stemmer" TODO: Missing relevant package
440 "--disable-warnings-as-errors"
441 ,(format #f "--jobs=~a" (parallel-job-count))
443 (modify-phases %standard-phases
444 (add-after 'unpack 'scons-propagate-environment
446 ;; Modify the SConstruct file to arrange for
447 ;; environment variables to be propagated.
448 (substitute* "SConstruct"
449 (("^env = Environment\\(")
450 "env = Environment(ENV=os.environ, "))
452 (add-after 'unpack 'create-version-file
454 (call-with-output-file "version.json"
456 (display ,(simple-format #f "{
462 (zero? (apply system*
465 "mongod" "mongo" "mongos")))))
467 (lambda* (#:key tests? inputs #:allow-other-keys)
469 (string-append (assoc-ref inputs "tzdata")
472 ;; Note that with the tests, especially the unittests, the
473 ;; build can take up to ~45GB of space, as many tests are
474 ;; individual executable files, with some being hundreds of
475 ;; megabytes in size.
478 invoke `("scons" ,@common-options "dbtest" "unittests"))
479 (substitute* "build/unittests.txt"
480 ;; TODO: Don't run the async_stream_test, as it hangs
481 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
483 ;; TODO: This test fails
484 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
485 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
487 (invoke "python" "buildscripts/resmoke.py"
488 "--suites=dbtest,unittests"
489 (format #f "--jobs=~a" (parallel-job-count)))))))
492 (let ((bin (string-append (assoc-ref %outputs "out") "/bin")))
493 (install-file "mongod" bin)
494 (install-file "mongos" bin)
495 (install-file "mongo" bin))
497 (home-page "https://www.mongodb.org/")
498 (synopsis "High performance and high availability document database")
500 "Mongo is a high-performance, high availability, schema-free
501 document-oriented database. A key goal of MongoDB is to bridge the gap
502 between key/value stores (which are fast and highly scalable) and traditional
503 RDBMS systems (which are deep in functionality).")
504 (license (list license:agpl3
505 ;; Some parts are licensed under the Apache License
514 (uri (list (string-append
515 "http://dev.mysql.com/get/Downloads/MySQL-"
516 (version-major+minor version) "/"
517 name "-" version ".tar.gz")
519 "http://downloads.mysql.com/archives/get/file/"
520 name "-" version ".tar.gz")))
523 "11v4g3igigv3zvknv67qml8in6fjrbs2vnr3q6bg6f62nydm95sk"))))
524 (build-system cmake-build-system)
527 '("-DBUILD_CONFIG=mysql_release"
530 "-DDEFAULT_CHARSET=utf8"
531 "-DDEFAULT_COLLATION=utf8_general_ci"
532 "-DMYSQL_DATADIR=/var/lib/mysql"
533 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
534 "-DINSTALL_INFODIR=share/mysql/docs"
535 "-DINSTALL_MANDIR=share/man"
536 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
537 "-DINSTALL_SCRIPTDIR=bin"
538 "-DINSTALL_INCLUDEDIR=include/mysql"
539 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
540 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
541 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
542 "-DINSTALL_DOCDIR=share/mysql/docs"
543 "-DINSTALL_SHAREDIR=share/mysql"
544 ;; Get rid of test data.
545 "-DINSTALL_MYSQLTESTDIR="
546 "-DINSTALL_SQLBENCHDIR=")
547 #:phases (modify-phases %standard-phases
549 'unpack 'patch-boost-version
551 ;; Mysql wants boost-1.59.0 specifically
552 (substitute* "cmake/boost.cmake"
554 ,(match (string-split (package-version boost) #\.)
555 ((_ minor . _) minor))))))
557 'install 'remove-extra-binaries
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let ((out (assoc-ref outputs "out")))
560 ;; Remove the 3 *_embedded files, which weigh in at
562 (for-each delete-file
563 (find-files (string-append out "/bin")
575 (home-page "http://www.mysql.com/")
576 (synopsis "Fast, easy to use, and popular database")
578 "MySQL is a fast, reliable, and easy to use relational database
579 management system that supports the standardized Structured Query
581 (license license:gpl2)))
583 (define-public mariadb
589 (uri (string-append "https://downloads.mariadb.org/f/"
590 name "-" version "/source/"
591 name "-" version ".tar.gz"))
594 "1m3ya6c3snnsyscd0waklayqfv0vhws52iizv2j5masj5xhdbfvk"))))
595 (build-system cmake-build-system)
598 '("-DBUILD_CONFIG=mysql_release"
599 ;; Linking with libarchive fails, like this:
601 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
602 ;; relocation R_X86_64_32 against `.bss' can not be used when
603 ;; making a shared object; recompile with -fPIC
605 ;; For now, disable the features that that use libarchive (xtrabackup).
606 "-DWITH_LIBARCHIVE=OFF"
608 "-DDEFAULT_CHARSET=utf8"
609 "-DDEFAULT_COLLATION=utf8_general_ci"
610 "-DMYSQL_DATADIR=/var/lib/mysql"
611 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
612 "-DINSTALL_INFODIR=share/mysql/docs"
613 "-DINSTALL_MANDIR=share/man"
614 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
615 "-DINSTALL_SCRIPTDIR=bin"
616 "-DINSTALL_INCLUDEDIR=include/mysql"
617 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
618 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
619 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
620 "-DINSTALL_DOCDIR=share/mysql/docs"
621 "-DINSTALL_SHAREDIR=share/mysql")
623 (modify-phases %standard-phases
625 'configure 'pre-configure
627 (setenv "CONFIG_SHELL" (which "sh"))
630 'install 'post-install
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (test (assoc-ref outputs "test")))
634 (substitute* (string-append out "/bin/mysql_install_db")
636 (string-append "basedir=\"" out "\"")))
637 ;; Remove unneeded files for testing.
638 (with-directory-excursion out
639 (for-each delete-file-recursively
640 '("data" "mysql-test" "sql-bench"
641 "share/man/man1/mysql-test-run.pl.1")))))))))
646 `(("jemalloc" ,jemalloc)
653 (home-page "https://mariadb.org/")
654 (synopsis "SQL database server")
656 "MariaDB is a multi-user and multi-threaded SQL database server, designed
657 as a drop-in replacement of MySQL.")
658 (license license:gpl2)))
660 (define-public postgresql
666 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
667 version "/postgresql-" version ".tar.bz2"))
670 "04z7lm4h94625vbncwv98svycqr942n3q47ailqaczkszqjlxjrw"))))
671 (build-system gnu-build-system)
673 `(#:configure-flags '("--with-uuid=e2fs")
675 (modify-phases %standard-phases
676 (add-before 'configure 'patch-/bin/sh
678 ;; Refer to the actual shell.
679 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
680 "src/bin/psql/command.c")
681 (("/bin/sh") (which "sh")))
683 (add-after 'build 'build-contrib
685 (zero? (system* "make" "-C" "contrib"))))
686 (add-after 'install 'install-contrib
688 (zero? (system* "make" "-C" "contrib" "install")))))))
690 `(("readline" ,readline)
691 ("libuuid" ,util-linux)
693 (home-page "https://www.postgresql.org/")
694 (synopsis "Powerful object-relational database system")
696 "PostgreSQL is a powerful object-relational database system. It is fully
697 ACID compliant, has full support for foreign keys, joins, views, triggers, and
698 stored procedures (in multiple languages). It includes most SQL:2008 data
699 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
700 TIMESTAMP. It also supports storage of binary large objects, including
701 pictures, sounds, or video.")
702 (license (license:x11-style "file://COPYRIGHT"))))
704 (define-public postgresql-9.6
711 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
712 version "/postgresql-" version ".tar.bz2"))
715 "0m417h30s18rwa7yzkqqcdb22ifpcda2fpg2cyx8bxvjp3ydz71r"))))))
724 (uri (string-append "http://fallabs.com/" name "/"
725 name "-" version ".tar.gz"))
728 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
729 (build-system gnu-build-system)
731 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
732 (assoc-ref %outputs "out")
734 (home-page "http://fallabs.com/qdbm")
735 (synopsis "Key-value database")
736 (description "QDBM is a library of routines for managing a
737 database. The database is a simple data file containing key-value
738 pairs. Every key and value is serial bytes with variable length.
739 Binary data as well as character strings can be used as a key or a
740 value. There is no concept of data tables or data types. Records are
741 organized in a hash table or B+ tree.")
742 (license license:lgpl2.1+)))
744 (define-public recutils
750 (uri (string-append "mirror://gnu/recutils/recutils-"
754 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
755 (build-system gnu-build-system)
757 ;; Running tests in parallel leads to test failures and crashes in
759 (arguments '(#:parallel-tests? #f
761 (list (string-append "--with-bash-headers="
762 (assoc-ref %build-inputs "bash:include")
765 #:phases (modify-phases %standard-phases
766 (add-before 'build 'set-bash4.4-header-location
768 (substitute* "bash/Makefile.in"
769 ;; Adjust the header search path for Bash
770 ;; 4.4 in accordance with 'bash.pc'.
771 (("AM_CPPFLAGS = (.*)$" _ rest)
772 (string-append "AM_CPPFLAGS = "
773 "-I$(BASH_HEADERS)/include "
776 ;; Install to PREFIX/lib/bash to match Bash
777 ;; 4.4's search path.
779 "libdir = @libdir@/bash\n"))
782 (native-inputs `(("emacs" ,emacs-minimal)
784 ("bash:include" ,bash "include")
785 ("libuuid" ,util-linux)))
787 ;; TODO: Add more optional inputs.
788 (inputs `(("curl" ,curl)
789 ("libgcrypt" ,libgcrypt)
791 (synopsis "Manipulate plain text files as databases")
793 "GNU Recutils is a set of tools and libraries for creating and
794 manipulating text-based, human-editable databases. Despite being text-based,
795 databases created with Recutils carry all of the expected features such as
796 unique fields, primary keys, time stamps and more. Many different field
797 types are supported, as is encryption.")
798 (license license:gpl3+)
799 (home-page "https://www.gnu.org/software/recutils/")))
801 (define-public rocksdb
807 (uri (string-append "https://github.com/facebook/rocksdb"
808 "/archive/v" version ".tar.gz"))
809 (file-name (string-append name "-" version ".tar.gz"))
812 "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb"))
813 (modules '((guix build utils)))
816 ;; TODO: unbundle gtest.
817 (delete-file "build_tools/gnu_parallel")
819 (build-system gnu-build-system)
821 `(#:make-flags (list "CC=gcc"
822 (string-append "INSTALL_PATH="
823 (assoc-ref %outputs "out")))
824 ;; Many tests fail on 32-bit platforms. There are multiple reports about
825 ;; this upstream, but it's not going to be supported any time soon.
826 #:tests? (let ((system ,(or (%current-target-system)
828 (or (string-prefix? "x86_64-linux" system)
829 (string-prefix? "aarch64-linux" system)))
831 (modify-phases %standard-phases
832 (add-after 'unpack 'patch-Makefile
834 (substitute* "Makefile"
835 (("build_tools/gnu_parallel") "parallel")
836 ;; Don't depend on the static library when installing.
837 (("install: install-static")
838 "install: install-shared")
839 (("#!/bin/sh") (string-append "#!" (which "sh"))))
842 ;; The default target is only needed for tests and built on demand.
844 (add-before 'check 'disable-optimizations
846 ;; Prevent the build from passing '-march=native' to the compiler.
847 (setenv "PORTABLE" "1")
849 (add-before 'check 'disable-failing-tests
851 (substitute* "Makefile"
852 ;; This test fails with GCC-5 and is unmaintained.
853 ;; https://github.com/facebook/rocksdb/issues/2148
854 (("^[[:blank:]]+spatial_db_test[[:blank:]]+\\\\") "\\")
855 ;; These tests reliably fail due to "Too many open files".
856 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
857 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
859 (add-after 'check 'build-release-libraries
860 ;; The default build target is a debug build for tests. The
861 ;; install target depends on "shared_lib" and "static_lib"
862 ;; targets for release builds so we build them here for clarity.
863 ;; TODO: Add debug output.
864 (lambda* (#:key (make-flags '()) #:allow-other-keys)
865 (zero? (apply system* "make" "shared_lib" make-flags)))))))
867 `(("parallel" ,parallel)
875 ("jemalloc" ,jemalloc)
879 (home-page "http://rocksdb.org/")
880 (synopsis "Persistent key-value store for fast storage")
882 "RocksDB is a library that forms the core building block for a fast
883 key-value server, especially suited for storing data on flash drives. It
884 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
885 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
886 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
887 compactions, making it specially suitable for storing multiple terabytes of
888 data in a single database. RocksDB is partially based on @code{LevelDB}.")
889 ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0.
890 (license (list license:bsd-3 license:asl2.0))))
892 (define-public sparql-query
894 (name "sparql-query")
898 (uri (string-append "https://github.com/tialaramex/"
899 name "/archive/" version ".tar.gz"))
901 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
902 (file-name (string-append name "-" version ".tar.gz"))))
903 (build-system gnu-build-system)
905 `(("readline" ,readline)
911 `(("pkg-config" ,pkg-config)))
913 `(#:make-flags '("CC=gcc")
915 (modify-phases %standard-phases
917 ;; The Makefile uses git to obtain versioning information. This phase
918 ;; substitutes the git invocation with the package version.
919 (add-after 'unpack 'remove-git-dependency
921 (substitute* "Makefile"
923 (string-append "gitrev = \"v" ,version "\"")))))
924 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
925 ;; This replacement does the same thing, except for using $PREFIX/bin
928 (lambda* (#:key outputs #:allow-other-keys)
929 (let* ((out (assoc-ref outputs "out"))
930 (bin (string-append out "/bin")))
931 (install-file "sparql-query" bin)
932 (system* "ln" "--symbolic"
933 (string-append bin "/sparql-query")
934 (string-append bin "/sparql-update")))))
936 (lambda* (#:key make-flags #:allow-other-keys)
938 (zero? (apply system* "make" `(,@make-flags "scan-test")))
939 (zero? (system "./scan-test"))))))))
940 (home-page "https://github.com/tialaramex/sparql-query/")
941 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
942 (description "Sparql-query is a command-line tool for accessing SPARQL
943 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
944 tools for interrogating SQL databases. For example, you can enter a query over
945 several lines, using a semi-colon at the end of a line to indicate the end of
946 your query. It also supports readline so that you can more easily recall and
947 edit previous queries, even across sessions. It can be used non-interactively,
948 for example from a shell script.")
949 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
950 ;; others (like sparql-query.c) contain a GPLv2+ license header.
951 (license (list license:gpl3+))))
953 (define-public sqlite
959 (uri (let ((numeric-version
960 (match (string-split version #\.)
961 ((first-digit other-digits ...)
962 (string-append first-digit
965 (map (cut string-pad <> 2 #\0)
968 (string-append "https://sqlite.org/2017/sqlite-autoconf-"
969 numeric-version ".tar.gz")))
972 "1qxvzdjwzw6k0kqjfabj86rnq87xdbwbca7laxxdhnh0fmkm3pfp"))))
973 (build-system gnu-build-system)
974 (inputs `(("readline" ,readline)))
977 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
978 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
979 ;; to use the system SQLite unless these options are enabled.
980 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
981 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
982 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
983 (home-page "https://www.sqlite.org/")
984 (synopsis "The SQLite database management system")
986 "SQLite is a software library that implements a self-contained, serverless,
987 zero-configuration, transactional SQL database engine. SQLite is the most
988 widely deployed SQL database engine in the world. The source code for SQLite
989 is in the public domain.")
990 (license license:public-domain)))
992 ;; This is used by Clementine.
993 (define-public sqlite-with-fts3
994 (package (inherit sqlite)
995 (name "sqlite-with-fts3")
997 (substitute-keyword-arguments (package-arguments sqlite)
998 ((#:configure-flags flags)
999 `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
1000 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
1001 "-DSQLITE_ENABLE_DBSTAT_VTAB "
1002 "-DSQLITE_ENABLE_FTS3 "
1003 "-DSQLITE_ENABLE_FTS3_PARENTHESIS "
1004 "-DSQLITE_ENABLE_FTS3_TOKENIZER")))))))
1012 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1016 "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl"))))
1017 (build-system gnu-build-system)
1020 (modify-phases %standard-phases
1022 (lambda* (#:key outputs #:allow-other-keys)
1023 (let ((out (assoc-ref outputs "out")))
1024 ;; The 'configure' script is a wrapper for Waf and
1025 ;; doesn't recognize things like '--enable-fast-install'.
1026 (zero? (system* "./configure"
1027 (string-append "--prefix=" out)))))))))
1029 `(;; TODO: Build the documentation.
1030 ;; ("docbook-xsl" ,docbook-xsl)
1031 ;; ("libxml2" ,libxml2)
1032 ;; ("libxslt" ,libxslt)
1033 ("python" ,python-2))) ;for the Waf build system
1034 (home-page "https://tdb.samba.org/")
1035 (synopsis "Trivial database")
1037 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1038 and BSD's DB except that it allows multiple simultaneous writers and uses
1039 locking internally to keep writers from trampling on each other. TDB is also
1041 (license license:lgpl3+)))
1043 (define-public perl-dbi
1050 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1054 "1ikbsb6sb0bd2m1dqknl4vx7ikmnd41y0xq8np1l40g8jcjp2mr5"))))
1055 (build-system perl-build-system)
1056 (synopsis "Database independent interface for Perl")
1057 (description "This package provides an database interface for Perl.")
1058 (home-page "http://search.cpan.org/dist/DBI")
1059 (license license:perl-license)))
1061 (define-public perl-dbix-class
1063 (name "perl-dbix-class")
1064 (version "0.082840")
1068 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1069 "DBIx-Class-" version ".tar.gz"))
1072 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
1073 (build-system perl-build-system)
1075 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1076 ("perl-file-temp" ,perl-file-temp)
1077 ("perl-module-install" ,perl-module-install)
1078 ("perl-package-stash" ,perl-package-stash)
1079 ("perl-test-deep" ,perl-test-deep)
1080 ("perl-test-exception" ,perl-test-exception)
1081 ("perl-test-warn" ,perl-test-warn)))
1083 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1084 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1085 ("perl-class-inspector" ,perl-class-inspector)
1086 ("perl-config-any" ,perl-config-any)
1087 ("perl-context-preserve" ,perl-context-preserve)
1088 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1089 ("perl-data-page" ,perl-data-page)
1090 ("perl-dbi" ,perl-dbi)
1091 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1092 ("perl-hash-merge" ,perl-hash-merge)
1093 ("perl-module-find" ,perl-module-find)
1094 ("perl-moo" ,perl-moo)
1095 ("perl-mro-compat" ,perl-mro-compat)
1096 ("perl-namespace-clean" ,perl-namespace-clean)
1097 ("perl-path-class" ,perl-path-class)
1098 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1099 ("perl-scope-guard" ,perl-scope-guard)
1100 ("perl-sql-abstract" ,perl-sql-abstract)
1101 ("perl-sub-name" ,perl-sub-name)
1102 ("perl-text-balanced" ,perl-text-balanced)
1103 ("perl-try-tiny" ,perl-try-tiny)))
1104 (home-page "http://search.cpan.org/dist/DBIx-Class")
1105 (synopsis "Extensible and flexible object <-> relational mapper")
1106 (description "An SQL to OO mapper with an object API inspired by
1107 Class::DBI (with a compatibility layer as a springboard for porting) and a
1108 resultset API that allows abstract encapsulation of database operations. It
1109 aims to make representing queries in your code as perl-ish as possible while
1110 still providing access to as many of the capabilities of the database as
1111 possible, including retrieving related records from multiple tables in a
1112 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1113 \"ORDER BY\" and \"HAVING\" support.")
1114 (license license:perl-license)))
1116 (define-public perl-dbix-class-cursor-cached
1118 (name "perl-dbix-class-cursor-cached")
1119 (version "1.001004")
1123 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1124 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1127 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1128 (build-system perl-build-system)
1130 `(("perl-cache-cache" ,perl-cache-cache)
1131 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1132 ("perl-module-install" ,perl-module-install)))
1134 `(("perl-carp-clan" ,perl-carp-clan)
1135 ("perl-dbix-class" ,perl-dbix-class)))
1136 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
1137 (synopsis "Cursor with built-in caching support")
1138 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1139 built-in caching support.")
1140 (license license:perl-license)))
1142 (define-public perl-dbix-class-introspectablem2m
1144 (name "perl-dbix-class-introspectablem2m")
1145 (version "0.001002")
1149 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1150 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1153 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1154 (build-system perl-build-system)
1156 `(("perl-module-install" ,perl-module-install)))
1158 `(("perl-dbix-class" ,perl-dbix-class)))
1159 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
1160 (synopsis "Introspect many-to-many relationships")
1161 (description "Because the many-to-many relationships are not real
1162 relationships, they can not be introspected with DBIx::Class. Many-to-many
1163 relationships are actually just a collection of convenience methods installed
1164 to bridge two relationships. This DBIx::Class component can be used to store
1165 all relevant information about these non-relationships so they can later be
1166 introspected and examined.")
1167 (license license:perl-license)))
1169 (define-public perl-dbix-class-schema-loader
1171 (name "perl-dbix-class-schema-loader")
1176 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1177 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1180 "06s2q6xj95600sdlfph57spjk2z1gjs4zwq5b7mz7d5izcxgnwb6"))))
1181 (build-system perl-build-system)
1183 `(("perl-config-any" ,perl-config-any)
1184 ("perl-config-general" ,perl-config-general)
1185 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1186 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1187 ("perl-module-install" ,perl-module-install)
1188 ("perl-moose" ,perl-moose)
1189 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1190 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1191 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1192 ("perl-test-deep" ,perl-test-deep)
1193 ("perl-test-differences" ,perl-test-differences)
1194 ("perl-test-exception" ,perl-test-exception)
1195 ("perl-test-pod" ,perl-test-pod)
1196 ("perl-test-warn" ,perl-test-warn)))
1198 `(("perl-class-unload" ,perl-class-unload)
1199 ("perl-class-inspector" ,perl-class-inspector)
1200 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1201 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1202 ("perl-carp-clan" ,perl-carp-clan)
1203 ("perl-data-dump" ,perl-data-dump)
1204 ("perl-dbix-class" ,perl-dbix-class)
1205 ("perl-hash-merge" ,perl-hash-merge)
1206 ("perl-list-moreutils" ,perl-list-moreutils)
1207 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1208 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1209 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1210 ("perl-namespace-clean" ,perl-namespace-clean)
1211 ("perl-mro-compat" ,perl-mro-compat)
1212 ("perl-scope-guard" ,perl-scope-guard)
1213 ("perl-string-camelcase" ,perl-string-camelcase)
1214 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1215 ("perl-sub-name" ,perl-sub-name)
1216 ("perl-try-tiny" ,perl-try-tiny)))
1217 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1218 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
1219 (synopsis "Create a DBIx::Class::Schema based on a database")
1220 (description "DBIx::Class::Schema::Loader automates the definition of a
1221 DBIx::Class::Schema by scanning database table definitions and setting up the
1222 columns, primary keys, unique constraints and relationships.")
1223 (license license:perl-license)))
1225 (define-public perl-dbd-pg
1227 (name "perl-dbd-pg")
1232 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1233 "DBD-Pg-" version ".tar.gz"))
1236 "0nb4wmkhq1q9f4g42sxy1m3d0xjqd3plqkxpmzni43ygr5ch8vp3"))))
1237 (build-system perl-build-system)
1239 `(("perl-dbi" ,perl-dbi)))
1241 `(("perl-dbi" ,perl-dbi)
1242 ("postgresql" ,postgresql)))
1243 (home-page "http://search.cpan.org/dist/DBD-Pg")
1244 (synopsis "DBI PostgreSQL interface")
1245 (description "This package provides a PostgreSQL driver for the Perl5
1246 @dfn{Database Interface} (DBI).")
1247 (license license:perl-license)))
1249 (define-public perl-dbd-mysql
1251 (name "perl-dbd-mysql")
1256 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1257 "DBD-mysql-" version ".tar.gz"))
1260 "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2"))
1261 (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch"))))
1262 (build-system perl-build-system)
1263 ;; Tests require running MySQL server
1264 (arguments `(#:tests? #f))
1266 `(("perl-dbi" ,perl-dbi)
1268 (home-page "http://search.cpan.org/dist/DBD-mysql")
1269 (synopsis "DBI MySQL interface")
1270 (description "This package provides a MySQL driver for the Perl5
1271 @dfn{Database Interface} (DBI).")
1272 (license license:perl-license)))
1274 (define-public perl-dbd-sqlite
1276 (name "perl-dbd-sqlite")
1281 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1285 "0sbj9lx9syzpknvjv8cz9jndg32qz775vy2prgq305npv3dsca9r"))))
1286 (build-system perl-build-system)
1287 (inputs `(("sqlite" ,sqlite)))
1288 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1289 (synopsis "SQlite interface for Perl")
1290 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1291 the entire thing in the distribution. So in order to get a fast transaction
1292 capable RDBMS working for your Perl project you simply have to install this
1293 module, and nothing else.")
1294 (license license:perl-license)
1295 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
1297 (define-public perl-sql-abstract
1299 (name "perl-sql-abstract")
1304 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1305 "SQL-Abstract-" version ".tar.gz"))
1308 "0xayvgv6nic61jm3nhg41rzwgm8h83wfyazvpaks0z7asjillpv5"))))
1309 (build-system perl-build-system)
1311 `(("perl-module-install" ,perl-module-install)
1312 ("perl-test-deep" ,perl-test-deep)
1313 ("perl-test-exception" ,perl-test-exception)
1314 ("perl-test-warn" ,perl-test-warn)))
1316 `(("perl-hash-merge" ,perl-hash-merge)
1317 ("perl-moo" ,perl-moo)
1318 ("perl-mro-compat" ,perl-mro-compat)
1319 ("perl-text-balanced" ,perl-text-balanced)))
1320 (home-page "http://search.cpan.org/dist/SQL-Abstract")
1321 (synopsis "Generate SQL from Perl data structures")
1322 (description "This module was inspired by the excellent DBIx::Abstract.
1323 While based on the concepts used by DBIx::Abstract, the concepts used have
1324 been modified to make the SQL easier to generate from Perl data structures.
1325 The underlying idea is for this module to do what you mean, based on the data
1326 structures you provide it, so that you don't have to modify your code every
1327 time your data changes.")
1328 (license license:perl-license)))
1330 (define-public perl-sql-splitstatement
1332 (name "perl-sql-splitstatement")
1337 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1338 "SQL-SplitStatement-" version ".tar.gz"))
1341 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1342 (build-system perl-build-system)
1344 `(("perl-test-exception" ,perl-test-exception)))
1346 `(("perl-class-accessor" ,perl-class-accessor)
1347 ("perl-list-moreutils" ,perl-list-moreutils)
1348 ("perl-regexp-common" ,perl-regexp-common)
1349 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1350 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
1351 (synopsis "Split SQL code into atomic statements")
1352 (description "This module tries to split any SQL code, even including
1353 non-standard extensions, into the atomic statements it is composed of.")
1354 (license license:perl-license)))
1356 (define-public perl-sql-tokenizer
1358 (name "perl-sql-tokenizer")
1363 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1364 "SQL-Tokenizer-" version ".tar.gz"))
1367 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1368 (build-system perl-build-system)
1369 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
1370 (synopsis "SQL tokenizer")
1371 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1372 claim to be a parser or query verifier. It just creates sane tokens from a
1374 (license license:perl-license)))
1376 (define-public unixodbc
1384 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1387 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
1388 (build-system gnu-build-system)
1389 (synopsis "Data source abstraction library")
1390 (description "Unixodbc is a library providing an API with which to access
1391 data sources. Data sources include SQL Servers and any software with an ODBC
1393 (license license:lgpl2.1+)
1394 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1395 (home-page "http://www.unixodbc.org")))
1397 (define-public unqlite
1403 ;; Contains bug fixes against the official release, and has an
1404 ;; autotooled build system.
1405 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1407 "unqlite-unofficial-" version ".tar.gz"))
1410 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1411 (build-system gnu-build-system)
1412 (arguments `(#:tests? #f)) ;No check target
1413 (home-page "http://www.unqlite.org")
1414 (synopsis "In-memory key/value and document store")
1416 "UnQLite is an in-process software library which implements a
1417 self-contained, serverless, zero-configuration, transactional NoSQL
1418 database engine. UnQLite is a document store database similar to
1419 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1420 similar to BerkeleyDB, LevelDB, etc.")
1421 (license license:bsd-2)))
1423 (define-public redis
1429 (uri (string-append "http://download.redis.io/releases/redis-"
1433 "04s8cgvwjj1979s3hg8zkwc9pyn3jkjpz5zidp87kfcipifr385i"))))
1434 (build-system gnu-build-system)
1436 '(#:tests? #f ; tests related to master/slave and replication fail
1437 #:phases (modify-phases %standard-phases
1438 (delete 'configure))
1439 #:make-flags `("CC=gcc"
1442 ,(string-append "PREFIX="
1443 (assoc-ref %outputs "out")))))
1444 (synopsis "Key-value cache and store")
1445 (description "Redis is an advanced key-value cache and store. Redis
1446 supports many data structures including strings, hashes, lists, sets, sorted
1447 sets, bitmaps and hyperloglogs.")
1448 (home-page "http://redis.io/")
1449 (license license:bsd-3)))
1451 (define-public kyotocabinet
1453 (name "kyotocabinet")
1457 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1458 name "-" version ".tar.gz"))
1461 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1462 (build-system gnu-build-system)
1466 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1467 (string-append "LDFLAGS=-Wl,-rpath="
1468 (assoc-ref %outputs "out") "/lib"))))
1469 (inputs `(("zlib" ,zlib)))
1470 (home-page "http://fallabs.com/kyotocabinet/")
1472 "Kyoto Cabinet is a modern implementation of the DBM database")
1474 "Kyoto Cabinet is a standalone file-based database that supports Hash
1475 and B+ Tree data storage models. It is a fast key-value lightweight
1476 database and supports many programming languages. It is a NoSQL database.")
1477 (license license:gpl3+)))
1479 (define-public tokyocabinet
1481 (name "tokyocabinet")
1486 (uri (string-append "http://fallabs.com/tokyocabinet/"
1487 name "-" version ".tar.gz"))
1490 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1491 (build-system gnu-build-system)
1494 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1495 (string-append "LDFLAGS=-Wl,-rpath="
1496 (assoc-ref %outputs "out") "/lib"))))
1499 (home-page "http://fallabs.com/tokyocabinet/")
1500 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1502 "Tokyo Cabinet is a library of routines for managing a database.
1503 The database is a simple data file containing records, each is a pair of a
1504 key and a value. Every key and value is serial bytes with variable length.
1505 Both binary data and character string can be used as a key and a value.
1506 There is neither concept of data tables nor data types. Records are
1507 organized in hash table, B+ tree, or fixed-length array.")
1508 (license license:lgpl2.1+)))
1510 (define-public wiredtiger
1517 "http://source.wiredtiger.com/releases/wiredtiger-"
1518 version ".tar.bz2"))
1521 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1522 (build-system gnu-build-system)
1524 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1526 (modify-phases %standard-phases
1527 (add-before 'check 'disable-test/fops
1529 ;; XXX: timed out after 3600 seconds of silence
1530 (substitute* "Makefile"
1536 ("snappy" ,snappy)))
1537 (home-page "http://source.wiredtiger.com/")
1538 (synopsis "NoSQL data engine")
1540 "WiredTiger is an extensible platform for data management. It supports
1541 row-oriented storage (where all columns of a row are stored together),
1542 column-oriented storage (where columns are stored in groups, allowing for
1543 more efficient access and storage of column subsets) and log-structured merge
1544 trees (LSM), for sustained throughput under random insert workloads.")
1545 (license license:gpl3) ; or GPL-2
1546 ;; configure.ac: WiredTiger requires a 64-bit build.
1547 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1549 (define-public guile-wiredtiger
1551 (name "guile-wiredtiger")
1552 (version "20171113.6cbc51da")
1556 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1557 (commit "6cbc51dab95d28fe31ae025fbdd88f3ecbf2111b")))
1558 (file-name (string-append name "-" version "-checkout"))
1561 "0x3qwpgch5pg0k21kc792h4y6b36a8xd1zkfq8ar2l2mqmpzkzyd"))))
1562 (build-system gnu-build-system)
1566 (list (string-append "--with-libwiredtiger-prefix="
1567 (assoc-ref %build-inputs "wiredtiger")))
1568 #:make-flags '("GUILE_AUTO_COMPILE=0")
1570 (modify-phases %standard-phases
1571 (add-after 'unpack 'bootstrap
1573 (zero? (system* "sh" "bootstrap"))))
1574 (add-before 'bootstrap 'remove-bundled-dependencies
1576 ;; TODO: Remove microkanren.scm when we have a separate package
1578 (delete-file "htmlprag.scm")
1579 (substitute* "Makefile.am"
1580 (("htmlprag\\.scm") ""))
1583 `(("autoconf" ,autoconf)
1584 ("automake" ,automake)
1585 ("pkg-config" ,pkg-config)))
1587 `(("wiredtiger" ,wiredtiger)
1588 ("guile" ,guile-2.2)))
1590 `(("guile-lib" ,guile-lib))) ;for (htmlprag)
1591 (synopsis "Wired Tiger bindings for GNU Guile")
1593 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1595 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1596 (license license:gpl3+)))
1598 (define-public perl-db-file
1600 (name "perl-db-file")
1606 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1611 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
1612 (build-system perl-build-system)
1613 (inputs `(("bdb" ,bdb)))
1614 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1616 `(#:phases (modify-phases %standard-phases
1618 'configure 'modify-config.in
1619 (lambda* (#:key inputs #:allow-other-keys)
1620 (substitute* "config.in"
1621 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1623 (home-page "http://search.cpan.org/dist/DB_File")
1625 "Perl5 access to Berkeley DB version 1.x")
1627 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1628 (license license:perl-license)))
1636 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1637 "LMDB_" version ".tar.gz"))
1640 "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
1641 (build-system gnu-build-system)
1643 `(#:test-target "test"
1645 (modify-phases %standard-phases
1647 (lambda* (#:key outputs #:allow-other-keys)
1648 (chdir (string-append
1649 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1650 (substitute* "Makefile"
1651 (("/usr/local") (assoc-ref outputs "out")))
1653 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1654 (synopsis "Lightning Memory-Mapped Database library")
1656 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1657 transactional database. Unlike more complex relational databases, LMDB handles
1658 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1659 underlying operating system for caching and locking, keeping the code small and
1661 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1662 disk-based databases with high read performance that scales linearly over
1663 multiple cores. The size of each database is limited only by the size of the
1664 virtual address space — not physical RAM.")
1665 (license license:openldap2.8)))
1667 (define-public libpqxx
1674 "http://pqxx.org/download/software/libpqxx/"
1675 name "-" version ".tar.gz"))
1678 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1679 (build-system gnu-build-system)
1681 `(("python" ,python-2)))
1682 (inputs `(("postgresql" ,postgresql)))
1684 `(#:tests? #f ; # FAIL: 1
1686 (modify-phases %standard-phases
1687 (add-before 'configure 'fix-sed-command
1689 ;; Newer sed versions error out if double brackets are not used.
1690 (substitute* "configure"
1691 (("\\[:space:\\]") "[[:space:]]"))
1693 (synopsis "C++ connector for PostgreSQL")
1695 "Libpqxx is a C++ library to enable user programs to communicate with the
1696 PostgreSQL database back-end. The database back-end can be local or it may be
1697 on another machine, accessed via TCP/IP.")
1698 (home-page "http://pqxx.org/")
1699 (license license:bsd-3)))
1701 (define-public python-peewee
1703 (name "python-peewee")
1708 (uri (pypi-uri "peewee" version))
1711 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
1712 (build-system python-build-system)
1714 `(#:tests? #f)) ; Fails to import test data
1716 `(("python-cython" ,python-cython)))
1717 (home-page "https://github.com/coleifer/peewee/")
1718 (synopsis "Small object-relational mapping utility")
1720 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1721 handles converting between pythonic values and those used by databases, so you
1722 can use Python types in your code without having to worry. It has built-in
1723 support for sqlite, mysql and postgresql. If you already have a database, you
1724 can autogenerate peewee models using @code{pwiz}, a model generator.")
1725 (license license:expat)))
1727 (define-public python2-peewee
1728 (package-with-python2 python-peewee))
1730 (define-public sqlcipher
1737 (uri (string-append "https://github.com/sqlcipher/" name
1738 "/archive/v" version ".tar.gz"))
1740 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1741 (file-name (string-append name "-" version ".tar.gz"))))
1742 (build-system gnu-build-system)
1744 `(("libcrypto" ,openssl)
1745 ("libtcl8.6" ,tcl))) ; required for running the tests
1750 '("--enable-tempstore=yes"
1751 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1752 "LDFLAGS=-lcrypto -ltcl8.6"
1754 ;; tests cannot be run from the Makefile
1755 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1756 #:test-target "testfixture"
1758 (modify-phases %standard-phases
1759 (add-before 'check 'build-test-runner
1760 (assoc-ref %standard-phases 'check))
1764 (system* "./testfixture" "test/crypto.test")))))))
1765 (home-page "https://www.zetetic.net/sqlcipher/")
1767 "Library providing transparent encryption of SQLite database files")
1768 (description "SQLCipher is an implementation of SQLite, extended to
1769 provide transparent 256-bit AES encryption of database files. Pages are
1770 encrypted before being written to disk and are decrypted when read back. It’s
1771 well suited for protecting embedded application databases and for mobile
1774 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1775 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1776 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1777 ;; source files are in the public domain.
1778 (license (list license:public-domain license:bsd-3))))
1780 (define-public python-pyodbc-c
1782 (name "python-pyodbc-c")
1787 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1788 "archive.tar.gz?ref=v" version))
1791 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1792 (file-name (string-append name "-" version ".tar.gz"))))
1793 (build-system python-build-system)
1795 `(("unixodbc" ,unixodbc)))
1797 `(;; No unit tests exist.
1799 (home-page "https://github.com/mkleehammer/pyodbc")
1800 (synopsis "Python ODBC Library")
1801 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1803 (license (license:x11-style "file://LICENSE.TXT"))))
1805 (define-public python2-pyodbc-c
1806 (package-with-python2 python-pyodbc-c))
1808 (define-public python-pyodbc
1810 (name "python-pyodbc")
1815 (uri (pypi-uri "pyodbc" version))
1818 "0a83zwz3h1agshnsc6r7al6q83222w8601gpzzzjvjz5m56ghmcn"))
1819 (file-name (string-append name "-" version ".tar.gz"))))
1820 (build-system python-build-system)
1822 `(("unixodbc" ,unixodbc)))
1824 `(;; No unit tests exist.
1826 (home-page "https://github.com/mkleehammer/pyodbc")
1827 (synopsis "Python ODBC Library")
1828 (description "@code{python-pyodbc} provides a Python DB-API driver
1830 (license (license:x11-style "file:///LICENSE.TXT"))))
1832 (define-public python2-pyodbc
1833 (package-with-python2 python-pyodbc))
1835 (define-public mdbtools
1842 (uri (string-append "https://github.com/brianb/mdbtools/archive/"
1846 "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
1847 (file-name (string-append name "-" version ".tar.gz"))))
1848 (build-system gnu-build-system)
1852 `(("autoconf" ,autoconf)
1853 ("automake" ,automake)
1854 ("libtool" ,libtool)
1855 ("pkg-config" ,pkg-config)
1856 ("txt2man" ,txt2man)
1860 (modify-phases %standard-phases
1861 (add-after 'unpack 'autoreconf
1863 (zero? (system* "autoreconf" "-vfi")))))))
1864 (home-page "http://mdbtools.sourceforge.net/")
1865 (synopsis "Read Microsoft Access databases")
1866 (description "MDB Tools is a set of tools and applications to read the
1867 proprietary MDB file format used in Microsoft's Access database package. This
1868 includes programs to export schema and data from Microsoft's Access database
1869 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
1870 etc., and an SQL engine for performing simple SQL queries.")
1871 (license (list license:lgpl2.0
1874 (define-public python-lmdb
1876 (name "python-lmdb")
1880 (uri (pypi-uri "lmdb" version))
1883 "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql"))
1884 (modules '((guix build utils)))
1886 ;; Delete bundled lmdb source files.
1887 '(for-each delete-file (list "lib/lmdb.h"
1891 (build-system python-build-system)
1896 (modify-phases %standard-phases
1897 (add-before 'build 'use-system-lmdb
1898 (lambda* (#:key inputs #:allow-other-keys)
1899 (let ((lmdb (assoc-ref inputs "lmdb")))
1900 (setenv "LMDB_FORCE_SYSTEM" "set")
1901 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
1902 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
1904 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
1906 (home-page "https://github.com/dw/py-lmdb")
1907 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
1909 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
1910 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
1912 (list license:openldap2.8
1913 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
1914 ;; but not actually needed on platforms currently supported by Guix.
1917 (define-public python2-lmdb
1918 (package-with-python2 python-lmdb))
1920 (define-public python-orator
1922 (name "python-orator")
1926 (uri (pypi-uri "orator" version))
1929 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
1930 (build-system python-build-system)
1933 (modify-phases %standard-phases
1934 (add-after 'unpack 'loosen-dependencies
1935 ;; Tests are not actually run since they are not included with the
1936 ;; distributed package, but dependencies are checked.
1938 (substitute* "setup.py"
1940 (("flexmock==0.9.7") "flexmock")
1941 ;; The pytest-mock package is out of date, so we remove minimum
1942 ;; version requirement.
1943 (("pytest-mock.*'") "pytest-mock'"))
1946 `(("python-pytest-mock" ,python-pytest-mock)
1947 ("python-pytest" ,python-pytest)
1948 ("python-flexmock" ,python-flexmock)))
1950 `(("python-backpack" ,python-backpack)
1951 ("python-blinker" ,python-blinker)
1952 ("python-cleo" ,python-cleo)
1953 ("python-faker" ,python-faker)
1954 ("python-inflection" ,python-inflection)
1955 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
1956 ("python-pendulum" ,python-pendulum)
1957 ("python-pyaml" ,python-pyaml)
1958 ("python-pygments" ,python-pygments)
1959 ("python-simplejson" ,python-simplejson)
1960 ("python-six" ,python-six)
1961 ("python-wrapt" ,python-wrapt)))
1962 (home-page "https://orator-orm.com/")
1963 (synopsis "ActiveRecord ORM for Python")
1965 "Orator provides a simple ActiveRecord-like Object Relational Mapping
1966 implementation for Python.")
1967 (license license:expat)
1968 (properties `((python2-variant . ,(delay python2-orator))))))
1970 (define-public python2-orator
1971 (package-with-python2 (strip-python2-variant python-orator)))
1973 (define-public virtuoso-ose
1975 (name "virtuoso-ose")
1981 "https://github.com/openlink/virtuoso-opensource/releases/"
1982 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
1984 (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002"))))
1985 (build-system gnu-build-system)
1987 `(#:tests? #f)) ; Tests require a network connection.
1989 `(("openssl" ,openssl)
1990 ("net-tools" ,net-tools)))
1991 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
1992 (synopsis "Multi-model database system")
1993 (description "Virtuoso is a scalable cross-platform server that combines
1994 relational, graph, and document data management with web application server
1995 and web services platform functionality.")
1996 ;; configure: error: ... can only be build on 64bit platforms
1997 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
1998 (license license:gpl2)))
2000 (define-public r-rmysql
2007 (uri (cran-uri "RMySQL" version))
2010 "1j0vr2l4s02cg2hzgr3pla96pjj4h85sxw28lidy58rg5awnsf82"))))
2011 (properties `((upstream-name . "RMySQL")))
2012 (build-system r-build-system)
2014 `(("pkg-config" ,pkg-config)))
2016 `(("mariadb" ,mariadb)
2019 `(("r-dbi" ,r-dbi)))
2020 (home-page "https://github.com/r-dbi/RMySQL")
2021 (synopsis "Database interface and MySQL driver for R")
2023 "This package provides a DBI interface to MySQL / MariaDB. The RMySQL
2024 package contains an old implementation based on legacy code from S-PLUS which
2025 is being phased out. A modern MySQL client based on Rcpp is available from
2026 the RMariaDB package.")
2027 (license license:gpl2)))
2029 (define-public python-ccm
2036 (uri (pypi-uri "ccm" version))
2039 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2040 (build-system python-build-system)
2042 `(("python-pyyaml" ,python-pyyaml)
2043 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2045 ("python-psutil" ,python-psutil)
2046 ("python-six" ,python-six)))
2047 (home-page "https://github.com/pcmanus/ccm")
2048 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2050 (description "Cassandra Cluster Manager is a development tool for testing
2051 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2053 (license license:asl2.0)))
2055 (define-public python2-ccm
2056 (package-with-python2 python-ccm))
2058 (define-public python2-pysqlite
2060 (name "python2-pysqlite")
2065 (uri (pypi-uri "pysqlite" version))
2068 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2069 (build-system python-build-system)
2071 `(("sqlite" ,sqlite)))
2073 `(#:python ,python-2 ; incompatible with Python 3
2074 #:tests? #f)) ; no test target
2075 (home-page "https://github.com/ghaering/pysqlite")
2076 (synopsis "SQLite bindings for Python")
2078 "Pysqlite provides SQLite bindings for Python that comply to the
2079 Database API 2.0T.")
2080 (license license:zlib)))
2082 (define-public python-sqlalchemy
2084 (name "python-sqlalchemy")
2089 (uri (string-append "https://pypi.python.org/packages/source/S/"
2090 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2093 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
2094 (build-system python-build-system)
2096 `(("python-cython" ,python-cython) ;for c extensions
2097 ("python-pytest" ,python-pytest)
2098 ("python-mock" ,python-mock))) ;for tests
2101 (modify-phases %standard-phases
2103 (lambda _ (zero? (system* "py.test")))))))
2104 (home-page "http://www.sqlalchemy.org")
2105 (synopsis "Database abstraction library")
2107 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2108 gives application developers the full power and flexibility of SQL. It
2109 provides a full suite of well known enterprise-level persistence patterns,
2110 designed for efficient and high-performing database access, adapted into a
2111 simple and Pythonic domain language.")
2112 (license license:x11)))
2114 (define-public python2-sqlalchemy
2115 (package-with-python2 python-sqlalchemy))
2117 (define-public python-sqlalchemy-utils
2119 (name "python-sqlalchemy-utils")
2124 (uri (pypi-uri "SQLAlchemy-Utils" version))
2127 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2128 (build-system python-build-system)
2130 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2132 ;; (modify-phases %standard-phases
2135 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2137 `(("python-six" ,python-six)
2138 ("python-sqlalchemy" ,python-sqlalchemy)))
2140 `(("python-dateutil" ,python-dateutil)
2141 ("python-flexmock" ,python-flexmock)
2142 ("python-psycopg2" ,python-psycopg2)
2143 ("python-pytest" ,python-pytest)
2144 ("python-pytz" ,python-pytz)))
2145 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2146 (synopsis "Various utility functions for SQLAlchemy")
2148 "SQLAlchemy-utils provides various utility functions and custom data types
2149 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2151 You might also want to install the following optional dependencies:
2153 @item @code{python-passlib}
2154 @item @code{python-babel}
2155 @item @code{python-cryptography}
2156 @item @code{python-pytz}
2157 @item @code{python-psycopg2}
2158 @item @code{python-furl}
2159 @item @code{python-flask-babel}
2162 (license license:bsd-3)))
2164 (define-public python2-sqlalchemy-utils
2165 (package-with-python2 python-sqlalchemy-utils))
2167 (define-public python-alembic
2169 (name "python-alembic")
2174 (uri (pypi-uri "alembic" version))
2177 "0cm73vabrqj92v7a0wwvldj8j7bc7dwv358kvkk7p87gx7mm2a04"))))
2178 (build-system python-build-system)
2180 `(("python-mock" ,python-mock)
2181 ("python-pytest-cov" ,python-pytest-cov)))
2183 `(("python-dateutil" ,python-dateutil)
2184 ("python-sqlalchemy" ,python-sqlalchemy)
2185 ("python-mako" ,python-mako)
2186 ("python-editor" ,python-editor)))
2187 (home-page "https://bitbucket.org/zzzeek/alembic")
2189 "Database migration tool for SQLAlchemy")
2191 "Alembic is a lightweight database migration tool for usage with the
2192 SQLAlchemy Database Toolkit for Python.")
2193 (license license:expat)))
2195 (define-public python2-alembic
2196 (package-with-python2 python-alembic))
2198 (define-public python-pickleshare
2200 (name "python-pickleshare")
2205 (uri (string-append "https://pypi.python.org/packages/source/p/"
2206 "pickleshare/pickleshare-" version ".tar.gz"))
2208 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
2209 (build-system python-build-system)
2211 `(("python-pathpy" ,python-pathpy)))
2212 (home-page "https://github.com/vivainio/pickleshare")
2213 (synopsis "Tiny key value database with concurrency support")
2215 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2216 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2217 shelve, many processes can access the database simultaneously. Changing a
2218 value in database is immediately visible to other processes accessing the same
2219 database. Concurrency is possible because the values are stored in separate
2220 files. Hence the “database” is a directory where all files are governed by
2222 (license license:expat)))
2224 (define-public python2-pickleshare
2225 (package-with-python2 python-pickleshare))
2227 (define-public python-apsw
2229 (name "python-apsw")
2230 (version "3.20.1-r1")
2234 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2238 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2239 (build-system python-build-system)
2241 `(("sqlite" ,sqlite)))
2244 (modify-phases %standard-phases
2248 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
2249 (add-after 'build 'build-test-helper
2253 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
2254 "-I. -Isqlite3 src/testextension.c") ))))
2256 (add-after 'install 'check
2257 (lambda* (#:key inputs outputs #:allow-other-keys)
2258 (add-installed-pythonpath inputs outputs)
2259 (zero? (system* "python" "setup.py" "test")))))))
2260 (home-page "https://github.com/rogerbinns/apsw/")
2261 (synopsis "Another Python SQLite Wrapper")
2262 (description "APSW is a Python wrapper for the SQLite
2263 embedded relational database engine. In contrast to other wrappers such as
2264 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2265 translate the complete SQLite API into Python.")
2266 (license license:zlib)))
2268 (define-public python2-apsw
2269 (package-with-python2 python-apsw))
2271 (define-public python2-neo4j-driver
2273 (name "python2-neo4j-driver")
2274 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2278 (uri (pypi-uri "neo4j-driver" version))
2281 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2282 (build-system python-build-system)
2284 `(#:python ,python-2))
2285 (home-page "https://neo4j.com/developer/python/")
2286 (synopsis "Neo4j driver code written in Python")
2287 (description "This package provides the Neo4j Python driver that connects
2288 to the database using Neo4j's binary protocol. It aims to be minimal, while
2289 being idiomatic to Python.")
2290 (license license:asl2.0)))
2292 (define-public python2-py2neo
2294 (name "python2-py2neo")
2298 (uri (pypi-uri "py2neo" version))
2301 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2302 (build-system python-build-system)
2304 `(#:python ,python-2))
2305 (home-page "http://py2neo.org")
2306 (synopsis "Library and toolkit for working with Neo4j in Python")
2307 (description "This package provides a client library and toolkit for
2308 working with Neo4j from within Python applications and from the command
2309 line. The core library has no external dependencies and has been carefully
2310 designed to be easy and intuitive to use.")
2311 (license license:asl2.0)))
2313 (define-public python-psycopg2
2315 (name "python-psycopg2")
2320 (uri (pypi-uri "psycopg2" version))
2323 "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
2324 (build-system python-build-system)
2326 ;; Tests would require a postgresql database "psycopg2_test"
2327 ;; and a running postgresql database management service.
2328 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2330 `(("postgresql" ,postgresql))) ; libpq
2331 (home-page "http://initd.org/psycopg/")
2332 (synopsis "Python PostgreSQL adapter")
2334 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
2335 (license license:lgpl3+)))
2337 (define-public python2-psycopg2
2338 (package-with-python2 python-psycopg2))
2340 (define-public python-sadisplay
2342 (name "python-sadisplay")
2347 (uri (pypi-uri "sadisplay" version))
2350 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2351 (build-system python-build-system)
2353 `(("python-sqlalchemy" ,python-sqlalchemy)))
2356 `(("python-nose" ,python-nose)))
2357 (home-page "https://bitbucket.org/estin/sadisplay")
2358 (synopsis "SQLAlchemy schema displayer")
2359 (description "This package provides a program to build Entity
2360 Relationship diagrams from a SQLAlchemy model (or directly from the
2362 (license license:bsd-3)))
2364 (define-public python2-sadisplay
2365 (package-with-python2 python-sadisplay))
2367 (define-public python-mysqlclient
2369 (name "python-mysqlclient")
2374 (uri (pypi-uri "mysqlclient" version))
2377 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
2378 (build-system python-build-system)
2380 `(("mariadb" ,mariadb)
2381 ("nose" ,python-nose)
2382 ("mock" ,python-mock)
2383 ("py.test" ,python-pytest)))
2387 ("openssl" ,openssl)))
2388 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2389 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2390 (description "MySQLdb is an interface to the popular MySQL database server
2391 for Python. The design goals are:
2393 @item Compliance with Python database API version 2.0 [PEP-0249],
2394 @item Thread-safety,
2395 @item Thread-friendliness (threads will not block each other).
2397 (license license:gpl2)))
2399 (define-public python2-mysqlclient
2400 (package-with-python2 python-mysqlclient))
2402 (define-public python-hiredis
2404 (name "python-hiredis")
2409 (uri (pypi-uri "hiredis" version))
2412 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2413 (build-system python-build-system)
2417 (home-page "https://github.com/redis/hiredis-py")
2418 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2419 (description "Python-hiredis is a python extension that wraps protocol
2420 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2421 (license license:bsd-3)))
2423 (define-public python2-hiredis
2424 (package-with-python2 python-hiredis))
2426 (define-public python-fakeredis
2428 (name "python-fakeredis")
2433 (uri (pypi-uri "fakeredis" version))
2436 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2437 (build-system python-build-system)
2441 (home-page "https://github.com/jamesls/fakeredis")
2442 (synopsis "Fake implementation of redis API for testing purposes")
2443 (description "Fakeredis is a pure python implementation of the redis-py
2444 python client that simulates talking to a redis server. This was created for a
2445 single purpose: to write unittests. Setting up redis is not hard, but many time
2446 you want to write unittests that do not talk to an external server (such as
2447 redis). This module now allows tests to simply use this module as a reasonable
2448 substitute for redis.")
2449 (license license:bsd-3)))
2451 (define-public python2-fakeredis
2452 (package-with-python2 python-fakeredis))
2454 (define-public python-redis
2456 (name "python-redis")
2461 (uri (pypi-uri "redis" version))
2463 (base32 "03vcgklykny0g0wpvqmy8p6azi2s078317wgb2xjv5m2rs9sjb52"))))
2464 (build-system python-build-system)
2465 ;; Tests require a running Redis server
2466 (arguments '(#:tests? #f))
2467 ;; As long as we are not running test, we do not need this input :-)
2469 ;; `(("python-pytest" ,python-pytest)))
2470 (home-page "https://github.com/andymccurdy/redis-py")
2471 (synopsis "Redis Python client")
2473 "This package provides a Python interface to the Redis key-value store.")
2474 (license license:expat)))
2476 (define-public python2-redis
2477 (package-with-python2 python-redis))
2479 (define-public python-rq
2486 (uri (pypi-uri "rq" version))
2488 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
2489 (build-system python-build-system)
2491 `(("python-click" ,python-click)
2492 ("python-redis" ,python-redis)))
2493 (home-page "http://python-rq.org/")
2494 (synopsis "Simple job queues for Python")
2496 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2497 processing them in the background with workers. It is backed by Redis and it
2498 is designed to have a low barrier to entry.")
2499 (license license:bsd-2)))
2501 (define-public python2-rq
2502 (package-with-python2 python-rq))
2504 (define-public python-trollius-redis
2506 (name "python-trollius-redis")
2511 (uri (pypi-uri "trollius_redis" version))
2514 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2515 (build-system python-build-system)
2516 ;; TODO: Tests require packaging 'hiredis'.
2517 (arguments '(#:tests? #f))
2518 (home-page "https://github.com/benjolitz/trollius-redis")
2519 (synopsis "Port of asyncio-redis to trollius")
2520 (description "@code{trollius-redis} is a Redis client for Python
2521 trollius. It is an asynchronious IO (PEP 3156) implementation of the
2523 (license license:bsd-2)))
2525 (define-public python2-trollius-redis
2526 (package-with-python2 python-trollius-redis))
2528 (define-public python-sqlparse
2530 (name "python-sqlparse")
2534 (uri (pypi-uri "sqlparse" version))
2537 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2538 (build-system python-build-system)
2541 (modify-phases %standard-phases
2543 (lambda _ (zero? (system* "py.test")))))))
2545 `(("python-pytest" ,python-pytest)))
2546 (home-page "https://github.com/andialbrecht/sqlparse")
2547 (synopsis "Non-validating SQL parser")
2548 (description "Sqlparse is a non-validating SQL parser for Python. It
2549 provides support for parsing, splitting and formatting SQL statements.")
2550 (license license:bsd-3)))
2552 (define-public python2-sqlparse
2553 (package-with-python2 python-sqlparse))
2555 (define-public python-sql
2562 (uri (pypi-uri "python-sql" version))
2565 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
2566 (build-system python-build-system)
2567 (home-page "https://python-sql.tryton.org/")
2568 (synopsis "Library to write SQL queries in a pythonic way")
2569 (description "@code{python-sql} is a library to write SQL queries, that
2570 transforms idiomatic python function calls to well-formed SQL queries.")
2571 (license license:bsd-3)))
2573 (define-public python2-sql
2574 (package-with-python2 python-sql))