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 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 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
22 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
23 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
24 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
25 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
26 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
34 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
35 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages databases)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages avahi)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages boost)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages cmake)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages crypto)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages cyrus-sasl)
68 #:use-module (gnu packages dbm)
69 #:use-module (gnu packages emacs)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages gettext)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages gnupg)
74 #:use-module (gnu packages guile)
75 #:use-module (gnu packages time)
76 #:use-module (gnu packages golang)
77 #:use-module (gnu packages jemalloc)
78 #:use-module (gnu packages language)
79 #:use-module (gnu packages libevent)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages ncurses)
83 #:use-module (gnu packages parallel)
84 #:use-module (gnu packages pcre)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages perl-check)
87 #:use-module (gnu packages perl-web)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages popt)
90 #:use-module (gnu packages python)
91 #:use-module (gnu packages python-crypto)
92 #:use-module (gnu packages python-xyz)
93 #:use-module (gnu packages rdf)
94 #:use-module (gnu packages readline)
95 #:use-module (gnu packages ruby)
96 #:use-module (gnu packages serialization)
97 #:use-module (gnu packages sphinx)
98 #:use-module (gnu packages sqlite)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages terminals)
101 #:use-module (gnu packages textutils)
102 #:use-module (gnu packages tls)
103 #:use-module (gnu packages valgrind)
104 #:use-module (gnu packages web)
105 #:use-module (gnu packages xml)
106 #:use-module ((guix licenses) #:prefix license:)
107 #:use-module (guix packages)
108 #:use-module (guix download)
109 #:use-module (guix bzr-download)
110 #:use-module (guix git-download)
111 #:use-module (guix build-system gnu)
112 #:use-module (guix build-system go)
113 #:use-module (guix build-system perl)
114 #:use-module (guix build-system python)
115 #:use-module (guix build-system ruby)
116 #:use-module (guix build-system cmake)
117 #:use-module (guix build-system scons)
118 #:use-module ((guix build utils) #:hide (which))
119 #:use-module (guix utils)
120 #:use-module (srfi srfi-1)
121 #:use-module (srfi srfi-26)
122 #:use-module (ice-9 match))
124 (define-public 4store
130 (uri (string-append "https://github.com/4store/4store/archive/v"
132 (file-name (string-append name "-" version ".tar.gz"))
134 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
135 (patches (search-patches "4store-unset-preprocessor-directive.patch"
136 "4store-fix-buildsystem.patch"))))
137 (build-system gnu-build-system)
141 ("autoconf" ,autoconf)
142 ("automake" ,automake)
143 ("gettext" ,gettext-minimal)
145 ("pcre" ,pcre "bin") ;for 'pcre-config'
146 ("pkg-config" ,pkg-config)))
152 ("readline" ,readline)
154 ("cyrus-sasl" ,cyrus-sasl)
156 ("util-linux" ,util-linux)))
159 (modify-phases %standard-phases
160 (add-after 'unpack 'generate-configure
162 (invoke "sh" "autogen.sh"))))))
163 ;; http://www.4store.org has been down for a while now.
164 (home-page "https://github.com/4store/4store")
165 (synopsis "Clustered RDF storage and query engine")
166 (description "4store is a RDF/SPARQL store written in C, supporting
167 either single machines or networked clusters.")
168 (license license:gpl3+)))
170 (define-public go-gopkg.in-mgo.v2
172 (name "go-gopkg.in-mgo.v2")
173 (version "2016.08.01")
177 (url "https://github.com/go-mgo/mgo")
178 (commit (string-append "r" version))))
179 (file-name (git-file-name name version))
182 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
183 (build-system go-build-system)
185 `(#:import-path "gopkg.in/mgo.v2"
186 ;; TODO: The tests fail as MongoDB fails to start
187 ;; Error parsing command line: unrecognised option '--chunkSize'
190 (modify-phases %standard-phases
191 (delete 'reset-gzip-timestamps)
192 (add-before 'check 'start-mongodb
193 (lambda* (#:key tests? #:allow-other-keys)
195 (with-directory-excursion "src/gopkg.in/mgo.v2"
196 (invoke "make" "startdb")))
198 (add-after 'check 'stop'mongodb
199 (lambda* (#:key tests? #:allow-other-keys)
201 (with-directory-excursion "src/gopkg.in/mgo.v2"
202 (invoke "make" "stopdb")))
205 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
207 ("daemontools" ,daemontools)))
208 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
210 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
211 It implements a rich selection of features under a simple API following
212 standard Go idioms.")
213 (home-page "http://labix.org/mgo")
214 (license license:bsd-2)))
216 (define-public es-dump-restore
218 (name "es-dump-restore")
223 (uri (rubygems-uri "es_dump_restore" version))
226 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
227 (build-system ruby-build-system)
229 '(#:tests? #f)) ;; No testsuite.
231 `(("ruby-httpclient" ,ruby-httpclient)
232 ("ruby-multi-json" ,ruby-multi-json)
233 ("ruby-progress_bar" ,ruby-progress_bar)
234 ("ruby-rubyzip" ,ruby-rubyzip)
235 ("ruby-thor" ,ruby-thor)))
236 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
238 "This package provides a utility for dumping the contents of an
239 ElasticSearch index to a compressed file and restoring the dumpfile back to an
240 ElasticSearch server")
241 (home-page "https://github.com/patientslikeme/es_dump_restore")
242 (license license:expat)))
244 (define-public leveldb
251 (url "https://github.com/google/leveldb")
253 (file-name (git-file-name name version))
256 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
257 (build-system cmake-build-system)
259 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
261 `(("snappy" ,snappy)))
262 (home-page "http://leveldb.org/")
263 (synopsis "Fast key-value storage library")
265 "LevelDB is a fast key-value storage library that provides an ordered
266 mapping from string keys to string values.")
267 (license license:bsd-3)))
269 (define-public memcached
277 "https://memcached.org/files/memcached-" version ".tar.gz"))
279 (base32 "1agj198rm5kc64z8qxck65kdzvw30pdfxalygipnryw0lwlxynww"))))
280 (build-system gnu-build-system)
282 `(("libevent" ,libevent)
283 ("cyrus-sasl" ,cyrus-sasl)))
284 (home-page "https://memcached.org/")
285 (synopsis "In-memory caching service")
286 (description "Memcached is an in-memory key-value store. It has a small
287 and generic API, and was originally intended for use with dynamic web
289 (license license:bsd-3)))
291 (define-public libmemcached
293 (name "libmemcached")
295 ;; We build from the sources since we want to build the extra HTML
296 ;; documentation which is not included with the release.
300 (url "lp:libmemcached/1.0")
301 (revision (string-append "tag:" version))))
302 (file-name (string-append name "-" version "-checkout"))
305 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))))
306 (build-system gnu-build-system)
308 `(("memcached" ,memcached)
310 ("autoconf" ,autoconf)
311 ("automake" ,automake)
315 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
317 `(("libevent" ,libevent)
318 ("cyrus-sasl" ,cyrus-sasl)))
319 (outputs '("out" "doc"))
322 (modify-phases %standard-phases
323 (add-before 'bootstrap 'fix-configure.ac
324 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
325 ;; get the error ``configure: error: cannot find install-sh,
326 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
327 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
328 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
330 (delete-file "bootstrap.sh") ;not useful in the context of Guix
331 (substitute* "configure.ac"
332 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
333 (("(^AC_INIT.*)" anchor)
334 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
336 (add-before 'bootstrap 'disable-failing-tests
337 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
339 ;; Mark some heavily failing test suites as expected to fail.
340 (substitute* "Makefile.am"
341 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
342 (string-append xfail_tests " tests/testudp"
343 " tests/libmemcached-1.0/testapp"
344 " tests/libmemcached-1.0/testsocket")))
345 ;; Disable two tests of the unittest test suite.
346 (substitute* "libtest/unittest.cc"
347 ((".*echo_fubar_BINARY \\},.*") "")
348 ((".*application_doesnotexist_BINARY \\},.*") ""))
350 (add-after 'disable-dns-tests 'build-and-install-html-doc
351 (lambda* (#:key outputs #:allow-other-keys)
352 (let ((html (string-append (assoc-ref outputs "doc")
353 "/share/doc/libmemcached/html/")))
354 (invoke "make" "install-html")
355 ;; Cleanup useless files.
356 (for-each delete-file-recursively
357 (map (lambda (x) (string-append html x))
358 '("_sources" ".doctrees" ".buildinfo"))))
360 (home-page "https://libmemcached.org/")
361 (synopsis "C++ library for memcached")
362 (description "libMemcached is a library to use memcached in C/C++
363 applications. It comes with a complete reference guide and documentation of
364 the API, and provides features such as:
366 @item Asynchronous and synchronous transport support
367 @item Consistent hashing and distribution
368 @item Tunable hashing algorithm to match keys
369 @item Access to large object support
370 @item Local replication
372 (license license:bsd-3)))
374 (define-public python-pylibmc
376 (name "python-pylibmc")
381 (uri (pypi-uri "pylibmc" version))
384 "1n6nvvhl0g52gpzzwdj1my6049xljkfwyxxygnwda9smrbj7pyay"))))
385 (build-system python-build-system)
388 (modify-phases %standard-phases
389 (add-before 'check 'start-memcached-daemon
390 ;; The test suite requires a memcached server.
392 (invoke "memcached" "-d"))))))
394 `(("memcached" ,memcached)
395 ("python-nose" ,python-nose)))
397 `(("libmemcached" ,libmemcached)
399 ("cyrus-sasl" ,cyrus-sasl)))
401 "http://sendapatch.se/projects/pylibmc/")
403 "Python client for memcached")
405 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
406 around TangentOrg’s libmemcached library, and can be used as a drop-in
407 replacement for the code@{python-memcached} library.")
408 (license license:bsd-3)))
410 (define-public python2-pylibmc
411 (package-with-python2 python-pylibmc))
413 (define-public mongodb
419 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
421 (file-name (string-append name "-" version ".tar.gz"))
423 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
424 (modules '((guix build utils)))
427 (for-each (lambda (dir)
428 (delete-file-recursively
429 (string-append "src/third_party/" dir)))
430 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
431 "valgrind-3.11.0" "wiredtiger"
432 "yaml-cpp-0.5.3" "zlib-1.2.8"))
436 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
437 (build-system scons-build-system)
439 `(("openssl" ,openssl)
441 ,@(match (%current-system)
442 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
443 `(("wiredtiger" ,wiredtiger)))
445 ("yaml-cpp" ,yaml-cpp)
449 `(("valgrind" ,valgrind)
452 ("python2-pymongo" ,python2-pymongo)
453 ("python2-pyyaml" ,python2-pyyaml)
456 `(#:scons ,scons-python2
458 (let ((common-options
459 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
461 ;; wiredtiger is 64-bit only
462 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
464 '("i686-linux" "armhf-linux"))
466 ``"--use-system-wiredtiger")
468 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
469 ;; --use-system-boost
470 "--use-system-snappy"
472 "--use-system-valgrind"
473 ;; "--use-system-stemmer" TODO: Missing relevant package
475 "--disable-warnings-as-errors"
476 ,(format #f "--jobs=~a" (parallel-job-count))
478 (modify-phases %standard-phases
479 (add-after 'unpack 'scons-propagate-environment
481 ;; Modify the SConstruct file to arrange for
482 ;; environment variables to be propagated.
483 (substitute* "SConstruct"
484 (("^env = Environment\\(")
485 "env = Environment(ENV=os.environ, "))
487 (add-after 'unpack 'create-version-file
489 (call-with-output-file "version.json"
491 (display ,(simple-format #f "{
497 (apply invoke `("scons"
499 "mongod" "mongo" "mongos"))))
501 (lambda* (#:key tests? inputs #:allow-other-keys)
503 (string-append (assoc-ref inputs "tzdata")
506 ;; Note that with the tests, especially the unittests, the
507 ;; build can take up to ~45GB of space, as many tests are
508 ;; individual executable files, with some being hundreds of
509 ;; megabytes in size.
510 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
511 (substitute* "build/unittests.txt"
512 ;; TODO: Don't run the async_stream_test, as it hangs
513 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
515 ;; TODO: This test fails
516 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
517 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
519 (invoke "python" "buildscripts/resmoke.py"
520 "--suites=dbtest,unittests"
521 (format #f "--jobs=~a" (parallel-job-count))))
524 (lambda* (#:key outputs #:allow-other-keys)
525 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
526 (install-file "mongod" bin)
527 (install-file "mongos" bin)
528 (install-file "mongo" bin))
530 (home-page "https://www.mongodb.org/")
531 (synopsis "High performance and high availability document database")
533 "Mongo is a high-performance, high availability, schema-free
534 document-oriented database. A key goal of MongoDB is to bridge the gap
535 between key/value stores (which are fast and highly scalable) and traditional
536 RDBMS systems (which are deep in functionality).")
537 (license (list license:agpl3
538 ;; Some parts are licensed under the Apache License
541 ;; XXX When updating, check whether boost-for-mysql is still needed.
542 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
549 (uri (list (string-append
550 "https://dev.mysql.com/get/Downloads/MySQL-"
551 (version-major+minor version) "/"
552 name "-" version ".tar.gz")
554 "https://downloads.mysql.com/archives/get/file/"
555 name "-" version ".tar.gz")))
558 "0rbc3xsc11lq2dm0ip6gxa16c06hi74scb97x5cw7yhbabaz4c07"))))
559 (build-system cmake-build-system)
562 '("-DBUILD_CONFIG=mysql_release"
565 "-DDEFAULT_CHARSET=utf8"
566 "-DDEFAULT_COLLATION=utf8_general_ci"
567 "-DMYSQL_DATADIR=/var/lib/mysql"
568 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
569 "-DINSTALL_INFODIR=share/mysql/docs"
570 "-DINSTALL_MANDIR=share/man"
571 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
572 "-DINSTALL_SCRIPTDIR=bin"
573 "-DINSTALL_INCLUDEDIR=include/mysql"
574 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
575 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
576 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
577 "-DINSTALL_DOCDIR=share/mysql/docs"
578 "-DINSTALL_SHAREDIR=share/mysql"
579 ;; Get rid of test data.
580 "-DINSTALL_MYSQLTESTDIR="
581 "-DINSTALL_SQLBENCHDIR=")
582 #:phases (modify-phases %standard-phases
584 'install 'remove-extra-binaries
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let ((out (assoc-ref outputs "out")))
587 ;; Remove the 3 *_embedded files, which weigh in at
589 (for-each delete-file
590 (find-files (string-append out "/bin")
597 `(("boost" ,boost-for-mysql)
602 (home-page "https://www.mysql.com/")
603 (synopsis "Fast, easy to use, and popular database")
605 "MySQL is a fast, reliable, and easy to use relational database
606 management system that supports the standardized Structured Query
608 (license license:gpl2)))
610 (define-public mariadb
616 (uri (string-append "https://downloads.mariadb.org/f/"
617 name "-" version "/source/"
618 name "-" version ".tar.gz"))
621 "0zq77w3ff9q781fn8cv46vy1v4ggb8vjarjvk51k653x4gyg9wfa"))
622 (patches (search-patches "mariadb-client-test-32bit.patch"))
623 (modules '((guix build utils)))
626 ;; Delete bundled snappy and xz.
627 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
628 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
629 ;; This file checks that the bundled sources are present and
630 ;; declares build procedures for them.
631 (("^include\\(TokuThirdParty\\)") ""))
632 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
633 ;; Don't attempt to use the procedures we just removed.
634 ((" build_lzma build_snappy") ""))
636 ;; Preserve CMakeLists.txt for these.
637 (for-each (lambda (file)
638 (unless (string-suffix? "CMakeLists.txt" file)
640 (append (find-files "extra/yassl")
641 (find-files "pcre") (find-files "zlib")))
643 (build-system cmake-build-system)
646 '("-DBUILD_CONFIG=mysql_release"
647 ;; Linking with libarchive fails, like this:
649 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
650 ;; relocation R_X86_64_32 against `.bss' can not be used when
651 ;; making a shared object; recompile with -fPIC
653 ;; For now, disable the features that that use libarchive (xtrabackup).
654 "-DWITH_LIBARCHIVE=OFF"
656 ;; Ensure the system libraries are used.
657 "-DWITH_JEMALLOC=yes"
662 "-DDEFAULT_CHARSET=utf8"
663 "-DDEFAULT_COLLATION=utf8_general_ci"
664 "-DMYSQL_DATADIR=/var/lib/mysql"
665 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
666 "-DINSTALL_INFODIR=share/mysql/docs"
667 "-DINSTALL_MANDIR=share/man"
668 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
669 "-DINSTALL_SCRIPTDIR=bin"
670 "-DINSTALL_INCLUDEDIR=include/mysql"
671 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
672 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
673 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
674 "-DINSTALL_DOCDIR=share/mysql/docs"
675 "-DINSTALL_SHAREDIR=share")
677 (modify-phases %standard-phases
678 (add-after 'unpack 'fix-pcre-detection
680 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
681 ;; in version 8.34. Unfortunately the upstream patch behaves
682 ;; slightly differently and the build system fails to detect it.
683 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
684 ;; XXX: Consider patching PCRE instead.
685 (substitute* "cmake/pcre.cmake"
686 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
688 (add-after 'unpack 'adjust-tests
690 (let ((disabled-tests
691 '(;; These fail because root@hostname == root@localhost in
692 ;; the build environment, causing a user count mismatch.
693 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
695 "main.explain_non_select"
696 "main.stat_tables_innodb"
697 "roles.acl_statistics"
699 ;; This file contains a time bomb which makes it fail after
700 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
703 ;; XXX: Fails sporadically.
704 "innodb_fts.crash_recovery"
706 ;; FIXME: This test fails on i686:
707 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
708 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
709 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
710 ;; (all three tables must exist and be identical)
711 ;; in a loop it produces the same error around 1/240 times.
712 ;; montywi on #maria suggested removing the real_end check in
713 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
714 ;; reach the ending quote occasionally. Disable it for now.
716 ;; FIXME: This test fails on armhf-linux:
717 "mroonga/storage.index_read_multiple_double"))
719 ;; This file contains a list of known-flaky tests for this
720 ;; release. Append our own items.
721 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
722 (for-each (lambda (test)
723 (format unstable-tests "~a : ~a\n"
724 test "Disabled in Guix"))
726 (close-port unstable-tests)
728 (substitute* "mysql-test/mysql-test-run.pl"
729 (("/bin/ls") (which "ls"))
730 (("/bin/sh") (which "sh")))
732 (add-before 'configure 'disable-plugins
734 (let ((disable-plugin (lambda (name)
735 (call-with-output-file
736 (string-append "plugin/" name
739 (format port "\n")))))
740 (disabled-plugins '(;; XXX: Causes a test failure.
742 (for-each disable-plugin disabled-plugins)
745 (lambda* (#:key (tests? #t) #:allow-other-keys)
747 (with-directory-excursion "mysql-test"
748 (invoke "./mtr" "--verbose"
750 "--testcase-timeout=40"
751 "--suite-timeout=600"
752 "--parallel" (number->string (parallel-job-count))
753 "--skip-test-list=unstable-tests"))
754 (format #t "test suite not run~%"))
757 'install 'post-install
758 (lambda* (#:key outputs #:allow-other-keys)
759 (let* ((out (assoc-ref outputs "out"))
760 (test (assoc-ref outputs "test")))
761 (substitute* (string-append out "/bin/mysql_install_db")
763 (string-append "basedir=\"" out "\"")))
764 ;; Remove unneeded files for testing.
765 (with-directory-excursion out
766 (for-each delete-file-recursively
767 '("data" "mysql-test" "sql-bench"
768 "share/man/man1/mysql-test-run.pl.1"))
769 ;; Delete huge and unnecessary executables.
770 (for-each delete-file (find-files "bin" "(test|embedded)"))
771 ;; And static libraries.
772 (for-each delete-file (find-files "lib" "\\.a$")))
778 `(("jemalloc" ,jemalloc)
787 ;; mariadb.pc says -lssl -lcrypto, so propagate it.
788 `(("openssl" ,openssl)))
789 ;; The test suite is very resource intensive and can take more than three
790 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
791 (properties '((timeout . 64800))) ;18 hours
792 (home-page "https://mariadb.org/")
793 (synopsis "SQL database server")
795 "MariaDB is a multi-user and multi-threaded SQL database server, designed
796 as a drop-in replacement of MySQL.")
797 (license license:gpl2)))
799 ;; Don't forget to update the other postgresql packages when upgrading this one.
800 (define-public postgresql
804 (replacement postgresql-10.8)
807 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
808 version "/postgresql-" version ".tar.bz2"))
811 "1piyfcrcqscjhnnwn91kdvr764s7d0qz4lgygf9bl6qc71ji1vdz"))
812 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
813 (build-system gnu-build-system)
815 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
817 (modify-phases %standard-phases
818 (add-before 'configure 'patch-/bin/sh
820 ;; Refer to the actual shell.
821 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
822 "src/bin/psql/command.c")
823 (("/bin/sh") (which "sh")))
825 (add-after 'build 'build-contrib
827 (invoke "make" "-C" "contrib")))
828 (add-after 'install 'install-contrib
830 (invoke "make" "-C" "contrib" "install"))))))
832 `(("readline" ,readline)
833 ("libuuid" ,util-linux)
836 (home-page "https://www.postgresql.org/")
837 (synopsis "Powerful object-relational database system")
839 "PostgreSQL is a powerful object-relational database system. It is fully
840 ACID compliant, has full support for foreign keys, joins, views, triggers, and
841 stored procedures (in multiple languages). It includes most SQL:2008 data
842 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
843 TIMESTAMP. It also supports storage of binary large objects, including
844 pictures, sounds, or video.")
845 (license (license:x11-style "file://COPYRIGHT"))))
847 ;; This release fixes CVE-2019-10129 and CVE-2019-10130. See
848 ;; <https://www.postgresql.org/about/news/1939/> for details.
849 ;; TODO: Remove this in the next rebuild cycle.
850 (define-public postgresql-10.8
856 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
857 version "/postgresql-" version ".tar.bz2"))
860 "0pfdmy4w95b49w9rkn8dwvzmi2brpqfvbxd04y0k0s0xvymc565i"))
861 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
863 (define-public postgresql-9.6
870 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
871 version "/postgresql-" version ".tar.bz2"))
874 "197964wb5pc5fx81a6mh9hlcrr9sgr3nqlpmljv6asi9aq0d5gpc"))))))
876 (define-public python-pymysql
878 (name "python-pymysql")
883 (uri (pypi-uri "PyMySQL" version))
885 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
886 (build-system python-build-system)
888 `(("python-unittest2" ,python-unittest2)))
890 `(("python-cryptography" ,python-cryptography)))
892 `(#:tests? #f)) ; tests expect a running MySQL
893 (home-page "https://github.com/PyMySQL/PyMySQL/")
894 (synopsis "Pure-Python MySQL driver")
896 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
897 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
898 (license license:expat)))
900 (define-public python2-pymysql
901 (package-with-python2 python-pymysql))
910 (uri (string-append "http://fallabs.com/" name "/"
911 name "-" version ".tar.gz"))
914 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
915 (build-system gnu-build-system)
917 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
918 (assoc-ref %outputs "out")
920 (home-page "http://fallabs.com/qdbm")
921 (synopsis "Key-value database")
922 (description "QDBM is a library of routines for managing a
923 database. The database is a simple data file containing key-value
924 pairs. Every key and value is serial bytes with variable length.
925 Binary data as well as character strings can be used as a key or a
926 value. There is no concept of data tables or data types. Records are
927 organized in a hash table or B+ tree.")
928 (license license:lgpl2.1+)))
930 (define-public recutils
936 (uri (string-append "mirror://gnu/recutils/recutils-"
940 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
941 (build-system gnu-build-system)
943 (arguments '(#:configure-flags
944 (list (string-append "--with-bash-headers="
945 (assoc-ref %build-inputs "bash:include")
948 (native-inputs `(("emacs" ,emacs-minimal)
950 ("bash:include" ,bash "include")
952 ("libuuid" ,util-linux)
953 ("pkg-config" ,pkg-config)))
955 ;; TODO: Add more optional inputs.
956 (inputs `(("curl" ,curl)
957 ("libgcrypt" ,libgcrypt)))
958 (synopsis "Manipulate plain text files as databases")
960 "GNU Recutils is a set of tools and libraries for creating and
961 manipulating text-based, human-editable databases. Despite being text-based,
962 databases created with Recutils carry all of the expected features such as
963 unique fields, primary keys, time stamps and more. Many different field
964 types are supported, as is encryption.")
965 (license license:gpl3+)
966 (home-page "https://www.gnu.org/software/recutils/")))
968 (define-public rocksdb
975 (url "https://github.com/facebook/rocksdb")
976 (commit (string-append "v" version))))
977 (file-name (git-file-name name version))
980 "1v2slmmr1dsgf8z0qcfg1y9x1al96859rg48b66p9nsawczd5zv9"))
981 (modules '((guix build utils)))
984 ;; TODO: unbundle gtest.
985 (delete-file "build_tools/gnu_parallel")
986 (substitute* "Makefile"
987 (("build_tools/gnu_parallel") "parallel"))
989 (build-system gnu-build-system)
991 `(#:make-flags (list "CC=gcc" "V=1"
992 ;; Ceph requires that RTTI is enabled.
994 (string-append "INSTALL_PATH="
995 (assoc-ref %outputs "out"))
997 ;; Running the full test suite takes hours and require
998 ;; a lot of disk space. Instead we only run a subset
999 ;; (see .travis.yml and Makefile).
1000 "ROCKSDBTESTS_END=db_tailing_iter_test")
1001 #:test-target "check_some"
1002 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1003 ;; this upstream, but it's not going to be supported any time soon.
1004 #:tests? (let ((system ,(or (%current-target-system)
1005 (%current-system))))
1006 (or (string-prefix? "x86_64-linux" system)
1007 (string-prefix? "aarch64-linux" system)))
1009 (modify-phases %standard-phases
1010 (add-after 'unpack 'patch-Makefile
1012 (substitute* "Makefile"
1013 ;; Don't depend on the static library when installing.
1014 (("install: install-static")
1015 "install: install-shared")
1016 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1019 ;; The default target is only needed for tests and built on demand.
1021 (add-before 'check 'disable-optimizations
1023 ;; Prevent the build from passing '-march=native' to the compiler.
1024 (setenv "PORTABLE" "1")
1026 (add-before 'check 'disable-failing-tests
1028 (substitute* "Makefile"
1029 ;; These tests reliably fail due to "Too many open files".
1030 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1031 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1033 (add-after 'check 'build
1034 ;; The default build target is a debug build for tests. The
1035 ;; install target depends on the "shared_lib" release target
1036 ;; so we build it here for clarity.
1037 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1038 (apply invoke "make" "shared_lib"
1039 `(,@(if parallel-build?
1040 `("-j" ,(number->string (parallel-job-count)))
1044 `(("parallel" ,parallel)
1047 ("python" ,python-2)
1052 ("jemalloc" ,jemalloc)
1056 (home-page "http://rocksdb.org/")
1057 (synopsis "Persistent key-value store for fast storage")
1059 "RocksDB is a library that forms the core building block for a fast
1060 key-value server, especially suited for storing data on flash drives. It
1061 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1062 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1063 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1064 compactions, making it specially suitable for storing multiple terabytes of
1065 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1066 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1067 ;; files carry the 3-clause BSD license.
1068 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1070 (define-public sparql-query
1072 (name "sparql-query")
1076 (uri (string-append "https://github.com/tialaramex/"
1077 name "/archive/" version ".tar.gz"))
1079 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1080 (file-name (string-append name "-" version ".tar.gz"))))
1081 (build-system gnu-build-system)
1083 `(("readline" ,readline)
1084 ("ncurses" ,ncurses)
1086 ("libxml2" ,libxml2)
1089 `(("pkg-config" ,pkg-config)))
1091 `(#:make-flags '("CC=gcc")
1093 (modify-phases %standard-phases
1095 ;; The Makefile uses git to obtain versioning information. This phase
1096 ;; substitutes the git invocation with the package version.
1097 (add-after 'unpack 'remove-git-dependency
1099 (substitute* "Makefile"
1101 (string-append "gitrev = \"v" ,version "\"")))
1103 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1104 ;; This replacement does the same thing, except for using $PREFIX/bin
1107 (lambda* (#:key outputs #:allow-other-keys)
1108 (let* ((out (assoc-ref outputs "out"))
1109 (bin (string-append out "/bin")))
1110 (install-file "sparql-query" bin)
1111 (symlink (string-append bin "/sparql-query")
1112 (string-append bin "/sparql-update")))
1115 (lambda* (#:key make-flags #:allow-other-keys)
1116 (apply invoke "make" `(,@make-flags "scan-test"))
1117 (invoke "./scan-test"))))))
1118 (home-page "https://github.com/tialaramex/sparql-query/")
1119 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1120 (description "Sparql-query is a command-line tool for accessing SPARQL
1121 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1122 tools for interrogating SQL databases. For example, you can enter a query over
1123 several lines, using a semi-colon at the end of a line to indicate the end of
1124 your query. It also supports readline so that you can more easily recall and
1125 edit previous queries, even across sessions. It can be used non-interactively,
1126 for example from a shell script.")
1127 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1128 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1129 (license (list license:gpl3+))))
1131 (define-public sqitch
1139 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-"
1144 "1cvj8grs3bzc4g7dw1zc26g4biv1frav18sq0fkvi2kk0q1aigzm"))))
1145 (build-system perl-build-system)
1148 (modify-phases %standard-phases
1149 (add-before 'check 'set-check-environment
1152 (setenv "HOME" "/tmp")
1154 (add-after 'install 'wrap-program
1155 (lambda* (#:key outputs #:allow-other-keys)
1156 (let* ((out (assoc-ref outputs "out"))
1157 (path (getenv "PERL5LIB")))
1158 (wrap-program (string-append out "/bin/sqitch")
1159 `("PERL5LIB" ":" prefix
1160 (,(string-append out "/lib/perl5/site_perl"
1165 `(("perl-capture-tiny" ,perl-capture-tiny)
1166 ("perl-io-pager" ,perl-io-pager)
1167 ("perl-module-build" ,perl-module-build)
1168 ("perl-module-runtime" ,perl-module-runtime)
1169 ("perl-path-class" ,perl-path-class)
1170 ("perl-test-deep" ,perl-test-deep)
1171 ("perl-test-dir" ,perl-test-dir)
1172 ("perl-test-exception" ,perl-test-exception)
1173 ("perl-test-file" ,perl-test-file)
1174 ("perl-test-file-contents" ,perl-test-file-contents)
1175 ("perl-test-mockmodule" ,perl-test-mockmodule)
1176 ("perl-test-nowarnings" ,perl-test-nowarnings)
1177 ("perl-test-warn" ,perl-test-warn)))
1179 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1180 ("perl-clone" ,perl-clone)
1181 ("perl-config-gitlike" ,perl-config-gitlike)
1182 ("perl-datetime" ,perl-datetime)
1183 ("perl-datetime-timezone" ,perl-datetime-timezone)
1184 ("perl-dbd-pg" ,perl-dbd-pg)
1185 ("perl-dbi" ,perl-dbi)
1186 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1187 ("perl-encode-locale" ,perl-encode-locale)
1188 ("perl-file-homedir" ,perl-file-homedir)
1189 ("perl-hash-merge" ,perl-hash-merge)
1190 ("perl-ipc-run3" ,perl-ipc-run3)
1191 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1192 ("perl-libintl-perl" ,perl-libintl-perl)
1193 ("perl-list-moreutils" ,perl-list-moreutils)
1194 ("perl-moo" ,perl-moo)
1195 ("perl-mysql-config" ,perl-mysql-config)
1196 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1197 ("perl-path-class" ,perl-path-class)
1198 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1199 ("perl-string-formatter" ,perl-string-formatter)
1200 ("perl-string-shellquote" ,perl-string-shellquote)
1201 ("perl-sub-exporter" ,perl-sub-exporter)
1202 ("perl-template-tiny" ,perl-template-tiny)
1203 ("perl-template-toolkit" ,perl-template-toolkit)
1204 ("perl-throwable" ,perl-throwable)
1205 ("perl-try-tiny" ,perl-try-tiny)
1206 ("perl-type-tiny" ,perl-type-tiny)
1207 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1208 ("perl-uri" ,perl-uri)
1209 ("perl-uri-db" ,perl-uri-db)))
1210 (home-page "https://sqitch.org/")
1211 (synopsis "Database change management tool")
1213 "Sqitch is a standalone change management system for database schemas,
1214 which uses SQL to describe changes.")
1215 (license license:x11)))
1217 (define-public sqlcrush
1218 ;; Unfortunately, there is no proper upstream release and may never be.
1219 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1223 (version (git-version "0.1.5" revision commit))
1227 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1229 (file-name (git-file-name name version))
1232 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1233 (build-system python-build-system)
1235 `(("python-cryptography" ,python-cryptography)
1236 ("python-psycopg2" ,python-psycopg2)
1237 ("python-pymysql" ,python-pymysql)
1238 ("python-sqlalchemy" ,python-sqlalchemy)))
1239 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1240 (synopsis "Text console-based database viewer and editor")
1242 "SQLcrush lets you view and edit a database directly from the text
1243 console through an ncurses interface. You can explore each table's structure,
1244 browse and edit the contents, add and delete entries, all while tracking your
1246 (license license:gpl3+)))) ; no headers, see README.md
1254 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1258 "0d9d2f1c83gmmq30bkfs50yb8399mr9xjjzscma4kyq0ajf75861"))))
1259 (build-system gnu-build-system)
1262 (modify-phases %standard-phases
1264 (lambda* (#:key outputs #:allow-other-keys)
1265 (let ((out (assoc-ref outputs "out")))
1266 ;; The 'configure' script is a wrapper for Waf and
1267 ;; doesn't recognize things like '--enable-fast-install'.
1268 (invoke "./configure"
1269 (string-append "--prefix=" out))))))))
1271 `(;; TODO: Build the documentation.
1272 ;; ("docbook-xsl" ,docbook-xsl)
1273 ;; ("libxml2" ,libxml2)
1274 ;; ("libxslt" ,libxslt)
1275 ("python" ,python) ;for the Waf build system
1277 (home-page "https://tdb.samba.org/")
1278 (synopsis "Trivial database")
1280 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1281 and BSD's DB except that it allows multiple simultaneous writers and uses
1282 locking internally to keep writers from trampling on each other. TDB is also
1284 (license license:lgpl3+)))
1286 (define-public perl-dbi
1293 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1297 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1298 (build-system perl-build-system)
1299 (synopsis "Database independent interface for Perl")
1300 (description "This package provides an database interface for Perl.")
1301 (home-page "https://metacpan.org/release/DBI")
1302 (license license:perl-license)))
1304 (define-public perl-dbix-class
1306 (name "perl-dbix-class")
1307 (version "0.082841")
1311 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1312 "DBIx-Class-" version ".tar.gz"))
1315 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1316 (build-system perl-build-system)
1318 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1319 ("perl-file-temp" ,perl-file-temp)
1320 ("perl-module-install" ,perl-module-install)
1321 ("perl-package-stash" ,perl-package-stash)
1322 ("perl-test-deep" ,perl-test-deep)
1323 ("perl-test-exception" ,perl-test-exception)
1324 ("perl-test-warn" ,perl-test-warn)))
1326 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1327 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1328 ("perl-class-inspector" ,perl-class-inspector)
1329 ("perl-config-any" ,perl-config-any)
1330 ("perl-context-preserve" ,perl-context-preserve)
1331 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1332 ("perl-data-page" ,perl-data-page)
1333 ("perl-dbi" ,perl-dbi)
1334 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1335 ("perl-hash-merge" ,perl-hash-merge)
1336 ("perl-module-find" ,perl-module-find)
1337 ("perl-moo" ,perl-moo)
1338 ("perl-mro-compat" ,perl-mro-compat)
1339 ("perl-namespace-clean" ,perl-namespace-clean)
1340 ("perl-path-class" ,perl-path-class)
1341 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1342 ("perl-scope-guard" ,perl-scope-guard)
1343 ("perl-sql-abstract" ,perl-sql-abstract)
1344 ("perl-sub-name" ,perl-sub-name)
1345 ("perl-text-balanced" ,perl-text-balanced)
1346 ("perl-try-tiny" ,perl-try-tiny)))
1347 (home-page "https://metacpan.org/release/DBIx-Class")
1348 (synopsis "Extensible and flexible object <-> relational mapper")
1349 (description "An SQL to OO mapper with an object API inspired by
1350 Class::DBI (with a compatibility layer as a springboard for porting) and a
1351 resultset API that allows abstract encapsulation of database operations. It
1352 aims to make representing queries in your code as perl-ish as possible while
1353 still providing access to as many of the capabilities of the database as
1354 possible, including retrieving related records from multiple tables in a
1355 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1356 \"ORDER BY\" and \"HAVING\" support.")
1357 (license license:perl-license)))
1359 (define-public perl-dbix-class-cursor-cached
1361 (name "perl-dbix-class-cursor-cached")
1362 (version "1.001004")
1366 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1367 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1370 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1371 (build-system perl-build-system)
1373 `(("perl-cache-cache" ,perl-cache-cache)
1374 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1375 ("perl-module-install" ,perl-module-install)))
1377 `(("perl-carp-clan" ,perl-carp-clan)
1378 ("perl-dbix-class" ,perl-dbix-class)))
1379 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1380 (synopsis "Cursor with built-in caching support")
1381 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1382 built-in caching support.")
1383 (license license:perl-license)))
1385 (define-public perl-dbix-class-introspectablem2m
1387 (name "perl-dbix-class-introspectablem2m")
1388 (version "0.001002")
1392 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1393 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1396 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1397 (build-system perl-build-system)
1399 `(("perl-module-install" ,perl-module-install)))
1401 `(("perl-dbix-class" ,perl-dbix-class)))
1402 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1403 (synopsis "Introspect many-to-many relationships")
1404 (description "Because the many-to-many relationships are not real
1405 relationships, they can not be introspected with DBIx::Class. Many-to-many
1406 relationships are actually just a collection of convenience methods installed
1407 to bridge two relationships. This DBIx::Class component can be used to store
1408 all relevant information about these non-relationships so they can later be
1409 introspected and examined.")
1410 (license license:perl-license)))
1412 (define-public perl-dbix-class-schema-loader
1414 (name "perl-dbix-class-schema-loader")
1419 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1420 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1423 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1424 (build-system perl-build-system)
1426 `(("perl-config-any" ,perl-config-any)
1427 ("perl-config-general" ,perl-config-general)
1428 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1429 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1430 ("perl-module-install" ,perl-module-install)
1431 ("perl-moose" ,perl-moose)
1432 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1433 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1434 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1435 ("perl-test-deep" ,perl-test-deep)
1436 ("perl-test-differences" ,perl-test-differences)
1437 ("perl-test-exception" ,perl-test-exception)
1438 ("perl-test-pod" ,perl-test-pod)
1439 ("perl-test-warn" ,perl-test-warn)))
1441 `(("perl-class-unload" ,perl-class-unload)
1442 ("perl-class-inspector" ,perl-class-inspector)
1443 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1444 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1445 ("perl-carp-clan" ,perl-carp-clan)
1446 ("perl-data-dump" ,perl-data-dump)
1447 ("perl-dbix-class" ,perl-dbix-class)
1448 ("perl-hash-merge" ,perl-hash-merge)
1449 ("perl-list-moreutils" ,perl-list-moreutils)
1450 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1451 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1452 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1453 ("perl-namespace-clean" ,perl-namespace-clean)
1454 ("perl-mro-compat" ,perl-mro-compat)
1455 ("perl-scope-guard" ,perl-scope-guard)
1456 ("perl-string-camelcase" ,perl-string-camelcase)
1457 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1458 ("perl-sub-name" ,perl-sub-name)
1459 ("perl-try-tiny" ,perl-try-tiny)))
1460 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1461 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1462 (synopsis "Create a DBIx::Class::Schema based on a database")
1463 (description "DBIx::Class::Schema::Loader automates the definition of a
1464 DBIx::Class::Schema by scanning database table definitions and setting up the
1465 columns, primary keys, unique constraints and relationships.")
1466 (license license:perl-license)))
1468 (define-public perl-dbd-pg
1470 (name "perl-dbd-pg")
1475 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1476 "DBD-Pg-" version ".tar.gz"))
1479 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1480 (build-system perl-build-system)
1482 `(("perl-dbi" ,perl-dbi)))
1484 `(("perl-dbi" ,perl-dbi)
1485 ("postgresql" ,postgresql)))
1486 (home-page "https://metacpan.org/release/DBD-Pg")
1487 (synopsis "DBI PostgreSQL interface")
1488 (description "This package provides a PostgreSQL driver for the Perl5
1489 @dfn{Database Interface} (DBI).")
1490 (license license:perl-license)))
1492 (define-public perl-dbd-mysql
1494 (name "perl-dbd-mysql")
1499 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1500 "DBD-mysql-" version ".tar.gz"))
1502 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1503 (build-system perl-build-system)
1506 (modify-phases %standard-phases
1507 (add-before 'configure 'skip-library-detection
1508 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1509 ;; are really only needed for the test suite; their absence does not
1510 ;; affect the build or the end result.
1512 (substitute* "Makefile.PL"
1513 (("use Devel::CheckLib;" match)
1514 (string-append "# " match))
1518 ;; Tests require running MySQL server.
1521 `(("perl-dbi" ,perl-dbi)
1522 ("mysql" ,mariadb)))
1523 (home-page "https://metacpan.org/release/DBD-mysql")
1524 (synopsis "DBI MySQL interface")
1525 (description "This package provides a MySQL driver for the Perl5
1526 @dfn{Database Interface} (DBI).")
1527 (license license:perl-license)))
1529 (define-public perl-dbd-sqlite
1531 (name "perl-dbd-sqlite")
1536 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1540 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1541 (build-system perl-build-system)
1542 (inputs `(("sqlite" ,sqlite)))
1543 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1544 (synopsis "SQlite interface for Perl")
1545 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1546 the entire thing in the distribution. So in order to get a fast transaction
1547 capable RDBMS working for your Perl project you simply have to install this
1548 module, and nothing else.")
1549 (license license:perl-license)
1550 (home-page "https://metacpan.org/release/DBD-SQLite")))
1552 (define-public perl-mysql-config
1554 (name "perl-mysql-config")
1560 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1565 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1566 (build-system perl-build-system)
1567 (home-page "https://metacpan.org/release/MySQL-Config")
1568 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1570 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1571 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1572 @code{Getopt::Long}.")
1573 (license license:perl-license)))
1575 (define-public perl-sql-abstract
1577 (name "perl-sql-abstract")
1582 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1583 "SQL-Abstract-" version ".tar.gz"))
1585 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1586 (build-system perl-build-system)
1588 `(("perl-module-install" ,perl-module-install)
1589 ("perl-test-deep" ,perl-test-deep)
1590 ("perl-test-exception" ,perl-test-exception)
1591 ("perl-test-warn" ,perl-test-warn)))
1593 `(("perl-hash-merge" ,perl-hash-merge)
1594 ("perl-moo" ,perl-moo)
1595 ("perl-mro-compat" ,perl-mro-compat)
1596 ("perl-text-balanced" ,perl-text-balanced)))
1597 (home-page "https://metacpan.org/release/SQL-Abstract")
1598 (synopsis "Generate SQL from Perl data structures")
1599 (description "This module was inspired by the excellent DBIx::Abstract.
1600 While based on the concepts used by DBIx::Abstract, the concepts used have
1601 been modified to make the SQL easier to generate from Perl data structures.
1602 The underlying idea is for this module to do what you mean, based on the data
1603 structures you provide it, so that you don't have to modify your code every
1604 time your data changes.")
1605 (license license:perl-license)))
1607 (define-public perl-sql-splitstatement
1609 (name "perl-sql-splitstatement")
1614 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1615 "SQL-SplitStatement-" version ".tar.gz"))
1618 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1619 (build-system perl-build-system)
1621 `(("perl-test-exception" ,perl-test-exception)))
1623 `(("perl-class-accessor" ,perl-class-accessor)
1624 ("perl-list-moreutils" ,perl-list-moreutils)
1625 ("perl-regexp-common" ,perl-regexp-common)
1626 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1627 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1628 (synopsis "Split SQL code into atomic statements")
1629 (description "This module tries to split any SQL code, even including
1630 non-standard extensions, into the atomic statements it is composed of.")
1631 (license license:perl-license)))
1633 (define-public perl-sql-tokenizer
1635 (name "perl-sql-tokenizer")
1640 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1641 "SQL-Tokenizer-" version ".tar.gz"))
1644 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1645 (build-system perl-build-system)
1646 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1647 (synopsis "SQL tokenizer")
1648 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1649 claim to be a parser or query verifier. It just creates sane tokens from a
1651 (license license:perl-license)))
1653 (define-public unixodbc
1661 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1664 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1665 (build-system gnu-build-system)
1666 (synopsis "Data source abstraction library")
1667 (description "Unixodbc is a library providing an API with which to access
1668 data sources. Data sources include SQL Servers and any software with an ODBC
1670 (license license:lgpl2.1+)
1671 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1672 (home-page "http://www.unixodbc.org")))
1674 (define-public unqlite
1680 ;; Contains bug fixes against the official release, and has an
1681 ;; autotooled build system.
1682 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1684 "unqlite-unofficial-" version ".tar.gz"))
1687 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1688 (build-system gnu-build-system)
1689 (arguments `(#:tests? #f)) ;No check target
1690 (home-page "http://www.unqlite.org")
1691 (synopsis "In-memory key/value and document store")
1693 "UnQLite is an in-process software library which implements a
1694 self-contained, serverless, zero-configuration, transactional NoSQL
1695 database engine. UnQLite is a document store database similar to
1696 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1697 similar to BerkeleyDB, LevelDB, etc.")
1698 (license license:bsd-2)))
1700 (define-public redis
1706 (uri (string-append "http://download.redis.io/releases/redis-"
1710 "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx"))))
1711 (build-system gnu-build-system)
1713 '(#:tests? #f ; tests related to master/slave and replication fail
1714 #:phases (modify-phases %standard-phases
1715 (delete 'configure))
1716 #:make-flags `("CC=gcc"
1719 ,(string-append "PREFIX="
1720 (assoc-ref %outputs "out")))))
1721 (synopsis "Key-value cache and store")
1722 (description "Redis is an advanced key-value cache and store. Redis
1723 supports many data structures including strings, hashes, lists, sets, sorted
1724 sets, bitmaps and hyperloglogs.")
1725 (home-page "http://redis.io/")
1726 (license license:bsd-3)))
1728 (define-public kyotocabinet
1730 (name "kyotocabinet")
1734 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1735 name "-" version ".tar.gz"))
1738 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1739 (build-system gnu-build-system)
1743 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1744 (string-append "LDFLAGS=-Wl,-rpath="
1745 (assoc-ref %outputs "out") "/lib"))))
1746 (inputs `(("zlib" ,zlib)))
1747 (home-page "http://fallabs.com/kyotocabinet/")
1749 "Kyoto Cabinet is a modern implementation of the DBM database")
1751 "Kyoto Cabinet is a standalone file-based database that supports Hash
1752 and B+ Tree data storage models. It is a fast key-value lightweight
1753 database and supports many programming languages. It is a NoSQL database.")
1754 (license license:gpl3+)))
1756 (define-public tokyocabinet
1758 (name "tokyocabinet")
1763 (uri (string-append "http://fallabs.com/tokyocabinet/"
1764 name "-" version ".tar.gz"))
1767 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1768 (build-system gnu-build-system)
1771 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1772 (string-append "LDFLAGS=-Wl,-rpath="
1773 (assoc-ref %outputs "out") "/lib"))))
1776 (home-page "http://fallabs.com/tokyocabinet/")
1777 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1779 "Tokyo Cabinet is a library of routines for managing a database.
1780 The database is a simple data file containing records, each is a pair of a
1781 key and a value. Every key and value is serial bytes with variable length.
1782 Both binary data and character string can be used as a key and a value.
1783 There is neither concept of data tables nor data types. Records are
1784 organized in hash table, B+ tree, or fixed-length array.")
1785 (license license:lgpl2.1+)))
1787 (define-public wiredtiger
1794 "http://source.wiredtiger.com/releases/wiredtiger-"
1795 version ".tar.bz2"))
1798 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1799 (build-system gnu-build-system)
1801 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1803 (modify-phases %standard-phases
1804 (add-before 'check 'disable-test/fops
1806 ;; XXX: timed out after 3600 seconds of silence
1807 (substitute* "Makefile"
1813 ("snappy" ,snappy)))
1814 (home-page "http://source.wiredtiger.com/")
1815 (synopsis "NoSQL data engine")
1817 "WiredTiger is an extensible platform for data management. It supports
1818 row-oriented storage (where all columns of a row are stored together),
1819 column-oriented storage (where columns are stored in groups, allowing for
1820 more efficient access and storage of column subsets) and log-structured merge
1821 trees (LSM), for sustained throughput under random insert workloads.")
1822 (license license:gpl3) ; or GPL-2
1823 ;; configure.ac: WiredTiger requires a 64-bit build.
1824 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1826 (define-public wiredtiger-3
1828 (inherit wiredtiger)
1833 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1834 version ".tar.bz2"))
1837 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
1839 (define-public guile-wiredtiger
1841 (name "guile-wiredtiger")
1846 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1847 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
1848 (file-name (string-append name "-" version "-checkout"))
1851 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
1852 (build-system gnu-build-system)
1854 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
1856 (list (string-append "--with-libwiredtiger-prefix="
1857 (assoc-ref %build-inputs "wiredtiger")))
1858 #:make-flags '("GUILE_AUTO_COMPILE=0")))
1860 `(("autoconf" ,autoconf)
1861 ("automake" ,automake)
1862 ("pkg-config" ,pkg-config)))
1864 `(("wiredtiger" ,wiredtiger-3)
1865 ("guile" ,guile-2.2)))
1867 `(("guile-bytestructures" ,guile-bytestructures)))
1868 (synopsis "WiredTiger bindings for GNU Guile")
1870 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1872 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1873 (license license:gpl3+)))
1875 (define-public perl-db-file
1877 (name "perl-db-file")
1883 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1888 "0sildz1i3fmh949w1scpjsyjx0cbmfw0yna3y70mc6vbwp8y696y"))))
1889 (build-system perl-build-system)
1890 (inputs `(("bdb" ,bdb)))
1891 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1893 `(#:phases (modify-phases %standard-phases
1895 'configure 'modify-config.in
1896 (lambda* (#:key inputs #:allow-other-keys)
1897 (substitute* "config.in"
1898 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1900 (home-page "https://metacpan.org/release/DB_File")
1902 "Perl5 access to Berkeley DB version 1.x")
1904 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1905 (license license:perl-license)))
1915 (url "https://github.com/LMDB/lmdb.git")
1916 (commit (string-append "LMDB_" version))))
1917 (file-name (git-file-name name version))
1919 (base32 "0ag7l5180ajvm73y59m7sn3p52xm8m972d08cshxhpwgwa4v35k6"))))
1920 (build-system gnu-build-system)
1922 `(#:test-target "test"
1924 (modify-phases %standard-phases
1926 (lambda* (#:key outputs #:allow-other-keys)
1927 (chdir "libraries/liblmdb")
1928 (substitute* "Makefile"
1929 (("/usr/local") (assoc-ref outputs "out")))
1931 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1932 (synopsis "Lightning Memory-Mapped Database library")
1934 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1935 transactional database. Unlike more complex relational databases, LMDB handles
1936 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1937 underlying operating system for caching and locking, keeping the code small and
1939 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1940 disk-based databases with high read performance that scales linearly over
1941 multiple cores. The size of each database is limited only by the size of the
1942 virtual address space — not physical RAM.")
1943 (license license:openldap2.8)))
1945 (define-public libpqxx
1952 "http://pqxx.org/download/software/libpqxx/"
1953 name "-" version ".tar.gz"))
1956 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1957 (build-system gnu-build-system)
1959 `(("python" ,python-2)))
1960 (inputs `(("postgresql" ,postgresql)))
1962 `(#:tests? #f ; # FAIL: 1
1964 (modify-phases %standard-phases
1965 (add-before 'configure 'fix-sed-command
1967 ;; Newer sed versions error out if double brackets are not used.
1968 (substitute* "configure"
1969 (("\\[:space:\\]") "[[:space:]]"))
1971 (synopsis "C++ connector for PostgreSQL")
1973 "Libpqxx is a C++ library to enable user programs to communicate with the
1974 PostgreSQL database back-end. The database back-end can be local or it may be
1975 on another machine, accessed via TCP/IP.")
1976 (home-page "http://pqxx.org/")
1977 (license license:bsd-3)))
1979 (define-public python-peewee
1981 (name "python-peewee")
1986 (uri (pypi-uri "peewee" version))
1989 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
1990 (build-system python-build-system)
1992 `(#:tests? #f)) ; Fails to import test data
1994 `(("python-cython" ,python-cython)))
1995 (home-page "https://github.com/coleifer/peewee/")
1996 (synopsis "Small object-relational mapping utility")
1998 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1999 handles converting between pythonic values and those used by databases, so you
2000 can use Python types in your code without having to worry. It has built-in
2001 support for sqlite, mysql and postgresql. If you already have a database, you
2002 can autogenerate peewee models using @code{pwiz}, a model generator.")
2003 (license license:expat)))
2005 (define-public python2-peewee
2006 (package-with-python2 python-peewee))
2008 (define-public sqlcipher
2015 (uri (string-append "https://github.com/sqlcipher/" name
2016 "/archive/v" version ".tar.gz"))
2018 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2019 (file-name (string-append name "-" version ".tar.gz"))))
2020 (build-system gnu-build-system)
2022 `(("libcrypto" ,openssl)
2023 ("libtcl8.6" ,tcl))) ; required for running the tests
2028 '("--enable-tempstore=yes"
2029 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2030 "LDFLAGS=-lcrypto -ltcl8.6"
2032 ;; tests cannot be run from the Makefile
2033 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2034 #:test-target "testfixture"
2036 (modify-phases %standard-phases
2037 (add-before 'check 'build-test-runner
2038 (assoc-ref %standard-phases 'check))
2041 (invoke "./testfixture" "test/crypto.test"))))))
2042 (home-page "https://www.zetetic.net/sqlcipher/")
2044 "Library providing transparent encryption of SQLite database files")
2045 (description "SQLCipher is an implementation of SQLite, extended to
2046 provide transparent 256-bit AES encryption of database files. Pages are
2047 encrypted before being written to disk and are decrypted when read back. It’s
2048 well suited for protecting embedded application databases and for mobile
2051 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2052 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2053 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2054 ;; source files are in the public domain.
2055 (license (list license:public-domain license:bsd-3))))
2057 (define-public python-pyodbc-c
2059 (name "python-pyodbc-c")
2064 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2065 "archive.tar.gz?ref=v" version))
2068 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2069 (file-name (string-append name "-" version ".tar.gz"))))
2070 (build-system python-build-system)
2072 `(("unixodbc" ,unixodbc)))
2074 `(;; No unit tests exist.
2076 (home-page "https://github.com/mkleehammer/pyodbc")
2077 (synopsis "Python ODBC Library")
2078 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2080 (license (license:x11-style "file://LICENSE.TXT"))))
2082 (define-public python2-pyodbc-c
2083 (package-with-python2 python-pyodbc-c))
2085 (define-public python-pyodbc
2087 (name "python-pyodbc")
2092 (uri (pypi-uri "pyodbc" version))
2094 (base32 "1qrxnf7ji5hml7z4y669k4wmk3iz2pcsr05bnn1n912asash09z5"))
2095 (file-name (string-append name "-" version ".tar.gz"))))
2096 (build-system python-build-system)
2098 `(("unixodbc" ,unixodbc)))
2100 `(;; No unit tests exist.
2102 (home-page "https://github.com/mkleehammer/pyodbc")
2103 (synopsis "Python ODBC Library")
2104 (description "@code{python-pyodbc} provides a Python DB-API driver
2106 (license (license:x11-style "file:///LICENSE.TXT"))))
2108 (define-public python2-pyodbc
2109 (package-with-python2 python-pyodbc))
2111 (define-public mdbtools
2119 (url "https://github.com/brianb/mdbtools.git")
2121 (file-name (git-file-name name version))
2124 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2125 (build-system gnu-build-system)
2129 `(("autoconf" ,autoconf)
2130 ("automake" ,automake)
2131 ("libtool" ,libtool)
2132 ("pkg-config" ,pkg-config)
2133 ("txt2man" ,txt2man)
2135 (home-page "http://mdbtools.sourceforge.net/")
2136 (synopsis "Read Microsoft Access databases")
2137 (description "MDB Tools is a set of tools and applications to read the
2138 proprietary MDB file format used in Microsoft's Access database package. This
2139 includes programs to export schema and data from Microsoft's Access database
2140 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2141 etc., and an SQL engine for performing simple SQL queries.")
2142 (license (list license:lgpl2.0
2145 (define-public python-lmdb
2147 (name "python-lmdb")
2151 (uri (pypi-uri "lmdb" version))
2154 "1zh38gvkqw1jm5105if6rr7ccbgyxr7k2rm5ygb9ab3bq82pyaww"))
2155 (modules '((guix build utils)))
2157 ;; Delete bundled lmdb source files.
2159 (for-each delete-file (list "lib/lmdb.h"
2164 (build-system python-build-system)
2169 (modify-phases %standard-phases
2170 (add-before 'build 'use-system-lmdb
2171 (lambda* (#:key inputs #:allow-other-keys)
2172 (let ((lmdb (assoc-ref inputs "lmdb")))
2173 (setenv "LMDB_FORCE_SYSTEM" "set")
2174 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2175 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2177 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2179 (home-page "https://github.com/dw/py-lmdb")
2180 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2182 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2183 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2185 (list license:openldap2.8
2186 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2187 ;; but not actually needed on platforms currently supported by Guix.
2190 (define-public python2-lmdb
2191 (package-with-python2 python-lmdb))
2193 (define-public python-orator
2195 (name "python-orator")
2199 (uri (pypi-uri "orator" version))
2202 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2203 (build-system python-build-system)
2206 (modify-phases %standard-phases
2207 (add-after 'unpack 'loosen-dependencies
2208 ;; Tests are not actually run since they are not included with the
2209 ;; distributed package, but dependencies are checked.
2211 (substitute* "setup.py"
2213 (("flexmock==0.9.7") "flexmock")
2214 ;; The pytest-mock package is out of date, so we remove minimum
2215 ;; version requirement.
2216 (("pytest-mock.*'") "pytest-mock'"))
2219 `(("python-pytest-mock" ,python-pytest-mock)
2220 ("python-pytest" ,python-pytest)
2221 ("python-flexmock" ,python-flexmock)))
2223 `(("python-backpack" ,python-backpack)
2224 ("python-blinker" ,python-blinker)
2225 ("python-cleo" ,python-cleo)
2226 ("python-faker" ,python-faker)
2227 ("python-inflection" ,python-inflection)
2228 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2229 ("python-pendulum" ,python-pendulum)
2230 ("python-pyaml" ,python-pyaml)
2231 ("python-pygments" ,python-pygments)
2232 ("python-simplejson" ,python-simplejson)
2233 ("python-six" ,python-six)
2234 ("python-wrapt" ,python-wrapt)))
2235 (home-page "https://orator-orm.com/")
2236 (synopsis "ActiveRecord ORM for Python")
2238 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2239 implementation for Python.")
2240 (license license:expat)
2241 (properties `((python2-variant . ,(delay python2-orator))))))
2243 (define-public python2-orator
2244 (package-with-python2 (strip-python2-variant python-orator)))
2246 (define-public virtuoso-ose
2248 (name "virtuoso-ose")
2254 "https://github.com/openlink/virtuoso-opensource/releases/"
2255 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2257 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2258 (build-system gnu-build-system)
2260 `(#:tests? #f ; Tests require a network connection.
2261 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2262 ;; This indicates that the internal zlib code may still be used.
2263 #:configure-flags '("--without-internal-zlib"
2264 "--with-readline")))
2266 `(("openssl" ,openssl)
2267 ("net-tools" ,net-tools)
2268 ("readline" ,readline)
2270 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2271 (synopsis "Multi-model database system")
2272 (description "Virtuoso is a scalable cross-platform server that combines
2273 relational, graph, and document data management with web application server
2274 and web services platform functionality.")
2275 ;; configure: error: ... can only be build on 64bit platforms
2276 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2277 (license license:gpl2)))
2279 (define-public python-ccm
2286 (uri (pypi-uri "ccm" version))
2289 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2290 (build-system python-build-system)
2292 `(("python-pyyaml" ,python-pyyaml)
2293 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2295 ("python-psutil" ,python-psutil)
2296 ("python-six" ,python-six)))
2297 (home-page "https://github.com/pcmanus/ccm")
2298 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2300 (description "Cassandra Cluster Manager is a development tool for testing
2301 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2303 (license license:asl2.0)))
2305 (define-public python2-ccm
2306 (package-with-python2 python-ccm))
2308 (define-public python2-pysqlite
2310 (name "python2-pysqlite")
2315 (uri (pypi-uri "pysqlite" version))
2318 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2319 (build-system python-build-system)
2321 `(("sqlite" ,sqlite)))
2323 `(#:python ,python-2 ; incompatible with Python 3
2324 #:tests? #f)) ; no test target
2325 (home-page "https://github.com/ghaering/pysqlite")
2326 (synopsis "SQLite bindings for Python")
2328 "Pysqlite provides SQLite bindings for Python that comply to the
2329 Database API 2.0T.")
2330 (license license:zlib)))
2332 (define-public python-sqlalchemy
2334 (name "python-sqlalchemy")
2339 (uri (pypi-uri "SQLAlchemy" version))
2341 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2342 (build-system python-build-system)
2344 `(("python-cython" ,python-cython) ; for C extensions
2345 ("python-pytest" ,python-pytest)
2346 ("python-mock" ,python-mock))) ; for tests
2349 (modify-phases %standard-phases
2351 (lambda _ (invoke "py.test"))))))
2352 (home-page "https://www.sqlalchemy.org")
2353 (synopsis "Database abstraction library")
2355 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2356 gives application developers the full power and flexibility of SQL. It
2357 provides a full suite of well known enterprise-level persistence patterns,
2358 designed for efficient and high-performing database access, adapted into a
2359 simple and Pythonic domain language.")
2360 (license license:x11)))
2362 (define-public python2-sqlalchemy
2363 (package-with-python2 python-sqlalchemy))
2365 (define-public python-sqlalchemy-utils
2367 (name "python-sqlalchemy-utils")
2372 (uri (pypi-uri "SQLAlchemy-Utils" version))
2375 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2376 (build-system python-build-system)
2378 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2380 ;; (modify-phases %standard-phases
2383 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2385 `(("python-six" ,python-six)
2386 ("python-sqlalchemy" ,python-sqlalchemy)))
2388 `(("python-dateutil" ,python-dateutil)
2389 ("python-flexmock" ,python-flexmock)
2390 ("python-psycopg2" ,python-psycopg2)
2391 ("python-pytest" ,python-pytest)
2392 ("python-pytz" ,python-pytz)))
2393 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2394 (synopsis "Various utility functions for SQLAlchemy")
2396 "SQLAlchemy-utils provides various utility functions and custom data types
2397 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2399 You might also want to install the following optional dependencies:
2401 @item @code{python-passlib}
2402 @item @code{python-babel}
2403 @item @code{python-cryptography}
2404 @item @code{python-pytz}
2405 @item @code{python-psycopg2}
2406 @item @code{python-furl}
2407 @item @code{python-flask-babel}
2410 (license license:bsd-3)))
2412 (define-public python2-sqlalchemy-utils
2413 (package-with-python2 python-sqlalchemy-utils))
2415 (define-public python-alembic
2417 (name "python-alembic")
2422 (uri (pypi-uri "alembic" version))
2425 "0asqz9mwc4w8bsar1icv3ik9jslxrj3gv3yxgmhc6nc6r9qbkg04"))))
2426 (build-system python-build-system)
2428 `(("python-mock" ,python-mock)
2429 ("python-pytest-cov" ,python-pytest-cov)))
2431 `(("python-dateutil" ,python-dateutil)
2432 ("python-sqlalchemy" ,python-sqlalchemy)
2433 ("python-mako" ,python-mako)
2434 ("python-editor" ,python-editor)))
2435 (home-page "https://bitbucket.org/zzzeek/alembic")
2437 "Database migration tool for SQLAlchemy")
2439 "Alembic is a lightweight database migration tool for usage with the
2440 SQLAlchemy Database Toolkit for Python.")
2441 (license license:expat)))
2443 (define-public python2-alembic
2444 (package-with-python2 python-alembic))
2446 (define-public python-pickleshare
2448 (name "python-pickleshare")
2453 (uri (pypi-uri "pickleshare" version))
2455 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2456 (build-system python-build-system)
2458 `(#:phases (modify-phases %standard-phases
2461 (invoke "pytest"))))))
2463 `(("python-pytest" ,python-pytest)))
2464 (home-page "https://github.com/vivainio/pickleshare")
2465 (synopsis "Tiny key value database with concurrency support")
2467 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2468 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2469 shelve, many processes can access the database simultaneously. Changing a
2470 value in database is immediately visible to other processes accessing the same
2471 database. Concurrency is possible because the values are stored in separate
2472 files. Hence the “database” is a directory where all files are governed by
2474 (properties `((python2-variant . ,(delay python2-pickleshare))))
2475 (license license:expat)))
2477 (define-public python2-pickleshare
2478 (let ((pickleshare (package-with-python2
2479 (strip-python2-variant python-pickleshare))))
2480 (package (inherit pickleshare)
2481 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2482 ,@(package-propagated-inputs pickleshare))))))
2484 (define-public python-apsw
2486 (name "python-apsw")
2487 (version "3.20.1-r1")
2491 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2493 (file-name (string-append "apsw-" version ".tar.gz"))
2496 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2497 (build-system python-build-system)
2499 `(("sqlite" ,sqlite)))
2502 (modify-phases %standard-phases
2505 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2507 (add-after 'build 'build-test-helper
2509 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2510 "-I." "-Isqlite3" "src/testextension.c")
2513 (add-after 'install 'check
2514 (lambda* (#:key inputs outputs #:allow-other-keys)
2515 (add-installed-pythonpath inputs outputs)
2516 (invoke "python" "setup.py" "test")
2518 (home-page "https://github.com/rogerbinns/apsw/")
2519 (synopsis "Another Python SQLite Wrapper")
2520 (description "APSW is a Python wrapper for the SQLite
2521 embedded relational database engine. In contrast to other wrappers such as
2522 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2523 translate the complete SQLite API into Python.")
2524 (license license:zlib)))
2526 (define-public python2-apsw
2527 (package-with-python2 python-apsw))
2529 (define-public python2-neo4j-driver
2531 (name "python2-neo4j-driver")
2532 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2536 (uri (pypi-uri "neo4j-driver" version))
2539 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2540 (build-system python-build-system)
2542 `(#:python ,python-2))
2543 (home-page "https://neo4j.com/developer/python/")
2544 (synopsis "Neo4j driver code written in Python")
2545 (description "This package provides the Neo4j Python driver that connects
2546 to the database using Neo4j's binary protocol. It aims to be minimal, while
2547 being idiomatic to Python.")
2548 (license license:asl2.0)))
2550 (define-public python2-py2neo
2552 (name "python2-py2neo")
2556 (uri (pypi-uri "py2neo" version))
2559 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2560 (build-system python-build-system)
2562 `(#:python ,python-2))
2563 (home-page "http://py2neo.org")
2564 (synopsis "Library and toolkit for working with Neo4j in Python")
2565 (description "This package provides a client library and toolkit for
2566 working with Neo4j from within Python applications and from the command
2567 line. The core library has no external dependencies and has been carefully
2568 designed to be easy and intuitive to use.")
2569 (license license:asl2.0)))
2571 (define-public python-psycopg2
2573 (name "python-psycopg2")
2578 (uri (pypi-uri "psycopg2" version))
2580 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2581 (build-system python-build-system)
2583 ;; Tests would require a postgresql database "psycopg2_test"
2584 ;; and a running postgresql database management service.
2585 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2587 `(("postgresql" ,postgresql))) ; libpq
2588 (home-page "http://initd.org/psycopg/")
2589 (synopsis "Python PostgreSQL adapter")
2591 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2593 (license license:lgpl3+)))
2595 (define-public python2-psycopg2
2596 (package-with-python2 python-psycopg2))
2598 (define-public python-sadisplay
2600 (name "python-sadisplay")
2605 (uri (pypi-uri "sadisplay" version))
2608 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2609 (build-system python-build-system)
2611 `(("python-sqlalchemy" ,python-sqlalchemy)))
2614 `(("python-nose" ,python-nose)))
2615 (home-page "https://bitbucket.org/estin/sadisplay")
2616 (synopsis "SQLAlchemy schema displayer")
2617 (description "This package provides a program to build Entity
2618 Relationship diagrams from a SQLAlchemy model (or directly from the
2620 (license license:bsd-3)))
2622 (define-public python2-sadisplay
2623 (package-with-python2 python-sadisplay))
2625 (define-public python-mysqlclient
2627 (name "python-mysqlclient")
2632 (uri (pypi-uri "mysqlclient" version))
2635 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2636 (build-system python-build-system)
2638 `(("nose" ,python-nose)
2639 ("mock" ,python-mock)
2640 ("py.test" ,python-pytest)))
2642 `(("mysql" ,mariadb)
2644 ("openssl" ,openssl)))
2645 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2646 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2647 (description "MySQLdb is an interface to the popular MySQL database server
2648 for Python. The design goals are:
2650 @item Compliance with Python database API version 2.0 [PEP-0249],
2651 @item Thread-safety,
2652 @item Thread-friendliness (threads will not block each other).
2654 (license license:gpl2)))
2656 (define-public python2-mysqlclient
2657 (package-with-python2 python-mysqlclient))
2659 (define-public python-hiredis
2661 (name "python-hiredis")
2666 (uri (pypi-uri "hiredis" version))
2669 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2670 (build-system python-build-system)
2674 (home-page "https://github.com/redis/hiredis-py")
2675 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2676 (description "Python-hiredis is a python extension that wraps protocol
2677 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2678 (license license:bsd-3)))
2680 (define-public python2-hiredis
2681 (package-with-python2 python-hiredis))
2683 (define-public python-fakeredis
2685 (name "python-fakeredis")
2690 (uri (pypi-uri "fakeredis" version))
2693 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2694 (build-system python-build-system)
2698 (home-page "https://github.com/jamesls/fakeredis")
2699 (synopsis "Fake implementation of redis API for testing purposes")
2701 "Fakeredis is a pure-Python implementation of the redis-py Python client
2702 that simulates talking to a redis server. It was created for a single purpose:
2703 to write unit tests.
2705 Setting up redis is not hard, but one often wants to write unit tests that don't
2706 talk to an external server such as redis. This module can be used as a
2707 reasonable substitute.")
2708 (license license:bsd-3)))
2710 (define-public python2-fakeredis
2711 (package-with-python2 python-fakeredis))
2713 (define-public python-redis
2715 (name "python-redis")
2720 (uri (pypi-uri "redis" version))
2722 (base32 "0wwj8il4c3aff15xwwcjfci367zxsakq05ps1a2il6yavp91i94c"))))
2723 (build-system python-build-system)
2724 ;; Tests require a running Redis server.
2725 (arguments '(#:tests? #f))
2726 ;; As long as we are not running test, we do not need this input :-)
2728 ;; `(("python-pytest" ,python-pytest)))
2729 (home-page "https://github.com/andymccurdy/redis-py")
2730 (synopsis "Redis Python client")
2732 "This package provides a Python interface to the Redis key-value store.")
2733 (license license:expat)))
2735 (define-public python2-redis
2736 (package-with-python2 python-redis))
2738 (define-public python-rq
2745 (uri (pypi-uri "rq" version))
2747 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2748 (build-system python-build-system)
2750 `(("python-click" ,python-click)
2751 ("python-redis" ,python-redis)))
2752 (home-page "http://python-rq.org/")
2753 (synopsis "Simple job queues for Python")
2755 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2756 processing them in the background with workers. It is backed by Redis and it
2757 is designed to have a low barrier to entry.")
2758 (license license:bsd-2)))
2760 (define-public python2-rq
2761 (package-with-python2 python-rq))
2763 (define-public python-trollius-redis
2765 (name "python-trollius-redis")
2770 (uri (pypi-uri "trollius_redis" version))
2773 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2774 (build-system python-build-system)
2775 ;; TODO: Tests require packaging 'hiredis'.
2776 (arguments '(#:tests? #f))
2777 (home-page "https://github.com/benjolitz/trollius-redis")
2778 (synopsis "Port of asyncio-redis to trollius")
2779 (description "@code{trollius-redis} is a Redis client for Python
2780 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2782 (license license:bsd-2)))
2784 (define-public python2-trollius-redis
2785 (package-with-python2 python-trollius-redis))
2787 (define-public python-sqlparse
2789 (name "python-sqlparse")
2793 (uri (pypi-uri "sqlparse" version))
2796 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2797 (build-system python-build-system)
2800 (modify-phases %standard-phases
2802 (lambda _ (invoke "py.test"))))))
2804 `(("python-pytest" ,python-pytest)))
2805 (home-page "https://github.com/andialbrecht/sqlparse")
2806 (synopsis "Non-validating SQL parser")
2807 (description "Sqlparse is a non-validating SQL parser for Python. It
2808 provides support for parsing, splitting and formatting SQL statements.")
2809 (license license:bsd-3)))
2811 (define-public python2-sqlparse
2812 (package-with-python2 python-sqlparse))
2814 (define-public python-sql
2821 (uri (pypi-uri "python-sql" version))
2823 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
2824 (build-system python-build-system)
2825 (home-page "https://python-sql.tryton.org/")
2826 (synopsis "Library to write SQL queries in a pythonic way")
2827 (description "@code{python-sql} is a library to write SQL queries, that
2828 transforms idiomatic python function calls to well-formed SQL queries.")
2829 (license license:bsd-3)))
2831 (define-public python2-sql
2832 (package-with-python2 python-sql))
2834 (define-public mongo-tools
2836 (name "mongo-tools")
2839 (origin (method git-fetch)
2841 (url "https://github.com/mongodb/mongo-tools")
2842 (commit (string-append "r" version))))
2843 (file-name (git-file-name name version))
2846 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
2847 (build-system go-build-system)
2849 `(#:import-path "github.com/mongodb/mongo-tools"
2850 #:modules ((srfi srfi-1)
2851 (guix build go-build-system)
2853 #:install-source? #f
2856 '("bsondump" "mongodump" "mongoexport" "mongofiles"
2857 "mongoimport" "mongooplog" "mongorestore"
2858 "mongostat" "mongotop")))
2859 (modify-phases %standard-phases
2860 (add-after 'unpack 'delete-bundled-source-code
2862 (delete-file-recursively
2863 "src/github.com/mongodb/mongo-tools/vendor")
2865 (add-after 'delete-bundled-source-code 'patch-source
2867 ;; Remove a redundant argument that causes compilation to fail.
2869 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
2870 (("skipping restore of system.profile collection\", db)")
2871 "skipping restore of system.profile collection\")"))
2875 (for-each (lambda (tool)
2878 ;; This is where the tests expect to find the
2880 "-o" ,(string-append
2881 "src/github.com/mongodb/mongo-tools/bin/"
2884 "-tags=\"ssl sasl\""
2886 "-extldflags=-Wl,-z,now,-z,relro"
2888 "src/github.com/mongodb/mongo-tools/"
2889 tool "/main/" tool ".go"))))
2890 (simple-format #t "build: running ~A\n"
2891 (string-join command))
2892 (apply invoke command)))
2897 (with-directory-excursion "src"
2898 (for-each (lambda (tool)
2901 (string-append "github.com/mongodb/mongo-tools/"
2906 (lambda* (#:key outputs #:allow-other-keys)
2907 (for-each (lambda (tool)
2909 (string-append "src/github.com/mongodb/mongo-tools/bin/"
2911 (string-append (assoc-ref outputs "out")
2916 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
2917 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
2918 ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
2919 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
2920 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
2921 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
2922 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
2923 (home-page "https://github.com/mongodb/mongo-tools")
2924 (synopsis "Various tools for interacting with MongoDB and BSON")
2926 "This package includes a collection of tools related to MongoDB.
2929 Display BSON files in a human-readable format
2931 Convert data from JSON, TSV or CSV and insert them into a collection
2933 Write an existing collection to CSV or JSON format
2934 @item mongodump/mongorestore
2935 Dump MongoDB backups to disk in the BSON format
2937 Read MongoDB backups in the BSON format, and restore them to a live database
2939 Monitor live MongoDB servers, replica sets, or sharded clusters
2941 Read, write, delete, or update files in GridFS
2943 Replay oplog entries between MongoDB servers
2945 Monitor read/write activity on a mongo server
2947 (license license:asl2.0)))
2949 (define-public apache-arrow
2951 (name "apache-arrow")
2957 (url "https://github.com/apache/arrow")
2958 (commit (string-append "apache-arrow-" version))))
2959 (file-name (git-file-name name version))
2962 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
2963 (build-system cmake-build-system)
2967 (modify-phases %standard-phases
2968 (add-before 'configure 'enter-source-directory
2969 (lambda _ (chdir "cpp") #t))
2970 (add-after 'unpack 'set-env
2972 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
2973 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
2974 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
2975 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
2976 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
2978 #:build-type "Release"
2980 (list "-DARROW_PYTHON=ON"
2982 ;; Install to PREFIX/lib (the default is
2984 (string-append "-DCMAKE_INSTALL_LIBDIR="
2985 (assoc-ref %outputs "out")
2988 ;; XXX These Guix package offer static
2989 ;; libraries that are not position independent,
2990 ;; and ld fails to link them into the arrow .so
2991 "-DARROW_WITH_SNAPPY=OFF"
2992 "-DARROW_WITH_ZLIB=OFF"
2993 "-DARROW_WITH_ZSTD=OFF"
2994 "-DARROW_WITH_LZ4=OFF"
2996 ;; Building the tests forces on all the
2997 ;; optional features and the use of static
2999 "-DARROW_BUILD_TESTS=OFF"
3000 "-DARROW_BUILD_STATIC=OFF")))
3003 ("rapidjson" ,rapidjson)
3004 ("brotli" ,google-brotli)
3005 ("flatbuffers" ,flatbuffers)
3006 ("jemalloc" ,jemalloc)
3007 ("python-3" ,python)
3008 ("python-numpy" ,python-numpy)))
3009 (home-page "https://arrow.apache.org/")
3010 (synopsis "Columnar in-memory analytics")
3011 (description "Apache Arrow is a columnar in-memory analytics layer
3012 designed to accelerate big data. It houses a set of canonical in-memory
3013 representations of flat and hierarchical data along with multiple
3014 language-bindings for structure manipulation. It also provides IPC and common
3015 algorithm implementations.")
3016 (license license:asl2.0)))
3018 (define-public python-pyarrow
3020 (name "python-pyarrow")
3026 (url "https://github.com/apache/arrow")
3027 (commit (string-append "apache-arrow-" version))))
3028 (file-name (git-file-name name version))
3031 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3032 (build-system python-build-system)
3034 '(#:tests? #f ; XXX There are no tests in the "python" directory
3036 (modify-phases %standard-phases
3037 (delete 'build) ; XXX the build is performed again during the install phase
3038 (add-after 'unpack 'enter-source-directory
3039 (lambda _ (chdir "python") #t))
3040 (add-after 'unpack 'set-env
3042 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3045 `(("apache-arrow" ,apache-arrow)
3046 ("python-numpy" ,python-numpy)
3047 ("python-pandas" ,python-pandas)
3048 ("python-six" ,python-six)))
3051 ("python-cython" ,python-cython)
3052 ("python-pytest" ,python-pytest)
3053 ("python-pytest-runner" ,python-pytest-runner)
3054 ("python-setuptools-scm" ,python-setuptools-scm)))
3055 (home-page "https://arrow.apache.org/docs/python/")
3056 (synopsis "Python bindings for Apache Arrow")
3057 (description "This library provides a Pythonic API wrapper for the reference
3058 Arrow C++ implementation, along with tools for interoperability with pandas,
3059 NumPy, and other traditional Python scientific computing packages.")
3060 (license license:asl2.0)))
3062 (define-public python2-pyarrow
3063 (package-with-python2 python-pyarrow))