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, 2020 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, 2020 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>
41 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
42 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
44 ;;; This file is part of GNU Guix.
46 ;;; GNU Guix is free software; you can redistribute it and/or modify it
47 ;;; under the terms of the GNU General Public License as published by
48 ;;; the Free Software Foundation; either version 3 of the License, or (at
49 ;;; your option) any later version.
51 ;;; GNU Guix is distributed in the hope that it will be useful, but
52 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 ;;; GNU General Public License for more details.
56 ;;; You should have received a copy of the GNU General Public License
57 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
59 (define-module (gnu packages databases)
60 #:use-module (gnu packages)
61 #:use-module (gnu packages admin)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages avahi)
65 #:use-module (gnu packages base)
66 #:use-module (gnu packages bash)
67 #:use-module (gnu packages bison)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages cmake)
71 #:use-module (gnu packages compression)
72 #:use-module (gnu packages crypto)
73 #:use-module (gnu packages curl)
74 #:use-module (gnu packages cyrus-sasl)
75 #:use-module (gnu packages dbm)
76 #:use-module (gnu packages emacs)
77 #:use-module (gnu packages flex)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages gettext)
80 #:use-module (gnu packages glib)
81 #:use-module (gnu packages gnupg)
82 #:use-module (gnu packages guile)
83 #:use-module (gnu packages time)
84 #:use-module (gnu packages golang)
85 #:use-module (gnu packages jemalloc)
86 #:use-module (gnu packages language)
87 #:use-module (gnu packages libevent)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages man)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages onc-rpc)
92 #:use-module (gnu packages parallel)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages perl-check)
96 #:use-module (gnu packages perl-web)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages popt)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-crypto)
101 #:use-module (gnu packages python-web)
102 #:use-module (gnu packages python-science)
103 #:use-module (gnu packages python-xyz)
104 #:use-module (gnu packages rdf)
105 #:use-module (gnu packages readline)
106 #:use-module (gnu packages ruby)
107 #:use-module (gnu packages serialization)
108 #:use-module (gnu packages sphinx)
109 #:use-module (gnu packages sqlite)
110 #:use-module (gnu packages tcl)
111 #:use-module (gnu packages terminals)
112 #:use-module (gnu packages textutils)
113 #:use-module (gnu packages tls)
114 #:use-module (gnu packages valgrind)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages xml)
117 #:use-module ((guix licenses) #:prefix license:)
118 #:use-module (guix packages)
119 #:use-module (guix download)
120 #:use-module (guix bzr-download)
121 #:use-module (guix git-download)
122 #:use-module (guix build-system emacs)
123 #:use-module (guix build-system gnu)
124 #:use-module (guix build-system go)
125 #:use-module (guix build-system perl)
126 #:use-module (guix build-system python)
127 #:use-module (guix build-system ruby)
128 #:use-module (guix build-system cmake)
129 #:use-module (guix build-system scons)
130 #:use-module (guix build-system trivial)
131 #:use-module (guix utils)
132 #:use-module (srfi srfi-1)
133 #:use-module (srfi srfi-26)
134 #:use-module (ice-9 match))
136 (define-public 4store
143 (url "https://github.com/4store/4store.git")
144 (commit (string-append "v" version))))
145 (file-name (git-file-name name version))
147 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
148 (patches (search-patches "4store-unset-preprocessor-directive.patch"
149 "4store-fix-buildsystem.patch"))))
150 (build-system gnu-build-system)
154 ("autoconf" ,autoconf)
155 ("automake" ,automake)
156 ("gettext" ,gettext-minimal)
158 ("pcre" ,pcre "bin") ;for 'pcre-config'
159 ("pkg-config" ,pkg-config)))
165 ("readline" ,readline)
167 ("cyrus-sasl" ,cyrus-sasl)
169 ("util-linux" ,util-linux)))
170 ;; http://www.4store.org has been down for a while now.
171 (home-page "https://github.com/4store/4store")
172 (synopsis "Clustered RDF storage and query engine")
173 (description "4store is a RDF/SPARQL store written in C, supporting
174 either single machines or networked clusters.")
175 (license license:gpl3+)))
177 (define-public go-gopkg.in-mgo.v2
179 (name "go-gopkg.in-mgo.v2")
180 (version "2016.08.01")
184 (url "https://github.com/go-mgo/mgo")
185 (commit (string-append "r" version))))
186 (file-name (git-file-name name version))
189 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
190 (build-system go-build-system)
192 `(#:import-path "gopkg.in/mgo.v2"
193 ;; TODO: The tests fail as MongoDB fails to start
194 ;; Error parsing command line: unrecognised option '--chunkSize'
197 (modify-phases %standard-phases
198 (delete 'reset-gzip-timestamps)
199 (add-before 'check 'start-mongodb
200 (lambda* (#:key tests? #:allow-other-keys)
202 (with-directory-excursion "src/gopkg.in/mgo.v2"
203 (invoke "make" "startdb")))
205 (add-after 'check 'stop'mongodb
206 (lambda* (#:key tests? #:allow-other-keys)
208 (with-directory-excursion "src/gopkg.in/mgo.v2"
209 (invoke "make" "stopdb")))
212 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
214 ("daemontools" ,daemontools)))
215 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
217 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
218 It implements a rich selection of features under a simple API following
219 standard Go idioms.")
220 (home-page "http://labix.org/mgo")
221 (license license:bsd-2)))
223 (define-public ephemeralpg
231 "http://eradman.com/ephemeralpg/code/ephemeralpg-"
234 (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4"))))
235 (build-system gnu-build-system)
237 '(#:make-flags (list "CC=gcc"
238 (string-append "PREFIX=" %output))
240 (modify-phases %standard-phases
243 (lambda* (#:key inputs #:allow-other-keys)
244 ;; The intention for one test is to test without PostgreSQL on
245 ;; the $PATH, so replace the test $PATH with just the util-linux
246 ;; bin, which contains getopt. It will hopefully be possible to
247 ;; remove this for releases after 2.8.
248 (substitute* "test.rb"
250 (string-append (assoc-ref inputs "util-linux")
252 ;; Set the LC_ALL=C as some tests use sort, and the locale
253 ;; affects the order. It will hopefully be possible to remove
254 ;; this for releases after 2.8.
255 (setenv "LC_ALL" "C")
256 (invoke "ruby" "test.rb")
258 (add-after 'install 'wrap
259 (lambda* (#:key inputs outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (wrap-program (string-append out "/bin/pg_tmp")
263 (,(string-append (assoc-ref inputs "util-linux")
265 ,(string-append (assoc-ref inputs "postgresql")
268 ,(string-append out "/bin")))))
271 `(("postgresql" ,postgresql)
272 ("util-linux" ,util-linux)))
275 (home-page "http://eradman.com/ephemeralpg/")
276 (synopsis "Run temporary PostgreSQL databases")
278 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
279 like running software test suites. Temporary databases created with
280 @code{pg_tmp} have a limited shared memory footprint and are automatically
281 garbage-collected after a configurable number of seconds (the default is
283 (license license:isc)))
285 (define-public es-dump-restore
287 (name "es-dump-restore")
292 (uri (rubygems-uri "es_dump_restore" version))
295 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
296 (build-system ruby-build-system)
298 '(#:tests? #f)) ;; No testsuite.
300 `(("ruby-httpclient" ,ruby-httpclient)
301 ("ruby-multi-json" ,ruby-multi-json)
302 ("ruby-progress_bar" ,ruby-progress_bar)
303 ("ruby-rubyzip" ,ruby-rubyzip)
304 ("ruby-thor" ,ruby-thor)))
305 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
307 "This package provides a utility for dumping the contents of an
308 ElasticSearch index to a compressed file and restoring the dumpfile back to an
309 ElasticSearch server")
310 (home-page "https://github.com/patientslikeme/es_dump_restore")
311 (license license:expat)))
313 (define-public leveldb
320 (url "https://github.com/google/leveldb")
322 (file-name (git-file-name name version))
325 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
326 (build-system cmake-build-system)
328 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
330 `(("snappy" ,snappy)))
331 (home-page "https://github.com/google/leveldb")
332 (synopsis "Fast key-value storage library")
334 "LevelDB is a fast key-value storage library that provides an ordered
335 mapping from string keys to string values.")
336 (license license:bsd-3)))
338 (define-public memcached
346 "https://memcached.org/files/memcached-" version ".tar.gz"))
348 (base32 "1r511qr95q0ywdaql3pdjiwzkfqxhhfzb13ilvl7mznfm4iv1myg"))))
349 (build-system gnu-build-system)
351 `(("libevent" ,libevent)
352 ("cyrus-sasl" ,cyrus-sasl)))
353 (home-page "https://memcached.org/")
354 (synopsis "In-memory caching service")
355 (description "Memcached is an in-memory key-value store. It has a small
356 and generic API, and was originally intended for use with dynamic web
358 (license license:bsd-3)))
360 (define-public libmemcached
362 (name "libmemcached")
364 ;; We build from the sources since we want to build the extra HTML
365 ;; documentation which is not included with the release.
369 (url "lp:libmemcached/1.0")
370 (revision (string-append "tag:" version))))
371 (file-name (string-append name "-" version "-checkout"))
374 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
376 (search-patches "libmemcached-build-with-gcc7.patch"))))
377 (build-system gnu-build-system)
379 `(("memcached" ,memcached)
381 ("autoconf" ,autoconf)
382 ("automake" ,automake)
386 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
388 `(("libevent" ,libevent)
389 ("cyrus-sasl" ,cyrus-sasl)))
390 (outputs '("out" "doc"))
393 (modify-phases %standard-phases
394 (add-before 'bootstrap 'fix-configure.ac
395 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
396 ;; get the error ``configure: error: cannot find install-sh,
397 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
398 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
399 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
401 (delete-file "bootstrap.sh") ;not useful in the context of Guix
402 (substitute* "configure.ac"
403 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
404 (("(^AC_INIT.*)" anchor)
405 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
407 (add-before 'bootstrap 'disable-failing-tests
408 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
410 ;; Mark some heavily failing test suites as expected to fail.
411 (substitute* "Makefile.am"
412 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
413 (string-append xfail_tests " tests/testudp"
414 " tests/libmemcached-1.0/testapp"
415 " tests/libmemcached-1.0/testsocket")))
416 ;; Disable two tests of the unittest test suite.
417 (substitute* "libtest/unittest.cc"
418 ((".*echo_fubar_BINARY \\},.*") "")
419 ((".*application_doesnotexist_BINARY \\},.*") ""))
421 (add-after 'disable-dns-tests 'build-and-install-html-doc
422 (lambda* (#:key outputs #:allow-other-keys)
423 (let ((html (string-append (assoc-ref outputs "doc")
424 "/share/doc/libmemcached/html/")))
425 (invoke "make" "install-html")
426 ;; Cleanup useless files.
427 (for-each delete-file-recursively
428 (map (lambda (x) (string-append html x))
429 '("_sources" ".doctrees" ".buildinfo"))))
431 (home-page "https://libmemcached.org/")
432 (synopsis "C++ library for memcached")
433 (description "libMemcached is a library to use memcached in C/C++
434 applications. It comes with a complete reference guide and documentation of
435 the API, and provides features such as:
437 @item Asynchronous and synchronous transport support
438 @item Consistent hashing and distribution
439 @item Tunable hashing algorithm to match keys
440 @item Access to large object support
441 @item Local replication
443 (license license:bsd-3)))
445 (define-public python-pylibmc
447 (name "python-pylibmc")
452 (uri (pypi-uri "pylibmc" version))
454 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
455 (build-system python-build-system)
458 (modify-phases %standard-phases
459 (add-before 'check 'start-memcached-daemon
460 ;; The test suite requires a memcached server.
462 (invoke "memcached" "-d"))))))
464 `(("memcached" ,memcached)
465 ("python-nose" ,python-nose)))
467 `(("libmemcached" ,libmemcached)
469 ("cyrus-sasl" ,cyrus-sasl)))
470 (home-page "http://sendapatch.se/projects/pylibmc/")
471 (synopsis "Python client for memcached")
473 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
474 around TangentOrg’s libmemcached library, and can be used as a drop-in
475 replacement for the code@{python-memcached} library.")
476 (license license:bsd-3)))
478 (define-public python2-pylibmc
479 (package-with-python2 python-pylibmc))
481 (define-public mongodb
487 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
489 (file-name (string-append name "-" version ".tar.gz"))
491 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
492 (modules '((guix build utils)))
495 (for-each (lambda (dir)
496 (delete-file-recursively
497 (string-append "src/third_party/" dir)))
498 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
499 "valgrind-3.11.0" "wiredtiger"
500 "yaml-cpp-0.5.3" "zlib-1.2.8"))
504 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
505 (build-system scons-build-system)
507 `(("openssl" ,openssl-1.0)
509 ,@(match (%current-system)
510 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
511 `(("wiredtiger" ,wiredtiger)))
513 ("yaml-cpp" ,yaml-cpp)
517 `(("valgrind" ,valgrind)
520 ("python2-pymongo" ,python2-pymongo)
521 ("python2-pyyaml" ,python2-pyyaml)
524 `(#:scons ,scons-python2
526 (let ((common-options
527 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
529 ;; wiredtiger is 64-bit only
530 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
532 '("i686-linux" "armhf-linux"))
534 ``"--use-system-wiredtiger")
536 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
537 ;; --use-system-boost
538 "--use-system-snappy"
540 "--use-system-valgrind"
541 ;; "--use-system-stemmer" TODO: Missing relevant package
543 "--disable-warnings-as-errors"
544 ,(format #f "--jobs=~a" (parallel-job-count))
546 (modify-phases %standard-phases
547 (add-after 'unpack 'patch
549 ;; Remove use of GNU extensions in parse_number_test.cpp, to
550 ;; allow compiling with GCC 7 or later
551 ;; https://jira.mongodb.org/browse/SERVER-28063
552 (substitute* "src/mongo/base/parse_number_test.cpp"
553 (("0xabcab\\.defdefP-10")
554 "687.16784283419838"))
556 (add-after 'unpack 'scons-propagate-environment
558 ;; Modify the SConstruct file to arrange for
559 ;; environment variables to be propagated.
560 (substitute* "SConstruct"
561 (("^env = Environment\\(")
562 "env = Environment(ENV=os.environ, "))
564 (add-after 'unpack 'create-version-file
566 (call-with-output-file "version.json"
568 (display ,(simple-format #f "{
574 (apply invoke `("scons"
576 "mongod" "mongo" "mongos"))))
578 (lambda* (#:key tests? inputs #:allow-other-keys)
580 (string-append (assoc-ref inputs "tzdata")
583 ;; Note that with the tests, especially the unittests, the
584 ;; build can take up to ~45GB of space, as many tests are
585 ;; individual executable files, with some being hundreds of
586 ;; megabytes in size.
587 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
588 (substitute* "build/unittests.txt"
589 ;; TODO: Don't run the async_stream_test, as it hangs
590 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
592 ;; TODO: This test fails
593 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
594 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
596 (invoke "python" "buildscripts/resmoke.py"
597 "--suites=dbtest,unittests"
598 (format #f "--jobs=~a" (parallel-job-count))))
601 (lambda* (#:key outputs #:allow-other-keys)
602 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
603 (install-file "mongod" bin)
604 (install-file "mongos" bin)
605 (install-file "mongo" bin))
607 (home-page "https://www.mongodb.org/")
608 (synopsis "High performance and high availability document database")
610 "Mongo is a high-performance, high availability, schema-free
611 document-oriented database. A key goal of MongoDB is to bridge the gap
612 between key/value stores (which are fast and highly scalable) and traditional
613 RDBMS systems (which are deep in functionality).")
614 (license (list license:agpl3
615 ;; Some parts are licensed under the Apache License
618 ;; XXX When updating, check whether boost-for-mysql is still needed.
619 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
626 (uri (list (string-append
627 "https://dev.mysql.com/get/Downloads/MySQL-"
628 (version-major+minor version) "/"
629 name "-" version ".tar.gz")
631 "https://downloads.mysql.com/archives/get/file/"
632 name "-" version ".tar.gz")))
635 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
636 (build-system cmake-build-system)
639 '("-DBUILD_CONFIG=mysql_release"
642 "-DDEFAULT_CHARSET=utf8"
643 "-DDEFAULT_COLLATION=utf8_general_ci"
644 "-DMYSQL_DATADIR=/var/lib/mysql"
645 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
646 "-DINSTALL_INFODIR=share/mysql/docs"
647 "-DINSTALL_MANDIR=share/man"
648 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
649 "-DINSTALL_SCRIPTDIR=bin"
650 "-DINSTALL_INCLUDEDIR=include/mysql"
651 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
652 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
653 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
654 "-DINSTALL_DOCDIR=share/mysql/docs"
655 "-DINSTALL_SHAREDIR=share/mysql"
656 ;; Get rid of test data.
657 "-DINSTALL_MYSQLTESTDIR="
658 "-DINSTALL_SQLBENCHDIR=")
659 #:phases (modify-phases %standard-phases
661 'install 'remove-extra-binaries
662 (lambda* (#:key outputs #:allow-other-keys)
663 (let ((out (assoc-ref outputs "out")))
664 ;; Remove the 3 *_embedded files, which weigh in at
666 (for-each delete-file
667 (find-files (string-append out "/bin")
673 ("pkg-config" ,pkg-config)))
675 `(("boost" ,boost-for-mysql)
677 ("libtirpc" ,libtirpc)
680 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
682 (home-page "https://www.mysql.com/")
683 (synopsis "Fast, easy to use, and popular database")
685 "MySQL is a fast, reliable, and easy to use relational database
686 management system that supports the standardized Structured Query
688 (license license:gpl2)))
690 (define-public mariadb
696 (uri (string-append "https://downloads.mariadb.com/MariaDB"
697 "/mariadb-" version "/source/mariadb-"
701 "0fah6d50hldq0farxwr8mj3jnniwdz0d1wsha07nx37fc79h7wi1"))
702 (patches (search-patches "mariadb-client-test-32bit.patch"))
703 (modules '((guix build utils)))
706 ;; Delete bundled snappy and xz.
707 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
708 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
709 ;; This file checks that the bundled sources are present and
710 ;; declares build procedures for them.
711 (("^include\\(TokuThirdParty\\)") ""))
712 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
713 ;; Don't attempt to use the procedures we just removed.
714 ((" build_lzma build_snappy") ""))
716 ;; Preserve CMakeLists.txt for these.
717 (for-each (lambda (file)
718 (unless (string-suffix? "CMakeLists.txt" file)
720 (append (find-files "extra/yassl")
721 (find-files "pcre") (find-files "zlib")))
723 (build-system cmake-build-system)
724 (outputs '("out" "lib" "dev"))
728 "-DBUILD_CONFIG=mysql_release"
729 ;; Linking with libarchive fails, like this:
731 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
732 ;; relocation R_X86_64_32 against `.bss' can not be used when
733 ;; making a shared object; recompile with -fPIC
735 ;; For now, disable the features that that use libarchive (xtrabackup).
736 "-DWITH_LIBARCHIVE=OFF"
738 ;; Disable the TokuDB engine, because its test suite frequently fails,
739 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
742 ;; Ensure the system libraries are used.
743 "-DWITH_JEMALLOC=yes"
748 "-DDEFAULT_CHARSET=utf8"
749 "-DDEFAULT_COLLATION=utf8_general_ci"
750 "-DMYSQL_DATADIR=/var/lib/mysql"
751 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
752 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
753 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
755 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
757 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
759 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
760 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
761 "-DCMAKE_INSTALL_LIBDIR=lib"
762 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
763 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
765 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
767 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
769 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
770 "/share/mysql/support-files")
771 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
772 "-DINSTALL_SHAREDIR=share")
774 (modify-phases %standard-phases
775 (add-after 'unpack 'fix-pcre-detection
777 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
778 ;; in version 8.34. Unfortunately the upstream patch behaves
779 ;; slightly differently and the build system fails to detect it.
780 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
781 ;; XXX: Consider patching PCRE instead.
782 (substitute* "cmake/pcre.cmake"
783 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
785 (add-after 'unpack 'adjust-tests
787 (let ((disabled-tests
788 '(;; These fail because root@hostname == root@localhost in
789 ;; the build environment, causing a user count mismatch.
790 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
792 "main.explain_non_select"
794 "main.stat_tables_innodb"
795 "roles.acl_statistics"
797 ;; This file contains a time bomb which makes it fail after
798 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
801 ;; FIXME: This test fails on i686:
802 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
803 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
804 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
805 ;; (all three tables must exist and be identical)
806 ;; in a loop it produces the same error around 1/240 times.
807 ;; montywi on #maria suggested removing the real_end check in
808 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
809 ;; reach the ending quote occasionally. Disable it for now.
811 ;; FIXME: This test fails on armhf-linux:
812 "mroonga/storage.index_read_multiple_double"))
814 ;; This file contains a list of known-flaky tests for this
815 ;; release. Append our own items.
816 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
817 (for-each (lambda (test)
818 (format unstable-tests "~a : ~a\n"
819 test "Disabled in Guix"))
821 (close-port unstable-tests)
823 ;; XXX: This test fails because it expects a latin1 charset and
824 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
825 (substitute* "mysql-test/r/gis_notembedded.result"
826 (("latin1_swedish_ci") "utf8_general_ci")
827 (("\tlatin1") "\tutf8"))
829 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
833 (substitute* "mysql-test/mysql-test-run.pl"
834 (("/bin/ls") (which "ls"))
835 (("/bin/sh") (which "sh")))
837 (add-before 'configure 'disable-plugins
839 (let ((disable-plugin (lambda (name)
840 (call-with-output-file
841 (string-append "plugin/" name
844 (format port "\n")))))
845 (disabled-plugins '(;; XXX: Causes a test failure.
847 (for-each disable-plugin disabled-plugins)
850 (lambda* (#:key (tests? #t) #:allow-other-keys)
852 (with-directory-excursion "mysql-test"
853 (invoke "./mtr" "--verbose"
855 "--testcase-timeout=40"
856 "--suite-timeout=600"
857 "--parallel" (number->string (parallel-job-count))
858 "--skip-test-list=unstable-tests"))
859 (format #t "test suite not run~%"))
862 'install 'post-install
863 (lambda* (#:key inputs outputs #:allow-other-keys)
864 (let* ((out (assoc-ref outputs "out"))
865 (dev (assoc-ref outputs "dev"))
866 (lib (assoc-ref outputs "lib"))
867 (openssl (assoc-ref inputs "openssl")))
868 (substitute* (string-append out "/bin/mysql_install_db")
870 (string-append "basedir=\"" out "\"")))
871 ;; Remove unneeded files for testing.
872 (with-directory-excursion lib
873 (for-each delete-file-recursively
874 '("data" "mysql-test" "sql-bench"))
875 ;; And static libraries.
876 (for-each delete-file (find-files "lib" "\\.a$")))
877 (with-directory-excursion out
878 (delete-file "share/man/man1/mysql-test-run.pl.1")
879 ;; Delete huge and unnecessary executables.
880 (for-each delete-file (find-files "bin" "(test|embedded)")))
881 (mkdir-p (string-append dev "/share"))
882 (mkdir-p (string-append dev "/bin"))
883 (rename-file (string-append lib "/bin/mysqld")
884 (string-append out "/bin/mysqld"))
885 (rename-file (string-append lib "/share/pkgconfig")
886 (string-append dev "/share/pkgconfig"))
887 (rename-file (string-append out "/bin/mysql_config")
888 (string-append dev "/bin/mysql_config"))
891 (substitute* (string-append out "/bin/mysql_install_db")
892 (("\\$basedir/share/mysql")
893 (string-append lib "/share/mysql")))
895 ;; Embed an absolute reference to OpenSSL in mysql_config
896 ;; and the pkg-config file to avoid propagation.
897 (substitute* (list (string-append dev "/bin/mysql_config")
898 (string-append dev "/share/pkgconfig/mariadb.pc"))
899 (("-lssl -lcrypto" all)
900 (string-append "-L" openssl "/lib " all)))
905 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
906 ,@(if (string-prefix? "armhf" (%current-system))
911 `(("jemalloc" ,jemalloc)
915 ("openssl" ,openssl-1.0)
920 ;; The test suite is very resource intensive and can take more than three
921 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
922 (properties '((timeout . 64800))) ;18 hours
923 (home-page "https://mariadb.org/")
924 (synopsis "SQL database server")
926 "MariaDB is a multi-user and multi-threaded SQL database server, designed
927 as a drop-in replacement of MySQL.")
928 (license license:gpl2)))
930 (define-public mariadb-connector-c
932 (name "mariadb-connector-c")
937 "https://downloads.mariadb.org/f/connector-c-"
938 version "/mariadb-connector-c-"
939 version "-src.tar.gz"))
942 "083724f5daaqyzdcx508caz6fk2hs89jff85zg28ih43vxkvnrnj"))))
944 `(("openssl" ,openssl)))
945 (build-system cmake-build-system)
949 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
950 (synopsis "Client library to connect to MySQL or MariaDB")
951 (description "The MariaDB Connector/C is used to connect applications
952 developed in C/C++ to MariaDB and MySQL databases.")
953 (license license:lgpl2.1+)))
955 ;; Don't forget to update the other postgresql packages when upgrading this one.
956 (define-public postgresql
962 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
963 version "/postgresql-" version ".tar.bz2"))
966 "1rsab4zf4rx7pvvhlwhb04kb95aiad9cwazc4ksbvg2gij47z3rq"))
967 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
968 (build-system gnu-build-system)
970 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
972 (modify-phases %standard-phases
973 (add-before 'configure 'patch-/bin/sh
975 ;; Refer to the actual shell.
976 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
977 "src/bin/psql/command.c")
978 (("/bin/sh") (which "sh")))
980 (add-after 'build 'build-contrib
982 (invoke "make" "-C" "contrib")))
983 (add-after 'install 'install-contrib
985 (invoke "make" "-C" "contrib" "install"))))))
987 `(("readline" ,readline)
988 ("libuuid" ,util-linux)
991 (home-page "https://www.postgresql.org/")
992 (synopsis "Powerful object-relational database system")
994 "PostgreSQL is a powerful object-relational database system. It is fully
995 ACID compliant, has full support for foreign keys, joins, views, triggers, and
996 stored procedures (in multiple languages). It includes most SQL:2008 data
997 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
998 TIMESTAMP. It also supports storage of binary large objects, including
999 pictures, sounds, or video.")
1000 (license (license:x11-style "file://COPYRIGHT"))))
1002 (define-public postgresql-11
1004 (inherit postgresql)
1009 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1010 version "/postgresql-" version ".tar.bz2"))
1013 "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
1015 (define-public postgresql-9.6
1017 (inherit postgresql)
1022 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1023 version "/postgresql-" version ".tar.bz2"))
1026 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
1028 (define-public python-pymysql
1030 (name "python-pymysql")
1035 (uri (pypi-uri "PyMySQL" version))
1037 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1038 (build-system python-build-system)
1040 `(("python-unittest2" ,python-unittest2)))
1042 `(("python-cryptography" ,python-cryptography)))
1044 `(#:tests? #f)) ; tests expect a running MySQL
1045 (home-page "https://github.com/PyMySQL/PyMySQL/")
1046 (synopsis "Pure-Python MySQL driver")
1048 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1049 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1050 (license license:expat)))
1052 (define-public python2-pymysql
1053 (package-with-python2 python-pymysql))
1062 (uri (string-append "http://fallabs.com/" name "/"
1063 name "-" version ".tar.gz"))
1066 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1067 (build-system gnu-build-system)
1069 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1070 (assoc-ref %outputs "out")
1072 #:make-flags (list "CFLAGS=-fPIC")))
1073 (home-page "http://fallabs.com/qdbm")
1074 (synopsis "Key-value database")
1075 (description "QDBM is a library of routines for managing a
1076 database. The database is a simple data file containing key-value
1077 pairs. Every key and value is serial bytes with variable length.
1078 Binary data as well as character strings can be used as a key or a
1079 value. There is no concept of data tables or data types. Records are
1080 organized in a hash table or B+ tree.")
1081 (license license:lgpl2.1+)))
1083 (define-public recutils
1089 (uri (string-append "mirror://gnu/recutils/recutils-"
1093 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1094 (build-system gnu-build-system)
1096 (arguments '(#:configure-flags
1097 (list (string-append "--with-bash-headers="
1098 (assoc-ref %build-inputs "bash:include")
1101 (native-inputs `(("bc" ,bc)
1102 ("bash:include" ,bash "include")
1104 ("libuuid" ,util-linux)
1105 ("pkg-config" ,pkg-config)))
1107 ;; TODO: Add more optional inputs.
1108 (inputs `(("curl" ,curl)
1109 ("libgcrypt" ,libgcrypt)))
1110 (synopsis "Manipulate plain text files as databases")
1112 "GNU Recutils is a set of tools and libraries for creating and
1113 manipulating text-based, human-editable databases. Despite being text-based,
1114 databases created with Recutils carry all of the expected features such as
1115 unique fields, primary keys, time stamps and more. Many different field
1116 types are supported, as is encryption.")
1117 (license license:gpl3+)
1118 (home-page "https://www.gnu.org/software/recutils/")))
1120 (define-public emacs-recutils
1123 (name "emacs-recutils")
1124 (build-system emacs-build-system)
1127 (modify-phases %standard-phases
1128 (add-after 'unpack 'change-directory
1134 (synopsis "Emacs mode for working with recutils database files")
1135 (description "This package provides an Emacs major mode @code{rec-mode}
1136 for working with GNU Recutils text-based, human-editable databases. It
1137 supports editing, navigation, and querying of recutils database files
1138 including field and record folding.")))
1140 (define-public rocksdb
1147 (url "https://github.com/facebook/rocksdb")
1148 (commit (string-append "v" version))))
1149 (file-name (git-file-name name version))
1152 "1h7y31b05w4vv4v509l368j9qlbv5assmdq9hp2788zipqbpywc0"))
1153 (modules '((guix build utils)))
1156 ;; TODO: unbundle gtest.
1157 (delete-file "build_tools/gnu_parallel")
1158 (substitute* "Makefile"
1159 (("build_tools/gnu_parallel") "parallel"))
1161 (build-system gnu-build-system)
1163 `(#:make-flags (list "CC=gcc" "V=1"
1164 ;; Ceph requires that RTTI is enabled.
1166 (string-append "INSTALL_PATH="
1167 (assoc-ref %outputs "out"))
1169 ;; Running the full test suite takes hours and require
1170 ;; a lot of disk space. Instead we only run a subset
1171 ;; (see .travis.yml and Makefile).
1172 "ROCKSDBTESTS_END=db_tailing_iter_test")
1173 #:test-target "check_some"
1174 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1175 ;; this upstream, but it's not going to be supported any time soon.
1176 #:tests? (let ((system ,(or (%current-target-system)
1177 (%current-system))))
1178 (or (string-prefix? "x86_64-linux" system)
1179 (string-prefix? "aarch64-linux" system)))
1181 (modify-phases %standard-phases
1182 (add-after 'unpack 'patch-Makefile
1184 (substitute* "Makefile"
1185 ;; Don't depend on the static library when installing.
1186 (("install: install-static")
1187 "install: install-shared")
1188 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1191 ;; The default target is only needed for tests and built on demand.
1193 (add-before 'check 'disable-optimizations
1195 ;; Prevent the build from passing '-march=native' to the compiler.
1196 (setenv "PORTABLE" "1")
1198 (add-before 'check 'disable-failing-tests
1200 (substitute* "Makefile"
1201 ;; These tests reliably fail due to "Too many open files".
1202 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1203 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1205 (add-after 'check 'build
1206 ;; The default build target is a debug build for tests. The
1207 ;; install target depends on the "shared_lib" release target
1208 ;; so we build it here for clarity.
1209 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1210 (apply invoke "make" "shared_lib"
1211 `(,@(if parallel-build?
1212 `("-j" ,(number->string (parallel-job-count)))
1216 `(("parallel" ,parallel)
1219 ("python" ,python-2)
1224 ("jemalloc" ,jemalloc)
1228 (home-page "https://rocksdb.org/")
1229 (synopsis "Persistent key-value store for fast storage")
1231 "RocksDB is a library that forms the core building block for a fast
1232 key-value server, especially suited for storing data on flash drives. It
1233 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1234 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1235 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1236 compactions, making it specially suitable for storing multiple terabytes of
1237 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1238 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1239 ;; files carry the 3-clause BSD license.
1240 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1242 (define-public sparql-query
1244 (name "sparql-query")
1248 (uri (string-append "https://github.com/tialaramex/"
1249 name "/archive/" version ".tar.gz"))
1251 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1252 (file-name (string-append name "-" version ".tar.gz"))))
1253 (build-system gnu-build-system)
1255 `(("readline" ,readline)
1256 ("ncurses" ,ncurses)
1258 ("libxml2" ,libxml2)
1261 `(("pkg-config" ,pkg-config)))
1263 `(#:make-flags '("CC=gcc")
1265 (modify-phases %standard-phases
1267 ;; The Makefile uses git to obtain versioning information. This phase
1268 ;; substitutes the git invocation with the package version.
1269 (add-after 'unpack 'remove-git-dependency
1271 (substitute* "Makefile"
1273 (string-append "gitrev = \"v" ,version "\"")))
1275 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1276 ;; This replacement does the same thing, except for using $PREFIX/bin
1279 (lambda* (#:key outputs #:allow-other-keys)
1280 (let* ((out (assoc-ref outputs "out"))
1281 (bin (string-append out "/bin")))
1282 (install-file "sparql-query" bin)
1283 (symlink (string-append bin "/sparql-query")
1284 (string-append bin "/sparql-update")))
1287 (lambda* (#:key make-flags #:allow-other-keys)
1288 (apply invoke "make" `(,@make-flags "scan-test"))
1289 (invoke "./scan-test"))))))
1290 (home-page "https://github.com/tialaramex/sparql-query/")
1291 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1292 (description "Sparql-query is a command-line tool for accessing SPARQL
1293 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1294 tools for interrogating SQL databases. For example, you can enter a query over
1295 several lines, using a semi-colon at the end of a line to indicate the end of
1296 your query. It also supports readline so that you can more easily recall and
1297 edit previous queries, even across sessions. It can be used non-interactively,
1298 for example from a shell script.")
1299 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1300 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1301 (license (list license:gpl3+))))
1303 (define-public sqitch
1311 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1314 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1315 (build-system perl-build-system)
1318 (modify-phases %standard-phases
1319 (add-before 'check 'set-check-environment
1322 (setenv "HOME" "/tmp")
1324 (add-after 'install 'wrap-program
1325 (lambda* (#:key outputs #:allow-other-keys)
1326 (let* ((out (assoc-ref outputs "out"))
1327 (path (getenv "PERL5LIB")))
1328 (wrap-program (string-append out "/bin/sqitch")
1329 `("PERL5LIB" ":" prefix
1330 (,(string-append out "/lib/perl5/site_perl"
1335 `(("perl-capture-tiny" ,perl-capture-tiny)
1336 ("perl-io-pager" ,perl-io-pager)
1337 ("perl-module-build" ,perl-module-build)
1338 ("perl-module-runtime" ,perl-module-runtime)
1339 ("perl-path-class" ,perl-path-class)
1340 ("perl-test-deep" ,perl-test-deep)
1341 ("perl-test-dir" ,perl-test-dir)
1342 ("perl-test-exception" ,perl-test-exception)
1343 ("perl-test-file" ,perl-test-file)
1344 ("perl-test-file-contents" ,perl-test-file-contents)
1345 ("perl-test-mockmodule" ,perl-test-mockmodule)
1346 ("perl-test-nowarnings" ,perl-test-nowarnings)
1347 ("perl-test-warn" ,perl-test-warn)))
1349 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1350 ("perl-clone" ,perl-clone)
1351 ("perl-config-gitlike" ,perl-config-gitlike)
1352 ("perl-datetime" ,perl-datetime)
1353 ("perl-datetime-timezone" ,perl-datetime-timezone)
1354 ("perl-dbd-pg" ,perl-dbd-pg)
1355 ("perl-dbi" ,perl-dbi)
1356 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1357 ("perl-encode-locale" ,perl-encode-locale)
1358 ("perl-hash-merge" ,perl-hash-merge)
1359 ("perl-ipc-run3" ,perl-ipc-run3)
1360 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1361 ("perl-libintl-perl" ,perl-libintl-perl)
1362 ("perl-list-moreutils" ,perl-list-moreutils)
1363 ("perl-moo" ,perl-moo)
1364 ("perl-mysql-config" ,perl-mysql-config)
1365 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1366 ("perl-path-class" ,perl-path-class)
1367 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1368 ("perl-string-formatter" ,perl-string-formatter)
1369 ("perl-string-shellquote" ,perl-string-shellquote)
1370 ("perl-sub-exporter" ,perl-sub-exporter)
1371 ("perl-template-tiny" ,perl-template-tiny)
1372 ("perl-template-toolkit" ,perl-template-toolkit)
1373 ("perl-throwable" ,perl-throwable)
1374 ("perl-try-tiny" ,perl-try-tiny)
1375 ("perl-type-tiny" ,perl-type-tiny)
1376 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1377 ("perl-uri" ,perl-uri)
1378 ("perl-uri-db" ,perl-uri-db)))
1379 (home-page "https://sqitch.org/")
1380 (synopsis "Database change management tool")
1382 "Sqitch is a standalone change management system for database schemas,
1383 which uses SQL to describe changes.")
1384 (license license:x11)))
1386 (define-public sqlcrush
1387 ;; Unfortunately, there is no proper upstream release and may never be.
1388 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1392 (version (git-version "0.1.5" revision commit))
1396 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1398 (file-name (git-file-name name version))
1401 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1402 (build-system python-build-system)
1404 `(("python-cryptography" ,python-cryptography)
1405 ("python-psycopg2" ,python-psycopg2)
1406 ("python-pymysql" ,python-pymysql)
1407 ("python-sqlalchemy" ,python-sqlalchemy)))
1408 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1409 (synopsis "Text console-based database viewer and editor")
1411 "SQLcrush lets you view and edit a database directly from the text
1412 console through an ncurses interface. You can explore each table's structure,
1413 browse and edit the contents, add and delete entries, all while tracking your
1415 (license license:gpl3+)))) ; no headers, see README.md
1423 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1427 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1428 (build-system gnu-build-system)
1431 (modify-phases %standard-phases
1433 (lambda* (#:key outputs #:allow-other-keys)
1434 (let ((out (assoc-ref outputs "out")))
1435 ;; The 'configure' script is a wrapper for Waf and
1436 ;; doesn't recognize things like '--enable-fast-install'.
1437 (invoke "./configure"
1438 (string-append "--prefix=" out))))))))
1440 `(;; TODO: Build the documentation.
1441 ;; ("docbook-xsl" ,docbook-xsl)
1442 ;; ("libxml2" ,libxml2)
1443 ;; ("libxslt" ,libxslt)
1444 ("python" ,python) ;for the Waf build system
1446 (home-page "https://tdb.samba.org/")
1447 (synopsis "Trivial database")
1449 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1450 and BSD's DB except that it allows multiple simultaneous writers and uses
1451 locking internally to keep writers from trampling on each other. TDB is also
1453 (license license:lgpl3+)))
1455 (define-public perl-dbi
1462 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1466 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1467 (build-system perl-build-system)
1468 (synopsis "Database independent interface for Perl")
1469 (description "This package provides an database interface for Perl.")
1470 (home-page "https://metacpan.org/release/DBI")
1471 (license license:perl-license)))
1473 (define-public perl-dbix-class
1475 (name "perl-dbix-class")
1476 (version "0.082841")
1480 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1481 "DBIx-Class-" version ".tar.gz"))
1484 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1485 (build-system perl-build-system)
1487 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1488 ("perl-file-temp" ,perl-file-temp)
1489 ("perl-module-install" ,perl-module-install)
1490 ("perl-package-stash" ,perl-package-stash)
1491 ("perl-test-deep" ,perl-test-deep)
1492 ("perl-test-exception" ,perl-test-exception)
1493 ("perl-test-warn" ,perl-test-warn)))
1495 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1496 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1497 ("perl-class-inspector" ,perl-class-inspector)
1498 ("perl-config-any" ,perl-config-any)
1499 ("perl-context-preserve" ,perl-context-preserve)
1500 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1501 ("perl-data-page" ,perl-data-page)
1502 ("perl-dbi" ,perl-dbi)
1503 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1504 ("perl-hash-merge" ,perl-hash-merge)
1505 ("perl-module-find" ,perl-module-find)
1506 ("perl-moo" ,perl-moo)
1507 ("perl-mro-compat" ,perl-mro-compat)
1508 ("perl-namespace-clean" ,perl-namespace-clean)
1509 ("perl-path-class" ,perl-path-class)
1510 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1511 ("perl-scope-guard" ,perl-scope-guard)
1512 ("perl-sql-abstract" ,perl-sql-abstract)
1513 ("perl-sub-name" ,perl-sub-name)
1514 ("perl-text-balanced" ,perl-text-balanced)
1515 ("perl-try-tiny" ,perl-try-tiny)))
1516 (home-page "https://metacpan.org/release/DBIx-Class")
1517 (synopsis "Extensible and flexible object <-> relational mapper")
1518 (description "An SQL to OO mapper with an object API inspired by
1519 Class::DBI (with a compatibility layer as a springboard for porting) and a
1520 resultset API that allows abstract encapsulation of database operations. It
1521 aims to make representing queries in your code as perl-ish as possible while
1522 still providing access to as many of the capabilities of the database as
1523 possible, including retrieving related records from multiple tables in a
1524 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1525 \"ORDER BY\" and \"HAVING\" support.")
1526 (license license:perl-license)))
1528 (define-public perl-dbix-class-cursor-cached
1530 (name "perl-dbix-class-cursor-cached")
1531 (version "1.001004")
1535 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1536 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1539 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1540 (build-system perl-build-system)
1542 `(("perl-cache-cache" ,perl-cache-cache)
1543 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1544 ("perl-module-install" ,perl-module-install)))
1546 `(("perl-carp-clan" ,perl-carp-clan)
1547 ("perl-dbix-class" ,perl-dbix-class)))
1548 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1549 (synopsis "Cursor with built-in caching support")
1550 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1551 built-in caching support.")
1552 (license license:perl-license)))
1554 (define-public perl-dbix-class-introspectablem2m
1556 (name "perl-dbix-class-introspectablem2m")
1557 (version "0.001002")
1561 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1562 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1565 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1566 (build-system perl-build-system)
1568 `(("perl-module-install" ,perl-module-install)))
1570 `(("perl-dbix-class" ,perl-dbix-class)))
1571 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1572 (synopsis "Introspect many-to-many relationships")
1573 (description "Because the many-to-many relationships are not real
1574 relationships, they can not be introspected with DBIx::Class. Many-to-many
1575 relationships are actually just a collection of convenience methods installed
1576 to bridge two relationships. This DBIx::Class component can be used to store
1577 all relevant information about these non-relationships so they can later be
1578 introspected and examined.")
1579 (license license:perl-license)))
1581 (define-public perl-dbix-class-schema-loader
1583 (name "perl-dbix-class-schema-loader")
1588 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1589 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1592 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1593 (build-system perl-build-system)
1595 `(("perl-config-any" ,perl-config-any)
1596 ("perl-config-general" ,perl-config-general)
1597 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1598 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1599 ("perl-module-install" ,perl-module-install)
1600 ("perl-moose" ,perl-moose)
1601 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1602 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1603 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1604 ("perl-test-deep" ,perl-test-deep)
1605 ("perl-test-differences" ,perl-test-differences)
1606 ("perl-test-exception" ,perl-test-exception)
1607 ("perl-test-pod" ,perl-test-pod)
1608 ("perl-test-warn" ,perl-test-warn)))
1610 `(("perl-class-unload" ,perl-class-unload)
1611 ("perl-class-inspector" ,perl-class-inspector)
1612 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1613 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1614 ("perl-carp-clan" ,perl-carp-clan)
1615 ("perl-data-dump" ,perl-data-dump)
1616 ("perl-dbix-class" ,perl-dbix-class)
1617 ("perl-hash-merge" ,perl-hash-merge)
1618 ("perl-list-moreutils" ,perl-list-moreutils)
1619 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1620 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1621 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1622 ("perl-namespace-clean" ,perl-namespace-clean)
1623 ("perl-mro-compat" ,perl-mro-compat)
1624 ("perl-scope-guard" ,perl-scope-guard)
1625 ("perl-string-camelcase" ,perl-string-camelcase)
1626 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1627 ("perl-sub-name" ,perl-sub-name)
1628 ("perl-try-tiny" ,perl-try-tiny)))
1629 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1630 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1631 (synopsis "Create a DBIx::Class::Schema based on a database")
1632 (description "DBIx::Class::Schema::Loader automates the definition of a
1633 DBIx::Class::Schema by scanning database table definitions and setting up the
1634 columns, primary keys, unique constraints and relationships.")
1635 (license license:perl-license)))
1637 (define-public perl-dbd-pg
1639 (name "perl-dbd-pg")
1644 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1645 "DBD-Pg-" version ".tar.gz"))
1648 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1649 (build-system perl-build-system)
1651 `(("perl-dbi" ,perl-dbi)))
1653 `(("perl-dbi" ,perl-dbi)
1654 ("postgresql" ,postgresql)))
1655 (home-page "https://metacpan.org/release/DBD-Pg")
1656 (synopsis "DBI PostgreSQL interface")
1657 (description "This package provides a PostgreSQL driver for the Perl5
1658 @dfn{Database Interface} (DBI).")
1659 (license license:perl-license)))
1661 (define-public perl-dbd-mysql
1663 (name "perl-dbd-mysql")
1668 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1669 "DBD-mysql-" version ".tar.gz"))
1671 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1672 (build-system perl-build-system)
1675 (modify-phases %standard-phases
1676 (add-before 'configure 'skip-library-detection
1677 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1678 ;; are really only needed for the test suite; their absence does not
1679 ;; affect the build or the end result.
1681 (substitute* "Makefile.PL"
1682 (("use Devel::CheckLib;" match)
1683 (string-append "# " match))
1687 ;; Tests require running MySQL server.
1690 `(("perl-dbi" ,perl-dbi)
1691 ("mysql" ,mariadb "lib")
1692 ("mysql-dev" ,mariadb "dev")))
1693 (home-page "https://metacpan.org/release/DBD-mysql")
1694 (synopsis "DBI MySQL interface")
1695 (description "This package provides a MySQL driver for the Perl5
1696 @dfn{Database Interface} (DBI).")
1697 (license license:perl-license)))
1699 (define-public perl-dbd-sqlite
1701 (name "perl-dbd-sqlite")
1706 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1710 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1711 (build-system perl-build-system)
1712 (inputs `(("sqlite" ,sqlite)))
1713 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1714 (synopsis "SQlite interface for Perl")
1715 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1716 the entire thing in the distribution. So in order to get a fast transaction
1717 capable RDBMS working for your Perl project you simply have to install this
1718 module, and nothing else.")
1719 (license license:perl-license)
1720 (home-page "https://metacpan.org/release/DBD-SQLite")))
1722 (define-public perl-mysql-config
1724 (name "perl-mysql-config")
1730 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1735 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1736 (build-system perl-build-system)
1737 (home-page "https://metacpan.org/release/MySQL-Config")
1738 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1740 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1741 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1742 @code{Getopt::Long}.")
1743 (license license:perl-license)))
1745 (define-public perl-sql-abstract
1747 (name "perl-sql-abstract")
1752 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1753 "SQL-Abstract-" version ".tar.gz"))
1755 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1756 (build-system perl-build-system)
1758 `(("perl-module-install" ,perl-module-install)
1759 ("perl-test-deep" ,perl-test-deep)
1760 ("perl-test-exception" ,perl-test-exception)
1761 ("perl-test-warn" ,perl-test-warn)))
1763 `(("perl-hash-merge" ,perl-hash-merge)
1764 ("perl-moo" ,perl-moo)
1765 ("perl-mro-compat" ,perl-mro-compat)
1766 ("perl-text-balanced" ,perl-text-balanced)))
1767 (home-page "https://metacpan.org/release/SQL-Abstract")
1768 (synopsis "Generate SQL from Perl data structures")
1769 (description "This module was inspired by the excellent DBIx::Abstract.
1770 While based on the concepts used by DBIx::Abstract, the concepts used have
1771 been modified to make the SQL easier to generate from Perl data structures.
1772 The underlying idea is for this module to do what you mean, based on the data
1773 structures you provide it, so that you don't have to modify your code every
1774 time your data changes.")
1775 (license license:perl-license)))
1777 (define-public perl-sql-splitstatement
1779 (name "perl-sql-splitstatement")
1784 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1785 "SQL-SplitStatement-" version ".tar.gz"))
1788 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1789 (build-system perl-build-system)
1791 `(("perl-test-exception" ,perl-test-exception)))
1793 `(("perl-class-accessor" ,perl-class-accessor)
1794 ("perl-list-moreutils" ,perl-list-moreutils)
1795 ("perl-regexp-common" ,perl-regexp-common)
1796 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1797 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1798 (synopsis "Split SQL code into atomic statements")
1799 (description "This module tries to split any SQL code, even including
1800 non-standard extensions, into the atomic statements it is composed of.")
1801 (license license:perl-license)))
1803 (define-public perl-sql-tokenizer
1805 (name "perl-sql-tokenizer")
1810 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1811 "SQL-Tokenizer-" version ".tar.gz"))
1814 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1815 (build-system perl-build-system)
1816 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1817 (synopsis "SQL tokenizer")
1818 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1819 claim to be a parser or query verifier. It just creates sane tokens from a
1821 (license license:perl-license)))
1823 (define-public unixodbc
1831 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1834 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1835 (build-system gnu-build-system)
1836 (synopsis "Data source abstraction library")
1837 (description "Unixodbc is a library providing an API with which to access
1838 data sources. Data sources include SQL Servers and any software with an ODBC
1840 (license license:lgpl2.1+)
1841 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1842 (home-page "http://www.unixodbc.org")))
1844 (define-public unqlite
1850 ;; Contains bug fixes against the official release, and has an
1851 ;; autotooled build system.
1852 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1854 "unqlite-unofficial-" version ".tar.gz"))
1857 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1858 (build-system gnu-build-system)
1859 (arguments `(#:tests? #f)) ;No check target
1860 (home-page "https://www.unqlite.org")
1861 (synopsis "In-memory key/value and document store")
1863 "UnQLite is an in-process software library which implements a
1864 self-contained, serverless, zero-configuration, transactional NoSQL
1865 database engine. UnQLite is a document store database similar to
1866 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1867 similar to BerkeleyDB, LevelDB, etc.")
1868 (license license:bsd-2)))
1870 (define-public redis
1876 (uri (string-append "http://download.redis.io/releases/redis-"
1880 "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
1881 (build-system gnu-build-system)
1883 '(#:tests? #f ; tests related to master/slave and replication fail
1884 #:phases (modify-phases %standard-phases
1885 (delete 'configure))
1886 #:make-flags `("CC=gcc"
1889 ,(string-append "PREFIX="
1890 (assoc-ref %outputs "out")))))
1891 (synopsis "Key-value cache and store")
1892 (description "Redis is an advanced key-value cache and store. Redis
1893 supports many data structures including strings, hashes, lists, sets, sorted
1894 sets, bitmaps and hyperloglogs.")
1895 (home-page "http://redis.io/")
1896 (license license:bsd-3)))
1898 (define-public kyotocabinet
1900 (name "kyotocabinet")
1904 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1905 name "-" version ".tar.gz"))
1908 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1909 (build-system gnu-build-system)
1913 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1914 (string-append "LDFLAGS=-Wl,-rpath="
1915 (assoc-ref %outputs "out") "/lib"))))
1916 (inputs `(("zlib" ,zlib)))
1917 (home-page "http://fallabs.com/kyotocabinet/")
1919 "Kyoto Cabinet is a modern implementation of the DBM database")
1921 "Kyoto Cabinet is a standalone file-based database that supports Hash
1922 and B+ Tree data storage models. It is a fast key-value lightweight
1923 database and supports many programming languages. It is a NoSQL database.")
1924 (license license:gpl3+)))
1926 (define-public tokyocabinet
1928 (name "tokyocabinet")
1933 (uri (string-append "http://fallabs.com/tokyocabinet/"
1934 name "-" version ".tar.gz"))
1937 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1938 (build-system gnu-build-system)
1941 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1942 (string-append "LDFLAGS=-Wl,-rpath="
1943 (assoc-ref %outputs "out") "/lib"))))
1946 (home-page "http://fallabs.com/tokyocabinet/")
1947 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1949 "Tokyo Cabinet is a library of routines for managing a database.
1950 The database is a simple data file containing records, each is a pair of a
1951 key and a value. Every key and value is serial bytes with variable length.
1952 Both binary data and character string can be used as a key and a value.
1953 There is neither concept of data tables nor data types. Records are
1954 organized in hash table, B+ tree, or fixed-length array.")
1955 (license license:lgpl2.1+)))
1957 (define-public wiredtiger
1964 "http://source.wiredtiger.com/releases/wiredtiger-"
1965 version ".tar.bz2"))
1968 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1969 (build-system gnu-build-system)
1971 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1973 (modify-phases %standard-phases
1974 (add-before 'check 'disable-test/fops
1976 ;; XXX: timed out after 3600 seconds of silence
1977 (substitute* "Makefile"
1983 ("snappy" ,snappy)))
1984 (home-page "http://source.wiredtiger.com/")
1985 (synopsis "NoSQL data engine")
1987 "WiredTiger is an extensible platform for data management. It supports
1988 row-oriented storage (where all columns of a row are stored together),
1989 column-oriented storage (where columns are stored in groups, allowing for
1990 more efficient access and storage of column subsets) and log-structured merge
1991 trees (LSM), for sustained throughput under random insert workloads.")
1992 (license license:gpl3) ; or GPL-2
1993 ;; configure.ac: WiredTiger requires a 64-bit build.
1994 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1996 (define-public wiredtiger-3
1998 (inherit wiredtiger)
2003 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2004 version ".tar.bz2"))
2007 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2009 (define-public guile-wiredtiger
2011 (name "guile-wiredtiger")
2016 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2017 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2018 (file-name (string-append name "-" version "-checkout"))
2021 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2022 (build-system gnu-build-system)
2024 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2026 (list (string-append "--with-libwiredtiger-prefix="
2027 (assoc-ref %build-inputs "wiredtiger")))
2028 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2030 `(("autoconf" ,autoconf)
2031 ("automake" ,automake)
2032 ("pkg-config" ,pkg-config)))
2034 `(("wiredtiger" ,wiredtiger-3)
2035 ("guile" ,guile-2.2)))
2037 `(("guile-bytestructures" ,guile-bytestructures)))
2038 (synopsis "WiredTiger bindings for GNU Guile")
2040 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2042 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2043 (license license:gpl3+)))
2045 (define-public perl-db-file
2047 (name "perl-db-file")
2053 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2058 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
2059 (build-system perl-build-system)
2060 (inputs `(("bdb" ,bdb)))
2061 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2063 `(#:phases (modify-phases %standard-phases
2065 'configure 'modify-config.in
2066 (lambda* (#:key inputs #:allow-other-keys)
2067 (substitute* "config.in"
2068 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2070 (home-page "https://metacpan.org/release/DB_File")
2072 "Perl5 access to Berkeley DB version 1.x")
2074 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2075 (license license:perl-license)))
2085 (url "https://github.com/LMDB/lmdb.git")
2086 (commit (string-append "LMDB_" version))))
2087 (file-name (git-file-name name version))
2089 (base32 "088q6m8fvr12w43s461h7cvpg5hj8csaqj6n9pci150dz7bk5lxm"))))
2090 (build-system gnu-build-system)
2092 `(#:test-target "test"
2094 (modify-phases %standard-phases
2096 (lambda* (#:key outputs #:allow-other-keys)
2097 (chdir "libraries/liblmdb")
2098 (substitute* "Makefile"
2099 (("/usr/local") (assoc-ref outputs "out")))
2101 (home-page "https://symas.com/products/lightning-memory-mapped-database")
2102 (synopsis "Lightning Memory-Mapped Database library")
2104 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2105 transactional database. Unlike more complex relational databases, LMDB handles
2106 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2107 underlying operating system for caching and locking, keeping the code small and
2109 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2110 disk-based databases with high read performance that scales linearly over
2111 multiple cores. The size of each database is limited only by the size of the
2112 virtual address space — not physical RAM.")
2113 (license license:openldap2.8)))
2115 (define-public lmdbxx
2118 (version "0.9.14.0")
2123 (url "https://github.com/drycpp/lmdbxx.git")
2125 (file-name (git-file-name name version))
2127 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2130 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2132 (modify-phases %standard-phases
2133 (delete 'configure))))
2134 (build-system gnu-build-system)
2135 (inputs `(("lmdb" ,lmdb)))
2136 (home-page "http://lmdbxx.sourceforge.net")
2137 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2138 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2139 @code{LMDB} embedded database library, offering both an error-checked
2140 procedural interface and an object-oriented resource interface with RAII
2142 (license license:unlicense)))
2144 (define-public libpqxx
2151 "http://pqxx.org/download/software/libpqxx/"
2152 name "-" version ".tar.gz"))
2155 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2156 (build-system gnu-build-system)
2158 `(("python" ,python-2)))
2159 (inputs `(("postgresql" ,postgresql)))
2161 `(#:tests? #f ; # FAIL: 1
2163 (modify-phases %standard-phases
2164 (add-before 'configure 'fix-sed-command
2166 ;; Newer sed versions error out if double brackets are not used.
2167 (substitute* "configure"
2168 (("\\[:space:\\]") "[[:space:]]"))
2170 (synopsis "C++ connector for PostgreSQL")
2172 "Libpqxx is a C++ library to enable user programs to communicate with the
2173 PostgreSQL database back-end. The database back-end can be local or it may be
2174 on another machine, accessed via TCP/IP.")
2175 (home-page "http://pqxx.org/")
2176 (license license:bsd-3)))
2178 (define-public python-peewee
2180 (name "python-peewee")
2185 (uri (pypi-uri "peewee" version))
2188 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2189 (build-system python-build-system)
2191 `(#:tests? #f)) ; Fails to import test data
2193 `(("python-cython" ,python-cython)))
2194 (home-page "https://github.com/coleifer/peewee/")
2195 (synopsis "Small object-relational mapping utility")
2197 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2198 handles converting between pythonic values and those used by databases, so you
2199 can use Python types in your code without having to worry. It has built-in
2200 support for sqlite, mysql and postgresql. If you already have a database, you
2201 can autogenerate peewee models using @code{pwiz}, a model generator.")
2202 (license license:expat)))
2204 (define-public python2-peewee
2205 (package-with-python2 python-peewee))
2207 (define-public sqlcipher
2214 (uri (string-append "https://github.com/sqlcipher/" name
2215 "/archive/v" version ".tar.gz"))
2217 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2218 (file-name (string-append name "-" version ".tar.gz"))))
2219 (build-system gnu-build-system)
2221 `(("libcrypto" ,openssl)
2222 ("libtcl8.6" ,tcl))) ; required for running the tests
2227 '("--enable-tempstore=yes"
2228 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2229 "LDFLAGS=-lcrypto -ltcl8.6"
2231 ;; tests cannot be run from the Makefile
2232 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2233 #:test-target "testfixture"
2235 (modify-phases %standard-phases
2236 (add-before 'check 'build-test-runner
2237 (assoc-ref %standard-phases 'check))
2240 (invoke "./testfixture" "test/crypto.test"))))))
2241 (home-page "https://www.zetetic.net/sqlcipher/")
2243 "Library providing transparent encryption of SQLite database files")
2244 (description "SQLCipher is an implementation of SQLite, extended to
2245 provide transparent 256-bit AES encryption of database files. Pages are
2246 encrypted before being written to disk and are decrypted when read back. It’s
2247 well suited for protecting embedded application databases and for mobile
2250 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2251 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2252 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2253 ;; source files are in the public domain.
2254 (license (list license:public-domain license:bsd-3))))
2256 (define-public python-pyodbc-c
2258 (name "python-pyodbc-c")
2263 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2264 "archive.tar.gz?ref=v" version))
2267 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2268 (file-name (string-append name "-" version ".tar.gz"))))
2269 (build-system python-build-system)
2271 `(("unixodbc" ,unixodbc)))
2273 `(;; No unit tests exist.
2275 (home-page "https://github.com/mkleehammer/pyodbc")
2276 (synopsis "Python ODBC Library")
2277 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2279 (license (license:x11-style "file://LICENSE.TXT"))))
2281 (define-public python2-pyodbc-c
2282 (package-with-python2 python-pyodbc-c))
2284 (define-public python-pyodbc
2286 (name "python-pyodbc")
2291 (uri (pypi-uri "pyodbc" version))
2293 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2294 (file-name (string-append name "-" version ".tar.gz"))))
2295 (build-system python-build-system)
2297 `(("unixodbc" ,unixodbc)))
2299 `(#:tests? #f)) ; no unit tests exist
2300 (home-page "https://github.com/mkleehammer/pyodbc")
2301 (synopsis "Python ODBC Library")
2302 (description "@code{python-pyodbc} provides a Python DB-API driver
2304 (license (license:x11-style "file:///LICENSE.TXT"))))
2306 (define-public python2-pyodbc
2307 (package-with-python2 python-pyodbc))
2309 (define-public mdbtools
2317 (url "https://github.com/brianb/mdbtools.git")
2319 (file-name (git-file-name name version))
2322 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2323 (build-system gnu-build-system)
2327 `(("autoconf" ,autoconf)
2328 ("automake" ,automake)
2329 ("libtool" ,libtool)
2330 ("pkg-config" ,pkg-config)
2331 ("txt2man" ,txt2man)
2333 (home-page "http://mdbtools.sourceforge.net/")
2334 (synopsis "Read Microsoft Access databases")
2335 (description "MDB Tools is a set of tools and applications to read the
2336 proprietary MDB file format used in Microsoft's Access database package. This
2337 includes programs to export schema and data from Microsoft's Access database
2338 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2339 etc., and an SQL engine for performing simple SQL queries.")
2340 (license (list license:lgpl2.0
2343 (define-public python-lmdb
2345 (name "python-lmdb")
2349 (uri (pypi-uri "lmdb" version))
2352 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2353 (modules '((guix build utils)))
2355 ;; Delete bundled lmdb source files.
2357 (for-each delete-file (list "lib/lmdb.h"
2362 (build-system python-build-system)
2367 (modify-phases %standard-phases
2368 (add-before 'build 'use-system-lmdb
2369 (lambda* (#:key inputs #:allow-other-keys)
2370 (let ((lmdb (assoc-ref inputs "lmdb")))
2371 (setenv "LMDB_FORCE_SYSTEM" "set")
2372 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2373 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2375 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2377 (home-page "https://github.com/dw/py-lmdb")
2378 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2380 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2381 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2383 (list license:openldap2.8
2384 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2385 ;; but not actually needed on platforms currently supported by Guix.
2388 (define-public python2-lmdb
2389 (package-with-python2 python-lmdb))
2391 (define-public python-orator
2393 (name "python-orator")
2397 (uri (pypi-uri "orator" version))
2400 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2401 (build-system python-build-system)
2404 (modify-phases %standard-phases
2405 (add-after 'unpack 'loosen-dependencies
2406 ;; Tests are not actually run since they are not included with the
2407 ;; distributed package, but dependencies are checked.
2409 (substitute* "setup.py"
2411 (("flexmock==0.9.7") "flexmock")
2412 ;; The pytest-mock package is out of date, so we remove minimum
2413 ;; version requirement.
2414 (("pytest-mock.*'") "pytest-mock'"))
2417 `(("python-pytest-mock" ,python-pytest-mock)
2418 ("python-pytest" ,python-pytest)
2419 ("python-flexmock" ,python-flexmock)))
2421 `(("python-backpack" ,python-backpack)
2422 ("python-blinker" ,python-blinker)
2423 ("python-cleo" ,python-cleo)
2424 ("python-faker" ,python-faker)
2425 ("python-inflection" ,python-inflection)
2426 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2427 ("python-pendulum" ,python-pendulum)
2428 ("python-pyaml" ,python-pyaml)
2429 ("python-pygments" ,python-pygments)
2430 ("python-simplejson" ,python-simplejson)
2431 ("python-six" ,python-six)
2432 ("python-wrapt" ,python-wrapt)))
2433 (home-page "https://orator-orm.com/")
2434 (synopsis "ActiveRecord ORM for Python")
2436 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2437 implementation for Python.")
2438 (license license:expat)
2439 (properties `((python2-variant . ,(delay python2-orator))))))
2441 (define-public python2-orator
2442 (package-with-python2 (strip-python2-variant python-orator)))
2444 (define-public virtuoso-ose
2446 (name "virtuoso-ose")
2452 "https://github.com/openlink/virtuoso-opensource/releases/"
2453 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2455 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2456 (build-system gnu-build-system)
2458 `(#:tests? #f ; Tests require a network connection.
2459 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2460 ;; This indicates that the internal zlib code may still be used.
2461 #:configure-flags '("--without-internal-zlib"
2462 "--with-readline")))
2464 `(("openssl" ,openssl-1.0)
2465 ("net-tools" ,net-tools)
2466 ("readline" ,readline)
2468 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2469 (synopsis "Multi-model database system")
2470 (description "Virtuoso is a scalable cross-platform server that combines
2471 relational, graph, and document data management with web application server
2472 and web services platform functionality.")
2473 ;; configure: error: ... can only be build on 64bit platforms
2474 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2475 (license license:gpl2)))
2477 (define-public python-ccm
2484 (uri (pypi-uri "ccm" version))
2487 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2488 (build-system python-build-system)
2490 `(("python-pyyaml" ,python-pyyaml)
2491 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2493 ("python-psutil" ,python-psutil)
2494 ("python-six" ,python-six)))
2495 (home-page "https://github.com/pcmanus/ccm")
2496 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2498 (description "Cassandra Cluster Manager is a development tool for testing
2499 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2501 (license license:asl2.0)))
2503 (define-public python2-ccm
2504 (package-with-python2 python-ccm))
2506 (define-public python2-pysqlite
2508 (name "python2-pysqlite")
2513 (uri (pypi-uri "pysqlite" version))
2516 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2517 (build-system python-build-system)
2519 `(("sqlite" ,sqlite)))
2521 `(#:python ,python-2 ; incompatible with Python 3
2522 #:tests? #f)) ; no test target
2523 (home-page "https://github.com/ghaering/pysqlite")
2524 (synopsis "SQLite bindings for Python")
2526 "Pysqlite provides SQLite bindings for Python that comply to the
2527 Database API 2.0T.")
2528 (license license:zlib)))
2530 (define-public python-sqlalchemy
2532 (name "python-sqlalchemy")
2537 (uri (pypi-uri "SQLAlchemy" version))
2539 (base32 "0iglkvymfp35zm5pxy5kzqvcv96kkas0chqdx7xpla86sspa9k64"))))
2540 (build-system python-build-system)
2542 `(("python-cython" ,python-cython) ; for C extensions
2543 ("python-pytest" ,python-pytest)
2544 ("python-mock" ,python-mock))) ; for tests
2547 (modify-phases %standard-phases
2549 (lambda _ (invoke "py.test"))))))
2550 (home-page "https://www.sqlalchemy.org")
2551 (synopsis "Database abstraction library")
2553 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2554 gives application developers the full power and flexibility of SQL. It
2555 provides a full suite of well known enterprise-level persistence patterns,
2556 designed for efficient and high-performing database access, adapted into a
2557 simple and Pythonic domain language.")
2558 (license license:x11)))
2560 (define-public python2-sqlalchemy
2561 (package-with-python2 python-sqlalchemy))
2563 (define-public python-sqlalchemy-utils
2565 (name "python-sqlalchemy-utils")
2570 (uri (pypi-uri "SQLAlchemy-Utils" version))
2573 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2574 (build-system python-build-system)
2576 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2578 ;; (modify-phases %standard-phases
2581 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2583 `(("python-six" ,python-six)
2584 ("python-sqlalchemy" ,python-sqlalchemy)))
2586 `(("python-dateutil" ,python-dateutil)
2587 ("python-flexmock" ,python-flexmock)
2588 ("python-psycopg2" ,python-psycopg2)
2589 ("python-pytest" ,python-pytest)
2590 ("python-pytz" ,python-pytz)))
2591 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2592 (synopsis "Various utility functions for SQLAlchemy")
2594 "SQLAlchemy-utils provides various utility functions and custom data types
2595 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2597 You might also want to install the following optional dependencies:
2599 @item @code{python-passlib}
2600 @item @code{python-babel}
2601 @item @code{python-cryptography}
2602 @item @code{python-pytz}
2603 @item @code{python-psycopg2}
2604 @item @code{python-furl}
2605 @item @code{python-flask-babel}
2608 (license license:bsd-3)))
2610 (define-public python2-sqlalchemy-utils
2611 (package-with-python2 python-sqlalchemy-utils))
2613 (define-public python-alembic
2615 (name "python-alembic")
2620 (uri (pypi-uri "alembic" version))
2623 "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd"))))
2624 (build-system python-build-system)
2626 `(("python-mock" ,python-mock)
2627 ("python-pytest-cov" ,python-pytest-cov)))
2629 `(("python-dateutil" ,python-dateutil)
2630 ("python-sqlalchemy" ,python-sqlalchemy)
2631 ("python-mako" ,python-mako)
2632 ("python-editor" ,python-editor)))
2633 (home-page "https://bitbucket.org/zzzeek/alembic")
2634 (synopsis "Database migration tool for SQLAlchemy")
2636 "Alembic is a lightweight database migration tool for usage with the
2637 SQLAlchemy Database Toolkit for Python.")
2638 (license license:expat)))
2640 (define-public python2-alembic
2641 (package-with-python2 python-alembic))
2643 (define-public python-pickleshare
2645 (name "python-pickleshare")
2650 (uri (pypi-uri "pickleshare" version))
2652 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2653 (build-system python-build-system)
2655 `(#:phases (modify-phases %standard-phases
2658 (invoke "pytest"))))))
2660 `(("python-pytest" ,python-pytest)))
2661 (home-page "https://github.com/vivainio/pickleshare")
2662 (synopsis "Tiny key value database with concurrency support")
2664 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2665 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2666 shelve, many processes can access the database simultaneously. Changing a
2667 value in database is immediately visible to other processes accessing the same
2668 database. Concurrency is possible because the values are stored in separate
2669 files. Hence the “database” is a directory where all files are governed by
2671 (properties `((python2-variant . ,(delay python2-pickleshare))))
2672 (license license:expat)))
2674 (define-public python2-pickleshare
2675 (let ((pickleshare (package-with-python2
2676 (strip-python2-variant python-pickleshare))))
2677 (package (inherit pickleshare)
2678 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2679 ,@(package-propagated-inputs pickleshare))))))
2681 (define-public python-apsw
2683 (name "python-apsw")
2684 (version "3.28.0-r1")
2688 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2689 "/download/" version "/apsw-" version ".zip"))
2692 "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly"))))
2693 (build-system python-build-system)
2695 `(("unzip" ,unzip)))
2697 `(("sqlite" ,sqlite)))
2700 (modify-phases %standard-phases
2703 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2705 (add-after 'build 'build-test-helper
2707 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2708 "-I." "-Isqlite3" "src/testextension.c")
2711 (lambda* (#:key inputs outputs #:allow-other-keys)
2712 (add-installed-pythonpath inputs outputs)
2713 (invoke "python" "setup.py" "test")
2715 (home-page "https://github.com/rogerbinns/apsw/")
2716 (synopsis "Another Python SQLite Wrapper")
2717 (description "APSW is a Python wrapper for the SQLite
2718 embedded relational database engine. In contrast to other wrappers such as
2719 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2720 translate the complete SQLite API into Python.")
2721 (license license:zlib)))
2723 (define-public python2-apsw
2724 (package-with-python2 python-apsw))
2726 (define-public python2-neo4j-driver
2728 (name "python2-neo4j-driver")
2729 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2733 (uri (pypi-uri "neo4j-driver" version))
2736 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2737 (build-system python-build-system)
2739 `(#:python ,python-2))
2740 (home-page "https://neo4j.com/developer/python/")
2741 (synopsis "Neo4j driver code written in Python")
2742 (description "This package provides the Neo4j Python driver that connects
2743 to the database using Neo4j's binary protocol. It aims to be minimal, while
2744 being idiomatic to Python.")
2745 (license license:asl2.0)))
2747 (define-public python2-py2neo
2749 (name "python2-py2neo")
2753 (uri (pypi-uri "py2neo" version))
2756 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2757 (build-system python-build-system)
2759 `(#:python ,python-2))
2760 (home-page "https://py2neo.org")
2761 (synopsis "Library and toolkit for working with Neo4j in Python")
2762 (description "This package provides a client library and toolkit for
2763 working with Neo4j from within Python applications and from the command
2764 line. The core library has no external dependencies and has been carefully
2765 designed to be easy and intuitive to use.")
2766 (license license:asl2.0)))
2768 (define-public python-psycopg2
2770 (name "python-psycopg2")
2775 (uri (pypi-uri "psycopg2" version))
2777 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2778 (build-system python-build-system)
2780 ;; Tests would require a postgresql database "psycopg2_test"
2781 ;; and a running postgresql database management service.
2782 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2784 `(("postgresql" ,postgresql))) ; libpq
2785 (home-page "http://initd.org/psycopg/")
2786 (synopsis "Python PostgreSQL adapter")
2788 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2790 (license license:lgpl3+)))
2792 (define-public python2-psycopg2
2793 (package-with-python2 python-psycopg2))
2795 (define-public python-sadisplay
2797 (name "python-sadisplay")
2802 (uri (pypi-uri "sadisplay" version))
2805 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2806 (build-system python-build-system)
2808 `(("python-sqlalchemy" ,python-sqlalchemy)))
2811 `(("python-nose" ,python-nose)))
2812 (home-page "https://bitbucket.org/estin/sadisplay")
2813 (synopsis "SQLAlchemy schema displayer")
2814 (description "This package provides a program to build Entity
2815 Relationship diagrams from a SQLAlchemy model (or directly from the
2817 (license license:bsd-3)))
2819 (define-public python2-sadisplay
2820 (package-with-python2 python-sadisplay))
2822 (define-public python-mysqlclient
2824 (name "python-mysqlclient")
2829 (uri (pypi-uri "mysqlclient" version))
2832 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2833 (build-system python-build-system)
2835 `(("nose" ,python-nose)
2836 ("mock" ,python-mock)
2837 ("py.test" ,python-pytest)))
2839 `(("mysql" ,mariadb "lib")
2840 ("mysql-dev" ,mariadb "dev")
2842 ("openssl" ,openssl)))
2843 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2844 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2845 (description "MySQLdb is an interface to the popular MySQL database server
2846 for Python. The design goals are:
2848 @item Compliance with Python database API version 2.0 [PEP-0249],
2849 @item Thread-safety,
2850 @item Thread-friendliness (threads will not block each other).
2852 (license license:gpl2)))
2854 (define-public python2-mysqlclient
2855 (package-with-python2 python-mysqlclient))
2857 (define-public python-hiredis
2859 (name "python-hiredis")
2864 (uri (pypi-uri "hiredis" version))
2867 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2868 (build-system python-build-system)
2872 (home-page "https://github.com/redis/hiredis-py")
2873 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2874 (description "Python-hiredis is a python extension that wraps protocol
2875 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2876 (license license:bsd-3)))
2878 (define-public python2-hiredis
2879 (package-with-python2 python-hiredis))
2881 (define-public python-fakeredis
2883 (name "python-fakeredis")
2888 (uri (pypi-uri "fakeredis" version))
2891 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2892 (build-system python-build-system)
2896 (home-page "https://github.com/jamesls/fakeredis")
2897 (synopsis "Fake implementation of redis API for testing purposes")
2899 "Fakeredis is a pure-Python implementation of the redis-py Python client
2900 that simulates talking to a redis server. It was created for a single purpose:
2901 to write unit tests.
2903 Setting up redis is not hard, but one often wants to write unit tests that don't
2904 talk to an external server such as redis. This module can be used as a
2905 reasonable substitute.")
2906 (license license:bsd-3)))
2908 (define-public python2-fakeredis
2909 (package-with-python2 python-fakeredis))
2911 (define-public python-redis
2913 (name "python-redis")
2918 (uri (pypi-uri "redis" version))
2920 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
2921 (build-system python-build-system)
2922 ;; Tests require a running Redis server.
2923 (arguments '(#:tests? #f))
2924 ;; As long as we are not running test, we do not need this input :-)
2926 ;; `(("python-pytest" ,python-pytest)))
2927 (home-page "https://github.com/andymccurdy/redis-py")
2928 (synopsis "Redis Python client")
2930 "This package provides a Python interface to the Redis key-value store.")
2931 (license license:expat)))
2933 (define-public python2-redis
2934 (package-with-python2 python-redis))
2936 (define-public python-rq
2943 (uri (pypi-uri "rq" version))
2945 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2946 (build-system python-build-system)
2948 `(("python-click" ,python-click)
2949 ("python-redis" ,python-redis)))
2950 (home-page "https://python-rq.org/")
2951 (synopsis "Simple job queues for Python")
2953 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2954 processing them in the background with workers. It is backed by Redis and it
2955 is designed to have a low barrier to entry.")
2956 (license license:bsd-2)))
2958 (define-public python2-rq
2959 (package-with-python2 python-rq))
2961 (define-public python-trollius-redis
2963 (name "python-trollius-redis")
2968 (uri (pypi-uri "trollius_redis" version))
2971 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2972 (build-system python-build-system)
2973 ;; TODO: Tests require packaging 'hiredis'.
2974 (arguments '(#:tests? #f))
2975 (home-page "https://github.com/benjolitz/trollius-redis")
2976 (synopsis "Port of asyncio-redis to trollius")
2977 (description "@code{trollius-redis} is a Redis client for Python
2978 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2980 (license license:bsd-2)))
2982 (define-public python2-trollius-redis
2983 (package-with-python2 python-trollius-redis))
2985 (define-public python-sqlparse
2987 (name "python-sqlparse")
2991 (uri (pypi-uri "sqlparse" version))
2994 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2995 (build-system python-build-system)
2998 (modify-phases %standard-phases
3000 (lambda _ (invoke "py.test"))))))
3002 `(("python-pytest" ,python-pytest)))
3003 (home-page "https://github.com/andialbrecht/sqlparse")
3004 (synopsis "Non-validating SQL parser")
3005 (description "Sqlparse is a non-validating SQL parser for Python. It
3006 provides support for parsing, splitting and formatting SQL statements.")
3007 (license license:bsd-3)))
3009 (define-public python2-sqlparse
3010 (package-with-python2 python-sqlparse))
3012 (define-public python-sql
3019 (uri (pypi-uri "python-sql" version))
3021 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3022 (build-system python-build-system)
3023 (home-page "https://python-sql.tryton.org/")
3024 (synopsis "Library to write SQL queries in a pythonic way")
3025 (description "@code{python-sql} is a library to write SQL queries, that
3026 transforms idiomatic python function calls to well-formed SQL queries.")
3027 (license license:bsd-3)))
3029 (define-public python2-sql
3030 (package-with-python2 python-sql))
3032 (define-public mongo-tools
3034 (name "mongo-tools")
3037 (origin (method git-fetch)
3039 (url "https://github.com/mongodb/mongo-tools")
3040 (commit (string-append "r" version))))
3041 (file-name (git-file-name name version))
3044 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3045 (build-system go-build-system)
3047 `(#:import-path "github.com/mongodb/mongo-tools"
3048 #:modules ((srfi srfi-1)
3049 (guix build go-build-system)
3051 #:install-source? #f
3054 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3055 "mongoimport" "mongooplog" "mongorestore"
3056 "mongostat" "mongotop")))
3057 (modify-phases %standard-phases
3058 (add-after 'unpack 'delete-bundled-source-code
3060 (delete-file-recursively
3061 "src/github.com/mongodb/mongo-tools/vendor")
3063 (add-after 'delete-bundled-source-code 'patch-source
3065 ;; Remove a redundant argument that causes compilation to fail.
3067 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3068 (("skipping restore of system.profile collection\", db)")
3069 "skipping restore of system.profile collection\")"))
3073 (for-each (lambda (tool)
3076 ;; This is where the tests expect to find the
3078 "-o" ,(string-append
3079 "src/github.com/mongodb/mongo-tools/bin/"
3082 "-tags=\"ssl sasl\""
3084 "-extldflags=-Wl,-z,now,-z,relro"
3086 "src/github.com/mongodb/mongo-tools/"
3087 tool "/main/" tool ".go"))))
3088 (simple-format #t "build: running ~A\n"
3089 (string-join command))
3090 (apply invoke command)))
3095 (with-directory-excursion "src"
3096 (for-each (lambda (tool)
3099 (string-append "github.com/mongodb/mongo-tools/"
3104 (lambda* (#:key outputs #:allow-other-keys)
3105 (for-each (lambda (tool)
3107 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3109 (string-append (assoc-ref outputs "out")
3114 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3115 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3116 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3117 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3118 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3119 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3120 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3121 (home-page "https://github.com/mongodb/mongo-tools")
3122 (synopsis "Various tools for interacting with MongoDB and BSON")
3124 "This package includes a collection of tools related to MongoDB.
3127 Display BSON files in a human-readable format
3129 Convert data from JSON, TSV or CSV and insert them into a collection
3131 Write an existing collection to CSV or JSON format
3132 @item mongodump/mongorestore
3133 Dump MongoDB backups to disk in the BSON format
3135 Read MongoDB backups in the BSON format, and restore them to a live database
3137 Monitor live MongoDB servers, replica sets, or sharded clusters
3139 Read, write, delete, or update files in GridFS
3141 Replay oplog entries between MongoDB servers
3143 Monitor read/write activity on a mongo server
3145 (license license:asl2.0)))
3147 (define-public apache-arrow
3149 (name "apache-arrow")
3155 (url "https://github.com/apache/arrow")
3156 (commit (string-append "apache-arrow-" version))))
3157 (file-name (git-file-name name version))
3160 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3161 (build-system cmake-build-system)
3165 (modify-phases %standard-phases
3166 (add-before 'configure 'enter-source-directory
3167 (lambda _ (chdir "cpp") #t))
3168 (add-after 'unpack 'set-env
3170 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3171 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3172 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3173 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
3174 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3176 #:build-type "Release"
3178 (list "-DARROW_PYTHON=ON"
3180 ;; Install to PREFIX/lib (the default is
3182 (string-append "-DCMAKE_INSTALL_LIBDIR="
3183 (assoc-ref %outputs "out")
3186 ;; XXX These Guix package offer static
3187 ;; libraries that are not position independent,
3188 ;; and ld fails to link them into the arrow .so
3189 "-DARROW_WITH_SNAPPY=OFF"
3190 "-DARROW_WITH_ZLIB=OFF"
3191 "-DARROW_WITH_ZSTD=OFF"
3192 "-DARROW_WITH_LZ4=OFF"
3194 ;; Building the tests forces on all the
3195 ;; optional features and the use of static
3197 "-DARROW_BUILD_TESTS=OFF"
3198 "-DARROW_BUILD_STATIC=OFF")))
3201 ("rapidjson" ,rapidjson)
3202 ("brotli" ,google-brotli)
3203 ("flatbuffers" ,flatbuffers)
3204 ("jemalloc" ,jemalloc)
3205 ("python-3" ,python)
3206 ("python-numpy" ,python-numpy)))
3207 (home-page "https://arrow.apache.org/")
3208 (synopsis "Columnar in-memory analytics")
3209 (description "Apache Arrow is a columnar in-memory analytics layer
3210 designed to accelerate big data. It houses a set of canonical in-memory
3211 representations of flat and hierarchical data along with multiple
3212 language-bindings for structure manipulation. It also provides IPC and common
3213 algorithm implementations.")
3214 (license license:asl2.0)))
3216 (define-public python-pyarrow
3218 (name "python-pyarrow")
3224 (url "https://github.com/apache/arrow")
3225 (commit (string-append "apache-arrow-" version))))
3226 (file-name (git-file-name name version))
3229 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3230 (build-system python-build-system)
3232 '(#:tests? #f ; XXX There are no tests in the "python" directory
3234 (modify-phases %standard-phases
3235 (delete 'build) ; XXX the build is performed again during the install phase
3236 (add-after 'unpack 'enter-source-directory
3237 (lambda _ (chdir "python") #t))
3238 (add-after 'unpack 'set-env
3240 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3243 `(("apache-arrow" ,apache-arrow)
3244 ("python-numpy" ,python-numpy)
3245 ("python-pandas" ,python-pandas)
3246 ("python-six" ,python-six)))
3248 `(("cmake" ,cmake-minimal)
3249 ("python-cython" ,python-cython)
3250 ("python-pytest" ,python-pytest)
3251 ("python-pytest-runner" ,python-pytest-runner)
3252 ("python-setuptools-scm" ,python-setuptools-scm)))
3253 (home-page "https://arrow.apache.org/docs/python/")
3254 (synopsis "Python bindings for Apache Arrow")
3255 (description "This library provides a Pythonic API wrapper for the reference
3256 Arrow C++ implementation, along with tools for interoperability with pandas,
3257 NumPy, and other traditional Python scientific computing packages.")
3258 (license license:asl2.0)))
3260 (define-public python2-pyarrow
3261 (package-with-python2 python-pyarrow))
3263 (define-public python-crate
3265 (name "python-crate")
3269 (uri (pypi-uri "crate" version))
3272 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3273 (build-system python-build-system)
3275 `(("python-urllib3" ,python-urllib3)))
3276 (home-page "https://github.com/crate/crate-python")
3277 (synopsis "CrateDB Python client")
3279 "This package provides a Python client library for CrateDB.
3280 It implements the Python DB API 2.0 specification and includes support for
3282 (license license:asl2.0)))
3284 (define-public libdbi
3290 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3291 version "/libdbi-" version ".tar.gz"))
3294 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3295 (build-system gnu-build-system)
3296 (synopsis "Database independent abstraction layer in C")
3298 "This library implements a database independent abstraction layer in C,
3299 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3300 programmers can leverage the power of multiple databases and multiple
3301 simultaneous database connections by using this framework.")
3302 (home-page "http://libdbi.sourceforge.net/")
3303 (license license:lgpl2.1+)))
3305 (define-public libdbi-drivers
3307 (name "libdbi-drivers")
3311 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3312 "libdbi-drivers/libdbi-drivers-" version
3313 "/libdbi-drivers-" version ".tar.gz"))
3316 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3317 (build-system gnu-build-system)
3320 ("inetutils" ,inetutils)
3321 ("glibc-locales" ,glibc-locales)
3322 ("mariadb" ,mariadb)))
3324 `(("libdbi" ,libdbi)
3325 ("mariadb:dev" ,mariadb "dev")
3326 ("mariadb:lib" ,mariadb "lib")
3327 ("postgresql" ,postgresql)
3328 ("sqlite" ,sqlite)))
3331 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3332 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3333 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3334 (postgresql (assoc-ref %build-inputs "postgresql"))
3335 (sqlite (assoc-ref %build-inputs "sqlite")))
3336 (list "--disable-docs"
3337 (string-append "--with-dbi-incdir=" libdbi "/include")
3338 (string-append "--with-dbi-libdir=" libdbi "/lib")
3340 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3341 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3343 (string-append "--with-pgsql-incdir=" postgresql "/include")
3344 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3346 (string-append "--with-sqlite-incdir=" sqlite "/include")
3347 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3349 (modify-phases %standard-phases
3350 (add-after 'unpack 'fix-tests
3351 (lambda* (#:key inputs #:allow-other-keys)
3352 (substitute* "tests/test_mysql.sh"
3354 (string-append "MYMYSQLD="
3355 (assoc-ref inputs "mariadb")
3358 (add-after 'install 'remove-empty-directories
3359 (lambda* (#:key outputs #:allow-other-keys)
3360 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3361 (delete-file-recursively var))
3363 (synopsis "Database drivers for the libdbi framework")
3365 "The @code{libdbi-drivers} library provides the database specific drivers
3366 for the @code{libdbi} framework.
3368 The drivers officially supported by @code{libdbi} are:
3374 (home-page "http://libdbi-drivers.sourceforge.net/")
3375 (license license:lgpl2.1+)))
3384 (url "https://github.com/SOCI/soci/")
3386 (file-name (git-file-name name version))
3389 "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb"))))
3390 (build-system cmake-build-system)
3392 `(("postgresql" ,postgresql)
3398 `(#:tests? #f ; Tests may require running database management systems.
3400 (modify-phases %standard-phases
3401 (add-after 'unpack 'fix-lib-path
3403 (substitute* "CMakeLists.txt"
3404 (("set\\(SOCI_LIBDIR \"lib64\"\\)") "")))))))
3405 (synopsis "C++ Database Access Library")
3407 "SOCI is an abstraction layer for several database backends, including
3408 PostreSQL, SQLite, ODBC and MySQL.")
3409 (home-page "http://soci.sourceforge.net/")
3410 (license license:boost1.0)))