1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 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, 2018 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, 2018 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, 2018 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, 2018 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>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages databases)
51 #:use-module (gnu packages)
52 #:use-module (gnu packages admin)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages autotools)
55 #:use-module (gnu packages avahi)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages bison)
59 #:use-module (gnu packages boost)
60 #:use-module (gnu packages check)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages crypto)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages cyrus-sasl)
65 #:use-module (gnu packages emacs)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages glib)
68 #:use-module (gnu packages gnupg)
69 #:use-module (gnu packages guile)
70 #:use-module (gnu packages time)
71 #:use-module (gnu packages golang)
72 #:use-module (gnu packages jemalloc)
73 #:use-module (gnu packages language)
74 #:use-module (gnu packages libevent)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages man)
77 #:use-module (gnu packages ncurses)
78 #:use-module (gnu packages parallel)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages perl-check)
82 #:use-module (gnu packages pkg-config)
83 #:use-module (gnu packages popt)
84 #:use-module (gnu packages python)
85 #:use-module (gnu packages rdf)
86 #:use-module (gnu packages readline)
87 #:use-module (gnu packages ruby)
88 #:use-module (gnu packages serialization)
89 #:use-module (gnu packages statistics)
90 #:use-module (gnu packages tcl)
91 #:use-module (gnu packages terminals)
92 #:use-module (gnu packages textutils)
93 #:use-module (gnu packages tls)
94 #:use-module (gnu packages valgrind)
95 #:use-module (gnu packages xml)
96 #:use-module ((guix licenses) #:prefix license:)
97 #:use-module (guix packages)
98 #:use-module (guix download)
99 #:use-module (guix git-download)
100 #:use-module (guix build-system gnu)
101 #:use-module (guix build-system go)
102 #:use-module (guix build-system perl)
103 #:use-module (guix build-system python)
104 #:use-module (guix build-system ruby)
105 #:use-module (guix build-system cmake)
106 #:use-module (guix build-system r)
107 #:use-module (guix build-system scons)
108 #:use-module ((guix build utils) #:hide (which))
109 #:use-module (guix utils)
110 #:use-module (srfi srfi-1)
111 #:use-module (srfi srfi-26)
112 #:use-module (ice-9 match))
114 (define-public 4store
120 (uri (string-append "https://github.com/4store/4store/archive/v"
122 (file-name (string-append name "-" version ".tar.gz"))
124 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
125 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
126 (build-system gnu-build-system)
130 ("autoconf" ,autoconf)
131 ("automake" ,automake)
132 ("gettext" ,gettext-minimal)
134 ("pcre" ,pcre "bin") ;for 'pcre-config'
135 ("pkg-config" ,pkg-config)))
141 ("readline" ,readline)
143 ("cyrus-sasl" ,cyrus-sasl)
145 ("util-linux" ,util-linux)))
148 (modify-phases %standard-phases
149 (add-after 'unpack 'generate-configure
151 (zero? (system* "sh" "autogen.sh")))))))
152 ;; http://www.4store.org has been down for a while now.
153 (home-page "https://github.com/4store/4store")
154 (synopsis "Clustered RDF storage and query engine")
155 (description "4store is a RDF/SPARQL store written in C, supporting
156 either single machines or networked clusters.")
157 (license license:gpl3+)))
165 (uri (string-append "mirror://gnu/gdbm/gdbm-"
169 "0pxwz3jlwvglq2mrbxvrjgr8pa0aj73p3v9sxmdlj570zw0gzknd"))))
170 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
171 (build-system gnu-build-system)
172 (home-page "http://www.gnu.org.ua/software/gdbm")
174 "Hash library of database functions compatible with traditional dbm")
176 "GDBM is a library for manipulating hashed databases. It is used to
177 store key/value pairs in a file in a manner similar to the Unix dbm library
178 and provides interfaces to the traditional file format.")
179 (license license:gpl3+)))
181 (define-public go-gopkg.in-mgo.v2
183 (name "go-gopkg.in-mgo.v2")
184 (version "2016.08.01")
188 (url "https://github.com/go-mgo/mgo")
189 (commit (string-append "r" version))))
190 (file-name (git-file-name name version))
193 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
194 (build-system go-build-system)
196 `(#:import-path "gopkg.in/mgo.v2"
197 ;; TODO: The tests fail as MongoDB fails to start
198 ;; Error parsing command line: unrecognised option '--chunkSize'
201 (modify-phases %standard-phases
202 (delete 'reset-gzip-timestamps)
203 (add-before 'check 'start-mongodb
204 (lambda* (#:key tests? #:allow-other-keys)
206 (with-directory-excursion "src/gopkg.in/mgo.v2"
207 (invoke "make" "startdb")))))
208 (add-after 'check 'stop'mongodb
209 (lambda* (#:key tests? #:allow-other-keys)
211 (with-directory-excursion "src/gopkg.in/mgo.v2"
212 (invoke "make" "stopdb"))))))))
214 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
216 ("daemontools" ,daemontools)))
217 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
219 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
220 It implements a rich selection of features under a simple API following
221 standard Go idioms.")
222 (home-page "http://labix.org/mgo")
223 (license license:bsd-2)))
231 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
235 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
236 (build-system gnu-build-system)
237 (outputs '("out" ; programs, libraries, headers
238 "doc")) ; 94 MiB of HTML docs
240 '(#:tests? #f ; no check target available
241 #:disallowed-references ("doc")
243 (modify-phases %standard-phases
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((out (assoc-ref outputs "out"))
247 (doc (assoc-ref outputs "doc")))
248 ;; '--docdir' is not honored, so we need to patch.
249 (substitute* "dist/Makefile.in"
250 (("docdir[[:blank:]]*=.*")
251 (string-append "docdir = " doc "/share/doc/bdb")))
254 (system* "./dist/configure"
255 (string-append "--prefix=" out)
256 (string-append "CONFIG_SHELL=" (which "bash"))
257 (string-append "SHELL=" (which "bash"))
259 ;; Remove 7 MiB of .a files.
262 ;; The compatibility mode is needed by some packages,
266 ;; The following flag is needed so that the inclusion
267 ;; of db_cxx.h into C++ files works; it leads to
268 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
269 "--enable-cxx"))))))))
270 (synopsis "Berkeley database")
272 "Berkeley DB is an embeddable database allowing developers the choice of
273 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
274 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
275 ;; files are covered by the 3-clause BSD license.
276 (license (list license:agpl3+ license:bsd-3))
278 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
280 (define-public bdb-5.3
281 (package (inherit bdb)
284 (license (license:non-copyleft "file://LICENSE"
285 "See LICENSE in the distribution."))
288 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
292 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
294 `(#:tests? #f ; no check target available
295 #:disallowed-references ("doc")
297 (modify-phases %standard-phases
299 (lambda* (#:key outputs #:allow-other-keys)
300 (let ((out (assoc-ref outputs "out"))
301 (doc (assoc-ref outputs "doc")))
302 ;; '--docdir' is not honored, so we need to patch.
303 (substitute* "dist/Makefile.in"
304 (("docdir[[:blank:]]*=.*")
305 (string-append "docdir = " doc "/share/doc/bdb")))
308 (system* "./dist/configure"
309 (string-append "--prefix=" out)
310 (string-append "CONFIG_SHELL=" (which "bash"))
311 (string-append "SHELL=" (which "bash"))
313 ;; Bdb doesn't recognize aarch64 as an architecture.
314 ,@(if (string=? "aarch64-linux" (%current-system))
315 '("--build=aarch64-unknown-linux-gnu")
318 ;; Remove 7 MiB of .a files.
321 ;; The compatibility mode is needed by some packages,
325 ;; The following flag is needed so that the inclusion
326 ;; of db_cxx.h into C++ files works; it leads to
327 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
328 "--enable-cxx"))))))))))
330 (define-public es-dump-restore
332 (name "es-dump-restore")
337 (uri (rubygems-uri "es_dump_restore" version))
340 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
341 (build-system ruby-build-system)
343 '(#:tests? #f)) ;; No testsuite.
345 `(("ruby-httpclient" ,ruby-httpclient)
346 ("ruby-multi-json" ,ruby-multi-json)
347 ("ruby-progress_bar" ,ruby-progress_bar)
348 ("ruby-rubyzip" ,ruby-rubyzip)
349 ("ruby-thor" ,ruby-thor)))
350 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
352 "This package provides a utility for dumping the contents of an
353 ElasticSearch index to a compressed file and restoring the dumpfile back to an
354 ElasticSearch server")
355 (home-page "https://github.com/patientslikeme/es_dump_restore")
356 (license license:expat)))
358 (define-public leveldb
364 (uri (string-append "https://github.com/google/leveldb"
365 "/archive/v" version ".tar.gz"))
366 (file-name (string-append name "-" version ".tar.gz"))
369 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
370 (build-system gnu-build-system)
372 '(#:make-flags (list "CC=gcc")
374 (modify-phases %standard-phases
377 ;; There is no install target, so we do it here.
378 (lambda* (#:key outputs #:allow-other-keys)
379 (let* ((out (assoc-ref outputs "out"))
380 (lib (string-append out "/lib"))
381 (include (string-append out "/include")))
382 (for-each (lambda (file)
383 (install-file file lib))
384 (find-files "out-shared" "^libleveldb\\.so.*$"))
385 (copy-recursively "include" include)
388 `(("snappy" ,snappy)))
389 (home-page "http://leveldb.org/")
390 (synopsis "Fast key-value storage library")
392 "LevelDB is a fast key-value storage library that provides an ordered
393 mapping from string keys to string values.")
394 (license license:bsd-3)))
396 (define-public memcached
404 "https://memcached.org/files/memcached-" version ".tar.gz"))
407 "00szy9d4szaixi260dcd4846zci04y0sd47ia2lzg0bxkn2ywxcn"))))
408 (build-system gnu-build-system)
410 `(("libevent" ,libevent)
411 ("cyrus-sasl" ,cyrus-sasl)))
412 (home-page "https://memcached.org/")
413 (synopsis "In memory caching service")
414 (description "Memcached is a in memory key value store. It has a small
415 and generic API, and was originally intended for use with dynamic web
417 (license license:bsd-3)))
419 (define-public mongodb
425 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
427 (file-name (string-append name "-" version ".tar.gz"))
429 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
430 (modules '((guix build utils)))
433 (for-each (lambda (dir)
434 (delete-file-recursively
435 (string-append "src/third_party/" dir)))
436 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
437 "valgrind-3.11.0" "wiredtiger"
438 "yaml-cpp-0.5.3" "zlib-1.2.8"))
442 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
443 (build-system scons-build-system)
445 `(("openssl" ,openssl)
447 ,@(match (%current-system)
448 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
449 `(("wiredtiger" ,wiredtiger)))
451 ("yaml-cpp" ,yaml-cpp)
455 `(("valgrind" ,valgrind)
457 ("python" ,python2-minimal)
458 ("python2-pymongo" ,python2-pymongo)
459 ("python2-pyyaml" ,python2-pyyaml)
462 `(#:scons ,scons-python2
464 (let ((common-options
465 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
467 ;; wiredtiger is 64-bit only
468 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
470 '("i686-linux" "armhf-linux"))
472 ``"--use-system-wiredtiger")
474 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
475 ;; --use-system-boost
476 "--use-system-snappy"
478 "--use-system-valgrind"
479 ;; "--use-system-stemmer" TODO: Missing relevant package
481 "--disable-warnings-as-errors"
482 ,(format #f "--jobs=~a" (parallel-job-count))
484 (modify-phases %standard-phases
485 (add-after 'unpack 'scons-propagate-environment
487 ;; Modify the SConstruct file to arrange for
488 ;; environment variables to be propagated.
489 (substitute* "SConstruct"
490 (("^env = Environment\\(")
491 "env = Environment(ENV=os.environ, "))
493 (add-after 'unpack 'create-version-file
495 (call-with-output-file "version.json"
497 (display ,(simple-format #f "{
503 (zero? (apply system*
506 "mongod" "mongo" "mongos")))))
508 (lambda* (#:key tests? inputs #:allow-other-keys)
510 (string-append (assoc-ref inputs "tzdata")
513 ;; Note that with the tests, especially the unittests, the
514 ;; build can take up to ~45GB of space, as many tests are
515 ;; individual executable files, with some being hundreds of
516 ;; megabytes in size.
519 invoke `("scons" ,@common-options "dbtest" "unittests"))
520 (substitute* "build/unittests.txt"
521 ;; TODO: Don't run the async_stream_test, as it hangs
522 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
524 ;; TODO: This test fails
525 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
526 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
528 (invoke "python" "buildscripts/resmoke.py"
529 "--suites=dbtest,unittests"
530 (format #f "--jobs=~a" (parallel-job-count)))))))
533 (let ((bin (string-append (assoc-ref %outputs "out") "/bin")))
534 (install-file "mongod" bin)
535 (install-file "mongos" bin)
536 (install-file "mongo" bin))
538 (home-page "https://www.mongodb.org/")
539 (synopsis "High performance and high availability document database")
541 "Mongo is a high-performance, high availability, schema-free
542 document-oriented database. A key goal of MongoDB is to bridge the gap
543 between key/value stores (which are fast and highly scalable) and traditional
544 RDBMS systems (which are deep in functionality).")
545 (license (list license:agpl3
546 ;; Some parts are licensed under the Apache License
555 (uri (list (string-append
556 "http://dev.mysql.com/get/Downloads/MySQL-"
557 (version-major+minor version) "/"
558 name "-" version ".tar.gz")
560 "http://downloads.mysql.com/archives/get/file/"
561 name "-" version ".tar.gz")))
564 "1dq9bgnajf7cq3mrjkwv6w5nwslhs26lkrw56i7w4fbsq9wm087s"))))
565 (build-system cmake-build-system)
568 '("-DBUILD_CONFIG=mysql_release"
571 "-DDEFAULT_CHARSET=utf8"
572 "-DDEFAULT_COLLATION=utf8_general_ci"
573 "-DMYSQL_DATADIR=/var/lib/mysql"
574 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
575 "-DINSTALL_INFODIR=share/mysql/docs"
576 "-DINSTALL_MANDIR=share/man"
577 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
578 "-DINSTALL_SCRIPTDIR=bin"
579 "-DINSTALL_INCLUDEDIR=include/mysql"
580 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
581 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
582 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
583 "-DINSTALL_DOCDIR=share/mysql/docs"
584 "-DINSTALL_SHAREDIR=share/mysql"
585 ;; Get rid of test data.
586 "-DINSTALL_MYSQLTESTDIR="
587 "-DINSTALL_SQLBENCHDIR=")
588 #:phases (modify-phases %standard-phases
590 'unpack 'patch-boost-version
592 ;; Mysql wants boost-1.59.0 specifically
593 (substitute* "cmake/boost.cmake"
595 ,(match (string-split (package-version boost) #\.)
596 ((_ minor . _) minor))))))
598 'install 'remove-extra-binaries
599 (lambda* (#:key outputs #:allow-other-keys)
600 (let ((out (assoc-ref outputs "out")))
601 ;; Remove the 3 *_embedded files, which weigh in at
603 (for-each delete-file
604 (find-files (string-append out "/bin")
616 (home-page "http://www.mysql.com/")
617 (synopsis "Fast, easy to use, and popular database")
619 "MySQL is a fast, reliable, and easy to use relational database
620 management system that supports the standardized Structured Query
622 (license license:gpl2)))
624 (define-public mariadb
630 (uri (string-append "https://downloads.mariadb.org/f/"
631 name "-" version "/source/"
632 name "-" version ".tar.gz"))
635 "1m3ya6c3snnsyscd0waklayqfv0vhws52iizv2j5masj5xhdbfvk"))))
636 (build-system cmake-build-system)
639 '("-DBUILD_CONFIG=mysql_release"
640 ;; Linking with libarchive fails, like this:
642 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
643 ;; relocation R_X86_64_32 against `.bss' can not be used when
644 ;; making a shared object; recompile with -fPIC
646 ;; For now, disable the features that that use libarchive (xtrabackup).
647 "-DWITH_LIBARCHIVE=OFF"
649 "-DDEFAULT_CHARSET=utf8"
650 "-DDEFAULT_COLLATION=utf8_general_ci"
651 "-DMYSQL_DATADIR=/var/lib/mysql"
652 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
653 "-DINSTALL_INFODIR=share/mysql/docs"
654 "-DINSTALL_MANDIR=share/man"
655 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
656 "-DINSTALL_SCRIPTDIR=bin"
657 "-DINSTALL_INCLUDEDIR=include/mysql"
658 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
659 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
660 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
661 "-DINSTALL_DOCDIR=share/mysql/docs"
662 "-DINSTALL_SHAREDIR=share/mysql")
664 (modify-phases %standard-phases
666 'configure 'pre-configure
668 (setenv "CONFIG_SHELL" (which "sh"))
671 'install 'post-install
672 (lambda* (#:key outputs #:allow-other-keys)
673 (let* ((out (assoc-ref outputs "out"))
674 (test (assoc-ref outputs "test")))
675 (substitute* (string-append out "/bin/mysql_install_db")
677 (string-append "basedir=\"" out "\"")))
678 ;; Remove unneeded files for testing.
679 (with-directory-excursion out
680 (for-each delete-file-recursively
681 '("data" "mysql-test" "sql-bench"
682 "share/man/man1/mysql-test-run.pl.1")))))))))
687 `(("jemalloc" ,jemalloc)
694 (home-page "https://mariadb.org/")
695 (synopsis "SQL database server")
697 "MariaDB is a multi-user and multi-threaded SQL database server, designed
698 as a drop-in replacement of MySQL.")
699 (license license:gpl2)))
701 (define-public postgresql
707 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
708 version "/postgresql-" version ".tar.bz2"))
711 "06lkcwsf851z49zqcws5yc77s2yrbaazf2nvbk38hpp31rw6i8kf"))))
712 (build-system gnu-build-system)
714 `(#:configure-flags '("--with-uuid=e2fs")
716 (modify-phases %standard-phases
717 (add-before 'configure 'patch-/bin/sh
719 ;; Refer to the actual shell.
720 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
721 "src/bin/psql/command.c")
722 (("/bin/sh") (which "sh")))
724 (add-after 'build 'build-contrib
726 (zero? (system* "make" "-C" "contrib"))))
727 (add-after 'install 'install-contrib
729 (zero? (system* "make" "-C" "contrib" "install")))))))
731 `(("readline" ,readline)
732 ("libuuid" ,util-linux)
734 (home-page "https://www.postgresql.org/")
735 (synopsis "Powerful object-relational database system")
737 "PostgreSQL is a powerful object-relational database system. It is fully
738 ACID compliant, has full support for foreign keys, joins, views, triggers, and
739 stored procedures (in multiple languages). It includes most SQL:2008 data
740 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
741 TIMESTAMP. It also supports storage of binary large objects, including
742 pictures, sounds, or video.")
743 (license (license:x11-style "file://COPYRIGHT"))))
745 (define-public postgresql-9.6
752 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
753 version "/postgresql-" version ".tar.bz2"))
756 "0w7bwf19wbdd3jjbjv03cnx56qka4801srcbsayk9v792awv7zga"))))))
765 (uri (string-append "http://fallabs.com/" name "/"
766 name "-" version ".tar.gz"))
769 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
770 (build-system gnu-build-system)
772 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
773 (assoc-ref %outputs "out")
775 (home-page "http://fallabs.com/qdbm")
776 (synopsis "Key-value database")
777 (description "QDBM is a library of routines for managing a
778 database. The database is a simple data file containing key-value
779 pairs. Every key and value is serial bytes with variable length.
780 Binary data as well as character strings can be used as a key or a
781 value. There is no concept of data tables or data types. Records are
782 organized in a hash table or B+ tree.")
783 (license license:lgpl2.1+)))
785 (define-public recutils
791 (uri (string-append "mirror://gnu/recutils/recutils-"
795 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
796 (build-system gnu-build-system)
798 ;; Running tests in parallel leads to test failures and crashes in
800 (arguments '(#:parallel-tests? #f
802 (list (string-append "--with-bash-headers="
803 (assoc-ref %build-inputs "bash:include")
806 #:phases (modify-phases %standard-phases
807 (add-before 'build 'set-bash4.4-header-location
809 (substitute* "bash/Makefile.in"
810 ;; Adjust the header search path for Bash
811 ;; 4.4 in accordance with 'bash.pc'.
812 (("AM_CPPFLAGS = (.*)$" _ rest)
813 (string-append "AM_CPPFLAGS = "
814 "-I$(BASH_HEADERS)/include "
817 ;; Install to PREFIX/lib/bash to match Bash
818 ;; 4.4's search path.
820 "libdir = @libdir@/bash\n"))
823 (native-inputs `(("emacs" ,emacs-minimal)
825 ("bash:include" ,bash "include")
826 ("libuuid" ,util-linux)))
828 ;; TODO: Add more optional inputs.
829 (inputs `(("curl" ,curl)
830 ("libgcrypt" ,libgcrypt)
832 (synopsis "Manipulate plain text files as databases")
834 "GNU Recutils is a set of tools and libraries for creating and
835 manipulating text-based, human-editable databases. Despite being text-based,
836 databases created with Recutils carry all of the expected features such as
837 unique fields, primary keys, time stamps and more. Many different field
838 types are supported, as is encryption.")
839 (license license:gpl3+)
840 (home-page "https://www.gnu.org/software/recutils/")))
842 (define-public rocksdb
848 (uri (string-append "https://github.com/facebook/rocksdb"
849 "/archive/v" version ".tar.gz"))
850 (file-name (string-append name "-" version ".tar.gz"))
853 "0hp7jxr99vyc57n708hiqk4lks9a9zmjgfjc21mx6v1rmabj2944"))
854 (modules '((guix build utils)))
857 ;; TODO: unbundle gtest.
858 (delete-file "build_tools/gnu_parallel")
859 (substitute* "Makefile"
860 (("build_tools/gnu_parallel") "parallel"))
862 (build-system gnu-build-system)
864 `(#:make-flags (list "CC=gcc" "V=1"
865 ;; Ceph requires that RTTI is enabled.
867 (string-append "INSTALL_PATH="
868 (assoc-ref %outputs "out"))
870 ;; Running the full test suite takes hours and require
871 ;; a lot of disk space. Instead we only run a subset
872 ;; (see .travis.yml and Makefile).
873 "ROCKSDBTESTS_END=db_tailing_iter_test")
874 #:test-target "check_some"
875 ;; Many tests fail on 32-bit platforms. There are multiple reports about
876 ;; this upstream, but it's not going to be supported any time soon.
877 #:tests? (let ((system ,(or (%current-target-system)
879 (or (string-prefix? "x86_64-linux" system)
880 (string-prefix? "aarch64-linux" system)))
882 (modify-phases %standard-phases
883 (add-after 'unpack 'patch-Makefile
885 (substitute* "Makefile"
886 ;; Don't depend on the static library when installing.
887 (("install: install-static")
888 "install: install-shared")
889 (("#!/bin/sh") (string-append "#!" (which "sh"))))
892 ;; The default target is only needed for tests and built on demand.
894 (add-before 'check 'disable-optimizations
896 ;; Prevent the build from passing '-march=native' to the compiler.
897 (setenv "PORTABLE" "1")
899 (add-before 'check 'disable-failing-tests
901 (substitute* "Makefile"
902 ;; These tests reliably fail due to "Too many open files".
903 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
904 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
906 (add-after 'check 'build
907 ;; The default build target is a debug build for tests. The
908 ;; install target depends on the "shared_lib" release target
909 ;; so we build it here for clarity.
910 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
911 (apply invoke "make" "shared_lib"
912 `(,@(if parallel-build?
913 `("-j" ,(number->string (parallel-job-count)))
917 `(("parallel" ,parallel)
925 ("jemalloc" ,jemalloc)
929 (home-page "http://rocksdb.org/")
930 (synopsis "Persistent key-value store for fast storage")
932 "RocksDB is a library that forms the core building block for a fast
933 key-value server, especially suited for storing data on flash drives. It
934 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
935 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
936 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
937 compactions, making it specially suitable for storing multiple terabytes of
938 data in a single database. RocksDB is partially based on @code{LevelDB}.")
939 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
940 ;; files carry the 3-clause BSD license.
941 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
943 (define-public sparql-query
945 (name "sparql-query")
949 (uri (string-append "https://github.com/tialaramex/"
950 name "/archive/" version ".tar.gz"))
952 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
953 (file-name (string-append name "-" version ".tar.gz"))))
954 (build-system gnu-build-system)
956 `(("readline" ,readline)
962 `(("pkg-config" ,pkg-config)))
964 `(#:make-flags '("CC=gcc")
966 (modify-phases %standard-phases
968 ;; The Makefile uses git to obtain versioning information. This phase
969 ;; substitutes the git invocation with the package version.
970 (add-after 'unpack 'remove-git-dependency
972 (substitute* "Makefile"
974 (string-append "gitrev = \"v" ,version "\"")))))
975 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
976 ;; This replacement does the same thing, except for using $PREFIX/bin
979 (lambda* (#:key outputs #:allow-other-keys)
980 (let* ((out (assoc-ref outputs "out"))
981 (bin (string-append out "/bin")))
982 (install-file "sparql-query" bin)
983 (system* "ln" "--symbolic"
984 (string-append bin "/sparql-query")
985 (string-append bin "/sparql-update")))))
987 (lambda* (#:key make-flags #:allow-other-keys)
989 (zero? (apply system* "make" `(,@make-flags "scan-test")))
990 (zero? (system "./scan-test"))))))))
991 (home-page "https://github.com/tialaramex/sparql-query/")
992 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
993 (description "Sparql-query is a command-line tool for accessing SPARQL
994 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
995 tools for interrogating SQL databases. For example, you can enter a query over
996 several lines, using a semi-colon at the end of a line to indicate the end of
997 your query. It also supports readline so that you can more easily recall and
998 edit previous queries, even across sessions. It can be used non-interactively,
999 for example from a shell script.")
1000 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1001 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1002 (license (list license:gpl3+))))
1004 (define-public sqlite
1010 (uri (let ((numeric-version
1011 (match (string-split version #\.)
1012 ((first-digit other-digits ...)
1013 (string-append first-digit
1016 (map (cut string-pad <> 2 #\0)
1019 (string-append "https://sqlite.org/2018/sqlite-autoconf-"
1020 numeric-version ".tar.gz")))
1023 "04n6hnw2g818d7r92cp2608kd5mhzyysy83k29kbq1mp709an918"))))
1024 (build-system gnu-build-system)
1025 (inputs `(("readline" ,readline)))
1028 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
1029 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
1030 ;; to use the system SQLite unless these options are enabled.
1031 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
1032 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
1033 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
1034 (home-page "https://www.sqlite.org/")
1035 (synopsis "The SQLite database management system")
1037 "SQLite is a software library that implements a self-contained, serverless,
1038 zero-configuration, transactional SQL database engine. SQLite is the most
1039 widely deployed SQL database engine in the world. The source code for SQLite
1040 is in the public domain.")
1041 (license license:public-domain)))
1043 ;; This is used by Tracker.
1044 (define-public sqlite-with-fts5
1045 (package (inherit sqlite)
1046 (name "sqlite-with-fts5")
1048 (substitute-keyword-arguments (package-arguments sqlite)
1049 ((#:configure-flags flags)
1050 `(cons "--enable-fts5" ,flags))))))
1052 ;; This is used by Clementine.
1053 (define-public sqlite-with-fts3
1054 (package (inherit sqlite)
1055 (name "sqlite-with-fts3")
1057 (substitute-keyword-arguments (package-arguments sqlite)
1058 ((#:configure-flags flags)
1059 `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
1060 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
1061 "-DSQLITE_ENABLE_DBSTAT_VTAB "
1062 "-DSQLITE_ENABLE_FTS3 "
1063 "-DSQLITE_ENABLE_FTS3_PARENTHESIS "
1064 "-DSQLITE_ENABLE_FTS3_TOKENIZER")))))))
1072 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1076 "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl"))))
1077 (build-system gnu-build-system)
1080 (modify-phases %standard-phases
1082 (lambda* (#:key outputs #:allow-other-keys)
1083 (let ((out (assoc-ref outputs "out")))
1084 ;; The 'configure' script is a wrapper for Waf and
1085 ;; doesn't recognize things like '--enable-fast-install'.
1086 (zero? (system* "./configure"
1087 (string-append "--prefix=" out)))))))))
1089 `(;; TODO: Build the documentation.
1090 ;; ("docbook-xsl" ,docbook-xsl)
1091 ;; ("libxml2" ,libxml2)
1092 ;; ("libxslt" ,libxslt)
1093 ("python" ,python-2))) ;for the Waf build system
1094 (home-page "https://tdb.samba.org/")
1095 (synopsis "Trivial database")
1097 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1098 and BSD's DB except that it allows multiple simultaneous writers and uses
1099 locking internally to keep writers from trampling on each other. TDB is also
1101 (license license:lgpl3+)))
1103 (define-public perl-dbi
1110 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1114 "1ikbsb6sb0bd2m1dqknl4vx7ikmnd41y0xq8np1l40g8jcjp2mr5"))))
1115 (build-system perl-build-system)
1116 (synopsis "Database independent interface for Perl")
1117 (description "This package provides an database interface for Perl.")
1118 (home-page "http://search.cpan.org/dist/DBI")
1119 (license license:perl-license)))
1121 (define-public perl-dbix-class
1123 (name "perl-dbix-class")
1124 (version "0.082840")
1128 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1129 "DBIx-Class-" version ".tar.gz"))
1132 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
1133 (build-system perl-build-system)
1135 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1136 ("perl-file-temp" ,perl-file-temp)
1137 ("perl-module-install" ,perl-module-install)
1138 ("perl-package-stash" ,perl-package-stash)
1139 ("perl-test-deep" ,perl-test-deep)
1140 ("perl-test-exception" ,perl-test-exception)
1141 ("perl-test-warn" ,perl-test-warn)))
1143 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1144 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1145 ("perl-class-inspector" ,perl-class-inspector)
1146 ("perl-config-any" ,perl-config-any)
1147 ("perl-context-preserve" ,perl-context-preserve)
1148 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1149 ("perl-data-page" ,perl-data-page)
1150 ("perl-dbi" ,perl-dbi)
1151 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1152 ("perl-hash-merge" ,perl-hash-merge)
1153 ("perl-module-find" ,perl-module-find)
1154 ("perl-moo" ,perl-moo)
1155 ("perl-mro-compat" ,perl-mro-compat)
1156 ("perl-namespace-clean" ,perl-namespace-clean)
1157 ("perl-path-class" ,perl-path-class)
1158 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1159 ("perl-scope-guard" ,perl-scope-guard)
1160 ("perl-sql-abstract" ,perl-sql-abstract)
1161 ("perl-sub-name" ,perl-sub-name)
1162 ("perl-text-balanced" ,perl-text-balanced)
1163 ("perl-try-tiny" ,perl-try-tiny)))
1164 (home-page "http://search.cpan.org/dist/DBIx-Class")
1165 (synopsis "Extensible and flexible object <-> relational mapper")
1166 (description "An SQL to OO mapper with an object API inspired by
1167 Class::DBI (with a compatibility layer as a springboard for porting) and a
1168 resultset API that allows abstract encapsulation of database operations. It
1169 aims to make representing queries in your code as perl-ish as possible while
1170 still providing access to as many of the capabilities of the database as
1171 possible, including retrieving related records from multiple tables in a
1172 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1173 \"ORDER BY\" and \"HAVING\" support.")
1174 (license license:perl-license)))
1176 (define-public perl-dbix-class-cursor-cached
1178 (name "perl-dbix-class-cursor-cached")
1179 (version "1.001004")
1183 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1184 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1187 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1188 (build-system perl-build-system)
1190 `(("perl-cache-cache" ,perl-cache-cache)
1191 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1192 ("perl-module-install" ,perl-module-install)))
1194 `(("perl-carp-clan" ,perl-carp-clan)
1195 ("perl-dbix-class" ,perl-dbix-class)))
1196 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
1197 (synopsis "Cursor with built-in caching support")
1198 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1199 built-in caching support.")
1200 (license license:perl-license)))
1202 (define-public perl-dbix-class-introspectablem2m
1204 (name "perl-dbix-class-introspectablem2m")
1205 (version "0.001002")
1209 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1210 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1213 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1214 (build-system perl-build-system)
1216 `(("perl-module-install" ,perl-module-install)))
1218 `(("perl-dbix-class" ,perl-dbix-class)))
1219 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
1220 (synopsis "Introspect many-to-many relationships")
1221 (description "Because the many-to-many relationships are not real
1222 relationships, they can not be introspected with DBIx::Class. Many-to-many
1223 relationships are actually just a collection of convenience methods installed
1224 to bridge two relationships. This DBIx::Class component can be used to store
1225 all relevant information about these non-relationships so they can later be
1226 introspected and examined.")
1227 (license license:perl-license)))
1229 (define-public perl-dbix-class-schema-loader
1231 (name "perl-dbix-class-schema-loader")
1236 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1237 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1240 "06s2q6xj95600sdlfph57spjk2z1gjs4zwq5b7mz7d5izcxgnwb6"))))
1241 (build-system perl-build-system)
1243 `(("perl-config-any" ,perl-config-any)
1244 ("perl-config-general" ,perl-config-general)
1245 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1246 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1247 ("perl-module-install" ,perl-module-install)
1248 ("perl-moose" ,perl-moose)
1249 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1250 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1251 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1252 ("perl-test-deep" ,perl-test-deep)
1253 ("perl-test-differences" ,perl-test-differences)
1254 ("perl-test-exception" ,perl-test-exception)
1255 ("perl-test-pod" ,perl-test-pod)
1256 ("perl-test-warn" ,perl-test-warn)))
1258 `(("perl-class-unload" ,perl-class-unload)
1259 ("perl-class-inspector" ,perl-class-inspector)
1260 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1261 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1262 ("perl-carp-clan" ,perl-carp-clan)
1263 ("perl-data-dump" ,perl-data-dump)
1264 ("perl-dbix-class" ,perl-dbix-class)
1265 ("perl-hash-merge" ,perl-hash-merge)
1266 ("perl-list-moreutils" ,perl-list-moreutils)
1267 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1268 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1269 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1270 ("perl-namespace-clean" ,perl-namespace-clean)
1271 ("perl-mro-compat" ,perl-mro-compat)
1272 ("perl-scope-guard" ,perl-scope-guard)
1273 ("perl-string-camelcase" ,perl-string-camelcase)
1274 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1275 ("perl-sub-name" ,perl-sub-name)
1276 ("perl-try-tiny" ,perl-try-tiny)))
1277 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1278 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
1279 (synopsis "Create a DBIx::Class::Schema based on a database")
1280 (description "DBIx::Class::Schema::Loader automates the definition of a
1281 DBIx::Class::Schema by scanning database table definitions and setting up the
1282 columns, primary keys, unique constraints and relationships.")
1283 (license license:perl-license)))
1285 (define-public perl-dbd-pg
1287 (name "perl-dbd-pg")
1292 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1293 "DBD-Pg-" version ".tar.gz"))
1296 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1297 (build-system perl-build-system)
1299 `(("perl-dbi" ,perl-dbi)))
1301 `(("perl-dbi" ,perl-dbi)
1302 ("postgresql" ,postgresql)))
1303 (home-page "http://search.cpan.org/dist/DBD-Pg")
1304 (synopsis "DBI PostgreSQL interface")
1305 (description "This package provides a PostgreSQL driver for the Perl5
1306 @dfn{Database Interface} (DBI).")
1307 (license license:perl-license)))
1309 (define-public perl-dbd-mysql
1311 (name "perl-dbd-mysql")
1316 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1317 "DBD-mysql-" version ".tar.gz"))
1320 "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2"))
1321 (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch"))))
1322 (build-system perl-build-system)
1323 ;; Tests require running MySQL server
1324 (arguments `(#:tests? #f))
1326 `(("perl-dbi" ,perl-dbi)
1328 (home-page "http://search.cpan.org/dist/DBD-mysql")
1329 (synopsis "DBI MySQL interface")
1330 (description "This package provides a MySQL driver for the Perl5
1331 @dfn{Database Interface} (DBI).")
1332 (license license:perl-license)))
1334 (define-public perl-dbd-sqlite
1336 (name "perl-dbd-sqlite")
1341 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1345 "0sbj9lx9syzpknvjv8cz9jndg32qz775vy2prgq305npv3dsca9r"))))
1346 (build-system perl-build-system)
1347 (inputs `(("sqlite" ,sqlite)))
1348 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1349 (synopsis "SQlite interface for Perl")
1350 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1351 the entire thing in the distribution. So in order to get a fast transaction
1352 capable RDBMS working for your Perl project you simply have to install this
1353 module, and nothing else.")
1354 (license license:perl-license)
1355 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
1357 (define-public perl-sql-abstract
1359 (name "perl-sql-abstract")
1364 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1365 "SQL-Abstract-" version ".tar.gz"))
1368 "0xayvgv6nic61jm3nhg41rzwgm8h83wfyazvpaks0z7asjillpv5"))))
1369 (build-system perl-build-system)
1371 `(("perl-module-install" ,perl-module-install)
1372 ("perl-test-deep" ,perl-test-deep)
1373 ("perl-test-exception" ,perl-test-exception)
1374 ("perl-test-warn" ,perl-test-warn)))
1376 `(("perl-hash-merge" ,perl-hash-merge)
1377 ("perl-moo" ,perl-moo)
1378 ("perl-mro-compat" ,perl-mro-compat)
1379 ("perl-text-balanced" ,perl-text-balanced)))
1380 (home-page "http://search.cpan.org/dist/SQL-Abstract")
1381 (synopsis "Generate SQL from Perl data structures")
1382 (description "This module was inspired by the excellent DBIx::Abstract.
1383 While based on the concepts used by DBIx::Abstract, the concepts used have
1384 been modified to make the SQL easier to generate from Perl data structures.
1385 The underlying idea is for this module to do what you mean, based on the data
1386 structures you provide it, so that you don't have to modify your code every
1387 time your data changes.")
1388 (license license:perl-license)))
1390 (define-public perl-sql-splitstatement
1392 (name "perl-sql-splitstatement")
1397 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1398 "SQL-SplitStatement-" version ".tar.gz"))
1401 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1402 (build-system perl-build-system)
1404 `(("perl-test-exception" ,perl-test-exception)))
1406 `(("perl-class-accessor" ,perl-class-accessor)
1407 ("perl-list-moreutils" ,perl-list-moreutils)
1408 ("perl-regexp-common" ,perl-regexp-common)
1409 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1410 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
1411 (synopsis "Split SQL code into atomic statements")
1412 (description "This module tries to split any SQL code, even including
1413 non-standard extensions, into the atomic statements it is composed of.")
1414 (license license:perl-license)))
1416 (define-public perl-sql-tokenizer
1418 (name "perl-sql-tokenizer")
1423 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1424 "SQL-Tokenizer-" version ".tar.gz"))
1427 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1428 (build-system perl-build-system)
1429 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
1430 (synopsis "SQL tokenizer")
1431 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1432 claim to be a parser or query verifier. It just creates sane tokens from a
1434 (license license:perl-license)))
1436 (define-public unixodbc
1444 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1447 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
1448 (build-system gnu-build-system)
1449 (synopsis "Data source abstraction library")
1450 (description "Unixodbc is a library providing an API with which to access
1451 data sources. Data sources include SQL Servers and any software with an ODBC
1453 (license license:lgpl2.1+)
1454 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1455 (home-page "http://www.unixodbc.org")))
1457 (define-public unqlite
1463 ;; Contains bug fixes against the official release, and has an
1464 ;; autotooled build system.
1465 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1467 "unqlite-unofficial-" version ".tar.gz"))
1470 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1471 (build-system gnu-build-system)
1472 (arguments `(#:tests? #f)) ;No check target
1473 (home-page "http://www.unqlite.org")
1474 (synopsis "In-memory key/value and document store")
1476 "UnQLite is an in-process software library which implements a
1477 self-contained, serverless, zero-configuration, transactional NoSQL
1478 database engine. UnQLite is a document store database similar to
1479 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1480 similar to BerkeleyDB, LevelDB, etc.")
1481 (license license:bsd-2)))
1483 (define-public redis
1489 (uri (string-append "http://download.redis.io/releases/redis-"
1493 "04s8cgvwjj1979s3hg8zkwc9pyn3jkjpz5zidp87kfcipifr385i"))))
1494 (build-system gnu-build-system)
1496 '(#:tests? #f ; tests related to master/slave and replication fail
1497 #:phases (modify-phases %standard-phases
1498 (delete 'configure))
1499 #:make-flags `("CC=gcc"
1502 ,(string-append "PREFIX="
1503 (assoc-ref %outputs "out")))))
1504 (synopsis "Key-value cache and store")
1505 (description "Redis is an advanced key-value cache and store. Redis
1506 supports many data structures including strings, hashes, lists, sets, sorted
1507 sets, bitmaps and hyperloglogs.")
1508 (home-page "http://redis.io/")
1509 (license license:bsd-3)))
1511 (define-public kyotocabinet
1513 (name "kyotocabinet")
1517 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1518 name "-" version ".tar.gz"))
1521 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1522 (build-system gnu-build-system)
1526 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1527 (string-append "LDFLAGS=-Wl,-rpath="
1528 (assoc-ref %outputs "out") "/lib"))))
1529 (inputs `(("zlib" ,zlib)))
1530 (home-page "http://fallabs.com/kyotocabinet/")
1532 "Kyoto Cabinet is a modern implementation of the DBM database")
1534 "Kyoto Cabinet is a standalone file-based database that supports Hash
1535 and B+ Tree data storage models. It is a fast key-value lightweight
1536 database and supports many programming languages. It is a NoSQL database.")
1537 (license license:gpl3+)))
1539 (define-public tokyocabinet
1541 (name "tokyocabinet")
1546 (uri (string-append "http://fallabs.com/tokyocabinet/"
1547 name "-" version ".tar.gz"))
1550 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1551 (build-system gnu-build-system)
1554 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1555 (string-append "LDFLAGS=-Wl,-rpath="
1556 (assoc-ref %outputs "out") "/lib"))))
1559 (home-page "http://fallabs.com/tokyocabinet/")
1560 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1562 "Tokyo Cabinet is a library of routines for managing a database.
1563 The database is a simple data file containing records, each is a pair of a
1564 key and a value. Every key and value is serial bytes with variable length.
1565 Both binary data and character string can be used as a key and a value.
1566 There is neither concept of data tables nor data types. Records are
1567 organized in hash table, B+ tree, or fixed-length array.")
1568 (license license:lgpl2.1+)))
1570 (define-public wiredtiger
1577 "http://source.wiredtiger.com/releases/wiredtiger-"
1578 version ".tar.bz2"))
1581 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1582 (build-system gnu-build-system)
1584 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1586 (modify-phases %standard-phases
1587 (add-before 'check 'disable-test/fops
1589 ;; XXX: timed out after 3600 seconds of silence
1590 (substitute* "Makefile"
1596 ("snappy" ,snappy)))
1597 (home-page "http://source.wiredtiger.com/")
1598 (synopsis "NoSQL data engine")
1600 "WiredTiger is an extensible platform for data management. It supports
1601 row-oriented storage (where all columns of a row are stored together),
1602 column-oriented storage (where columns are stored in groups, allowing for
1603 more efficient access and storage of column subsets) and log-structured merge
1604 trees (LSM), for sustained throughput under random insert workloads.")
1605 (license license:gpl3) ; or GPL-2
1606 ;; configure.ac: WiredTiger requires a 64-bit build.
1607 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1609 (define-public guile-wiredtiger
1611 (name "guile-wiredtiger")
1616 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1617 (commit "070ed68139d99c279f058a6c293f00292d35dbd7")))
1618 (file-name (string-append name "-" version "-checkout"))
1621 "14rna97wsylajzxfif95wnblq85csgcfc666gh5dl0ssgd7x8llh"))))
1622 (build-system gnu-build-system)
1624 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
1626 (list (string-append "--with-libwiredtiger-prefix="
1627 (assoc-ref %build-inputs "wiredtiger")))
1628 #:make-flags '("GUILE_AUTO_COMPILE=0")))
1629 ;; TODO: Remove microkanren.scm when we have a separate package
1632 `(("autoconf" ,autoconf)
1633 ("automake" ,automake)
1634 ("pkg-config" ,pkg-config)))
1636 `(("wiredtiger" ,wiredtiger)
1637 ("guile" ,guile-2.2)))
1639 `(("guile-lib" ,guile-lib))) ;for (htmlprag)
1640 (synopsis "WiredTiger bindings for GNU Guile")
1642 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1643 database. Various higher level database abstractions.")
1644 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1645 (license license:gpl3+)))
1647 (define-public perl-db-file
1649 (name "perl-db-file")
1655 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1660 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
1661 (build-system perl-build-system)
1662 (inputs `(("bdb" ,bdb)))
1663 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1665 `(#:phases (modify-phases %standard-phases
1667 'configure 'modify-config.in
1668 (lambda* (#:key inputs #:allow-other-keys)
1669 (substitute* "config.in"
1670 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1672 (home-page "http://search.cpan.org/dist/DB_File")
1674 "Perl5 access to Berkeley DB version 1.x")
1676 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1677 (license license:perl-license)))
1685 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1686 "LMDB_" version ".tar.gz"))
1689 "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
1690 (build-system gnu-build-system)
1692 `(#:test-target "test"
1694 (modify-phases %standard-phases
1696 (lambda* (#:key outputs #:allow-other-keys)
1697 (chdir (string-append
1698 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1699 (substitute* "Makefile"
1700 (("/usr/local") (assoc-ref outputs "out")))
1702 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1703 (synopsis "Lightning Memory-Mapped Database library")
1705 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1706 transactional database. Unlike more complex relational databases, LMDB handles
1707 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1708 underlying operating system for caching and locking, keeping the code small and
1710 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1711 disk-based databases with high read performance that scales linearly over
1712 multiple cores. The size of each database is limited only by the size of the
1713 virtual address space — not physical RAM.")
1714 (license license:openldap2.8)))
1716 (define-public libpqxx
1723 "http://pqxx.org/download/software/libpqxx/"
1724 name "-" version ".tar.gz"))
1727 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1728 (build-system gnu-build-system)
1730 `(("python" ,python-2)))
1731 (inputs `(("postgresql" ,postgresql)))
1733 `(#:tests? #f ; # FAIL: 1
1735 (modify-phases %standard-phases
1736 (add-before 'configure 'fix-sed-command
1738 ;; Newer sed versions error out if double brackets are not used.
1739 (substitute* "configure"
1740 (("\\[:space:\\]") "[[:space:]]"))
1742 (synopsis "C++ connector for PostgreSQL")
1744 "Libpqxx is a C++ library to enable user programs to communicate with the
1745 PostgreSQL database back-end. The database back-end can be local or it may be
1746 on another machine, accessed via TCP/IP.")
1747 (home-page "http://pqxx.org/")
1748 (license license:bsd-3)))
1750 (define-public python-peewee
1752 (name "python-peewee")
1757 (uri (pypi-uri "peewee" version))
1760 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
1761 (build-system python-build-system)
1763 `(#:tests? #f)) ; Fails to import test data
1765 `(("python-cython" ,python-cython)))
1766 (home-page "https://github.com/coleifer/peewee/")
1767 (synopsis "Small object-relational mapping utility")
1769 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1770 handles converting between pythonic values and those used by databases, so you
1771 can use Python types in your code without having to worry. It has built-in
1772 support for sqlite, mysql and postgresql. If you already have a database, you
1773 can autogenerate peewee models using @code{pwiz}, a model generator.")
1774 (license license:expat)))
1776 (define-public python2-peewee
1777 (package-with-python2 python-peewee))
1779 (define-public sqlcipher
1786 (uri (string-append "https://github.com/sqlcipher/" name
1787 "/archive/v" version ".tar.gz"))
1789 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1790 (file-name (string-append name "-" version ".tar.gz"))))
1791 (build-system gnu-build-system)
1793 `(("libcrypto" ,openssl)
1794 ("libtcl8.6" ,tcl))) ; required for running the tests
1799 '("--enable-tempstore=yes"
1800 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1801 "LDFLAGS=-lcrypto -ltcl8.6"
1803 ;; tests cannot be run from the Makefile
1804 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1805 #:test-target "testfixture"
1807 (modify-phases %standard-phases
1808 (add-before 'check 'build-test-runner
1809 (assoc-ref %standard-phases 'check))
1813 (system* "./testfixture" "test/crypto.test")))))))
1814 (home-page "https://www.zetetic.net/sqlcipher/")
1816 "Library providing transparent encryption of SQLite database files")
1817 (description "SQLCipher is an implementation of SQLite, extended to
1818 provide transparent 256-bit AES encryption of database files. Pages are
1819 encrypted before being written to disk and are decrypted when read back. It’s
1820 well suited for protecting embedded application databases and for mobile
1823 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1824 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1825 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1826 ;; source files are in the public domain.
1827 (license (list license:public-domain license:bsd-3))))
1829 (define-public python-pyodbc-c
1831 (name "python-pyodbc-c")
1836 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1837 "archive.tar.gz?ref=v" version))
1840 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1841 (file-name (string-append name "-" version ".tar.gz"))))
1842 (build-system python-build-system)
1844 `(("unixodbc" ,unixodbc)))
1846 `(;; No unit tests exist.
1848 (home-page "https://github.com/mkleehammer/pyodbc")
1849 (synopsis "Python ODBC Library")
1850 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1852 (license (license:x11-style "file://LICENSE.TXT"))))
1854 (define-public python2-pyodbc-c
1855 (package-with-python2 python-pyodbc-c))
1857 (define-public python-pyodbc
1859 (name "python-pyodbc")
1864 (uri (pypi-uri "pyodbc" version))
1867 "0a83zwz3h1agshnsc6r7al6q83222w8601gpzzzjvjz5m56ghmcn"))
1868 (file-name (string-append name "-" version ".tar.gz"))))
1869 (build-system python-build-system)
1871 `(("unixodbc" ,unixodbc)))
1873 `(;; No unit tests exist.
1875 (home-page "https://github.com/mkleehammer/pyodbc")
1876 (synopsis "Python ODBC Library")
1877 (description "@code{python-pyodbc} provides a Python DB-API driver
1879 (license (license:x11-style "file:///LICENSE.TXT"))))
1881 (define-public python2-pyodbc
1882 (package-with-python2 python-pyodbc))
1884 (define-public mdbtools
1891 (uri (string-append "https://github.com/brianb/mdbtools/archive/"
1895 "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
1896 (file-name (string-append name "-" version ".tar.gz"))))
1897 (build-system gnu-build-system)
1901 `(("autoconf" ,autoconf)
1902 ("automake" ,automake)
1903 ("libtool" ,libtool)
1904 ("pkg-config" ,pkg-config)
1905 ("txt2man" ,txt2man)
1909 (modify-phases %standard-phases
1910 (add-after 'unpack 'autoreconf
1912 (zero? (system* "autoreconf" "-vfi")))))))
1913 (home-page "http://mdbtools.sourceforge.net/")
1914 (synopsis "Read Microsoft Access databases")
1915 (description "MDB Tools is a set of tools and applications to read the
1916 proprietary MDB file format used in Microsoft's Access database package. This
1917 includes programs to export schema and data from Microsoft's Access database
1918 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
1919 etc., and an SQL engine for performing simple SQL queries.")
1920 (license (list license:lgpl2.0
1923 (define-public python-lmdb
1925 (name "python-lmdb")
1929 (uri (pypi-uri "lmdb" version))
1932 "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql"))
1933 (modules '((guix build utils)))
1935 ;; Delete bundled lmdb source files.
1937 (for-each delete-file (list "lib/lmdb.h"
1942 (build-system python-build-system)
1947 (modify-phases %standard-phases
1948 (add-before 'build 'use-system-lmdb
1949 (lambda* (#:key inputs #:allow-other-keys)
1950 (let ((lmdb (assoc-ref inputs "lmdb")))
1951 (setenv "LMDB_FORCE_SYSTEM" "set")
1952 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
1953 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
1955 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
1957 (home-page "https://github.com/dw/py-lmdb")
1958 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
1960 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
1961 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
1963 (list license:openldap2.8
1964 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
1965 ;; but not actually needed on platforms currently supported by Guix.
1968 (define-public python2-lmdb
1969 (package-with-python2 python-lmdb))
1971 (define-public python-orator
1973 (name "python-orator")
1977 (uri (pypi-uri "orator" version))
1980 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
1981 (build-system python-build-system)
1984 (modify-phases %standard-phases
1985 (add-after 'unpack 'loosen-dependencies
1986 ;; Tests are not actually run since they are not included with the
1987 ;; distributed package, but dependencies are checked.
1989 (substitute* "setup.py"
1991 (("flexmock==0.9.7") "flexmock")
1992 ;; The pytest-mock package is out of date, so we remove minimum
1993 ;; version requirement.
1994 (("pytest-mock.*'") "pytest-mock'"))
1997 `(("python-pytest-mock" ,python-pytest-mock)
1998 ("python-pytest" ,python-pytest)
1999 ("python-flexmock" ,python-flexmock)))
2001 `(("python-backpack" ,python-backpack)
2002 ("python-blinker" ,python-blinker)
2003 ("python-cleo" ,python-cleo)
2004 ("python-faker" ,python-faker)
2005 ("python-inflection" ,python-inflection)
2006 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2007 ("python-pendulum" ,python-pendulum)
2008 ("python-pyaml" ,python-pyaml)
2009 ("python-pygments" ,python-pygments)
2010 ("python-simplejson" ,python-simplejson)
2011 ("python-six" ,python-six)
2012 ("python-wrapt" ,python-wrapt)))
2013 (home-page "https://orator-orm.com/")
2014 (synopsis "ActiveRecord ORM for Python")
2016 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2017 implementation for Python.")
2018 (license license:expat)
2019 (properties `((python2-variant . ,(delay python2-orator))))))
2021 (define-public python2-orator
2022 (package-with-python2 (strip-python2-variant python-orator)))
2024 (define-public virtuoso-ose
2026 (name "virtuoso-ose")
2032 "https://github.com/openlink/virtuoso-opensource/releases/"
2033 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2035 (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002"))))
2036 (build-system gnu-build-system)
2038 `(#:tests? #f)) ; Tests require a network connection.
2040 `(("openssl" ,openssl)
2041 ("net-tools" ,net-tools)))
2042 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2043 (synopsis "Multi-model database system")
2044 (description "Virtuoso is a scalable cross-platform server that combines
2045 relational, graph, and document data management with web application server
2046 and web services platform functionality.")
2047 ;; configure: error: ... can only be build on 64bit platforms
2048 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2049 (license license:gpl2)))
2051 (define-public r-rmysql
2058 (uri (cran-uri "RMySQL" version))
2061 "01891kn263b02y6addgpy3gn5axg7m10bqbqv7dg9yx9k85am590"))))
2062 (properties `((upstream-name . "RMySQL")))
2063 (build-system r-build-system)
2065 `(("pkg-config" ,pkg-config)))
2067 `(("mariadb" ,mariadb)
2070 `(("r-dbi" ,r-dbi)))
2071 (home-page "https://github.com/r-dbi/RMySQL")
2072 (synopsis "Database interface and MySQL driver for R")
2074 "This package provides a DBI interface to MySQL / MariaDB. The RMySQL
2075 package contains an old implementation based on legacy code from S-PLUS which
2076 is being phased out. A modern MySQL client based on Rcpp is available from
2077 the RMariaDB package.")
2078 (license license:gpl2)))
2080 (define-public python-ccm
2087 (uri (pypi-uri "ccm" version))
2090 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2091 (build-system python-build-system)
2093 `(("python-pyyaml" ,python-pyyaml)
2094 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2096 ("python-psutil" ,python-psutil)
2097 ("python-six" ,python-six)))
2098 (home-page "https://github.com/pcmanus/ccm")
2099 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2101 (description "Cassandra Cluster Manager is a development tool for testing
2102 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2104 (license license:asl2.0)))
2106 (define-public python2-ccm
2107 (package-with-python2 python-ccm))
2109 (define-public python2-pysqlite
2111 (name "python2-pysqlite")
2116 (uri (pypi-uri "pysqlite" version))
2119 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2120 (build-system python-build-system)
2122 `(("sqlite" ,sqlite)))
2124 `(#:python ,python-2 ; incompatible with Python 3
2125 #:tests? #f)) ; no test target
2126 (home-page "https://github.com/ghaering/pysqlite")
2127 (synopsis "SQLite bindings for Python")
2129 "Pysqlite provides SQLite bindings for Python that comply to the
2130 Database API 2.0T.")
2131 (license license:zlib)))
2133 (define-public python-sqlalchemy
2135 (name "python-sqlalchemy")
2140 (uri (string-append "https://pypi.python.org/packages/source/S/"
2141 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2144 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
2145 (build-system python-build-system)
2147 `(("python-cython" ,python-cython) ;for c extensions
2148 ("python-pytest" ,python-pytest)
2149 ("python-mock" ,python-mock))) ;for tests
2152 (modify-phases %standard-phases
2154 (lambda _ (zero? (system* "py.test")))))))
2155 (home-page "http://www.sqlalchemy.org")
2156 (synopsis "Database abstraction library")
2158 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2159 gives application developers the full power and flexibility of SQL. It
2160 provides a full suite of well known enterprise-level persistence patterns,
2161 designed for efficient and high-performing database access, adapted into a
2162 simple and Pythonic domain language.")
2163 (license license:x11)))
2165 (define-public python2-sqlalchemy
2166 (package-with-python2 python-sqlalchemy))
2168 (define-public python-sqlalchemy-utils
2170 (name "python-sqlalchemy-utils")
2175 (uri (pypi-uri "SQLAlchemy-Utils" version))
2178 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2179 (build-system python-build-system)
2181 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2183 ;; (modify-phases %standard-phases
2186 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2188 `(("python-six" ,python-six)
2189 ("python-sqlalchemy" ,python-sqlalchemy)))
2191 `(("python-dateutil" ,python-dateutil)
2192 ("python-flexmock" ,python-flexmock)
2193 ("python-psycopg2" ,python-psycopg2)
2194 ("python-pytest" ,python-pytest)
2195 ("python-pytz" ,python-pytz)))
2196 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2197 (synopsis "Various utility functions for SQLAlchemy")
2199 "SQLAlchemy-utils provides various utility functions and custom data types
2200 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2202 You might also want to install the following optional dependencies:
2204 @item @code{python-passlib}
2205 @item @code{python-babel}
2206 @item @code{python-cryptography}
2207 @item @code{python-pytz}
2208 @item @code{python-psycopg2}
2209 @item @code{python-furl}
2210 @item @code{python-flask-babel}
2213 (license license:bsd-3)))
2215 (define-public python2-sqlalchemy-utils
2216 (package-with-python2 python-sqlalchemy-utils))
2218 (define-public python-alembic
2220 (name "python-alembic")
2225 (uri (pypi-uri "alembic" version))
2228 "0cm73vabrqj92v7a0wwvldj8j7bc7dwv358kvkk7p87gx7mm2a04"))))
2229 (build-system python-build-system)
2231 `(("python-mock" ,python-mock)
2232 ("python-pytest-cov" ,python-pytest-cov)))
2234 `(("python-dateutil" ,python-dateutil)
2235 ("python-sqlalchemy" ,python-sqlalchemy)
2236 ("python-mako" ,python-mako)
2237 ("python-editor" ,python-editor)))
2238 (home-page "https://bitbucket.org/zzzeek/alembic")
2240 "Database migration tool for SQLAlchemy")
2242 "Alembic is a lightweight database migration tool for usage with the
2243 SQLAlchemy Database Toolkit for Python.")
2244 (license license:expat)))
2246 (define-public python2-alembic
2247 (package-with-python2 python-alembic))
2249 (define-public python-pickleshare
2251 (name "python-pickleshare")
2256 (uri (pypi-uri "pickleshare" version))
2258 (base32 "0yvk14dzxk7g6qpr7iw23vzqbsr0dh4ij4xynkhnzpfz4xr2bac4"))))
2259 (build-system python-build-system)
2261 `(#:phases (modify-phases %standard-phases
2264 (invoke "pytest"))))))
2266 `(("python-pytest" ,python-pytest)))
2267 (home-page "https://github.com/vivainio/pickleshare")
2268 (synopsis "Tiny key value database with concurrency support")
2270 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2271 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2272 shelve, many processes can access the database simultaneously. Changing a
2273 value in database is immediately visible to other processes accessing the same
2274 database. Concurrency is possible because the values are stored in separate
2275 files. Hence the “database” is a directory where all files are governed by
2277 (properties `((python2-variant . ,(delay python2-pickleshare))))
2278 (license license:expat)))
2280 (define-public python2-pickleshare
2281 (let ((pickleshare (package-with-python2
2282 (strip-python2-variant python-pickleshare))))
2283 (package (inherit pickleshare)
2284 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2285 ,@(package-propagated-inputs pickleshare))))))
2287 (define-public python-apsw
2289 (name "python-apsw")
2290 (version "3.20.1-r1")
2294 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2296 (file-name (string-append "apsw-" version ".tar.gz"))
2299 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2300 (build-system python-build-system)
2302 `(("sqlite" ,sqlite)))
2305 (modify-phases %standard-phases
2308 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2310 (add-after 'build 'build-test-helper
2312 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2313 "-I." "-Isqlite3" "src/testextension.c")
2316 (add-after 'install 'check
2317 (lambda* (#:key inputs outputs #:allow-other-keys)
2318 (add-installed-pythonpath inputs outputs)
2319 (invoke "python" "setup.py" "test")
2321 (home-page "https://github.com/rogerbinns/apsw/")
2322 (synopsis "Another Python SQLite Wrapper")
2323 (description "APSW is a Python wrapper for the SQLite
2324 embedded relational database engine. In contrast to other wrappers such as
2325 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2326 translate the complete SQLite API into Python.")
2327 (license license:zlib)))
2329 (define-public python2-apsw
2330 (package-with-python2 python-apsw))
2332 (define-public python2-neo4j-driver
2334 (name "python2-neo4j-driver")
2335 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2339 (uri (pypi-uri "neo4j-driver" version))
2342 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2343 (build-system python-build-system)
2345 `(#:python ,python-2))
2346 (home-page "https://neo4j.com/developer/python/")
2347 (synopsis "Neo4j driver code written in Python")
2348 (description "This package provides the Neo4j Python driver that connects
2349 to the database using Neo4j's binary protocol. It aims to be minimal, while
2350 being idiomatic to Python.")
2351 (license license:asl2.0)))
2353 (define-public python2-py2neo
2355 (name "python2-py2neo")
2359 (uri (pypi-uri "py2neo" version))
2362 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2363 (build-system python-build-system)
2365 `(#:python ,python-2))
2366 (home-page "http://py2neo.org")
2367 (synopsis "Library and toolkit for working with Neo4j in Python")
2368 (description "This package provides a client library and toolkit for
2369 working with Neo4j from within Python applications and from the command
2370 line. The core library has no external dependencies and has been carefully
2371 designed to be easy and intuitive to use.")
2372 (license license:asl2.0)))
2374 (define-public python-psycopg2
2376 (name "python-psycopg2")
2381 (uri (pypi-uri "psycopg2" version))
2384 "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
2385 (build-system python-build-system)
2387 ;; Tests would require a postgresql database "psycopg2_test"
2388 ;; and a running postgresql database management service.
2389 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2391 `(("postgresql" ,postgresql))) ; libpq
2392 (home-page "http://initd.org/psycopg/")
2393 (synopsis "Python PostgreSQL adapter")
2395 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
2396 (license license:lgpl3+)))
2398 (define-public python2-psycopg2
2399 (package-with-python2 python-psycopg2))
2401 (define-public python-sadisplay
2403 (name "python-sadisplay")
2408 (uri (pypi-uri "sadisplay" version))
2411 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2412 (build-system python-build-system)
2414 `(("python-sqlalchemy" ,python-sqlalchemy)))
2417 `(("python-nose" ,python-nose)))
2418 (home-page "https://bitbucket.org/estin/sadisplay")
2419 (synopsis "SQLAlchemy schema displayer")
2420 (description "This package provides a program to build Entity
2421 Relationship diagrams from a SQLAlchemy model (or directly from the
2423 (license license:bsd-3)))
2425 (define-public python2-sadisplay
2426 (package-with-python2 python-sadisplay))
2428 (define-public python-mysqlclient
2430 (name "python-mysqlclient")
2435 (uri (pypi-uri "mysqlclient" version))
2438 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
2439 (build-system python-build-system)
2441 `(("mariadb" ,mariadb)
2442 ("nose" ,python-nose)
2443 ("mock" ,python-mock)
2444 ("py.test" ,python-pytest)))
2448 ("openssl" ,openssl)))
2449 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2450 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2451 (description "MySQLdb is an interface to the popular MySQL database server
2452 for Python. The design goals are:
2454 @item Compliance with Python database API version 2.0 [PEP-0249],
2455 @item Thread-safety,
2456 @item Thread-friendliness (threads will not block each other).
2458 (license license:gpl2)))
2460 (define-public python2-mysqlclient
2461 (package-with-python2 python-mysqlclient))
2463 (define-public python-hiredis
2465 (name "python-hiredis")
2470 (uri (pypi-uri "hiredis" version))
2473 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2474 (build-system python-build-system)
2478 (home-page "https://github.com/redis/hiredis-py")
2479 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2480 (description "Python-hiredis is a python extension that wraps protocol
2481 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2482 (license license:bsd-3)))
2484 (define-public python2-hiredis
2485 (package-with-python2 python-hiredis))
2487 (define-public python-fakeredis
2489 (name "python-fakeredis")
2494 (uri (pypi-uri "fakeredis" version))
2497 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2498 (build-system python-build-system)
2502 (home-page "https://github.com/jamesls/fakeredis")
2503 (synopsis "Fake implementation of redis API for testing purposes")
2504 (description "Fakeredis is a pure python implementation of the redis-py
2505 python client that simulates talking to a redis server. This was created for a
2506 single purpose: to write unittests. Setting up redis is not hard, but many time
2507 you want to write unittests that do not talk to an external server (such as
2508 redis). This module now allows tests to simply use this module as a reasonable
2509 substitute for redis.")
2510 (license license:bsd-3)))
2512 (define-public python2-fakeredis
2513 (package-with-python2 python-fakeredis))
2515 (define-public python-redis
2517 (name "python-redis")
2522 (uri (pypi-uri "redis" version))
2524 (base32 "03vcgklykny0g0wpvqmy8p6azi2s078317wgb2xjv5m2rs9sjb52"))))
2525 (build-system python-build-system)
2526 ;; Tests require a running Redis server
2527 (arguments '(#:tests? #f))
2528 ;; As long as we are not running test, we do not need this input :-)
2530 ;; `(("python-pytest" ,python-pytest)))
2531 (home-page "https://github.com/andymccurdy/redis-py")
2532 (synopsis "Redis Python client")
2534 "This package provides a Python interface to the Redis key-value store.")
2535 (license license:expat)))
2537 (define-public python2-redis
2538 (package-with-python2 python-redis))
2540 (define-public python-rq
2547 (uri (pypi-uri "rq" version))
2549 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
2550 (build-system python-build-system)
2552 `(("python-click" ,python-click)
2553 ("python-redis" ,python-redis)))
2554 (home-page "http://python-rq.org/")
2555 (synopsis "Simple job queues for Python")
2557 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2558 processing them in the background with workers. It is backed by Redis and it
2559 is designed to have a low barrier to entry.")
2560 (license license:bsd-2)))
2562 (define-public python2-rq
2563 (package-with-python2 python-rq))
2565 (define-public python-trollius-redis
2567 (name "python-trollius-redis")
2572 (uri (pypi-uri "trollius_redis" version))
2575 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2576 (build-system python-build-system)
2577 ;; TODO: Tests require packaging 'hiredis'.
2578 (arguments '(#:tests? #f))
2579 (home-page "https://github.com/benjolitz/trollius-redis")
2580 (synopsis "Port of asyncio-redis to trollius")
2581 (description "@code{trollius-redis} is a Redis client for Python
2582 trollius. It is an asynchronious IO (PEP 3156) implementation of the
2584 (license license:bsd-2)))
2586 (define-public python2-trollius-redis
2587 (package-with-python2 python-trollius-redis))
2589 (define-public python-sqlparse
2591 (name "python-sqlparse")
2595 (uri (pypi-uri "sqlparse" version))
2598 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2599 (build-system python-build-system)
2602 (modify-phases %standard-phases
2604 (lambda _ (zero? (system* "py.test")))))))
2606 `(("python-pytest" ,python-pytest)))
2607 (home-page "https://github.com/andialbrecht/sqlparse")
2608 (synopsis "Non-validating SQL parser")
2609 (description "Sqlparse is a non-validating SQL parser for Python. It
2610 provides support for parsing, splitting and formatting SQL statements.")
2611 (license license:bsd-3)))
2613 (define-public python2-sqlparse
2614 (package-with-python2 python-sqlparse))
2616 (define-public python-sql
2623 (uri (pypi-uri "python-sql" version))
2626 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
2627 (build-system python-build-system)
2628 (home-page "https://python-sql.tryton.org/")
2629 (synopsis "Library to write SQL queries in a pythonic way")
2630 (description "@code{python-sql} is a library to write SQL queries, that
2631 transforms idiomatic python function calls to well-formed SQL queries.")
2632 (license license:bsd-3)))
2634 (define-public python2-sql
2635 (package-with-python2 python-sql))
2637 (define-public mongo-tools
2639 (name "mongo-tools")
2642 (origin (method git-fetch)
2644 (url "https://github.com/mongodb/mongo-tools")
2645 (commit (string-append "r" version))))
2646 (file-name (git-file-name name version))
2649 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
2650 (build-system go-build-system)
2652 `(#:import-path "github.com/mongodb/mongo-tools"
2653 #:modules ((srfi srfi-1)
2654 (guix build go-build-system)
2658 '("bsondump" "mongodump" "mongoexport" "mongofiles"
2659 "mongoimport" "mongooplog" "mongorestore"
2660 "mongostat" "mongotop")))
2661 (modify-phases %standard-phases
2662 (add-after 'unpack 'delete-bundled-source-code
2664 (delete-file-recursively
2665 "src/github.com/mongodb/mongo-tools/vendor")
2667 ;; We don't need to install the source code for end-user applications
2668 (delete 'install-source)
2671 (every (lambda (tool)
2674 ;; This is where the tests expect to find the
2676 "-o" ,(string-append
2677 "src/github.com/mongodb/mongo-tools/bin/"
2680 "-tags=\"ssl sasl\""
2682 "-extldflags=-Wl,-z,now,-z,relro"
2684 "src/github.com/mongodb/mongo-tools/"
2685 tool "/main/" tool ".go"))))
2686 (simple-format #t "build: running ~A\n"
2687 (string-join command))
2688 (apply invoke command)))
2692 (with-directory-excursion "src"
2693 (every (lambda (tool)
2696 (string-append "github.com/mongodb/mongo-tools/" tool)))
2699 (lambda* (#:key outputs #:allow-other-keys)
2700 (for-each (lambda (tool)
2702 (string-append "src/github.com/mongodb/mongo-tools/bin/" tool)
2703 (string-append (assoc-ref outputs "out")
2707 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
2708 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
2709 ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
2710 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
2711 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
2712 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
2713 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
2714 (home-page "https://github.com/mongodb/mongo-tools")
2715 (synopsis "Various tools for interacting with MongoDB and BSON")
2717 "This package includes a collection of tools related to MongoDB.
2720 Display BSON files in a human-readable format
2722 Convert data from JSON, TSV or CSV and insert them into a collection
2724 Write an existing collection to CSV or JSON format
2725 @item mongodump/mongorestore
2726 Dump MongoDB backups to disk in the BSON format
2728 Read MongoDB backups in the BSON format, and restore them to a live database
2730 Monitor live MongoDB servers, replica sets, or sharded clusters
2732 Read, write, delete, or update files in GridFS
2734 Replay oplog entries between MongoDB servers
2736 Monitor read/write activity on a mongo server
2738 (license license:asl2.0)))