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, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
15 ;;; Copyright © 2016, 2017, 2018 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, 2019 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017, 2018 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, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
34 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
35 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
36 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
37 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
38 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
39 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
40 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
42 ;;; This file is part of GNU Guix.
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57 (define-module (gnu packages databases)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages admin)
60 #:use-module (gnu packages algebra)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages avahi)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages bash)
65 #:use-module (gnu packages bison)
66 #:use-module (gnu packages boost)
67 #:use-module (gnu packages check)
68 #:use-module (gnu packages cmake)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages crypto)
71 #:use-module (gnu packages curl)
72 #:use-module (gnu packages cyrus-sasl)
73 #:use-module (gnu packages dbm)
74 #:use-module (gnu packages emacs)
75 #:use-module (gnu packages flex)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnupg)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages time)
82 #:use-module (gnu packages golang)
83 #:use-module (gnu packages jemalloc)
84 #:use-module (gnu packages language)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages ncurses)
89 #:use-module (gnu packages onc-rpc)
90 #:use-module (gnu packages parallel)
91 #:use-module (gnu packages pcre)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages perl-check)
94 #:use-module (gnu packages perl-web)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages popt)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages python-crypto)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-science)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages rdf)
103 #:use-module (gnu packages readline)
104 #:use-module (gnu packages ruby)
105 #:use-module (gnu packages serialization)
106 #:use-module (gnu packages sphinx)
107 #:use-module (gnu packages sqlite)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages terminals)
110 #:use-module (gnu packages textutils)
111 #:use-module (gnu packages tls)
112 #:use-module (gnu packages valgrind)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages xml)
115 #:use-module ((guix licenses) #:prefix license:)
116 #:use-module (guix packages)
117 #:use-module (guix download)
118 #:use-module (guix bzr-download)
119 #:use-module (guix git-download)
120 #:use-module (guix build-system emacs)
121 #:use-module (guix build-system gnu)
122 #:use-module (guix build-system go)
123 #:use-module (guix build-system perl)
124 #:use-module (guix build-system python)
125 #:use-module (guix build-system ruby)
126 #:use-module (guix build-system cmake)
127 #:use-module (guix build-system scons)
128 #:use-module (guix build-system trivial)
129 #:use-module ((guix build utils) #:hide (which))
130 #:use-module (guix utils)
131 #:use-module (srfi srfi-1)
132 #:use-module (srfi srfi-26)
133 #:use-module (ice-9 match))
135 (define-public 4store
142 (url "https://github.com/4store/4store.git")
143 (commit (string-append "v" version))))
144 (file-name (git-file-name name version))
146 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
147 (patches (search-patches "4store-unset-preprocessor-directive.patch"
148 "4store-fix-buildsystem.patch"))))
149 (build-system gnu-build-system)
153 ("autoconf" ,autoconf)
154 ("automake" ,automake)
155 ("gettext" ,gettext-minimal)
157 ("pcre" ,pcre "bin") ;for 'pcre-config'
158 ("pkg-config" ,pkg-config)))
164 ("readline" ,readline)
166 ("cyrus-sasl" ,cyrus-sasl)
168 ("util-linux" ,util-linux)))
169 ;; http://www.4store.org has been down for a while now.
170 (home-page "https://github.com/4store/4store")
171 (synopsis "Clustered RDF storage and query engine")
172 (description "4store is a RDF/SPARQL store written in C, supporting
173 either single machines or networked clusters.")
174 (license license:gpl3+)))
176 (define-public go-gopkg.in-mgo.v2
178 (name "go-gopkg.in-mgo.v2")
179 (version "2016.08.01")
183 (url "https://github.com/go-mgo/mgo")
184 (commit (string-append "r" version))))
185 (file-name (git-file-name name version))
188 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
189 (build-system go-build-system)
191 `(#:import-path "gopkg.in/mgo.v2"
192 ;; TODO: The tests fail as MongoDB fails to start
193 ;; Error parsing command line: unrecognised option '--chunkSize'
196 (modify-phases %standard-phases
197 (delete 'reset-gzip-timestamps)
198 (add-before 'check 'start-mongodb
199 (lambda* (#:key tests? #:allow-other-keys)
201 (with-directory-excursion "src/gopkg.in/mgo.v2"
202 (invoke "make" "startdb")))
204 (add-after 'check 'stop'mongodb
205 (lambda* (#:key tests? #:allow-other-keys)
207 (with-directory-excursion "src/gopkg.in/mgo.v2"
208 (invoke "make" "stopdb")))
211 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
213 ("daemontools" ,daemontools)))
214 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
216 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
217 It implements a rich selection of features under a simple API following
218 standard Go idioms.")
219 (home-page "http://labix.org/mgo")
220 (license license:bsd-2)))
222 (define-public ephemeralpg
230 "http://eradman.com/ephemeralpg/code/ephemeralpg-"
233 (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4"))))
234 (build-system gnu-build-system)
236 '(#:make-flags (list "CC=gcc"
237 (string-append "PREFIX=" %output))
239 (modify-phases %standard-phases
242 (lambda* (#:key inputs #:allow-other-keys)
243 ;; The intention for one test is to test without PostgreSQL on
244 ;; the $PATH, so replace the test $PATH with just the util-linux
245 ;; bin, which contains getopt. It will hopefully be possible to
246 ;; remove this for releases after 2.8.
247 (substitute* "test.rb"
249 (string-append (assoc-ref inputs "util-linux")
251 ;; Set the LC_ALL=C as some tests use sort, and the locale
252 ;; affects the order. It will hopefully be possible to remove
253 ;; this for releases after 2.8.
254 (setenv "LC_ALL" "C")
255 (invoke "ruby" "test.rb")
257 (add-after 'install 'wrap
258 (lambda* (#:key inputs outputs #:allow-other-keys)
259 (let ((out (assoc-ref outputs "out")))
260 (wrap-program (string-append out "/bin/pg_tmp")
262 (,(string-append (assoc-ref inputs "util-linux")
264 ,(string-append (assoc-ref inputs "postgresql")
267 ,(string-append out "/bin")))))
270 `(("postgresql" ,postgresql)
271 ("util-linux" ,util-linux)))
274 (home-page "http://eradman.com/ephemeralpg/")
275 (synopsis "Run temporary PostgreSQL databases")
277 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
278 like running software test suites. Temporary databases created with
279 @code{pg_tmp} have a limited shared memory footprint and are automatically
280 garbage-collected after a configurable number of seconds (the default is
282 (license license:isc)))
284 (define-public es-dump-restore
286 (name "es-dump-restore")
291 (uri (rubygems-uri "es_dump_restore" version))
294 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
295 (build-system ruby-build-system)
297 '(#:tests? #f)) ;; No testsuite.
299 `(("ruby-httpclient" ,ruby-httpclient)
300 ("ruby-multi-json" ,ruby-multi-json)
301 ("ruby-progress_bar" ,ruby-progress_bar)
302 ("ruby-rubyzip" ,ruby-rubyzip)
303 ("ruby-thor" ,ruby-thor)))
304 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
306 "This package provides a utility for dumping the contents of an
307 ElasticSearch index to a compressed file and restoring the dumpfile back to an
308 ElasticSearch server")
309 (home-page "https://github.com/patientslikeme/es_dump_restore")
310 (license license:expat)))
312 (define-public leveldb
319 (url "https://github.com/google/leveldb")
321 (file-name (git-file-name name version))
324 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
325 (build-system cmake-build-system)
327 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
329 `(("snappy" ,snappy)))
330 (home-page "https://github.com/google/leveldb")
331 (synopsis "Fast key-value storage library")
333 "LevelDB is a fast key-value storage library that provides an ordered
334 mapping from string keys to string values.")
335 (license license:bsd-3)))
337 (define-public memcached
345 "https://memcached.org/files/memcached-" version ".tar.gz"))
347 (base32 "0nnccb697jhdn5gqrh3phibzs6xr4nf4ryv7nmyv5vf11n4jr8j5"))))
348 (build-system gnu-build-system)
350 `(("libevent" ,libevent)
351 ("cyrus-sasl" ,cyrus-sasl)))
352 (home-page "https://memcached.org/")
353 (synopsis "In-memory caching service")
354 (description "Memcached is an in-memory key-value store. It has a small
355 and generic API, and was originally intended for use with dynamic web
357 (license license:bsd-3)))
359 (define-public libmemcached
361 (name "libmemcached")
363 ;; We build from the sources since we want to build the extra HTML
364 ;; documentation which is not included with the release.
368 (url "lp:libmemcached/1.0")
369 (revision (string-append "tag:" version))))
370 (file-name (string-append name "-" version "-checkout"))
373 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))))
374 (build-system gnu-build-system)
376 `(("memcached" ,memcached)
378 ("autoconf" ,autoconf)
379 ("automake" ,automake)
383 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
385 `(("libevent" ,libevent)
386 ("cyrus-sasl" ,cyrus-sasl)))
387 (outputs '("out" "doc"))
390 (modify-phases %standard-phases
391 (add-before 'bootstrap 'fix-configure.ac
392 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
393 ;; get the error ``configure: error: cannot find install-sh,
394 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
395 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
396 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
398 (delete-file "bootstrap.sh") ;not useful in the context of Guix
399 (substitute* "configure.ac"
400 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
401 (("(^AC_INIT.*)" anchor)
402 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
404 (add-before 'bootstrap 'disable-failing-tests
405 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
407 ;; Mark some heavily failing test suites as expected to fail.
408 (substitute* "Makefile.am"
409 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
410 (string-append xfail_tests " tests/testudp"
411 " tests/libmemcached-1.0/testapp"
412 " tests/libmemcached-1.0/testsocket")))
413 ;; Disable two tests of the unittest test suite.
414 (substitute* "libtest/unittest.cc"
415 ((".*echo_fubar_BINARY \\},.*") "")
416 ((".*application_doesnotexist_BINARY \\},.*") ""))
418 (add-after 'disable-dns-tests 'build-and-install-html-doc
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let ((html (string-append (assoc-ref outputs "doc")
421 "/share/doc/libmemcached/html/")))
422 (invoke "make" "install-html")
423 ;; Cleanup useless files.
424 (for-each delete-file-recursively
425 (map (lambda (x) (string-append html x))
426 '("_sources" ".doctrees" ".buildinfo"))))
428 (home-page "https://libmemcached.org/")
429 (synopsis "C++ library for memcached")
430 (description "libMemcached is a library to use memcached in C/C++
431 applications. It comes with a complete reference guide and documentation of
432 the API, and provides features such as:
434 @item Asynchronous and synchronous transport support
435 @item Consistent hashing and distribution
436 @item Tunable hashing algorithm to match keys
437 @item Access to large object support
438 @item Local replication
440 (license license:bsd-3)))
442 (define-public python-pylibmc
444 (name "python-pylibmc")
449 (uri (pypi-uri "pylibmc" version))
451 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
452 (build-system python-build-system)
455 (modify-phases %standard-phases
456 (add-before 'check 'start-memcached-daemon
457 ;; The test suite requires a memcached server.
459 (invoke "memcached" "-d"))))))
461 `(("memcached" ,memcached)
462 ("python-nose" ,python-nose)))
464 `(("libmemcached" ,libmemcached)
466 ("cyrus-sasl" ,cyrus-sasl)))
467 (home-page "http://sendapatch.se/projects/pylibmc/")
468 (synopsis "Python client for memcached")
470 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
471 around TangentOrg’s libmemcached library, and can be used as a drop-in
472 replacement for the code@{python-memcached} library.")
473 (license license:bsd-3)))
475 (define-public python2-pylibmc
476 (package-with-python2 python-pylibmc))
478 (define-public mongodb
484 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
486 (file-name (string-append name "-" version ".tar.gz"))
488 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
489 (modules '((guix build utils)))
492 (for-each (lambda (dir)
493 (delete-file-recursively
494 (string-append "src/third_party/" dir)))
495 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
496 "valgrind-3.11.0" "wiredtiger"
497 "yaml-cpp-0.5.3" "zlib-1.2.8"))
501 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
502 (build-system scons-build-system)
504 `(("openssl" ,openssl-1.0)
506 ,@(match (%current-system)
507 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
508 `(("wiredtiger" ,wiredtiger)))
510 ("yaml-cpp" ,yaml-cpp)
514 `(("valgrind" ,valgrind)
517 ("python2-pymongo" ,python2-pymongo)
518 ("python2-pyyaml" ,python2-pyyaml)
521 `(#:scons ,scons-python2
523 (let ((common-options
524 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
526 ;; wiredtiger is 64-bit only
527 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
529 '("i686-linux" "armhf-linux"))
531 ``"--use-system-wiredtiger")
533 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
534 ;; --use-system-boost
535 "--use-system-snappy"
537 "--use-system-valgrind"
538 ;; "--use-system-stemmer" TODO: Missing relevant package
540 "--disable-warnings-as-errors"
541 ,(format #f "--jobs=~a" (parallel-job-count))
543 (modify-phases %standard-phases
544 (add-after 'unpack 'patch
546 ;; Remove use of GNU extensions in parse_number_test.cpp, to
547 ;; allow compiling with GCC 7 or later
548 ;; https://jira.mongodb.org/browse/SERVER-28063
549 (substitute* "src/mongo/base/parse_number_test.cpp"
550 (("0xabcab\\.defdefP-10")
551 "687.16784283419838"))
553 (add-after 'unpack 'scons-propagate-environment
555 ;; Modify the SConstruct file to arrange for
556 ;; environment variables to be propagated.
557 (substitute* "SConstruct"
558 (("^env = Environment\\(")
559 "env = Environment(ENV=os.environ, "))
561 (add-after 'unpack 'create-version-file
563 (call-with-output-file "version.json"
565 (display ,(simple-format #f "{
571 (apply invoke `("scons"
573 "mongod" "mongo" "mongos"))))
575 (lambda* (#:key tests? inputs #:allow-other-keys)
577 (string-append (assoc-ref inputs "tzdata")
580 ;; Note that with the tests, especially the unittests, the
581 ;; build can take up to ~45GB of space, as many tests are
582 ;; individual executable files, with some being hundreds of
583 ;; megabytes in size.
584 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
585 (substitute* "build/unittests.txt"
586 ;; TODO: Don't run the async_stream_test, as it hangs
587 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
589 ;; TODO: This test fails
590 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
591 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
593 (invoke "python" "buildscripts/resmoke.py"
594 "--suites=dbtest,unittests"
595 (format #f "--jobs=~a" (parallel-job-count))))
598 (lambda* (#:key outputs #:allow-other-keys)
599 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
600 (install-file "mongod" bin)
601 (install-file "mongos" bin)
602 (install-file "mongo" bin))
604 (home-page "https://www.mongodb.org/")
605 (synopsis "High performance and high availability document database")
607 "Mongo is a high-performance, high availability, schema-free
608 document-oriented database. A key goal of MongoDB is to bridge the gap
609 between key/value stores (which are fast and highly scalable) and traditional
610 RDBMS systems (which are deep in functionality).")
611 (license (list license:agpl3
612 ;; Some parts are licensed under the Apache License
615 ;; XXX When updating, check whether boost-for-mysql is still needed.
616 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
623 (uri (list (string-append
624 "https://dev.mysql.com/get/Downloads/MySQL-"
625 (version-major+minor version) "/"
626 name "-" version ".tar.gz")
628 "https://downloads.mysql.com/archives/get/file/"
629 name "-" version ".tar.gz")))
632 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
633 (build-system cmake-build-system)
636 '("-DBUILD_CONFIG=mysql_release"
639 "-DDEFAULT_CHARSET=utf8"
640 "-DDEFAULT_COLLATION=utf8_general_ci"
641 "-DMYSQL_DATADIR=/var/lib/mysql"
642 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
643 "-DINSTALL_INFODIR=share/mysql/docs"
644 "-DINSTALL_MANDIR=share/man"
645 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
646 "-DINSTALL_SCRIPTDIR=bin"
647 "-DINSTALL_INCLUDEDIR=include/mysql"
648 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
649 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
650 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
651 "-DINSTALL_DOCDIR=share/mysql/docs"
652 "-DINSTALL_SHAREDIR=share/mysql"
653 ;; Get rid of test data.
654 "-DINSTALL_MYSQLTESTDIR="
655 "-DINSTALL_SQLBENCHDIR=")
656 #:phases (modify-phases %standard-phases
658 'install 'remove-extra-binaries
659 (lambda* (#:key outputs #:allow-other-keys)
660 (let ((out (assoc-ref outputs "out")))
661 ;; Remove the 3 *_embedded files, which weigh in at
663 (for-each delete-file
664 (find-files (string-append out "/bin")
670 ("pkg-config" ,pkg-config)))
672 `(("boost" ,boost-for-mysql)
674 ("libtirpc" ,libtirpc)
677 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
679 (home-page "https://www.mysql.com/")
680 (synopsis "Fast, easy to use, and popular database")
682 "MySQL is a fast, reliable, and easy to use relational database
683 management system that supports the standardized Structured Query
685 (license license:gpl2)))
687 (define-public mariadb
693 (uri (string-append "https://downloads.mariadb.com/MariaDB"
694 "/mariadb-" version "/source/mariadb-"
698 "1pxyq37q4p7515by7k8hs3l3css68f3bm3akx99vw4m1rxwwbm63"))
699 (patches (search-patches "mariadb-client-test-32bit.patch"))
700 (modules '((guix build utils)))
703 ;; Delete bundled snappy and xz.
704 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
705 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
706 ;; This file checks that the bundled sources are present and
707 ;; declares build procedures for them.
708 (("^include\\(TokuThirdParty\\)") ""))
709 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
710 ;; Don't attempt to use the procedures we just removed.
711 ((" build_lzma build_snappy") ""))
713 ;; Preserve CMakeLists.txt for these.
714 (for-each (lambda (file)
715 (unless (string-suffix? "CMakeLists.txt" file)
717 (append (find-files "extra/yassl")
718 (find-files "pcre") (find-files "zlib")))
720 (build-system cmake-build-system)
721 (outputs '("out" "lib" "dev"))
725 "-DBUILD_CONFIG=mysql_release"
726 ;; Linking with libarchive fails, like this:
728 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
729 ;; relocation R_X86_64_32 against `.bss' can not be used when
730 ;; making a shared object; recompile with -fPIC
732 ;; For now, disable the features that that use libarchive (xtrabackup).
733 "-DWITH_LIBARCHIVE=OFF"
735 ;; Disable the TokuDB engine, because its test suite frequently fails,
736 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
739 ;; Ensure the system libraries are used.
740 "-DWITH_JEMALLOC=yes"
745 "-DDEFAULT_CHARSET=utf8"
746 "-DDEFAULT_COLLATION=utf8_general_ci"
747 "-DMYSQL_DATADIR=/var/lib/mysql"
748 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
749 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
750 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
752 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
754 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
756 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
757 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
758 "-DCMAKE_INSTALL_LIBDIR=lib"
759 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
760 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
762 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
764 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
766 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
767 "/share/mysql/support-files")
768 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
769 "-DINSTALL_SHAREDIR=share")
771 (modify-phases %standard-phases
772 (add-after 'unpack 'fix-pcre-detection
774 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
775 ;; in version 8.34. Unfortunately the upstream patch behaves
776 ;; slightly differently and the build system fails to detect it.
777 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
778 ;; XXX: Consider patching PCRE instead.
779 (substitute* "cmake/pcre.cmake"
780 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
782 (add-after 'unpack 'adjust-tests
784 (let ((disabled-tests
785 '(;; These fail because root@hostname == root@localhost in
786 ;; the build environment, causing a user count mismatch.
787 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
789 "main.explain_non_select"
790 "main.stat_tables_innodb"
791 "roles.acl_statistics"
793 ;; This file contains a time bomb which makes it fail after
794 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
797 ;; FIXME: This test fails on i686:
798 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
799 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
800 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
801 ;; (all three tables must exist and be identical)
802 ;; in a loop it produces the same error around 1/240 times.
803 ;; montywi on #maria suggested removing the real_end check in
804 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
805 ;; reach the ending quote occasionally. Disable it for now.
807 ;; FIXME: This test fails on armhf-linux:
808 "mroonga/storage.index_read_multiple_double"))
810 ;; This file contains a list of known-flaky tests for this
811 ;; release. Append our own items.
812 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
813 (for-each (lambda (test)
814 (format unstable-tests "~a : ~a\n"
815 test "Disabled in Guix"))
817 (close-port unstable-tests)
819 ;; XXX: This test fails because it expects a latin1 charset and
820 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
821 (substitute* "mysql-test/r/gis_notembedded.result"
822 (("latin1_swedish_ci") "utf8_general_ci")
823 (("\tlatin1") "\tutf8"))
825 (substitute* "mysql-test/mysql-test-run.pl"
826 (("/bin/ls") (which "ls"))
827 (("/bin/sh") (which "sh")))
829 (add-before 'configure 'disable-plugins
831 (let ((disable-plugin (lambda (name)
832 (call-with-output-file
833 (string-append "plugin/" name
836 (format port "\n")))))
837 (disabled-plugins '(;; XXX: Causes a test failure.
839 (for-each disable-plugin disabled-plugins)
842 (lambda* (#:key (tests? #t) #:allow-other-keys)
844 (with-directory-excursion "mysql-test"
845 (invoke "./mtr" "--verbose"
847 "--testcase-timeout=40"
848 "--suite-timeout=600"
849 "--parallel" (number->string (parallel-job-count))
850 "--skip-test-list=unstable-tests"))
851 (format #t "test suite not run~%"))
854 'install 'post-install
855 (lambda* (#:key inputs outputs #:allow-other-keys)
856 (let* ((out (assoc-ref outputs "out"))
857 (dev (assoc-ref outputs "dev"))
858 (lib (assoc-ref outputs "lib"))
859 (openssl (assoc-ref inputs "openssl")))
860 (substitute* (string-append out "/bin/mysql_install_db")
862 (string-append "basedir=\"" out "\"")))
863 ;; Remove unneeded files for testing.
864 (with-directory-excursion lib
865 (for-each delete-file-recursively
866 '("data" "mysql-test" "sql-bench"))
867 ;; And static libraries.
868 (for-each delete-file (find-files "lib" "\\.a$")))
869 (with-directory-excursion out
870 (delete-file "share/man/man1/mysql-test-run.pl.1")
871 ;; Delete huge and unnecessary executables.
872 (for-each delete-file (find-files "bin" "(test|embedded)")))
873 (mkdir-p (string-append dev "/share"))
874 (mkdir-p (string-append dev "/bin"))
875 (rename-file (string-append lib "/bin/mysqld")
876 (string-append out "/bin/mysqld"))
877 (rename-file (string-append lib "/share/pkgconfig")
878 (string-append dev "/share/pkgconfig"))
879 (rename-file (string-append out "/bin/mysql_config")
880 (string-append dev "/bin/mysql_config"))
882 ;; Embed an absolute reference to OpenSSL in mysql_config
883 ;; and the pkg-config file to avoid propagation.
884 (substitute* (list (string-append dev "/bin/mysql_config")
885 (string-append dev "/share/pkgconfig/mariadb.pc"))
886 (("-lssl -lcrypto" all)
887 (string-append "-L" openssl "/lib " all)))
892 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
893 ,@(if (string-prefix? "armhf" (%current-system))
898 `(("jemalloc" ,jemalloc)
902 ("openssl" ,openssl-1.0)
907 ;; The test suite is very resource intensive and can take more than three
908 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
909 (properties '((timeout . 64800))) ;18 hours
910 (home-page "https://mariadb.org/")
911 (synopsis "SQL database server")
913 "MariaDB is a multi-user and multi-threaded SQL database server, designed
914 as a drop-in replacement of MySQL.")
915 (license license:gpl2)))
917 ;; TODO: mysql_install_db is broken in MariaDB. This package is here as
918 ;; a workaround for packages that need it. Merge with 'mariadb' in the next
920 (define-public mariadb/fixed-install-db
924 (name "mariadb-fixed")
927 `(("mariadb" ,mariadb)
928 ("mariadb:lib" ,mariadb "lib")))
930 (build-system trivial-build-system)
932 `(#:modules ((guix build utils))
935 (use-modules ((guix build utils)))
936 (let ((out (assoc-ref %outputs "out")))
937 (copy-recursively (assoc-ref %build-inputs "mariadb") out)
938 (substitute* (string-append out "/bin/mysql_install_db")
939 (("\\$basedir/share/mysql")
940 (string-append (assoc-ref %build-inputs "mariadb:lib")
944 ;; Don't forget to update the other postgresql packages when upgrading this one.
945 (define-public postgresql
951 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
952 version "/postgresql-" version ".tar.bz2"))
955 "02fcmvbh0mhplj3s2jd24s642ysx7bggnf0h8bs5amh7dgzi8p8d"))
956 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
957 (build-system gnu-build-system)
959 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
961 (modify-phases %standard-phases
962 (add-before 'configure 'patch-/bin/sh
964 ;; Refer to the actual shell.
965 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
966 "src/bin/psql/command.c")
967 (("/bin/sh") (which "sh")))
969 (add-after 'build 'build-contrib
971 (invoke "make" "-C" "contrib")))
972 (add-after 'install 'install-contrib
974 (invoke "make" "-C" "contrib" "install"))))))
976 `(("readline" ,readline)
977 ("libuuid" ,util-linux)
980 (home-page "https://www.postgresql.org/")
981 (synopsis "Powerful object-relational database system")
983 "PostgreSQL is a powerful object-relational database system. It is fully
984 ACID compliant, has full support for foreign keys, joins, views, triggers, and
985 stored procedures (in multiple languages). It includes most SQL:2008 data
986 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
987 TIMESTAMP. It also supports storage of binary large objects, including
988 pictures, sounds, or video.")
989 (license (license:x11-style "file://COPYRIGHT"))))
991 (define-public postgresql-11
998 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
999 version "/postgresql-" version ".tar.bz2"))
1002 "106ikalvrilihlvhq7xj7snq98hgbgq6qsgjrd252wgw1c327pvz"))))))
1004 (define-public postgresql-9.6
1006 (inherit postgresql)
1011 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1012 version "/postgresql-" version ".tar.bz2"))
1015 "02hp69h2p02asfblkaahblzdz2zmawd2r11h6237y5j7yadgxn9w"))))))
1017 (define-public python-pymysql
1019 (name "python-pymysql")
1024 (uri (pypi-uri "PyMySQL" version))
1026 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1027 (build-system python-build-system)
1029 `(("python-unittest2" ,python-unittest2)))
1031 `(("python-cryptography" ,python-cryptography)))
1033 `(#:tests? #f)) ; tests expect a running MySQL
1034 (home-page "https://github.com/PyMySQL/PyMySQL/")
1035 (synopsis "Pure-Python MySQL driver")
1037 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1038 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1039 (license license:expat)))
1041 (define-public python2-pymysql
1042 (package-with-python2 python-pymysql))
1051 (uri (string-append "http://fallabs.com/" name "/"
1052 name "-" version ".tar.gz"))
1055 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1056 (build-system gnu-build-system)
1058 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1059 (assoc-ref %outputs "out")
1061 (home-page "http://fallabs.com/qdbm")
1062 (synopsis "Key-value database")
1063 (description "QDBM is a library of routines for managing a
1064 database. The database is a simple data file containing key-value
1065 pairs. Every key and value is serial bytes with variable length.
1066 Binary data as well as character strings can be used as a key or a
1067 value. There is no concept of data tables or data types. Records are
1068 organized in a hash table or B+ tree.")
1069 (license license:lgpl2.1+)))
1071 (define-public recutils
1077 (uri (string-append "mirror://gnu/recutils/recutils-"
1081 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1082 (build-system gnu-build-system)
1084 (arguments '(#:configure-flags
1085 (list (string-append "--with-bash-headers="
1086 (assoc-ref %build-inputs "bash:include")
1089 (native-inputs `(("bc" ,bc)
1090 ("bash:include" ,bash "include")
1092 ("libuuid" ,util-linux)
1093 ("pkg-config" ,pkg-config)))
1095 ;; TODO: Add more optional inputs.
1096 (inputs `(("curl" ,curl)
1097 ("libgcrypt" ,libgcrypt)))
1098 (synopsis "Manipulate plain text files as databases")
1100 "GNU Recutils is a set of tools and libraries for creating and
1101 manipulating text-based, human-editable databases. Despite being text-based,
1102 databases created with Recutils carry all of the expected features such as
1103 unique fields, primary keys, time stamps and more. Many different field
1104 types are supported, as is encryption.")
1105 (license license:gpl3+)
1106 (home-page "https://www.gnu.org/software/recutils/")))
1108 (define-public emacs-recutils
1111 (name "emacs-recutils")
1112 (build-system emacs-build-system)
1115 (modify-phases %standard-phases
1116 (add-after 'unpack 'change-directory
1122 (synopsis "Emacs mode for working with recutils database files")
1123 (description "This package provides an Emacs major mode @code{rec-mode}
1124 for working with GNU Recutils text-based, human-editable databases. It
1125 supports editing, navigation, and querying of recutils database files
1126 including field and record folding.")))
1128 (define-public rocksdb
1135 (url "https://github.com/facebook/rocksdb")
1136 (commit (string-append "v" version))))
1137 (file-name (git-file-name name version))
1140 "01f5lcrcr809jhkkvxhv743hwpcxszj4r30hy9qy1i0mvjky02vf"))
1141 (modules '((guix build utils)))
1144 ;; TODO: unbundle gtest.
1145 (delete-file "build_tools/gnu_parallel")
1146 (substitute* "Makefile"
1147 (("build_tools/gnu_parallel") "parallel"))
1149 (build-system gnu-build-system)
1151 `(#:make-flags (list "CC=gcc" "V=1"
1152 ;; Ceph requires that RTTI is enabled.
1154 (string-append "INSTALL_PATH="
1155 (assoc-ref %outputs "out"))
1157 ;; Running the full test suite takes hours and require
1158 ;; a lot of disk space. Instead we only run a subset
1159 ;; (see .travis.yml and Makefile).
1160 "ROCKSDBTESTS_END=db_tailing_iter_test")
1161 #:test-target "check_some"
1162 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1163 ;; this upstream, but it's not going to be supported any time soon.
1164 #:tests? (let ((system ,(or (%current-target-system)
1165 (%current-system))))
1166 (or (string-prefix? "x86_64-linux" system)
1167 (string-prefix? "aarch64-linux" system)))
1169 (modify-phases %standard-phases
1170 (add-after 'unpack 'patch-Makefile
1172 (substitute* "Makefile"
1173 ;; Don't depend on the static library when installing.
1174 (("install: install-static")
1175 "install: install-shared")
1176 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1179 ;; The default target is only needed for tests and built on demand.
1181 (add-before 'check 'disable-optimizations
1183 ;; Prevent the build from passing '-march=native' to the compiler.
1184 (setenv "PORTABLE" "1")
1186 (add-before 'check 'disable-failing-tests
1188 (substitute* "Makefile"
1189 ;; These tests reliably fail due to "Too many open files".
1190 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1191 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1193 (add-after 'check 'build
1194 ;; The default build target is a debug build for tests. The
1195 ;; install target depends on the "shared_lib" release target
1196 ;; so we build it here for clarity.
1197 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1198 (apply invoke "make" "shared_lib"
1199 `(,@(if parallel-build?
1200 `("-j" ,(number->string (parallel-job-count)))
1204 `(("parallel" ,parallel)
1207 ("python" ,python-2)
1212 ("jemalloc" ,jemalloc)
1216 (home-page "http://rocksdb.org/")
1217 (synopsis "Persistent key-value store for fast storage")
1219 "RocksDB is a library that forms the core building block for a fast
1220 key-value server, especially suited for storing data on flash drives. It
1221 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1222 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1223 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1224 compactions, making it specially suitable for storing multiple terabytes of
1225 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1226 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1227 ;; files carry the 3-clause BSD license.
1228 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1230 (define-public sparql-query
1232 (name "sparql-query")
1236 (uri (string-append "https://github.com/tialaramex/"
1237 name "/archive/" version ".tar.gz"))
1239 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1240 (file-name (string-append name "-" version ".tar.gz"))))
1241 (build-system gnu-build-system)
1243 `(("readline" ,readline)
1244 ("ncurses" ,ncurses)
1246 ("libxml2" ,libxml2)
1249 `(("pkg-config" ,pkg-config)))
1251 `(#:make-flags '("CC=gcc")
1253 (modify-phases %standard-phases
1255 ;; The Makefile uses git to obtain versioning information. This phase
1256 ;; substitutes the git invocation with the package version.
1257 (add-after 'unpack 'remove-git-dependency
1259 (substitute* "Makefile"
1261 (string-append "gitrev = \"v" ,version "\"")))
1263 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1264 ;; This replacement does the same thing, except for using $PREFIX/bin
1267 (lambda* (#:key outputs #:allow-other-keys)
1268 (let* ((out (assoc-ref outputs "out"))
1269 (bin (string-append out "/bin")))
1270 (install-file "sparql-query" bin)
1271 (symlink (string-append bin "/sparql-query")
1272 (string-append bin "/sparql-update")))
1275 (lambda* (#:key make-flags #:allow-other-keys)
1276 (apply invoke "make" `(,@make-flags "scan-test"))
1277 (invoke "./scan-test"))))))
1278 (home-page "https://github.com/tialaramex/sparql-query/")
1279 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1280 (description "Sparql-query is a command-line tool for accessing SPARQL
1281 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1282 tools for interrogating SQL databases. For example, you can enter a query over
1283 several lines, using a semi-colon at the end of a line to indicate the end of
1284 your query. It also supports readline so that you can more easily recall and
1285 edit previous queries, even across sessions. It can be used non-interactively,
1286 for example from a shell script.")
1287 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1288 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1289 (license (list license:gpl3+))))
1291 (define-public sqitch
1299 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1302 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1303 (build-system perl-build-system)
1306 (modify-phases %standard-phases
1307 (add-before 'check 'set-check-environment
1310 (setenv "HOME" "/tmp")
1312 (add-after 'install 'wrap-program
1313 (lambda* (#:key outputs #:allow-other-keys)
1314 (let* ((out (assoc-ref outputs "out"))
1315 (path (getenv "PERL5LIB")))
1316 (wrap-program (string-append out "/bin/sqitch")
1317 `("PERL5LIB" ":" prefix
1318 (,(string-append out "/lib/perl5/site_perl"
1323 `(("perl-capture-tiny" ,perl-capture-tiny)
1324 ("perl-io-pager" ,perl-io-pager)
1325 ("perl-module-build" ,perl-module-build)
1326 ("perl-module-runtime" ,perl-module-runtime)
1327 ("perl-path-class" ,perl-path-class)
1328 ("perl-test-deep" ,perl-test-deep)
1329 ("perl-test-dir" ,perl-test-dir)
1330 ("perl-test-exception" ,perl-test-exception)
1331 ("perl-test-file" ,perl-test-file)
1332 ("perl-test-file-contents" ,perl-test-file-contents)
1333 ("perl-test-mockmodule" ,perl-test-mockmodule)
1334 ("perl-test-nowarnings" ,perl-test-nowarnings)
1335 ("perl-test-warn" ,perl-test-warn)))
1337 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1338 ("perl-clone" ,perl-clone)
1339 ("perl-config-gitlike" ,perl-config-gitlike)
1340 ("perl-datetime" ,perl-datetime)
1341 ("perl-datetime-timezone" ,perl-datetime-timezone)
1342 ("perl-dbd-pg" ,perl-dbd-pg)
1343 ("perl-dbi" ,perl-dbi)
1344 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1345 ("perl-encode-locale" ,perl-encode-locale)
1346 ("perl-hash-merge" ,perl-hash-merge)
1347 ("perl-ipc-run3" ,perl-ipc-run3)
1348 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1349 ("perl-libintl-perl" ,perl-libintl-perl)
1350 ("perl-list-moreutils" ,perl-list-moreutils)
1351 ("perl-moo" ,perl-moo)
1352 ("perl-mysql-config" ,perl-mysql-config)
1353 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1354 ("perl-path-class" ,perl-path-class)
1355 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1356 ("perl-string-formatter" ,perl-string-formatter)
1357 ("perl-string-shellquote" ,perl-string-shellquote)
1358 ("perl-sub-exporter" ,perl-sub-exporter)
1359 ("perl-template-tiny" ,perl-template-tiny)
1360 ("perl-template-toolkit" ,perl-template-toolkit)
1361 ("perl-throwable" ,perl-throwable)
1362 ("perl-try-tiny" ,perl-try-tiny)
1363 ("perl-type-tiny" ,perl-type-tiny)
1364 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1365 ("perl-uri" ,perl-uri)
1366 ("perl-uri-db" ,perl-uri-db)))
1367 (home-page "https://sqitch.org/")
1368 (synopsis "Database change management tool")
1370 "Sqitch is a standalone change management system for database schemas,
1371 which uses SQL to describe changes.")
1372 (license license:x11)))
1374 (define-public sqlcrush
1375 ;; Unfortunately, there is no proper upstream release and may never be.
1376 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1380 (version (git-version "0.1.5" revision commit))
1384 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1386 (file-name (git-file-name name version))
1389 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1390 (build-system python-build-system)
1392 `(("python-cryptography" ,python-cryptography)
1393 ("python-psycopg2" ,python-psycopg2)
1394 ("python-pymysql" ,python-pymysql)
1395 ("python-sqlalchemy" ,python-sqlalchemy)))
1396 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1397 (synopsis "Text console-based database viewer and editor")
1399 "SQLcrush lets you view and edit a database directly from the text
1400 console through an ncurses interface. You can explore each table's structure,
1401 browse and edit the contents, add and delete entries, all while tracking your
1403 (license license:gpl3+)))) ; no headers, see README.md
1411 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1415 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1416 (build-system gnu-build-system)
1419 (modify-phases %standard-phases
1421 (lambda* (#:key outputs #:allow-other-keys)
1422 (let ((out (assoc-ref outputs "out")))
1423 ;; The 'configure' script is a wrapper for Waf and
1424 ;; doesn't recognize things like '--enable-fast-install'.
1425 (invoke "./configure"
1426 (string-append "--prefix=" out))))))))
1428 `(;; TODO: Build the documentation.
1429 ;; ("docbook-xsl" ,docbook-xsl)
1430 ;; ("libxml2" ,libxml2)
1431 ;; ("libxslt" ,libxslt)
1432 ("python" ,python) ;for the Waf build system
1434 (home-page "https://tdb.samba.org/")
1435 (synopsis "Trivial database")
1437 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1438 and BSD's DB except that it allows multiple simultaneous writers and uses
1439 locking internally to keep writers from trampling on each other. TDB is also
1441 (license license:lgpl3+)))
1443 (define-public perl-dbi
1450 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1454 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1455 (build-system perl-build-system)
1456 (synopsis "Database independent interface for Perl")
1457 (description "This package provides an database interface for Perl.")
1458 (home-page "https://metacpan.org/release/DBI")
1459 (license license:perl-license)))
1461 (define-public perl-dbix-class
1463 (name "perl-dbix-class")
1464 (version "0.082841")
1468 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1469 "DBIx-Class-" version ".tar.gz"))
1472 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1473 (build-system perl-build-system)
1475 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1476 ("perl-file-temp" ,perl-file-temp)
1477 ("perl-module-install" ,perl-module-install)
1478 ("perl-package-stash" ,perl-package-stash)
1479 ("perl-test-deep" ,perl-test-deep)
1480 ("perl-test-exception" ,perl-test-exception)
1481 ("perl-test-warn" ,perl-test-warn)))
1483 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1484 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1485 ("perl-class-inspector" ,perl-class-inspector)
1486 ("perl-config-any" ,perl-config-any)
1487 ("perl-context-preserve" ,perl-context-preserve)
1488 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1489 ("perl-data-page" ,perl-data-page)
1490 ("perl-dbi" ,perl-dbi)
1491 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1492 ("perl-hash-merge" ,perl-hash-merge)
1493 ("perl-module-find" ,perl-module-find)
1494 ("perl-moo" ,perl-moo)
1495 ("perl-mro-compat" ,perl-mro-compat)
1496 ("perl-namespace-clean" ,perl-namespace-clean)
1497 ("perl-path-class" ,perl-path-class)
1498 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1499 ("perl-scope-guard" ,perl-scope-guard)
1500 ("perl-sql-abstract" ,perl-sql-abstract)
1501 ("perl-sub-name" ,perl-sub-name)
1502 ("perl-text-balanced" ,perl-text-balanced)
1503 ("perl-try-tiny" ,perl-try-tiny)))
1504 (home-page "https://metacpan.org/release/DBIx-Class")
1505 (synopsis "Extensible and flexible object <-> relational mapper")
1506 (description "An SQL to OO mapper with an object API inspired by
1507 Class::DBI (with a compatibility layer as a springboard for porting) and a
1508 resultset API that allows abstract encapsulation of database operations. It
1509 aims to make representing queries in your code as perl-ish as possible while
1510 still providing access to as many of the capabilities of the database as
1511 possible, including retrieving related records from multiple tables in a
1512 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1513 \"ORDER BY\" and \"HAVING\" support.")
1514 (license license:perl-license)))
1516 (define-public perl-dbix-class-cursor-cached
1518 (name "perl-dbix-class-cursor-cached")
1519 (version "1.001004")
1523 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1524 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1527 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1528 (build-system perl-build-system)
1530 `(("perl-cache-cache" ,perl-cache-cache)
1531 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1532 ("perl-module-install" ,perl-module-install)))
1534 `(("perl-carp-clan" ,perl-carp-clan)
1535 ("perl-dbix-class" ,perl-dbix-class)))
1536 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1537 (synopsis "Cursor with built-in caching support")
1538 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1539 built-in caching support.")
1540 (license license:perl-license)))
1542 (define-public perl-dbix-class-introspectablem2m
1544 (name "perl-dbix-class-introspectablem2m")
1545 (version "0.001002")
1549 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1550 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1553 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1554 (build-system perl-build-system)
1556 `(("perl-module-install" ,perl-module-install)))
1558 `(("perl-dbix-class" ,perl-dbix-class)))
1559 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1560 (synopsis "Introspect many-to-many relationships")
1561 (description "Because the many-to-many relationships are not real
1562 relationships, they can not be introspected with DBIx::Class. Many-to-many
1563 relationships are actually just a collection of convenience methods installed
1564 to bridge two relationships. This DBIx::Class component can be used to store
1565 all relevant information about these non-relationships so they can later be
1566 introspected and examined.")
1567 (license license:perl-license)))
1569 (define-public perl-dbix-class-schema-loader
1571 (name "perl-dbix-class-schema-loader")
1576 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1577 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1580 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1581 (build-system perl-build-system)
1583 `(("perl-config-any" ,perl-config-any)
1584 ("perl-config-general" ,perl-config-general)
1585 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1586 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1587 ("perl-module-install" ,perl-module-install)
1588 ("perl-moose" ,perl-moose)
1589 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1590 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1591 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1592 ("perl-test-deep" ,perl-test-deep)
1593 ("perl-test-differences" ,perl-test-differences)
1594 ("perl-test-exception" ,perl-test-exception)
1595 ("perl-test-pod" ,perl-test-pod)
1596 ("perl-test-warn" ,perl-test-warn)))
1598 `(("perl-class-unload" ,perl-class-unload)
1599 ("perl-class-inspector" ,perl-class-inspector)
1600 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1601 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1602 ("perl-carp-clan" ,perl-carp-clan)
1603 ("perl-data-dump" ,perl-data-dump)
1604 ("perl-dbix-class" ,perl-dbix-class)
1605 ("perl-hash-merge" ,perl-hash-merge)
1606 ("perl-list-moreutils" ,perl-list-moreutils)
1607 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1608 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1609 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1610 ("perl-namespace-clean" ,perl-namespace-clean)
1611 ("perl-mro-compat" ,perl-mro-compat)
1612 ("perl-scope-guard" ,perl-scope-guard)
1613 ("perl-string-camelcase" ,perl-string-camelcase)
1614 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1615 ("perl-sub-name" ,perl-sub-name)
1616 ("perl-try-tiny" ,perl-try-tiny)))
1617 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1618 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1619 (synopsis "Create a DBIx::Class::Schema based on a database")
1620 (description "DBIx::Class::Schema::Loader automates the definition of a
1621 DBIx::Class::Schema by scanning database table definitions and setting up the
1622 columns, primary keys, unique constraints and relationships.")
1623 (license license:perl-license)))
1625 (define-public perl-dbd-pg
1627 (name "perl-dbd-pg")
1632 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1633 "DBD-Pg-" version ".tar.gz"))
1636 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1637 (build-system perl-build-system)
1639 `(("perl-dbi" ,perl-dbi)))
1641 `(("perl-dbi" ,perl-dbi)
1642 ("postgresql" ,postgresql)))
1643 (home-page "https://metacpan.org/release/DBD-Pg")
1644 (synopsis "DBI PostgreSQL interface")
1645 (description "This package provides a PostgreSQL driver for the Perl5
1646 @dfn{Database Interface} (DBI).")
1647 (license license:perl-license)))
1649 (define-public perl-dbd-mysql
1651 (name "perl-dbd-mysql")
1656 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1657 "DBD-mysql-" version ".tar.gz"))
1659 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1660 (build-system perl-build-system)
1663 (modify-phases %standard-phases
1664 (add-before 'configure 'skip-library-detection
1665 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1666 ;; are really only needed for the test suite; their absence does not
1667 ;; affect the build or the end result.
1669 (substitute* "Makefile.PL"
1670 (("use Devel::CheckLib;" match)
1671 (string-append "# " match))
1675 ;; Tests require running MySQL server.
1678 `(("perl-dbi" ,perl-dbi)
1679 ("mysql" ,mariadb "lib")
1680 ("mysql-dev" ,mariadb "dev")))
1681 (home-page "https://metacpan.org/release/DBD-mysql")
1682 (synopsis "DBI MySQL interface")
1683 (description "This package provides a MySQL driver for the Perl5
1684 @dfn{Database Interface} (DBI).")
1685 (license license:perl-license)))
1687 (define-public perl-dbd-sqlite
1689 (name "perl-dbd-sqlite")
1694 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1698 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1699 (build-system perl-build-system)
1700 (inputs `(("sqlite" ,sqlite)))
1701 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1702 (synopsis "SQlite interface for Perl")
1703 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1704 the entire thing in the distribution. So in order to get a fast transaction
1705 capable RDBMS working for your Perl project you simply have to install this
1706 module, and nothing else.")
1707 (license license:perl-license)
1708 (home-page "https://metacpan.org/release/DBD-SQLite")))
1710 (define-public perl-mysql-config
1712 (name "perl-mysql-config")
1718 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1723 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1724 (build-system perl-build-system)
1725 (home-page "https://metacpan.org/release/MySQL-Config")
1726 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1728 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1729 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1730 @code{Getopt::Long}.")
1731 (license license:perl-license)))
1733 (define-public perl-sql-abstract
1735 (name "perl-sql-abstract")
1740 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1741 "SQL-Abstract-" version ".tar.gz"))
1743 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1744 (build-system perl-build-system)
1746 `(("perl-module-install" ,perl-module-install)
1747 ("perl-test-deep" ,perl-test-deep)
1748 ("perl-test-exception" ,perl-test-exception)
1749 ("perl-test-warn" ,perl-test-warn)))
1751 `(("perl-hash-merge" ,perl-hash-merge)
1752 ("perl-moo" ,perl-moo)
1753 ("perl-mro-compat" ,perl-mro-compat)
1754 ("perl-text-balanced" ,perl-text-balanced)))
1755 (home-page "https://metacpan.org/release/SQL-Abstract")
1756 (synopsis "Generate SQL from Perl data structures")
1757 (description "This module was inspired by the excellent DBIx::Abstract.
1758 While based on the concepts used by DBIx::Abstract, the concepts used have
1759 been modified to make the SQL easier to generate from Perl data structures.
1760 The underlying idea is for this module to do what you mean, based on the data
1761 structures you provide it, so that you don't have to modify your code every
1762 time your data changes.")
1763 (license license:perl-license)))
1765 (define-public perl-sql-splitstatement
1767 (name "perl-sql-splitstatement")
1772 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1773 "SQL-SplitStatement-" version ".tar.gz"))
1776 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1777 (build-system perl-build-system)
1779 `(("perl-test-exception" ,perl-test-exception)))
1781 `(("perl-class-accessor" ,perl-class-accessor)
1782 ("perl-list-moreutils" ,perl-list-moreutils)
1783 ("perl-regexp-common" ,perl-regexp-common)
1784 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1785 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1786 (synopsis "Split SQL code into atomic statements")
1787 (description "This module tries to split any SQL code, even including
1788 non-standard extensions, into the atomic statements it is composed of.")
1789 (license license:perl-license)))
1791 (define-public perl-sql-tokenizer
1793 (name "perl-sql-tokenizer")
1798 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1799 "SQL-Tokenizer-" version ".tar.gz"))
1802 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1803 (build-system perl-build-system)
1804 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1805 (synopsis "SQL tokenizer")
1806 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1807 claim to be a parser or query verifier. It just creates sane tokens from a
1809 (license license:perl-license)))
1811 (define-public unixodbc
1819 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1822 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1823 (build-system gnu-build-system)
1824 (synopsis "Data source abstraction library")
1825 (description "Unixodbc is a library providing an API with which to access
1826 data sources. Data sources include SQL Servers and any software with an ODBC
1828 (license license:lgpl2.1+)
1829 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1830 (home-page "http://www.unixodbc.org")))
1832 (define-public unqlite
1838 ;; Contains bug fixes against the official release, and has an
1839 ;; autotooled build system.
1840 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1842 "unqlite-unofficial-" version ".tar.gz"))
1845 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1846 (build-system gnu-build-system)
1847 (arguments `(#:tests? #f)) ;No check target
1848 (home-page "http://www.unqlite.org")
1849 (synopsis "In-memory key/value and document store")
1851 "UnQLite is an in-process software library which implements a
1852 self-contained, serverless, zero-configuration, transactional NoSQL
1853 database engine. UnQLite is a document store database similar to
1854 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1855 similar to BerkeleyDB, LevelDB, etc.")
1856 (license license:bsd-2)))
1858 (define-public redis
1864 (uri (string-append "http://download.redis.io/releases/redis-"
1868 "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx"))))
1869 (build-system gnu-build-system)
1871 '(#:tests? #f ; tests related to master/slave and replication fail
1872 #:phases (modify-phases %standard-phases
1873 (delete 'configure))
1874 #:make-flags `("CC=gcc"
1877 ,(string-append "PREFIX="
1878 (assoc-ref %outputs "out")))))
1879 (synopsis "Key-value cache and store")
1880 (description "Redis is an advanced key-value cache and store. Redis
1881 supports many data structures including strings, hashes, lists, sets, sorted
1882 sets, bitmaps and hyperloglogs.")
1883 (home-page "http://redis.io/")
1884 (license license:bsd-3)))
1886 (define-public kyotocabinet
1888 (name "kyotocabinet")
1892 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1893 name "-" version ".tar.gz"))
1896 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1897 (build-system gnu-build-system)
1901 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1902 (string-append "LDFLAGS=-Wl,-rpath="
1903 (assoc-ref %outputs "out") "/lib"))))
1904 (inputs `(("zlib" ,zlib)))
1905 (home-page "http://fallabs.com/kyotocabinet/")
1907 "Kyoto Cabinet is a modern implementation of the DBM database")
1909 "Kyoto Cabinet is a standalone file-based database that supports Hash
1910 and B+ Tree data storage models. It is a fast key-value lightweight
1911 database and supports many programming languages. It is a NoSQL database.")
1912 (license license:gpl3+)))
1914 (define-public tokyocabinet
1916 (name "tokyocabinet")
1921 (uri (string-append "http://fallabs.com/tokyocabinet/"
1922 name "-" version ".tar.gz"))
1925 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1926 (build-system gnu-build-system)
1929 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1930 (string-append "LDFLAGS=-Wl,-rpath="
1931 (assoc-ref %outputs "out") "/lib"))))
1934 (home-page "http://fallabs.com/tokyocabinet/")
1935 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1937 "Tokyo Cabinet is a library of routines for managing a database.
1938 The database is a simple data file containing records, each is a pair of a
1939 key and a value. Every key and value is serial bytes with variable length.
1940 Both binary data and character string can be used as a key and a value.
1941 There is neither concept of data tables nor data types. Records are
1942 organized in hash table, B+ tree, or fixed-length array.")
1943 (license license:lgpl2.1+)))
1945 (define-public wiredtiger
1952 "http://source.wiredtiger.com/releases/wiredtiger-"
1953 version ".tar.bz2"))
1956 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1957 (build-system gnu-build-system)
1959 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1961 (modify-phases %standard-phases
1962 (add-before 'check 'disable-test/fops
1964 ;; XXX: timed out after 3600 seconds of silence
1965 (substitute* "Makefile"
1971 ("snappy" ,snappy)))
1972 (home-page "http://source.wiredtiger.com/")
1973 (synopsis "NoSQL data engine")
1975 "WiredTiger is an extensible platform for data management. It supports
1976 row-oriented storage (where all columns of a row are stored together),
1977 column-oriented storage (where columns are stored in groups, allowing for
1978 more efficient access and storage of column subsets) and log-structured merge
1979 trees (LSM), for sustained throughput under random insert workloads.")
1980 (license license:gpl3) ; or GPL-2
1981 ;; configure.ac: WiredTiger requires a 64-bit build.
1982 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1984 (define-public wiredtiger-3
1986 (inherit wiredtiger)
1991 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1992 version ".tar.bz2"))
1995 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
1997 (define-public guile-wiredtiger
1999 (name "guile-wiredtiger")
2004 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2005 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2006 (file-name (string-append name "-" version "-checkout"))
2009 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2010 (build-system gnu-build-system)
2012 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2014 (list (string-append "--with-libwiredtiger-prefix="
2015 (assoc-ref %build-inputs "wiredtiger")))
2016 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2018 `(("autoconf" ,autoconf)
2019 ("automake" ,automake)
2020 ("pkg-config" ,pkg-config)))
2022 `(("wiredtiger" ,wiredtiger-3)
2023 ("guile" ,guile-2.2)))
2025 `(("guile-bytestructures" ,guile-bytestructures)))
2026 (synopsis "WiredTiger bindings for GNU Guile")
2028 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2030 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2031 (license license:gpl3+)))
2033 (define-public perl-db-file
2035 (name "perl-db-file")
2041 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2046 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
2047 (build-system perl-build-system)
2048 (inputs `(("bdb" ,bdb)))
2049 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2051 `(#:phases (modify-phases %standard-phases
2053 'configure 'modify-config.in
2054 (lambda* (#:key inputs #:allow-other-keys)
2055 (substitute* "config.in"
2056 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2058 (home-page "https://metacpan.org/release/DB_File")
2060 "Perl5 access to Berkeley DB version 1.x")
2062 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2063 (license license:perl-license)))
2073 (url "https://github.com/LMDB/lmdb.git")
2074 (commit (string-append "LMDB_" version))))
2075 (file-name (git-file-name name version))
2077 (base32 "0ag7l5180ajvm73y59m7sn3p52xm8m972d08cshxhpwgwa4v35k6"))))
2078 (build-system gnu-build-system)
2080 `(#:test-target "test"
2082 (modify-phases %standard-phases
2084 (lambda* (#:key outputs #:allow-other-keys)
2085 (chdir "libraries/liblmdb")
2086 (substitute* "Makefile"
2087 (("/usr/local") (assoc-ref outputs "out")))
2089 (home-page "https://symas.com/products/lightning-memory-mapped-database")
2090 (synopsis "Lightning Memory-Mapped Database library")
2092 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2093 transactional database. Unlike more complex relational databases, LMDB handles
2094 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2095 underlying operating system for caching and locking, keeping the code small and
2097 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2098 disk-based databases with high read performance that scales linearly over
2099 multiple cores. The size of each database is limited only by the size of the
2100 virtual address space — not physical RAM.")
2101 (license license:openldap2.8)))
2103 (define-public libpqxx
2110 "http://pqxx.org/download/software/libpqxx/"
2111 name "-" version ".tar.gz"))
2114 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2115 (build-system gnu-build-system)
2117 `(("python" ,python-2)))
2118 (inputs `(("postgresql" ,postgresql)))
2120 `(#:tests? #f ; # FAIL: 1
2122 (modify-phases %standard-phases
2123 (add-before 'configure 'fix-sed-command
2125 ;; Newer sed versions error out if double brackets are not used.
2126 (substitute* "configure"
2127 (("\\[:space:\\]") "[[:space:]]"))
2129 (synopsis "C++ connector for PostgreSQL")
2131 "Libpqxx is a C++ library to enable user programs to communicate with the
2132 PostgreSQL database back-end. The database back-end can be local or it may be
2133 on another machine, accessed via TCP/IP.")
2134 (home-page "http://pqxx.org/")
2135 (license license:bsd-3)))
2137 (define-public python-peewee
2139 (name "python-peewee")
2144 (uri (pypi-uri "peewee" version))
2147 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2148 (build-system python-build-system)
2150 `(#:tests? #f)) ; Fails to import test data
2152 `(("python-cython" ,python-cython)))
2153 (home-page "https://github.com/coleifer/peewee/")
2154 (synopsis "Small object-relational mapping utility")
2156 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2157 handles converting between pythonic values and those used by databases, so you
2158 can use Python types in your code without having to worry. It has built-in
2159 support for sqlite, mysql and postgresql. If you already have a database, you
2160 can autogenerate peewee models using @code{pwiz}, a model generator.")
2161 (license license:expat)))
2163 (define-public python2-peewee
2164 (package-with-python2 python-peewee))
2166 (define-public sqlcipher
2173 (uri (string-append "https://github.com/sqlcipher/" name
2174 "/archive/v" version ".tar.gz"))
2176 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2177 (file-name (string-append name "-" version ".tar.gz"))))
2178 (build-system gnu-build-system)
2180 `(("libcrypto" ,openssl)
2181 ("libtcl8.6" ,tcl))) ; required for running the tests
2186 '("--enable-tempstore=yes"
2187 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2188 "LDFLAGS=-lcrypto -ltcl8.6"
2190 ;; tests cannot be run from the Makefile
2191 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2192 #:test-target "testfixture"
2194 (modify-phases %standard-phases
2195 (add-before 'check 'build-test-runner
2196 (assoc-ref %standard-phases 'check))
2199 (invoke "./testfixture" "test/crypto.test"))))))
2200 (home-page "https://www.zetetic.net/sqlcipher/")
2202 "Library providing transparent encryption of SQLite database files")
2203 (description "SQLCipher is an implementation of SQLite, extended to
2204 provide transparent 256-bit AES encryption of database files. Pages are
2205 encrypted before being written to disk and are decrypted when read back. It’s
2206 well suited for protecting embedded application databases and for mobile
2209 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2210 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2211 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2212 ;; source files are in the public domain.
2213 (license (list license:public-domain license:bsd-3))))
2215 (define-public python-pyodbc-c
2217 (name "python-pyodbc-c")
2222 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2223 "archive.tar.gz?ref=v" version))
2226 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2227 (file-name (string-append name "-" version ".tar.gz"))))
2228 (build-system python-build-system)
2230 `(("unixodbc" ,unixodbc)))
2232 `(;; No unit tests exist.
2234 (home-page "https://github.com/mkleehammer/pyodbc")
2235 (synopsis "Python ODBC Library")
2236 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2238 (license (license:x11-style "file://LICENSE.TXT"))))
2240 (define-public python2-pyodbc-c
2241 (package-with-python2 python-pyodbc-c))
2243 (define-public python-pyodbc
2245 (name "python-pyodbc")
2250 (uri (pypi-uri "pyodbc" version))
2252 (base32 "1kd2i7hc1330cli72vawzby17c3039cqn1aba4i0zrjnpghjhmib"))
2253 (file-name (string-append name "-" version ".tar.gz"))))
2254 (build-system python-build-system)
2256 `(("unixodbc" ,unixodbc)))
2258 `(#:tests? #f)) ; no unit tests exist
2259 (home-page "https://github.com/mkleehammer/pyodbc")
2260 (synopsis "Python ODBC Library")
2261 (description "@code{python-pyodbc} provides a Python DB-API driver
2263 (license (license:x11-style "file:///LICENSE.TXT"))))
2265 (define-public python2-pyodbc
2266 (package-with-python2 python-pyodbc))
2268 (define-public mdbtools
2276 (url "https://github.com/brianb/mdbtools.git")
2278 (file-name (git-file-name name version))
2281 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2282 (build-system gnu-build-system)
2286 `(("autoconf" ,autoconf)
2287 ("automake" ,automake)
2288 ("libtool" ,libtool)
2289 ("pkg-config" ,pkg-config)
2290 ("txt2man" ,txt2man)
2292 (home-page "http://mdbtools.sourceforge.net/")
2293 (synopsis "Read Microsoft Access databases")
2294 (description "MDB Tools is a set of tools and applications to read the
2295 proprietary MDB file format used in Microsoft's Access database package. This
2296 includes programs to export schema and data from Microsoft's Access database
2297 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2298 etc., and an SQL engine for performing simple SQL queries.")
2299 (license (list license:lgpl2.0
2302 (define-public python-lmdb
2304 (name "python-lmdb")
2308 (uri (pypi-uri "lmdb" version))
2311 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2312 (modules '((guix build utils)))
2314 ;; Delete bundled lmdb source files.
2316 (for-each delete-file (list "lib/lmdb.h"
2321 (build-system python-build-system)
2326 (modify-phases %standard-phases
2327 (add-before 'build 'use-system-lmdb
2328 (lambda* (#:key inputs #:allow-other-keys)
2329 (let ((lmdb (assoc-ref inputs "lmdb")))
2330 (setenv "LMDB_FORCE_SYSTEM" "set")
2331 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2332 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2334 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2336 (home-page "https://github.com/dw/py-lmdb")
2337 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2339 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2340 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2342 (list license:openldap2.8
2343 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2344 ;; but not actually needed on platforms currently supported by Guix.
2347 (define-public python2-lmdb
2348 (package-with-python2 python-lmdb))
2350 (define-public python-orator
2352 (name "python-orator")
2356 (uri (pypi-uri "orator" version))
2359 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2360 (build-system python-build-system)
2363 (modify-phases %standard-phases
2364 (add-after 'unpack 'loosen-dependencies
2365 ;; Tests are not actually run since they are not included with the
2366 ;; distributed package, but dependencies are checked.
2368 (substitute* "setup.py"
2370 (("flexmock==0.9.7") "flexmock")
2371 ;; The pytest-mock package is out of date, so we remove minimum
2372 ;; version requirement.
2373 (("pytest-mock.*'") "pytest-mock'"))
2376 `(("python-pytest-mock" ,python-pytest-mock)
2377 ("python-pytest" ,python-pytest)
2378 ("python-flexmock" ,python-flexmock)))
2380 `(("python-backpack" ,python-backpack)
2381 ("python-blinker" ,python-blinker)
2382 ("python-cleo" ,python-cleo)
2383 ("python-faker" ,python-faker)
2384 ("python-inflection" ,python-inflection)
2385 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2386 ("python-pendulum" ,python-pendulum)
2387 ("python-pyaml" ,python-pyaml)
2388 ("python-pygments" ,python-pygments)
2389 ("python-simplejson" ,python-simplejson)
2390 ("python-six" ,python-six)
2391 ("python-wrapt" ,python-wrapt)))
2392 (home-page "https://orator-orm.com/")
2393 (synopsis "ActiveRecord ORM for Python")
2395 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2396 implementation for Python.")
2397 (license license:expat)
2398 (properties `((python2-variant . ,(delay python2-orator))))))
2400 (define-public python2-orator
2401 (package-with-python2 (strip-python2-variant python-orator)))
2403 (define-public virtuoso-ose
2405 (name "virtuoso-ose")
2411 "https://github.com/openlink/virtuoso-opensource/releases/"
2412 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2414 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2415 (build-system gnu-build-system)
2417 `(#:tests? #f ; Tests require a network connection.
2418 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2419 ;; This indicates that the internal zlib code may still be used.
2420 #:configure-flags '("--without-internal-zlib"
2421 "--with-readline")))
2423 `(("openssl" ,openssl-1.0)
2424 ("net-tools" ,net-tools)
2425 ("readline" ,readline)
2427 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2428 (synopsis "Multi-model database system")
2429 (description "Virtuoso is a scalable cross-platform server that combines
2430 relational, graph, and document data management with web application server
2431 and web services platform functionality.")
2432 ;; configure: error: ... can only be build on 64bit platforms
2433 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2434 (license license:gpl2)))
2436 (define-public python-ccm
2443 (uri (pypi-uri "ccm" version))
2446 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2447 (build-system python-build-system)
2449 `(("python-pyyaml" ,python-pyyaml)
2450 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2452 ("python-psutil" ,python-psutil)
2453 ("python-six" ,python-six)))
2454 (home-page "https://github.com/pcmanus/ccm")
2455 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2457 (description "Cassandra Cluster Manager is a development tool for testing
2458 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2460 (license license:asl2.0)))
2462 (define-public python2-ccm
2463 (package-with-python2 python-ccm))
2465 (define-public python2-pysqlite
2467 (name "python2-pysqlite")
2472 (uri (pypi-uri "pysqlite" version))
2475 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2476 (build-system python-build-system)
2478 `(("sqlite" ,sqlite)))
2480 `(#:python ,python-2 ; incompatible with Python 3
2481 #:tests? #f)) ; no test target
2482 (home-page "https://github.com/ghaering/pysqlite")
2483 (synopsis "SQLite bindings for Python")
2485 "Pysqlite provides SQLite bindings for Python that comply to the
2486 Database API 2.0T.")
2487 (license license:zlib)))
2489 (define-public python-sqlalchemy
2491 (name "python-sqlalchemy")
2496 (uri (pypi-uri "SQLAlchemy" version))
2498 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2499 (build-system python-build-system)
2501 `(("python-cython" ,python-cython) ; for C extensions
2502 ("python-pytest" ,python-pytest)
2503 ("python-mock" ,python-mock))) ; for tests
2506 (modify-phases %standard-phases
2508 (lambda _ (invoke "py.test"))))))
2509 (home-page "https://www.sqlalchemy.org")
2510 (synopsis "Database abstraction library")
2512 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2513 gives application developers the full power and flexibility of SQL. It
2514 provides a full suite of well known enterprise-level persistence patterns,
2515 designed for efficient and high-performing database access, adapted into a
2516 simple and Pythonic domain language.")
2517 (license license:x11)))
2519 (define-public python2-sqlalchemy
2520 (package-with-python2 python-sqlalchemy))
2522 (define-public python-sqlalchemy-utils
2524 (name "python-sqlalchemy-utils")
2529 (uri (pypi-uri "SQLAlchemy-Utils" version))
2532 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2533 (build-system python-build-system)
2535 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2537 ;; (modify-phases %standard-phases
2540 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2542 `(("python-six" ,python-six)
2543 ("python-sqlalchemy" ,python-sqlalchemy)))
2545 `(("python-dateutil" ,python-dateutil)
2546 ("python-flexmock" ,python-flexmock)
2547 ("python-psycopg2" ,python-psycopg2)
2548 ("python-pytest" ,python-pytest)
2549 ("python-pytz" ,python-pytz)))
2550 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2551 (synopsis "Various utility functions for SQLAlchemy")
2553 "SQLAlchemy-utils provides various utility functions and custom data types
2554 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2556 You might also want to install the following optional dependencies:
2558 @item @code{python-passlib}
2559 @item @code{python-babel}
2560 @item @code{python-cryptography}
2561 @item @code{python-pytz}
2562 @item @code{python-psycopg2}
2563 @item @code{python-furl}
2564 @item @code{python-flask-babel}
2567 (license license:bsd-3)))
2569 (define-public python2-sqlalchemy-utils
2570 (package-with-python2 python-sqlalchemy-utils))
2572 (define-public python-alembic
2574 (name "python-alembic")
2579 (uri (pypi-uri "alembic" version))
2582 "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd"))))
2583 (build-system python-build-system)
2585 `(("python-mock" ,python-mock)
2586 ("python-pytest-cov" ,python-pytest-cov)))
2588 `(("python-dateutil" ,python-dateutil)
2589 ("python-sqlalchemy" ,python-sqlalchemy)
2590 ("python-mako" ,python-mako)
2591 ("python-editor" ,python-editor)))
2592 (home-page "https://bitbucket.org/zzzeek/alembic")
2593 (synopsis "Database migration tool for SQLAlchemy")
2595 "Alembic is a lightweight database migration tool for usage with the
2596 SQLAlchemy Database Toolkit for Python.")
2597 (license license:expat)))
2599 (define-public python2-alembic
2600 (package-with-python2 python-alembic))
2602 (define-public python-pickleshare
2604 (name "python-pickleshare")
2609 (uri (pypi-uri "pickleshare" version))
2611 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2612 (build-system python-build-system)
2614 `(#:phases (modify-phases %standard-phases
2617 (invoke "pytest"))))))
2619 `(("python-pytest" ,python-pytest)))
2620 (home-page "https://github.com/vivainio/pickleshare")
2621 (synopsis "Tiny key value database with concurrency support")
2623 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2624 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2625 shelve, many processes can access the database simultaneously. Changing a
2626 value in database is immediately visible to other processes accessing the same
2627 database. Concurrency is possible because the values are stored in separate
2628 files. Hence the “database” is a directory where all files are governed by
2630 (properties `((python2-variant . ,(delay python2-pickleshare))))
2631 (license license:expat)))
2633 (define-public python2-pickleshare
2634 (let ((pickleshare (package-with-python2
2635 (strip-python2-variant python-pickleshare))))
2636 (package (inherit pickleshare)
2637 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2638 ,@(package-propagated-inputs pickleshare))))))
2640 (define-public python-apsw
2642 (name "python-apsw")
2643 (version "3.28.0-r1")
2647 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2648 "/download/" version "/apsw-" version ".zip"))
2651 "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly"))))
2652 (build-system python-build-system)
2654 `(("unzip" ,unzip)))
2656 `(("sqlite" ,sqlite)))
2659 (modify-phases %standard-phases
2662 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2664 (add-after 'build 'build-test-helper
2666 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2667 "-I." "-Isqlite3" "src/testextension.c")
2670 (lambda* (#:key inputs outputs #:allow-other-keys)
2671 (add-installed-pythonpath inputs outputs)
2672 (invoke "python" "setup.py" "test")
2674 (home-page "https://github.com/rogerbinns/apsw/")
2675 (synopsis "Another Python SQLite Wrapper")
2676 (description "APSW is a Python wrapper for the SQLite
2677 embedded relational database engine. In contrast to other wrappers such as
2678 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2679 translate the complete SQLite API into Python.")
2680 (license license:zlib)))
2682 (define-public python2-apsw
2683 (package-with-python2 python-apsw))
2685 (define-public python2-neo4j-driver
2687 (name "python2-neo4j-driver")
2688 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2692 (uri (pypi-uri "neo4j-driver" version))
2695 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2696 (build-system python-build-system)
2698 `(#:python ,python-2))
2699 (home-page "https://neo4j.com/developer/python/")
2700 (synopsis "Neo4j driver code written in Python")
2701 (description "This package provides the Neo4j Python driver that connects
2702 to the database using Neo4j's binary protocol. It aims to be minimal, while
2703 being idiomatic to Python.")
2704 (license license:asl2.0)))
2706 (define-public python2-py2neo
2708 (name "python2-py2neo")
2712 (uri (pypi-uri "py2neo" version))
2715 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2716 (build-system python-build-system)
2718 `(#:python ,python-2))
2719 (home-page "http://py2neo.org")
2720 (synopsis "Library and toolkit for working with Neo4j in Python")
2721 (description "This package provides a client library and toolkit for
2722 working with Neo4j from within Python applications and from the command
2723 line. The core library has no external dependencies and has been carefully
2724 designed to be easy and intuitive to use.")
2725 (license license:asl2.0)))
2727 (define-public python-psycopg2
2729 (name "python-psycopg2")
2734 (uri (pypi-uri "psycopg2" version))
2736 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2737 (build-system python-build-system)
2739 ;; Tests would require a postgresql database "psycopg2_test"
2740 ;; and a running postgresql database management service.
2741 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2743 `(("postgresql" ,postgresql))) ; libpq
2744 (home-page "http://initd.org/psycopg/")
2745 (synopsis "Python PostgreSQL adapter")
2747 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2749 (license license:lgpl3+)))
2751 (define-public python2-psycopg2
2752 (package-with-python2 python-psycopg2))
2754 (define-public python-sadisplay
2756 (name "python-sadisplay")
2761 (uri (pypi-uri "sadisplay" version))
2764 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2765 (build-system python-build-system)
2767 `(("python-sqlalchemy" ,python-sqlalchemy)))
2770 `(("python-nose" ,python-nose)))
2771 (home-page "https://bitbucket.org/estin/sadisplay")
2772 (synopsis "SQLAlchemy schema displayer")
2773 (description "This package provides a program to build Entity
2774 Relationship diagrams from a SQLAlchemy model (or directly from the
2776 (license license:bsd-3)))
2778 (define-public python2-sadisplay
2779 (package-with-python2 python-sadisplay))
2781 (define-public python-mysqlclient
2783 (name "python-mysqlclient")
2788 (uri (pypi-uri "mysqlclient" version))
2791 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2792 (build-system python-build-system)
2794 `(("nose" ,python-nose)
2795 ("mock" ,python-mock)
2796 ("py.test" ,python-pytest)))
2798 `(("mysql" ,mariadb "lib")
2799 ("mysql-dev" ,mariadb "dev")
2801 ("openssl" ,openssl)))
2802 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2803 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2804 (description "MySQLdb is an interface to the popular MySQL database server
2805 for Python. The design goals are:
2807 @item Compliance with Python database API version 2.0 [PEP-0249],
2808 @item Thread-safety,
2809 @item Thread-friendliness (threads will not block each other).
2811 (license license:gpl2)))
2813 (define-public python2-mysqlclient
2814 (package-with-python2 python-mysqlclient))
2816 (define-public python-hiredis
2818 (name "python-hiredis")
2823 (uri (pypi-uri "hiredis" version))
2826 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2827 (build-system python-build-system)
2831 (home-page "https://github.com/redis/hiredis-py")
2832 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2833 (description "Python-hiredis is a python extension that wraps protocol
2834 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2835 (license license:bsd-3)))
2837 (define-public python2-hiredis
2838 (package-with-python2 python-hiredis))
2840 (define-public python-fakeredis
2842 (name "python-fakeredis")
2847 (uri (pypi-uri "fakeredis" version))
2850 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2851 (build-system python-build-system)
2855 (home-page "https://github.com/jamesls/fakeredis")
2856 (synopsis "Fake implementation of redis API for testing purposes")
2858 "Fakeredis is a pure-Python implementation of the redis-py Python client
2859 that simulates talking to a redis server. It was created for a single purpose:
2860 to write unit tests.
2862 Setting up redis is not hard, but one often wants to write unit tests that don't
2863 talk to an external server such as redis. This module can be used as a
2864 reasonable substitute.")
2865 (license license:bsd-3)))
2867 (define-public python2-fakeredis
2868 (package-with-python2 python-fakeredis))
2870 (define-public python-redis
2872 (name "python-redis")
2877 (uri (pypi-uri "redis" version))
2879 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
2880 (build-system python-build-system)
2881 ;; Tests require a running Redis server.
2882 (arguments '(#:tests? #f))
2883 ;; As long as we are not running test, we do not need this input :-)
2885 ;; `(("python-pytest" ,python-pytest)))
2886 (home-page "https://github.com/andymccurdy/redis-py")
2887 (synopsis "Redis Python client")
2889 "This package provides a Python interface to the Redis key-value store.")
2890 (license license:expat)))
2892 (define-public python2-redis
2893 (package-with-python2 python-redis))
2895 (define-public python-rq
2902 (uri (pypi-uri "rq" version))
2904 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2905 (build-system python-build-system)
2907 `(("python-click" ,python-click)
2908 ("python-redis" ,python-redis)))
2909 (home-page "http://python-rq.org/")
2910 (synopsis "Simple job queues for Python")
2912 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2913 processing them in the background with workers. It is backed by Redis and it
2914 is designed to have a low barrier to entry.")
2915 (license license:bsd-2)))
2917 (define-public python2-rq
2918 (package-with-python2 python-rq))
2920 (define-public python-trollius-redis
2922 (name "python-trollius-redis")
2927 (uri (pypi-uri "trollius_redis" version))
2930 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2931 (build-system python-build-system)
2932 ;; TODO: Tests require packaging 'hiredis'.
2933 (arguments '(#:tests? #f))
2934 (home-page "https://github.com/benjolitz/trollius-redis")
2935 (synopsis "Port of asyncio-redis to trollius")
2936 (description "@code{trollius-redis} is a Redis client for Python
2937 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2939 (license license:bsd-2)))
2941 (define-public python2-trollius-redis
2942 (package-with-python2 python-trollius-redis))
2944 (define-public python-sqlparse
2946 (name "python-sqlparse")
2950 (uri (pypi-uri "sqlparse" version))
2953 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2954 (build-system python-build-system)
2957 (modify-phases %standard-phases
2959 (lambda _ (invoke "py.test"))))))
2961 `(("python-pytest" ,python-pytest)))
2962 (home-page "https://github.com/andialbrecht/sqlparse")
2963 (synopsis "Non-validating SQL parser")
2964 (description "Sqlparse is a non-validating SQL parser for Python. It
2965 provides support for parsing, splitting and formatting SQL statements.")
2966 (license license:bsd-3)))
2968 (define-public python2-sqlparse
2969 (package-with-python2 python-sqlparse))
2971 (define-public python-sql
2978 (uri (pypi-uri "python-sql" version))
2980 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
2981 (build-system python-build-system)
2982 (home-page "https://python-sql.tryton.org/")
2983 (synopsis "Library to write SQL queries in a pythonic way")
2984 (description "@code{python-sql} is a library to write SQL queries, that
2985 transforms idiomatic python function calls to well-formed SQL queries.")
2986 (license license:bsd-3)))
2988 (define-public python2-sql
2989 (package-with-python2 python-sql))
2991 (define-public mongo-tools
2993 (name "mongo-tools")
2996 (origin (method git-fetch)
2998 (url "https://github.com/mongodb/mongo-tools")
2999 (commit (string-append "r" version))))
3000 (file-name (git-file-name name version))
3003 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3004 (build-system go-build-system)
3006 `(#:import-path "github.com/mongodb/mongo-tools"
3007 #:modules ((srfi srfi-1)
3008 (guix build go-build-system)
3010 #:install-source? #f
3013 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3014 "mongoimport" "mongooplog" "mongorestore"
3015 "mongostat" "mongotop")))
3016 (modify-phases %standard-phases
3017 (add-after 'unpack 'delete-bundled-source-code
3019 (delete-file-recursively
3020 "src/github.com/mongodb/mongo-tools/vendor")
3022 (add-after 'delete-bundled-source-code 'patch-source
3024 ;; Remove a redundant argument that causes compilation to fail.
3026 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3027 (("skipping restore of system.profile collection\", db)")
3028 "skipping restore of system.profile collection\")"))
3032 (for-each (lambda (tool)
3035 ;; This is where the tests expect to find the
3037 "-o" ,(string-append
3038 "src/github.com/mongodb/mongo-tools/bin/"
3041 "-tags=\"ssl sasl\""
3043 "-extldflags=-Wl,-z,now,-z,relro"
3045 "src/github.com/mongodb/mongo-tools/"
3046 tool "/main/" tool ".go"))))
3047 (simple-format #t "build: running ~A\n"
3048 (string-join command))
3049 (apply invoke command)))
3054 (with-directory-excursion "src"
3055 (for-each (lambda (tool)
3058 (string-append "github.com/mongodb/mongo-tools/"
3063 (lambda* (#:key outputs #:allow-other-keys)
3064 (for-each (lambda (tool)
3066 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3068 (string-append (assoc-ref outputs "out")
3073 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3074 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3075 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3076 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3077 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3078 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3079 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3080 (home-page "https://github.com/mongodb/mongo-tools")
3081 (synopsis "Various tools for interacting with MongoDB and BSON")
3083 "This package includes a collection of tools related to MongoDB.
3086 Display BSON files in a human-readable format
3088 Convert data from JSON, TSV or CSV and insert them into a collection
3090 Write an existing collection to CSV or JSON format
3091 @item mongodump/mongorestore
3092 Dump MongoDB backups to disk in the BSON format
3094 Read MongoDB backups in the BSON format, and restore them to a live database
3096 Monitor live MongoDB servers, replica sets, or sharded clusters
3098 Read, write, delete, or update files in GridFS
3100 Replay oplog entries between MongoDB servers
3102 Monitor read/write activity on a mongo server
3104 (license license:asl2.0)))
3106 (define-public apache-arrow
3108 (name "apache-arrow")
3114 (url "https://github.com/apache/arrow")
3115 (commit (string-append "apache-arrow-" version))))
3116 (file-name (git-file-name name version))
3119 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3120 (build-system cmake-build-system)
3124 (modify-phases %standard-phases
3125 (add-before 'configure 'enter-source-directory
3126 (lambda _ (chdir "cpp") #t))
3127 (add-after 'unpack 'set-env
3129 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3130 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3131 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3132 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
3133 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3135 #:build-type "Release"
3137 (list "-DARROW_PYTHON=ON"
3139 ;; Install to PREFIX/lib (the default is
3141 (string-append "-DCMAKE_INSTALL_LIBDIR="
3142 (assoc-ref %outputs "out")
3145 ;; XXX These Guix package offer static
3146 ;; libraries that are not position independent,
3147 ;; and ld fails to link them into the arrow .so
3148 "-DARROW_WITH_SNAPPY=OFF"
3149 "-DARROW_WITH_ZLIB=OFF"
3150 "-DARROW_WITH_ZSTD=OFF"
3151 "-DARROW_WITH_LZ4=OFF"
3153 ;; Building the tests forces on all the
3154 ;; optional features and the use of static
3156 "-DARROW_BUILD_TESTS=OFF"
3157 "-DARROW_BUILD_STATIC=OFF")))
3160 ("rapidjson" ,rapidjson)
3161 ("brotli" ,google-brotli)
3162 ("flatbuffers" ,flatbuffers)
3163 ("jemalloc" ,jemalloc)
3164 ("python-3" ,python)
3165 ("python-numpy" ,python-numpy)))
3166 (home-page "https://arrow.apache.org/")
3167 (synopsis "Columnar in-memory analytics")
3168 (description "Apache Arrow is a columnar in-memory analytics layer
3169 designed to accelerate big data. It houses a set of canonical in-memory
3170 representations of flat and hierarchical data along with multiple
3171 language-bindings for structure manipulation. It also provides IPC and common
3172 algorithm implementations.")
3173 (license license:asl2.0)))
3175 (define-public python-pyarrow
3177 (name "python-pyarrow")
3183 (url "https://github.com/apache/arrow")
3184 (commit (string-append "apache-arrow-" version))))
3185 (file-name (git-file-name name version))
3188 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3189 (build-system python-build-system)
3191 '(#:tests? #f ; XXX There are no tests in the "python" directory
3193 (modify-phases %standard-phases
3194 (delete 'build) ; XXX the build is performed again during the install phase
3195 (add-after 'unpack 'enter-source-directory
3196 (lambda _ (chdir "python") #t))
3197 (add-after 'unpack 'set-env
3199 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3202 `(("apache-arrow" ,apache-arrow)
3203 ("python-numpy" ,python-numpy)
3204 ("python-pandas" ,python-pandas)
3205 ("python-six" ,python-six)))
3207 `(("cmake" ,cmake-minimal)
3208 ("python-cython" ,python-cython)
3209 ("python-pytest" ,python-pytest)
3210 ("python-pytest-runner" ,python-pytest-runner)
3211 ("python-setuptools-scm" ,python-setuptools-scm)))
3212 (home-page "https://arrow.apache.org/docs/python/")
3213 (synopsis "Python bindings for Apache Arrow")
3214 (description "This library provides a Pythonic API wrapper for the reference
3215 Arrow C++ implementation, along with tools for interoperability with pandas,
3216 NumPy, and other traditional Python scientific computing packages.")
3217 (license license:asl2.0)))
3219 (define-public python2-pyarrow
3220 (package-with-python2 python-pyarrow))
3222 (define-public python-crate
3224 (name "python-crate")
3228 (uri (pypi-uri "crate" version))
3231 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3232 (build-system python-build-system)
3234 `(("python-urllib3" ,python-urllib3)))
3235 (home-page "https://github.com/crate/crate-python")
3236 (synopsis "CrateDB Python client")
3238 "This package provides a Python client library for CrateDB.
3239 It implements the Python DB API 2.0 specification and includes support for
3241 (license license:asl2.0)))
3243 (define-public libdbi
3249 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3250 version "/libdbi-" version ".tar.gz"))
3253 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3254 (build-system gnu-build-system)
3255 (synopsis "Database independent abstraction layer in C")
3257 "This library implements a database independent abstraction layer in C,
3258 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3259 programmers can leverage the power of multiple databases and multiple
3260 simultaneous database connections by using this framework.")
3261 (home-page "http://libdbi.sourceforge.net/")
3262 (license license:lgpl2.1+)))
3264 (define-public libdbi-drivers
3266 (name "libdbi-drivers")
3270 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3271 "libdbi-drivers/libdbi-drivers-" version
3272 "/libdbi-drivers-" version ".tar.gz"))
3275 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3276 (build-system gnu-build-system)
3279 ("inetutils" ,inetutils)
3280 ("glibc-locales" ,glibc-locales)
3281 ("mariadb" ,mariadb/fixed-install-db)))
3283 `(("libdbi" ,libdbi)
3284 ("mariadb:dev" ,mariadb "dev")
3285 ("mariadb:lib" ,mariadb "lib")
3286 ("postgresql" ,postgresql)
3287 ("sqlite" ,sqlite)))
3290 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3291 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3292 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3293 (postgresql (assoc-ref %build-inputs "postgresql"))
3294 (sqlite (assoc-ref %build-inputs "sqlite")))
3295 (list "--disable-docs"
3296 (string-append "--with-dbi-incdir=" libdbi "/include")
3297 (string-append "--with-dbi-libdir=" libdbi "/lib")
3299 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3300 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3302 (string-append "--with-pgsql-incdir=" postgresql "/include")
3303 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3305 (string-append "--with-sqlite-incdir=" sqlite "/include")
3306 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3308 (modify-phases %standard-phases
3309 (add-after 'unpack 'fix-tests
3310 (lambda* (#:key inputs #:allow-other-keys)
3311 (substitute* "tests/test_mysql.sh"
3313 (string-append "MYMYSQLD="
3314 (assoc-ref inputs "mariadb")
3317 (add-after 'install 'remove-empty-directories
3318 (lambda* (#:key outputs #:allow-other-keys)
3319 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3320 (delete-file-recursively var))
3322 (synopsis "Database drivers for the libdbi framework")
3324 "The @code{libdbi-drivers} library provides the database specific drivers
3325 for the @code{libdbi} framework.
3327 The drivers officially supported by @code{libdbi} are:
3333 (home-page "http://libdbi-drivers.sourceforge.net/")
3334 (license license:lgpl2.1+)))