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>
36 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
37 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
38 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
39 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
41 ;;; This file is part of GNU Guix.
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56 (define-module (gnu packages databases)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages admin)
59 #:use-module (gnu packages algebra)
60 #:use-module (gnu packages autotools)
61 #:use-module (gnu packages avahi)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages boost)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages cmake)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages crypto)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages cyrus-sasl)
72 #:use-module (gnu packages dbm)
73 #:use-module (gnu packages emacs)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages gettext)
76 #:use-module (gnu packages glib)
77 #:use-module (gnu packages gnupg)
78 #:use-module (gnu packages guile)
79 #:use-module (gnu packages time)
80 #:use-module (gnu packages golang)
81 #:use-module (gnu packages jemalloc)
82 #:use-module (gnu packages language)
83 #:use-module (gnu packages libevent)
84 #:use-module (gnu packages linux)
85 #:use-module (gnu packages man)
86 #:use-module (gnu packages ncurses)
87 #:use-module (gnu packages parallel)
88 #:use-module (gnu packages pcre)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages perl-check)
91 #:use-module (gnu packages perl-web)
92 #:use-module (gnu packages pkg-config)
93 #:use-module (gnu packages popt)
94 #:use-module (gnu packages python)
95 #:use-module (gnu packages python-crypto)
96 #:use-module (gnu packages python-web)
97 #:use-module (gnu packages python-xyz)
98 #:use-module (gnu packages rdf)
99 #:use-module (gnu packages readline)
100 #:use-module (gnu packages ruby)
101 #:use-module (gnu packages serialization)
102 #:use-module (gnu packages sphinx)
103 #:use-module (gnu packages sqlite)
104 #:use-module (gnu packages tcl)
105 #:use-module (gnu packages terminals)
106 #:use-module (gnu packages textutils)
107 #:use-module (gnu packages tls)
108 #:use-module (gnu packages valgrind)
109 #:use-module (gnu packages web)
110 #:use-module (gnu packages xml)
111 #:use-module ((guix licenses) #:prefix license:)
112 #:use-module (guix packages)
113 #:use-module (guix download)
114 #:use-module (guix bzr-download)
115 #:use-module (guix git-download)
116 #:use-module (guix build-system emacs)
117 #:use-module (guix build-system gnu)
118 #:use-module (guix build-system go)
119 #:use-module (guix build-system perl)
120 #:use-module (guix build-system python)
121 #:use-module (guix build-system ruby)
122 #:use-module (guix build-system cmake)
123 #:use-module (guix build-system scons)
124 #:use-module ((guix build utils) #:hide (which))
125 #:use-module (guix utils)
126 #:use-module (srfi srfi-1)
127 #:use-module (srfi srfi-26)
128 #:use-module (ice-9 match))
130 (define-public 4store
136 (uri (string-append "https://github.com/4store/4store/archive/v"
138 (file-name (string-append name "-" version ".tar.gz"))
140 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
141 (patches (search-patches "4store-unset-preprocessor-directive.patch"
142 "4store-fix-buildsystem.patch"))))
143 (build-system gnu-build-system)
147 ("autoconf" ,autoconf)
148 ("automake" ,automake)
149 ("gettext" ,gettext-minimal)
151 ("pcre" ,pcre "bin") ;for 'pcre-config'
152 ("pkg-config" ,pkg-config)))
158 ("readline" ,readline)
160 ("cyrus-sasl" ,cyrus-sasl)
162 ("util-linux" ,util-linux)))
165 (modify-phases %standard-phases
166 (add-after 'unpack 'generate-configure
168 (invoke "sh" "autogen.sh"))))))
169 ;; http://www.4store.org has been down for a while now.
170 (home-page "https://github.com/4store/4store")
171 (synopsis "Clustered RDF storage and query engine")
172 (description "4store is a RDF/SPARQL store written in C, supporting
173 either single machines or networked clusters.")
174 (license license:gpl3+)))
176 (define-public go-gopkg.in-mgo.v2
178 (name "go-gopkg.in-mgo.v2")
179 (version "2016.08.01")
183 (url "https://github.com/go-mgo/mgo")
184 (commit (string-append "r" version))))
185 (file-name (git-file-name name version))
188 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
189 (build-system go-build-system)
191 `(#:import-path "gopkg.in/mgo.v2"
192 ;; TODO: The tests fail as MongoDB fails to start
193 ;; Error parsing command line: unrecognised option '--chunkSize'
196 (modify-phases %standard-phases
197 (delete 'reset-gzip-timestamps)
198 (add-before 'check 'start-mongodb
199 (lambda* (#:key tests? #:allow-other-keys)
201 (with-directory-excursion "src/gopkg.in/mgo.v2"
202 (invoke "make" "startdb")))
204 (add-after 'check 'stop'mongodb
205 (lambda* (#:key tests? #:allow-other-keys)
207 (with-directory-excursion "src/gopkg.in/mgo.v2"
208 (invoke "make" "stopdb")))
211 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
213 ("daemontools" ,daemontools)))
214 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
216 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
217 It implements a rich selection of features under a simple API following
218 standard Go idioms.")
219 (home-page "http://labix.org/mgo")
220 (license license:bsd-2)))
222 (define-public es-dump-restore
224 (name "es-dump-restore")
229 (uri (rubygems-uri "es_dump_restore" version))
232 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
233 (build-system ruby-build-system)
235 '(#:tests? #f)) ;; No testsuite.
237 `(("ruby-httpclient" ,ruby-httpclient)
238 ("ruby-multi-json" ,ruby-multi-json)
239 ("ruby-progress_bar" ,ruby-progress_bar)
240 ("ruby-rubyzip" ,ruby-rubyzip)
241 ("ruby-thor" ,ruby-thor)))
242 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
244 "This package provides a utility for dumping the contents of an
245 ElasticSearch index to a compressed file and restoring the dumpfile back to an
246 ElasticSearch server")
247 (home-page "https://github.com/patientslikeme/es_dump_restore")
248 (license license:expat)))
250 (define-public leveldb
257 (url "https://github.com/google/leveldb")
259 (file-name (git-file-name name version))
262 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
263 (build-system cmake-build-system)
265 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
267 `(("snappy" ,snappy)))
268 (home-page "http://leveldb.org/")
269 (synopsis "Fast key-value storage library")
271 "LevelDB is a fast key-value storage library that provides an ordered
272 mapping from string keys to string values.")
273 (license license:bsd-3)))
275 (define-public memcached
283 "https://memcached.org/files/memcached-" version ".tar.gz"))
285 (base32 "0nnccb697jhdn5gqrh3phibzs6xr4nf4ryv7nmyv5vf11n4jr8j5"))))
286 (build-system gnu-build-system)
288 `(("libevent" ,libevent)
289 ("cyrus-sasl" ,cyrus-sasl)))
290 (home-page "https://memcached.org/")
291 (synopsis "In-memory caching service")
292 (description "Memcached is an in-memory key-value store. It has a small
293 and generic API, and was originally intended for use with dynamic web
295 (license license:bsd-3)))
297 (define-public libmemcached
299 (name "libmemcached")
301 ;; We build from the sources since we want to build the extra HTML
302 ;; documentation which is not included with the release.
306 (url "lp:libmemcached/1.0")
307 (revision (string-append "tag:" version))))
308 (file-name (string-append name "-" version "-checkout"))
311 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))))
312 (build-system gnu-build-system)
314 `(("memcached" ,memcached)
316 ("autoconf" ,autoconf)
317 ("automake" ,automake)
321 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
323 `(("libevent" ,libevent)
324 ("cyrus-sasl" ,cyrus-sasl)))
325 (outputs '("out" "doc"))
328 (modify-phases %standard-phases
329 (add-before 'bootstrap 'fix-configure.ac
330 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
331 ;; get the error ``configure: error: cannot find install-sh,
332 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
333 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
334 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
336 (delete-file "bootstrap.sh") ;not useful in the context of Guix
337 (substitute* "configure.ac"
338 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
339 (("(^AC_INIT.*)" anchor)
340 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
342 (add-before 'bootstrap 'disable-failing-tests
343 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
345 ;; Mark some heavily failing test suites as expected to fail.
346 (substitute* "Makefile.am"
347 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
348 (string-append xfail_tests " tests/testudp"
349 " tests/libmemcached-1.0/testapp"
350 " tests/libmemcached-1.0/testsocket")))
351 ;; Disable two tests of the unittest test suite.
352 (substitute* "libtest/unittest.cc"
353 ((".*echo_fubar_BINARY \\},.*") "")
354 ((".*application_doesnotexist_BINARY \\},.*") ""))
356 (add-after 'disable-dns-tests 'build-and-install-html-doc
357 (lambda* (#:key outputs #:allow-other-keys)
358 (let ((html (string-append (assoc-ref outputs "doc")
359 "/share/doc/libmemcached/html/")))
360 (invoke "make" "install-html")
361 ;; Cleanup useless files.
362 (for-each delete-file-recursively
363 (map (lambda (x) (string-append html x))
364 '("_sources" ".doctrees" ".buildinfo"))))
366 (home-page "https://libmemcached.org/")
367 (synopsis "C++ library for memcached")
368 (description "libMemcached is a library to use memcached in C/C++
369 applications. It comes with a complete reference guide and documentation of
370 the API, and provides features such as:
372 @item Asynchronous and synchronous transport support
373 @item Consistent hashing and distribution
374 @item Tunable hashing algorithm to match keys
375 @item Access to large object support
376 @item Local replication
378 (license license:bsd-3)))
380 (define-public python-pylibmc
382 (name "python-pylibmc")
387 (uri (pypi-uri "pylibmc" version))
390 "1n6nvvhl0g52gpzzwdj1my6049xljkfwyxxygnwda9smrbj7pyay"))))
391 (build-system python-build-system)
394 (modify-phases %standard-phases
395 (add-before 'check 'start-memcached-daemon
396 ;; The test suite requires a memcached server.
398 (invoke "memcached" "-d"))))))
400 `(("memcached" ,memcached)
401 ("python-nose" ,python-nose)))
403 `(("libmemcached" ,libmemcached)
405 ("cyrus-sasl" ,cyrus-sasl)))
407 "http://sendapatch.se/projects/pylibmc/")
409 "Python client for memcached")
411 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
412 around TangentOrg’s libmemcached library, and can be used as a drop-in
413 replacement for the code@{python-memcached} library.")
414 (license license:bsd-3)))
416 (define-public python2-pylibmc
417 (package-with-python2 python-pylibmc))
419 (define-public mongodb
425 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
427 (file-name (string-append name "-" version ".tar.gz"))
429 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
430 (modules '((guix build utils)))
433 (for-each (lambda (dir)
434 (delete-file-recursively
435 (string-append "src/third_party/" dir)))
436 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
437 "valgrind-3.11.0" "wiredtiger"
438 "yaml-cpp-0.5.3" "zlib-1.2.8"))
442 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
443 (build-system scons-build-system)
445 `(("openssl" ,openssl)
447 ,@(match (%current-system)
448 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
449 `(("wiredtiger" ,wiredtiger)))
451 ("yaml-cpp" ,yaml-cpp)
455 `(("valgrind" ,valgrind)
458 ("python2-pymongo" ,python2-pymongo)
459 ("python2-pyyaml" ,python2-pyyaml)
462 `(#:scons ,scons-python2
464 (let ((common-options
465 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
467 ;; wiredtiger is 64-bit only
468 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
470 '("i686-linux" "armhf-linux"))
472 ``"--use-system-wiredtiger")
474 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
475 ;; --use-system-boost
476 "--use-system-snappy"
478 "--use-system-valgrind"
479 ;; "--use-system-stemmer" TODO: Missing relevant package
481 "--disable-warnings-as-errors"
482 ,(format #f "--jobs=~a" (parallel-job-count))
484 (modify-phases %standard-phases
485 (add-after 'unpack 'scons-propagate-environment
487 ;; Modify the SConstruct file to arrange for
488 ;; environment variables to be propagated.
489 (substitute* "SConstruct"
490 (("^env = Environment\\(")
491 "env = Environment(ENV=os.environ, "))
493 (add-after 'unpack 'create-version-file
495 (call-with-output-file "version.json"
497 (display ,(simple-format #f "{
503 (apply invoke `("scons"
505 "mongod" "mongo" "mongos"))))
507 (lambda* (#:key tests? inputs #:allow-other-keys)
509 (string-append (assoc-ref inputs "tzdata")
512 ;; Note that with the tests, especially the unittests, the
513 ;; build can take up to ~45GB of space, as many tests are
514 ;; individual executable files, with some being hundreds of
515 ;; megabytes in size.
516 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
517 (substitute* "build/unittests.txt"
518 ;; TODO: Don't run the async_stream_test, as it hangs
519 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
521 ;; TODO: This test fails
522 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
523 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
525 (invoke "python" "buildscripts/resmoke.py"
526 "--suites=dbtest,unittests"
527 (format #f "--jobs=~a" (parallel-job-count))))
530 (lambda* (#:key outputs #:allow-other-keys)
531 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
532 (install-file "mongod" bin)
533 (install-file "mongos" bin)
534 (install-file "mongo" bin))
536 (home-page "https://www.mongodb.org/")
537 (synopsis "High performance and high availability document database")
539 "Mongo is a high-performance, high availability, schema-free
540 document-oriented database. A key goal of MongoDB is to bridge the gap
541 between key/value stores (which are fast and highly scalable) and traditional
542 RDBMS systems (which are deep in functionality).")
543 (license (list license:agpl3
544 ;; Some parts are licensed under the Apache License
547 ;; XXX When updating, check whether boost-for-mysql is still needed.
548 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
555 (uri (list (string-append
556 "https://dev.mysql.com/get/Downloads/MySQL-"
557 (version-major+minor version) "/"
558 name "-" version ".tar.gz")
560 "https://downloads.mysql.com/archives/get/file/"
561 name "-" version ".tar.gz")))
564 "0rbc3xsc11lq2dm0ip6gxa16c06hi74scb97x5cw7yhbabaz4c07"))))
565 (build-system cmake-build-system)
568 '("-DBUILD_CONFIG=mysql_release"
571 "-DDEFAULT_CHARSET=utf8"
572 "-DDEFAULT_COLLATION=utf8_general_ci"
573 "-DMYSQL_DATADIR=/var/lib/mysql"
574 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
575 "-DINSTALL_INFODIR=share/mysql/docs"
576 "-DINSTALL_MANDIR=share/man"
577 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
578 "-DINSTALL_SCRIPTDIR=bin"
579 "-DINSTALL_INCLUDEDIR=include/mysql"
580 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
581 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
582 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
583 "-DINSTALL_DOCDIR=share/mysql/docs"
584 "-DINSTALL_SHAREDIR=share/mysql"
585 ;; Get rid of test data.
586 "-DINSTALL_MYSQLTESTDIR="
587 "-DINSTALL_SQLBENCHDIR=")
588 #:phases (modify-phases %standard-phases
590 'install 'remove-extra-binaries
591 (lambda* (#:key outputs #:allow-other-keys)
592 (let ((out (assoc-ref outputs "out")))
593 ;; Remove the 3 *_embedded files, which weigh in at
595 (for-each delete-file
596 (find-files (string-append out "/bin")
603 `(("boost" ,boost-for-mysql)
608 (home-page "https://www.mysql.com/")
609 (synopsis "Fast, easy to use, and popular database")
611 "MySQL is a fast, reliable, and easy to use relational database
612 management system that supports the standardized Structured Query
614 (license license:gpl2)))
616 (define-public mariadb
622 (uri (string-append "https://downloads.mariadb.com/MariaDB"
623 "/mariadb-" version "/source/mariadb-"
627 "1wh0073lqw3d9xs150bf2q3qvjwa6886mfi9khmsn7p8vapw6irb"))
628 (patches (search-patches "mariadb-client-test-32bit.patch"))
629 (modules '((guix build utils)))
632 ;; Delete bundled snappy and xz.
633 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
634 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
635 ;; This file checks that the bundled sources are present and
636 ;; declares build procedures for them.
637 (("^include\\(TokuThirdParty\\)") ""))
638 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
639 ;; Don't attempt to use the procedures we just removed.
640 ((" build_lzma build_snappy") ""))
642 ;; Preserve CMakeLists.txt for these.
643 (for-each (lambda (file)
644 (unless (string-suffix? "CMakeLists.txt" file)
646 (append (find-files "extra/yassl")
647 (find-files "pcre") (find-files "zlib")))
649 (build-system cmake-build-system)
652 '("-DBUILD_CONFIG=mysql_release"
653 ;; Linking with libarchive fails, like this:
655 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
656 ;; relocation R_X86_64_32 against `.bss' can not be used when
657 ;; making a shared object; recompile with -fPIC
659 ;; For now, disable the features that that use libarchive (xtrabackup).
660 "-DWITH_LIBARCHIVE=OFF"
662 ;; Disable the TokuDB engine, because its test suite frequently fails,
663 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
666 ;; Ensure the system libraries are used.
667 "-DWITH_JEMALLOC=yes"
672 "-DDEFAULT_CHARSET=utf8"
673 "-DDEFAULT_COLLATION=utf8_general_ci"
674 "-DMYSQL_DATADIR=/var/lib/mysql"
675 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
676 "-DINSTALL_INFODIR=share/mysql/docs"
677 "-DINSTALL_MANDIR=share/man"
678 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
679 "-DINSTALL_SCRIPTDIR=bin"
680 "-DINSTALL_INCLUDEDIR=include/mysql"
681 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
682 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
683 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
684 "-DINSTALL_DOCDIR=share/mysql/docs"
685 "-DINSTALL_SHAREDIR=share")
687 (modify-phases %standard-phases
688 (add-after 'unpack 'fix-pcre-detection
690 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
691 ;; in version 8.34. Unfortunately the upstream patch behaves
692 ;; slightly differently and the build system fails to detect it.
693 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
694 ;; XXX: Consider patching PCRE instead.
695 (substitute* "cmake/pcre.cmake"
696 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
698 (add-after 'unpack 'adjust-tests
700 (let ((disabled-tests
701 '(;; These fail because root@hostname == root@localhost in
702 ;; the build environment, causing a user count mismatch.
703 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
705 "main.explain_non_select"
706 "main.stat_tables_innodb"
707 "roles.acl_statistics"
709 ;; This file contains a time bomb which makes it fail after
710 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
713 ;; FIXME: This test fails on i686:
714 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
715 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
716 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
717 ;; (all three tables must exist and be identical)
718 ;; in a loop it produces the same error around 1/240 times.
719 ;; montywi on #maria suggested removing the real_end check in
720 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
721 ;; reach the ending quote occasionally. Disable it for now.
723 ;; FIXME: This test fails on armhf-linux:
724 "mroonga/storage.index_read_multiple_double"))
726 ;; This file contains a list of known-flaky tests for this
727 ;; release. Append our own items.
728 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
729 (for-each (lambda (test)
730 (format unstable-tests "~a : ~a\n"
731 test "Disabled in Guix"))
733 (close-port unstable-tests)
735 (substitute* "mysql-test/mysql-test-run.pl"
736 (("/bin/ls") (which "ls"))
737 (("/bin/sh") (which "sh")))
739 (add-before 'configure 'disable-plugins
741 (let ((disable-plugin (lambda (name)
742 (call-with-output-file
743 (string-append "plugin/" name
746 (format port "\n")))))
747 (disabled-plugins '(;; XXX: Causes a test failure.
749 (for-each disable-plugin disabled-plugins)
752 (lambda* (#:key (tests? #t) #:allow-other-keys)
754 (with-directory-excursion "mysql-test"
755 (invoke "./mtr" "--verbose"
757 "--testcase-timeout=40"
758 "--suite-timeout=600"
759 "--parallel" (number->string (parallel-job-count))
760 "--skip-test-list=unstable-tests"))
761 (format #t "test suite not run~%"))
764 'install 'post-install
765 (lambda* (#:key outputs #:allow-other-keys)
766 (let* ((out (assoc-ref outputs "out"))
767 (test (assoc-ref outputs "test")))
768 (substitute* (string-append out "/bin/mysql_install_db")
770 (string-append "basedir=\"" out "\"")))
771 ;; Remove unneeded files for testing.
772 (with-directory-excursion out
773 (for-each delete-file-recursively
774 '("data" "mysql-test" "sql-bench"
775 "share/man/man1/mysql-test-run.pl.1"))
776 ;; Delete huge and unnecessary executables.
777 (for-each delete-file (find-files "bin" "(test|embedded)"))
778 ;; And static libraries.
779 (for-each delete-file (find-files "lib" "\\.a$")))
785 `(("jemalloc" ,jemalloc)
793 ;; mariadb.pc says -lssl -lcrypto, so propagate it.
794 `(("openssl" ,openssl)))
795 ;; The test suite is very resource intensive and can take more than three
796 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
797 (properties '((timeout . 64800))) ;18 hours
798 (home-page "https://mariadb.org/")
799 (synopsis "SQL database server")
801 "MariaDB is a multi-user and multi-threaded SQL database server, designed
802 as a drop-in replacement of MySQL.")
803 (license license:gpl2)))
805 ;; Don't forget to update the other postgresql packages when upgrading this one.
806 (define-public postgresql
812 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
813 version "/postgresql-" version ".tar.bz2"))
816 "0m0gbf7nwgag6a1z5f9xszwzgf2xhx0ncakyxwxlzs87n1zk32wm"))
817 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
818 (build-system gnu-build-system)
820 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
822 (modify-phases %standard-phases
823 (add-before 'configure 'patch-/bin/sh
825 ;; Refer to the actual shell.
826 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
827 "src/bin/psql/command.c")
828 (("/bin/sh") (which "sh")))
830 (add-after 'build 'build-contrib
832 (invoke "make" "-C" "contrib")))
833 (add-after 'install 'install-contrib
835 (invoke "make" "-C" "contrib" "install"))))))
837 `(("readline" ,readline)
838 ("libuuid" ,util-linux)
841 (home-page "https://www.postgresql.org/")
842 (synopsis "Powerful object-relational database system")
844 "PostgreSQL is a powerful object-relational database system. It is fully
845 ACID compliant, has full support for foreign keys, joins, views, triggers, and
846 stored procedures (in multiple languages). It includes most SQL:2008 data
847 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
848 TIMESTAMP. It also supports storage of binary large objects, including
849 pictures, sounds, or video.")
850 (license (license:x11-style "file://COPYRIGHT"))))
852 (define-public postgresql-11
859 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
860 version "/postgresql-" version ".tar.bz2"))
863 "12ycjlqncijgmd5z078ybwda8ilas96lc7nxxmdq140mzpgjv002"))))))
865 (define-public postgresql-9.6
872 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
873 version "/postgresql-" version ".tar.bz2"))
876 "08hsqczy1ixkjyf2vr3s9x69agfz9yr8lh31fir4z0dfr5jw421z"))))))
878 (define-public python-pymysql
880 (name "python-pymysql")
885 (uri (pypi-uri "PyMySQL" version))
887 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
888 (build-system python-build-system)
890 `(("python-unittest2" ,python-unittest2)))
892 `(("python-cryptography" ,python-cryptography)))
894 `(#:tests? #f)) ; tests expect a running MySQL
895 (home-page "https://github.com/PyMySQL/PyMySQL/")
896 (synopsis "Pure-Python MySQL driver")
898 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
899 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
900 (license license:expat)))
902 (define-public python2-pymysql
903 (package-with-python2 python-pymysql))
912 (uri (string-append "http://fallabs.com/" name "/"
913 name "-" version ".tar.gz"))
916 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
917 (build-system gnu-build-system)
919 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
920 (assoc-ref %outputs "out")
922 (home-page "http://fallabs.com/qdbm")
923 (synopsis "Key-value database")
924 (description "QDBM is a library of routines for managing a
925 database. The database is a simple data file containing key-value
926 pairs. Every key and value is serial bytes with variable length.
927 Binary data as well as character strings can be used as a key or a
928 value. There is no concept of data tables or data types. Records are
929 organized in a hash table or B+ tree.")
930 (license license:lgpl2.1+)))
932 (define-public recutils
938 (uri (string-append "mirror://gnu/recutils/recutils-"
942 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
943 (build-system gnu-build-system)
945 (arguments '(#:configure-flags
946 (list (string-append "--with-bash-headers="
947 (assoc-ref %build-inputs "bash:include")
950 (native-inputs `(("bc" ,bc)
951 ("bash:include" ,bash "include")
953 ("libuuid" ,util-linux)
954 ("pkg-config" ,pkg-config)))
956 ;; TODO: Add more optional inputs.
957 (inputs `(("curl" ,curl)
958 ("libgcrypt" ,libgcrypt)))
959 (synopsis "Manipulate plain text files as databases")
961 "GNU Recutils is a set of tools and libraries for creating and
962 manipulating text-based, human-editable databases. Despite being text-based,
963 databases created with Recutils carry all of the expected features such as
964 unique fields, primary keys, time stamps and more. Many different field
965 types are supported, as is encryption.")
966 (license license:gpl3+)
967 (home-page "https://www.gnu.org/software/recutils/")))
969 (define-public emacs-recutils
972 (name "emacs-recutils")
973 (build-system emacs-build-system)
976 (modify-phases %standard-phases
977 (add-after 'unpack 'change-directory
983 (synopsis "Emacs mode for working with recutils database files")
984 (description "This package provides an Emacs major mode @code{rec-mode}
985 for working with GNU Recutils text-based, human-editable databases. It
986 supports editing, navigation, and querying of recutils database files
987 including field and record folding.")))
989 (define-public rocksdb
996 (url "https://github.com/facebook/rocksdb")
997 (commit (string-append "v" version))))
998 (file-name (git-file-name name version))
1001 "1v2slmmr1dsgf8z0qcfg1y9x1al96859rg48b66p9nsawczd5zv9"))
1002 (modules '((guix build utils)))
1005 ;; TODO: unbundle gtest.
1006 (delete-file "build_tools/gnu_parallel")
1007 (substitute* "Makefile"
1008 (("build_tools/gnu_parallel") "parallel"))
1010 (build-system gnu-build-system)
1012 `(#:make-flags (list "CC=gcc" "V=1"
1013 ;; Ceph requires that RTTI is enabled.
1015 (string-append "INSTALL_PATH="
1016 (assoc-ref %outputs "out"))
1018 ;; Running the full test suite takes hours and require
1019 ;; a lot of disk space. Instead we only run a subset
1020 ;; (see .travis.yml and Makefile).
1021 "ROCKSDBTESTS_END=db_tailing_iter_test")
1022 #:test-target "check_some"
1023 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1024 ;; this upstream, but it's not going to be supported any time soon.
1025 #:tests? (let ((system ,(or (%current-target-system)
1026 (%current-system))))
1027 (or (string-prefix? "x86_64-linux" system)
1028 (string-prefix? "aarch64-linux" system)))
1030 (modify-phases %standard-phases
1031 (add-after 'unpack 'patch-Makefile
1033 (substitute* "Makefile"
1034 ;; Don't depend on the static library when installing.
1035 (("install: install-static")
1036 "install: install-shared")
1037 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1040 ;; The default target is only needed for tests and built on demand.
1042 (add-before 'check 'disable-optimizations
1044 ;; Prevent the build from passing '-march=native' to the compiler.
1045 (setenv "PORTABLE" "1")
1047 (add-before 'check 'disable-failing-tests
1049 (substitute* "Makefile"
1050 ;; These tests reliably fail due to "Too many open files".
1051 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1052 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1054 (add-after 'check 'build
1055 ;; The default build target is a debug build for tests. The
1056 ;; install target depends on the "shared_lib" release target
1057 ;; so we build it here for clarity.
1058 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1059 (apply invoke "make" "shared_lib"
1060 `(,@(if parallel-build?
1061 `("-j" ,(number->string (parallel-job-count)))
1065 `(("parallel" ,parallel)
1068 ("python" ,python-2)
1073 ("jemalloc" ,jemalloc)
1077 (home-page "http://rocksdb.org/")
1078 (synopsis "Persistent key-value store for fast storage")
1080 "RocksDB is a library that forms the core building block for a fast
1081 key-value server, especially suited for storing data on flash drives. It
1082 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1083 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1084 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1085 compactions, making it specially suitable for storing multiple terabytes of
1086 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1087 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1088 ;; files carry the 3-clause BSD license.
1089 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1091 (define-public sparql-query
1093 (name "sparql-query")
1097 (uri (string-append "https://github.com/tialaramex/"
1098 name "/archive/" version ".tar.gz"))
1100 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1101 (file-name (string-append name "-" version ".tar.gz"))))
1102 (build-system gnu-build-system)
1104 `(("readline" ,readline)
1105 ("ncurses" ,ncurses)
1107 ("libxml2" ,libxml2)
1110 `(("pkg-config" ,pkg-config)))
1112 `(#:make-flags '("CC=gcc")
1114 (modify-phases %standard-phases
1116 ;; The Makefile uses git to obtain versioning information. This phase
1117 ;; substitutes the git invocation with the package version.
1118 (add-after 'unpack 'remove-git-dependency
1120 (substitute* "Makefile"
1122 (string-append "gitrev = \"v" ,version "\"")))
1124 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1125 ;; This replacement does the same thing, except for using $PREFIX/bin
1128 (lambda* (#:key outputs #:allow-other-keys)
1129 (let* ((out (assoc-ref outputs "out"))
1130 (bin (string-append out "/bin")))
1131 (install-file "sparql-query" bin)
1132 (symlink (string-append bin "/sparql-query")
1133 (string-append bin "/sparql-update")))
1136 (lambda* (#:key make-flags #:allow-other-keys)
1137 (apply invoke "make" `(,@make-flags "scan-test"))
1138 (invoke "./scan-test"))))))
1139 (home-page "https://github.com/tialaramex/sparql-query/")
1140 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1141 (description "Sparql-query is a command-line tool for accessing SPARQL
1142 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1143 tools for interrogating SQL databases. For example, you can enter a query over
1144 several lines, using a semi-colon at the end of a line to indicate the end of
1145 your query. It also supports readline so that you can more easily recall and
1146 edit previous queries, even across sessions. It can be used non-interactively,
1147 for example from a shell script.")
1148 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1149 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1150 (license (list license:gpl3+))))
1152 (define-public sqitch
1160 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-"
1165 "1cvj8grs3bzc4g7dw1zc26g4biv1frav18sq0fkvi2kk0q1aigzm"))))
1166 (build-system perl-build-system)
1169 (modify-phases %standard-phases
1170 (add-before 'check 'set-check-environment
1173 (setenv "HOME" "/tmp")
1175 (add-after 'install 'wrap-program
1176 (lambda* (#:key outputs #:allow-other-keys)
1177 (let* ((out (assoc-ref outputs "out"))
1178 (path (getenv "PERL5LIB")))
1179 (wrap-program (string-append out "/bin/sqitch")
1180 `("PERL5LIB" ":" prefix
1181 (,(string-append out "/lib/perl5/site_perl"
1186 `(("perl-capture-tiny" ,perl-capture-tiny)
1187 ("perl-io-pager" ,perl-io-pager)
1188 ("perl-module-build" ,perl-module-build)
1189 ("perl-module-runtime" ,perl-module-runtime)
1190 ("perl-path-class" ,perl-path-class)
1191 ("perl-test-deep" ,perl-test-deep)
1192 ("perl-test-dir" ,perl-test-dir)
1193 ("perl-test-exception" ,perl-test-exception)
1194 ("perl-test-file" ,perl-test-file)
1195 ("perl-test-file-contents" ,perl-test-file-contents)
1196 ("perl-test-mockmodule" ,perl-test-mockmodule)
1197 ("perl-test-nowarnings" ,perl-test-nowarnings)
1198 ("perl-test-warn" ,perl-test-warn)))
1200 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1201 ("perl-clone" ,perl-clone)
1202 ("perl-config-gitlike" ,perl-config-gitlike)
1203 ("perl-datetime" ,perl-datetime)
1204 ("perl-datetime-timezone" ,perl-datetime-timezone)
1205 ("perl-dbd-pg" ,perl-dbd-pg)
1206 ("perl-dbi" ,perl-dbi)
1207 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1208 ("perl-encode-locale" ,perl-encode-locale)
1209 ("perl-file-homedir" ,perl-file-homedir)
1210 ("perl-hash-merge" ,perl-hash-merge)
1211 ("perl-ipc-run3" ,perl-ipc-run3)
1212 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1213 ("perl-libintl-perl" ,perl-libintl-perl)
1214 ("perl-list-moreutils" ,perl-list-moreutils)
1215 ("perl-moo" ,perl-moo)
1216 ("perl-mysql-config" ,perl-mysql-config)
1217 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1218 ("perl-path-class" ,perl-path-class)
1219 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1220 ("perl-string-formatter" ,perl-string-formatter)
1221 ("perl-string-shellquote" ,perl-string-shellquote)
1222 ("perl-sub-exporter" ,perl-sub-exporter)
1223 ("perl-template-tiny" ,perl-template-tiny)
1224 ("perl-template-toolkit" ,perl-template-toolkit)
1225 ("perl-throwable" ,perl-throwable)
1226 ("perl-try-tiny" ,perl-try-tiny)
1227 ("perl-type-tiny" ,perl-type-tiny)
1228 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1229 ("perl-uri" ,perl-uri)
1230 ("perl-uri-db" ,perl-uri-db)))
1231 (home-page "https://sqitch.org/")
1232 (synopsis "Database change management tool")
1234 "Sqitch is a standalone change management system for database schemas,
1235 which uses SQL to describe changes.")
1236 (license license:x11)))
1238 (define-public sqlcrush
1239 ;; Unfortunately, there is no proper upstream release and may never be.
1240 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1244 (version (git-version "0.1.5" revision commit))
1248 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1250 (file-name (git-file-name name version))
1253 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1254 (build-system python-build-system)
1256 `(("python-cryptography" ,python-cryptography)
1257 ("python-psycopg2" ,python-psycopg2)
1258 ("python-pymysql" ,python-pymysql)
1259 ("python-sqlalchemy" ,python-sqlalchemy)))
1260 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1261 (synopsis "Text console-based database viewer and editor")
1263 "SQLcrush lets you view and edit a database directly from the text
1264 console through an ncurses interface. You can explore each table's structure,
1265 browse and edit the contents, add and delete entries, all while tracking your
1267 (license license:gpl3+)))) ; no headers, see README.md
1275 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1279 "0d9d2f1c83gmmq30bkfs50yb8399mr9xjjzscma4kyq0ajf75861"))))
1280 (build-system gnu-build-system)
1283 (modify-phases %standard-phases
1285 (lambda* (#:key outputs #:allow-other-keys)
1286 (let ((out (assoc-ref outputs "out")))
1287 ;; The 'configure' script is a wrapper for Waf and
1288 ;; doesn't recognize things like '--enable-fast-install'.
1289 (invoke "./configure"
1290 (string-append "--prefix=" out))))))))
1292 `(;; TODO: Build the documentation.
1293 ;; ("docbook-xsl" ,docbook-xsl)
1294 ;; ("libxml2" ,libxml2)
1295 ;; ("libxslt" ,libxslt)
1296 ("python" ,python) ;for the Waf build system
1298 (home-page "https://tdb.samba.org/")
1299 (synopsis "Trivial database")
1301 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1302 and BSD's DB except that it allows multiple simultaneous writers and uses
1303 locking internally to keep writers from trampling on each other. TDB is also
1305 (license license:lgpl3+)))
1307 (define-public perl-dbi
1314 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1318 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1319 (build-system perl-build-system)
1320 (synopsis "Database independent interface for Perl")
1321 (description "This package provides an database interface for Perl.")
1322 (home-page "https://metacpan.org/release/DBI")
1323 (license license:perl-license)))
1325 (define-public perl-dbix-class
1327 (name "perl-dbix-class")
1328 (version "0.082841")
1332 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1333 "DBIx-Class-" version ".tar.gz"))
1336 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1337 (build-system perl-build-system)
1339 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1340 ("perl-file-temp" ,perl-file-temp)
1341 ("perl-module-install" ,perl-module-install)
1342 ("perl-package-stash" ,perl-package-stash)
1343 ("perl-test-deep" ,perl-test-deep)
1344 ("perl-test-exception" ,perl-test-exception)
1345 ("perl-test-warn" ,perl-test-warn)))
1347 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1348 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1349 ("perl-class-inspector" ,perl-class-inspector)
1350 ("perl-config-any" ,perl-config-any)
1351 ("perl-context-preserve" ,perl-context-preserve)
1352 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1353 ("perl-data-page" ,perl-data-page)
1354 ("perl-dbi" ,perl-dbi)
1355 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1356 ("perl-hash-merge" ,perl-hash-merge)
1357 ("perl-module-find" ,perl-module-find)
1358 ("perl-moo" ,perl-moo)
1359 ("perl-mro-compat" ,perl-mro-compat)
1360 ("perl-namespace-clean" ,perl-namespace-clean)
1361 ("perl-path-class" ,perl-path-class)
1362 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1363 ("perl-scope-guard" ,perl-scope-guard)
1364 ("perl-sql-abstract" ,perl-sql-abstract)
1365 ("perl-sub-name" ,perl-sub-name)
1366 ("perl-text-balanced" ,perl-text-balanced)
1367 ("perl-try-tiny" ,perl-try-tiny)))
1368 (home-page "https://metacpan.org/release/DBIx-Class")
1369 (synopsis "Extensible and flexible object <-> relational mapper")
1370 (description "An SQL to OO mapper with an object API inspired by
1371 Class::DBI (with a compatibility layer as a springboard for porting) and a
1372 resultset API that allows abstract encapsulation of database operations. It
1373 aims to make representing queries in your code as perl-ish as possible while
1374 still providing access to as many of the capabilities of the database as
1375 possible, including retrieving related records from multiple tables in a
1376 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1377 \"ORDER BY\" and \"HAVING\" support.")
1378 (license license:perl-license)))
1380 (define-public perl-dbix-class-cursor-cached
1382 (name "perl-dbix-class-cursor-cached")
1383 (version "1.001004")
1387 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1388 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1391 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1392 (build-system perl-build-system)
1394 `(("perl-cache-cache" ,perl-cache-cache)
1395 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1396 ("perl-module-install" ,perl-module-install)))
1398 `(("perl-carp-clan" ,perl-carp-clan)
1399 ("perl-dbix-class" ,perl-dbix-class)))
1400 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1401 (synopsis "Cursor with built-in caching support")
1402 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1403 built-in caching support.")
1404 (license license:perl-license)))
1406 (define-public perl-dbix-class-introspectablem2m
1408 (name "perl-dbix-class-introspectablem2m")
1409 (version "0.001002")
1413 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1414 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1417 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1418 (build-system perl-build-system)
1420 `(("perl-module-install" ,perl-module-install)))
1422 `(("perl-dbix-class" ,perl-dbix-class)))
1423 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1424 (synopsis "Introspect many-to-many relationships")
1425 (description "Because the many-to-many relationships are not real
1426 relationships, they can not be introspected with DBIx::Class. Many-to-many
1427 relationships are actually just a collection of convenience methods installed
1428 to bridge two relationships. This DBIx::Class component can be used to store
1429 all relevant information about these non-relationships so they can later be
1430 introspected and examined.")
1431 (license license:perl-license)))
1433 (define-public perl-dbix-class-schema-loader
1435 (name "perl-dbix-class-schema-loader")
1440 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1441 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1444 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1445 (build-system perl-build-system)
1447 `(("perl-config-any" ,perl-config-any)
1448 ("perl-config-general" ,perl-config-general)
1449 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1450 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1451 ("perl-module-install" ,perl-module-install)
1452 ("perl-moose" ,perl-moose)
1453 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1454 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1455 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1456 ("perl-test-deep" ,perl-test-deep)
1457 ("perl-test-differences" ,perl-test-differences)
1458 ("perl-test-exception" ,perl-test-exception)
1459 ("perl-test-pod" ,perl-test-pod)
1460 ("perl-test-warn" ,perl-test-warn)))
1462 `(("perl-class-unload" ,perl-class-unload)
1463 ("perl-class-inspector" ,perl-class-inspector)
1464 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1465 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1466 ("perl-carp-clan" ,perl-carp-clan)
1467 ("perl-data-dump" ,perl-data-dump)
1468 ("perl-dbix-class" ,perl-dbix-class)
1469 ("perl-hash-merge" ,perl-hash-merge)
1470 ("perl-list-moreutils" ,perl-list-moreutils)
1471 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1472 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1473 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1474 ("perl-namespace-clean" ,perl-namespace-clean)
1475 ("perl-mro-compat" ,perl-mro-compat)
1476 ("perl-scope-guard" ,perl-scope-guard)
1477 ("perl-string-camelcase" ,perl-string-camelcase)
1478 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1479 ("perl-sub-name" ,perl-sub-name)
1480 ("perl-try-tiny" ,perl-try-tiny)))
1481 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1482 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1483 (synopsis "Create a DBIx::Class::Schema based on a database")
1484 (description "DBIx::Class::Schema::Loader automates the definition of a
1485 DBIx::Class::Schema by scanning database table definitions and setting up the
1486 columns, primary keys, unique constraints and relationships.")
1487 (license license:perl-license)))
1489 (define-public perl-dbd-pg
1491 (name "perl-dbd-pg")
1496 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1497 "DBD-Pg-" version ".tar.gz"))
1500 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1501 (build-system perl-build-system)
1503 `(("perl-dbi" ,perl-dbi)))
1505 `(("perl-dbi" ,perl-dbi)
1506 ("postgresql" ,postgresql)))
1507 (home-page "https://metacpan.org/release/DBD-Pg")
1508 (synopsis "DBI PostgreSQL interface")
1509 (description "This package provides a PostgreSQL driver for the Perl5
1510 @dfn{Database Interface} (DBI).")
1511 (license license:perl-license)))
1513 (define-public perl-dbd-mysql
1515 (name "perl-dbd-mysql")
1520 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1521 "DBD-mysql-" version ".tar.gz"))
1523 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1524 (build-system perl-build-system)
1527 (modify-phases %standard-phases
1528 (add-before 'configure 'skip-library-detection
1529 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1530 ;; are really only needed for the test suite; their absence does not
1531 ;; affect the build or the end result.
1533 (substitute* "Makefile.PL"
1534 (("use Devel::CheckLib;" match)
1535 (string-append "# " match))
1539 ;; Tests require running MySQL server.
1542 `(("perl-dbi" ,perl-dbi)
1543 ("mysql" ,mariadb)))
1544 (home-page "https://metacpan.org/release/DBD-mysql")
1545 (synopsis "DBI MySQL interface")
1546 (description "This package provides a MySQL driver for the Perl5
1547 @dfn{Database Interface} (DBI).")
1548 (license license:perl-license)))
1550 (define-public perl-dbd-sqlite
1552 (name "perl-dbd-sqlite")
1557 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1561 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1562 (build-system perl-build-system)
1563 (inputs `(("sqlite" ,sqlite)))
1564 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1565 (synopsis "SQlite interface for Perl")
1566 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1567 the entire thing in the distribution. So in order to get a fast transaction
1568 capable RDBMS working for your Perl project you simply have to install this
1569 module, and nothing else.")
1570 (license license:perl-license)
1571 (home-page "https://metacpan.org/release/DBD-SQLite")))
1573 (define-public perl-mysql-config
1575 (name "perl-mysql-config")
1581 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1586 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1587 (build-system perl-build-system)
1588 (home-page "https://metacpan.org/release/MySQL-Config")
1589 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1591 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1592 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1593 @code{Getopt::Long}.")
1594 (license license:perl-license)))
1596 (define-public perl-sql-abstract
1598 (name "perl-sql-abstract")
1603 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1604 "SQL-Abstract-" version ".tar.gz"))
1606 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1607 (build-system perl-build-system)
1609 `(("perl-module-install" ,perl-module-install)
1610 ("perl-test-deep" ,perl-test-deep)
1611 ("perl-test-exception" ,perl-test-exception)
1612 ("perl-test-warn" ,perl-test-warn)))
1614 `(("perl-hash-merge" ,perl-hash-merge)
1615 ("perl-moo" ,perl-moo)
1616 ("perl-mro-compat" ,perl-mro-compat)
1617 ("perl-text-balanced" ,perl-text-balanced)))
1618 (home-page "https://metacpan.org/release/SQL-Abstract")
1619 (synopsis "Generate SQL from Perl data structures")
1620 (description "This module was inspired by the excellent DBIx::Abstract.
1621 While based on the concepts used by DBIx::Abstract, the concepts used have
1622 been modified to make the SQL easier to generate from Perl data structures.
1623 The underlying idea is for this module to do what you mean, based on the data
1624 structures you provide it, so that you don't have to modify your code every
1625 time your data changes.")
1626 (license license:perl-license)))
1628 (define-public perl-sql-splitstatement
1630 (name "perl-sql-splitstatement")
1635 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1636 "SQL-SplitStatement-" version ".tar.gz"))
1639 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1640 (build-system perl-build-system)
1642 `(("perl-test-exception" ,perl-test-exception)))
1644 `(("perl-class-accessor" ,perl-class-accessor)
1645 ("perl-list-moreutils" ,perl-list-moreutils)
1646 ("perl-regexp-common" ,perl-regexp-common)
1647 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1648 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1649 (synopsis "Split SQL code into atomic statements")
1650 (description "This module tries to split any SQL code, even including
1651 non-standard extensions, into the atomic statements it is composed of.")
1652 (license license:perl-license)))
1654 (define-public perl-sql-tokenizer
1656 (name "perl-sql-tokenizer")
1661 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1662 "SQL-Tokenizer-" version ".tar.gz"))
1665 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1666 (build-system perl-build-system)
1667 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1668 (synopsis "SQL tokenizer")
1669 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1670 claim to be a parser or query verifier. It just creates sane tokens from a
1672 (license license:perl-license)))
1674 (define-public unixodbc
1682 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1685 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1686 (build-system gnu-build-system)
1687 (synopsis "Data source abstraction library")
1688 (description "Unixodbc is a library providing an API with which to access
1689 data sources. Data sources include SQL Servers and any software with an ODBC
1691 (license license:lgpl2.1+)
1692 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1693 (home-page "http://www.unixodbc.org")))
1695 (define-public unqlite
1701 ;; Contains bug fixes against the official release, and has an
1702 ;; autotooled build system.
1703 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1705 "unqlite-unofficial-" version ".tar.gz"))
1708 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1709 (build-system gnu-build-system)
1710 (arguments `(#:tests? #f)) ;No check target
1711 (home-page "http://www.unqlite.org")
1712 (synopsis "In-memory key/value and document store")
1714 "UnQLite is an in-process software library which implements a
1715 self-contained, serverless, zero-configuration, transactional NoSQL
1716 database engine. UnQLite is a document store database similar to
1717 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1718 similar to BerkeleyDB, LevelDB, etc.")
1719 (license license:bsd-2)))
1721 (define-public redis
1727 (uri (string-append "http://download.redis.io/releases/redis-"
1731 "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx"))))
1732 (build-system gnu-build-system)
1734 '(#:tests? #f ; tests related to master/slave and replication fail
1735 #:phases (modify-phases %standard-phases
1736 (delete 'configure))
1737 #:make-flags `("CC=gcc"
1740 ,(string-append "PREFIX="
1741 (assoc-ref %outputs "out")))))
1742 (synopsis "Key-value cache and store")
1743 (description "Redis is an advanced key-value cache and store. Redis
1744 supports many data structures including strings, hashes, lists, sets, sorted
1745 sets, bitmaps and hyperloglogs.")
1746 (home-page "http://redis.io/")
1747 (license license:bsd-3)))
1749 (define-public kyotocabinet
1751 (name "kyotocabinet")
1755 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1756 name "-" version ".tar.gz"))
1759 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1760 (build-system gnu-build-system)
1764 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1765 (string-append "LDFLAGS=-Wl,-rpath="
1766 (assoc-ref %outputs "out") "/lib"))))
1767 (inputs `(("zlib" ,zlib)))
1768 (home-page "http://fallabs.com/kyotocabinet/")
1770 "Kyoto Cabinet is a modern implementation of the DBM database")
1772 "Kyoto Cabinet is a standalone file-based database that supports Hash
1773 and B+ Tree data storage models. It is a fast key-value lightweight
1774 database and supports many programming languages. It is a NoSQL database.")
1775 (license license:gpl3+)))
1777 (define-public tokyocabinet
1779 (name "tokyocabinet")
1784 (uri (string-append "http://fallabs.com/tokyocabinet/"
1785 name "-" version ".tar.gz"))
1788 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1789 (build-system gnu-build-system)
1792 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1793 (string-append "LDFLAGS=-Wl,-rpath="
1794 (assoc-ref %outputs "out") "/lib"))))
1797 (home-page "http://fallabs.com/tokyocabinet/")
1798 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1800 "Tokyo Cabinet is a library of routines for managing a database.
1801 The database is a simple data file containing records, each is a pair of a
1802 key and a value. Every key and value is serial bytes with variable length.
1803 Both binary data and character string can be used as a key and a value.
1804 There is neither concept of data tables nor data types. Records are
1805 organized in hash table, B+ tree, or fixed-length array.")
1806 (license license:lgpl2.1+)))
1808 (define-public wiredtiger
1815 "http://source.wiredtiger.com/releases/wiredtiger-"
1816 version ".tar.bz2"))
1819 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1820 (build-system gnu-build-system)
1822 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1824 (modify-phases %standard-phases
1825 (add-before 'check 'disable-test/fops
1827 ;; XXX: timed out after 3600 seconds of silence
1828 (substitute* "Makefile"
1834 ("snappy" ,snappy)))
1835 (home-page "http://source.wiredtiger.com/")
1836 (synopsis "NoSQL data engine")
1838 "WiredTiger is an extensible platform for data management. It supports
1839 row-oriented storage (where all columns of a row are stored together),
1840 column-oriented storage (where columns are stored in groups, allowing for
1841 more efficient access and storage of column subsets) and log-structured merge
1842 trees (LSM), for sustained throughput under random insert workloads.")
1843 (license license:gpl3) ; or GPL-2
1844 ;; configure.ac: WiredTiger requires a 64-bit build.
1845 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1847 (define-public wiredtiger-3
1849 (inherit wiredtiger)
1854 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1855 version ".tar.bz2"))
1858 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
1860 (define-public guile-wiredtiger
1862 (name "guile-wiredtiger")
1867 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1868 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
1869 (file-name (string-append name "-" version "-checkout"))
1872 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
1873 (build-system gnu-build-system)
1875 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
1877 (list (string-append "--with-libwiredtiger-prefix="
1878 (assoc-ref %build-inputs "wiredtiger")))
1879 #:make-flags '("GUILE_AUTO_COMPILE=0")))
1881 `(("autoconf" ,autoconf)
1882 ("automake" ,automake)
1883 ("pkg-config" ,pkg-config)))
1885 `(("wiredtiger" ,wiredtiger-3)
1886 ("guile" ,guile-2.2)))
1888 `(("guile-bytestructures" ,guile-bytestructures)))
1889 (synopsis "WiredTiger bindings for GNU Guile")
1891 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1893 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1894 (license license:gpl3+)))
1896 (define-public perl-db-file
1898 (name "perl-db-file")
1904 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1909 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
1910 (build-system perl-build-system)
1911 (inputs `(("bdb" ,bdb)))
1912 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1914 `(#:phases (modify-phases %standard-phases
1916 'configure 'modify-config.in
1917 (lambda* (#:key inputs #:allow-other-keys)
1918 (substitute* "config.in"
1919 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1921 (home-page "https://metacpan.org/release/DB_File")
1923 "Perl5 access to Berkeley DB version 1.x")
1925 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1926 (license license:perl-license)))
1936 (url "https://github.com/LMDB/lmdb.git")
1937 (commit (string-append "LMDB_" version))))
1938 (file-name (git-file-name name version))
1940 (base32 "0ag7l5180ajvm73y59m7sn3p52xm8m972d08cshxhpwgwa4v35k6"))))
1941 (build-system gnu-build-system)
1943 `(#:test-target "test"
1945 (modify-phases %standard-phases
1947 (lambda* (#:key outputs #:allow-other-keys)
1948 (chdir "libraries/liblmdb")
1949 (substitute* "Makefile"
1950 (("/usr/local") (assoc-ref outputs "out")))
1952 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1953 (synopsis "Lightning Memory-Mapped Database library")
1955 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1956 transactional database. Unlike more complex relational databases, LMDB handles
1957 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1958 underlying operating system for caching and locking, keeping the code small and
1960 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1961 disk-based databases with high read performance that scales linearly over
1962 multiple cores. The size of each database is limited only by the size of the
1963 virtual address space — not physical RAM.")
1964 (license license:openldap2.8)))
1966 (define-public libpqxx
1973 "http://pqxx.org/download/software/libpqxx/"
1974 name "-" version ".tar.gz"))
1977 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1978 (build-system gnu-build-system)
1980 `(("python" ,python-2)))
1981 (inputs `(("postgresql" ,postgresql)))
1983 `(#:tests? #f ; # FAIL: 1
1985 (modify-phases %standard-phases
1986 (add-before 'configure 'fix-sed-command
1988 ;; Newer sed versions error out if double brackets are not used.
1989 (substitute* "configure"
1990 (("\\[:space:\\]") "[[:space:]]"))
1992 (synopsis "C++ connector for PostgreSQL")
1994 "Libpqxx is a C++ library to enable user programs to communicate with the
1995 PostgreSQL database back-end. The database back-end can be local or it may be
1996 on another machine, accessed via TCP/IP.")
1997 (home-page "http://pqxx.org/")
1998 (license license:bsd-3)))
2000 (define-public python-peewee
2002 (name "python-peewee")
2007 (uri (pypi-uri "peewee" version))
2010 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2011 (build-system python-build-system)
2013 `(#:tests? #f)) ; Fails to import test data
2015 `(("python-cython" ,python-cython)))
2016 (home-page "https://github.com/coleifer/peewee/")
2017 (synopsis "Small object-relational mapping utility")
2019 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2020 handles converting between pythonic values and those used by databases, so you
2021 can use Python types in your code without having to worry. It has built-in
2022 support for sqlite, mysql and postgresql. If you already have a database, you
2023 can autogenerate peewee models using @code{pwiz}, a model generator.")
2024 (license license:expat)))
2026 (define-public python2-peewee
2027 (package-with-python2 python-peewee))
2029 (define-public sqlcipher
2036 (uri (string-append "https://github.com/sqlcipher/" name
2037 "/archive/v" version ".tar.gz"))
2039 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2040 (file-name (string-append name "-" version ".tar.gz"))))
2041 (build-system gnu-build-system)
2043 `(("libcrypto" ,openssl)
2044 ("libtcl8.6" ,tcl))) ; required for running the tests
2049 '("--enable-tempstore=yes"
2050 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2051 "LDFLAGS=-lcrypto -ltcl8.6"
2053 ;; tests cannot be run from the Makefile
2054 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2055 #:test-target "testfixture"
2057 (modify-phases %standard-phases
2058 (add-before 'check 'build-test-runner
2059 (assoc-ref %standard-phases 'check))
2062 (invoke "./testfixture" "test/crypto.test"))))))
2063 (home-page "https://www.zetetic.net/sqlcipher/")
2065 "Library providing transparent encryption of SQLite database files")
2066 (description "SQLCipher is an implementation of SQLite, extended to
2067 provide transparent 256-bit AES encryption of database files. Pages are
2068 encrypted before being written to disk and are decrypted when read back. It’s
2069 well suited for protecting embedded application databases and for mobile
2072 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2073 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2074 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2075 ;; source files are in the public domain.
2076 (license (list license:public-domain license:bsd-3))))
2078 (define-public python-pyodbc-c
2080 (name "python-pyodbc-c")
2085 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2086 "archive.tar.gz?ref=v" version))
2089 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2090 (file-name (string-append name "-" version ".tar.gz"))))
2091 (build-system python-build-system)
2093 `(("unixodbc" ,unixodbc)))
2095 `(;; No unit tests exist.
2097 (home-page "https://github.com/mkleehammer/pyodbc")
2098 (synopsis "Python ODBC Library")
2099 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2101 (license (license:x11-style "file://LICENSE.TXT"))))
2103 (define-public python2-pyodbc-c
2104 (package-with-python2 python-pyodbc-c))
2106 (define-public python-pyodbc
2108 (name "python-pyodbc")
2113 (uri (pypi-uri "pyodbc" version))
2115 (base32 "1qrxnf7ji5hml7z4y669k4wmk3iz2pcsr05bnn1n912asash09z5"))
2116 (file-name (string-append name "-" version ".tar.gz"))))
2117 (build-system python-build-system)
2119 `(("unixodbc" ,unixodbc)))
2121 `(;; No unit tests exist.
2123 (home-page "https://github.com/mkleehammer/pyodbc")
2124 (synopsis "Python ODBC Library")
2125 (description "@code{python-pyodbc} provides a Python DB-API driver
2127 (license (license:x11-style "file:///LICENSE.TXT"))))
2129 (define-public python2-pyodbc
2130 (package-with-python2 python-pyodbc))
2132 (define-public mdbtools
2140 (url "https://github.com/brianb/mdbtools.git")
2142 (file-name (git-file-name name version))
2145 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2146 (build-system gnu-build-system)
2150 `(("autoconf" ,autoconf)
2151 ("automake" ,automake)
2152 ("libtool" ,libtool)
2153 ("pkg-config" ,pkg-config)
2154 ("txt2man" ,txt2man)
2156 (home-page "http://mdbtools.sourceforge.net/")
2157 (synopsis "Read Microsoft Access databases")
2158 (description "MDB Tools is a set of tools and applications to read the
2159 proprietary MDB file format used in Microsoft's Access database package. This
2160 includes programs to export schema and data from Microsoft's Access database
2161 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2162 etc., and an SQL engine for performing simple SQL queries.")
2163 (license (list license:lgpl2.0
2166 (define-public python-lmdb
2168 (name "python-lmdb")
2172 (uri (pypi-uri "lmdb" version))
2175 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2176 (modules '((guix build utils)))
2178 ;; Delete bundled lmdb source files.
2180 (for-each delete-file (list "lib/lmdb.h"
2185 (build-system python-build-system)
2190 (modify-phases %standard-phases
2191 (add-before 'build 'use-system-lmdb
2192 (lambda* (#:key inputs #:allow-other-keys)
2193 (let ((lmdb (assoc-ref inputs "lmdb")))
2194 (setenv "LMDB_FORCE_SYSTEM" "set")
2195 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2196 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2198 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2200 (home-page "https://github.com/dw/py-lmdb")
2201 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2203 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2204 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2206 (list license:openldap2.8
2207 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2208 ;; but not actually needed on platforms currently supported by Guix.
2211 (define-public python2-lmdb
2212 (package-with-python2 python-lmdb))
2214 (define-public python-orator
2216 (name "python-orator")
2220 (uri (pypi-uri "orator" version))
2223 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2224 (build-system python-build-system)
2227 (modify-phases %standard-phases
2228 (add-after 'unpack 'loosen-dependencies
2229 ;; Tests are not actually run since they are not included with the
2230 ;; distributed package, but dependencies are checked.
2232 (substitute* "setup.py"
2234 (("flexmock==0.9.7") "flexmock")
2235 ;; The pytest-mock package is out of date, so we remove minimum
2236 ;; version requirement.
2237 (("pytest-mock.*'") "pytest-mock'"))
2240 `(("python-pytest-mock" ,python-pytest-mock)
2241 ("python-pytest" ,python-pytest)
2242 ("python-flexmock" ,python-flexmock)))
2244 `(("python-backpack" ,python-backpack)
2245 ("python-blinker" ,python-blinker)
2246 ("python-cleo" ,python-cleo)
2247 ("python-faker" ,python-faker)
2248 ("python-inflection" ,python-inflection)
2249 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2250 ("python-pendulum" ,python-pendulum)
2251 ("python-pyaml" ,python-pyaml)
2252 ("python-pygments" ,python-pygments)
2253 ("python-simplejson" ,python-simplejson)
2254 ("python-six" ,python-six)
2255 ("python-wrapt" ,python-wrapt)))
2256 (home-page "https://orator-orm.com/")
2257 (synopsis "ActiveRecord ORM for Python")
2259 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2260 implementation for Python.")
2261 (license license:expat)
2262 (properties `((python2-variant . ,(delay python2-orator))))))
2264 (define-public python2-orator
2265 (package-with-python2 (strip-python2-variant python-orator)))
2267 (define-public virtuoso-ose
2269 (name "virtuoso-ose")
2275 "https://github.com/openlink/virtuoso-opensource/releases/"
2276 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2278 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2279 (build-system gnu-build-system)
2281 `(#:tests? #f ; Tests require a network connection.
2282 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2283 ;; This indicates that the internal zlib code may still be used.
2284 #:configure-flags '("--without-internal-zlib"
2285 "--with-readline")))
2287 `(("openssl" ,openssl)
2288 ("net-tools" ,net-tools)
2289 ("readline" ,readline)
2291 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2292 (synopsis "Multi-model database system")
2293 (description "Virtuoso is a scalable cross-platform server that combines
2294 relational, graph, and document data management with web application server
2295 and web services platform functionality.")
2296 ;; configure: error: ... can only be build on 64bit platforms
2297 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2298 (license license:gpl2)))
2300 (define-public python-ccm
2307 (uri (pypi-uri "ccm" version))
2310 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2311 (build-system python-build-system)
2313 `(("python-pyyaml" ,python-pyyaml)
2314 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2316 ("python-psutil" ,python-psutil)
2317 ("python-six" ,python-six)))
2318 (home-page "https://github.com/pcmanus/ccm")
2319 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2321 (description "Cassandra Cluster Manager is a development tool for testing
2322 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2324 (license license:asl2.0)))
2326 (define-public python2-ccm
2327 (package-with-python2 python-ccm))
2329 (define-public python2-pysqlite
2331 (name "python2-pysqlite")
2336 (uri (pypi-uri "pysqlite" version))
2339 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2340 (build-system python-build-system)
2342 `(("sqlite" ,sqlite)))
2344 `(#:python ,python-2 ; incompatible with Python 3
2345 #:tests? #f)) ; no test target
2346 (home-page "https://github.com/ghaering/pysqlite")
2347 (synopsis "SQLite bindings for Python")
2349 "Pysqlite provides SQLite bindings for Python that comply to the
2350 Database API 2.0T.")
2351 (license license:zlib)))
2353 (define-public python-sqlalchemy
2355 (name "python-sqlalchemy")
2360 (uri (pypi-uri "SQLAlchemy" version))
2362 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2363 (build-system python-build-system)
2365 `(("python-cython" ,python-cython) ; for C extensions
2366 ("python-pytest" ,python-pytest)
2367 ("python-mock" ,python-mock))) ; for tests
2370 (modify-phases %standard-phases
2372 (lambda _ (invoke "py.test"))))))
2373 (home-page "https://www.sqlalchemy.org")
2374 (synopsis "Database abstraction library")
2376 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2377 gives application developers the full power and flexibility of SQL. It
2378 provides a full suite of well known enterprise-level persistence patterns,
2379 designed for efficient and high-performing database access, adapted into a
2380 simple and Pythonic domain language.")
2381 (license license:x11)))
2383 (define-public python2-sqlalchemy
2384 (package-with-python2 python-sqlalchemy))
2386 (define-public python-sqlalchemy-utils
2388 (name "python-sqlalchemy-utils")
2393 (uri (pypi-uri "SQLAlchemy-Utils" version))
2396 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2397 (build-system python-build-system)
2399 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2401 ;; (modify-phases %standard-phases
2404 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2406 `(("python-six" ,python-six)
2407 ("python-sqlalchemy" ,python-sqlalchemy)))
2409 `(("python-dateutil" ,python-dateutil)
2410 ("python-flexmock" ,python-flexmock)
2411 ("python-psycopg2" ,python-psycopg2)
2412 ("python-pytest" ,python-pytest)
2413 ("python-pytz" ,python-pytz)))
2414 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2415 (synopsis "Various utility functions for SQLAlchemy")
2417 "SQLAlchemy-utils provides various utility functions and custom data types
2418 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2420 You might also want to install the following optional dependencies:
2422 @item @code{python-passlib}
2423 @item @code{python-babel}
2424 @item @code{python-cryptography}
2425 @item @code{python-pytz}
2426 @item @code{python-psycopg2}
2427 @item @code{python-furl}
2428 @item @code{python-flask-babel}
2431 (license license:bsd-3)))
2433 (define-public python2-sqlalchemy-utils
2434 (package-with-python2 python-sqlalchemy-utils))
2436 (define-public python-alembic
2438 (name "python-alembic")
2443 (uri (pypi-uri "alembic" version))
2446 "1dwl0264r6ri2jyrjr68am04x538ab26xwy4crqjnnhm4alwm3c2"))))
2447 (build-system python-build-system)
2449 `(("python-mock" ,python-mock)
2450 ("python-pytest-cov" ,python-pytest-cov)))
2452 `(("python-dateutil" ,python-dateutil)
2453 ("python-sqlalchemy" ,python-sqlalchemy)
2454 ("python-mako" ,python-mako)
2455 ("python-editor" ,python-editor)))
2456 (home-page "https://bitbucket.org/zzzeek/alembic")
2458 "Database migration tool for SQLAlchemy")
2460 "Alembic is a lightweight database migration tool for usage with the
2461 SQLAlchemy Database Toolkit for Python.")
2462 (license license:expat)))
2464 (define-public python2-alembic
2465 (package-with-python2 python-alembic))
2467 (define-public python-pickleshare
2469 (name "python-pickleshare")
2474 (uri (pypi-uri "pickleshare" version))
2476 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2477 (build-system python-build-system)
2479 `(#:phases (modify-phases %standard-phases
2482 (invoke "pytest"))))))
2484 `(("python-pytest" ,python-pytest)))
2485 (home-page "https://github.com/vivainio/pickleshare")
2486 (synopsis "Tiny key value database with concurrency support")
2488 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2489 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2490 shelve, many processes can access the database simultaneously. Changing a
2491 value in database is immediately visible to other processes accessing the same
2492 database. Concurrency is possible because the values are stored in separate
2493 files. Hence the “database” is a directory where all files are governed by
2495 (properties `((python2-variant . ,(delay python2-pickleshare))))
2496 (license license:expat)))
2498 (define-public python2-pickleshare
2499 (let ((pickleshare (package-with-python2
2500 (strip-python2-variant python-pickleshare))))
2501 (package (inherit pickleshare)
2502 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2503 ,@(package-propagated-inputs pickleshare))))))
2505 (define-public python-apsw
2507 (name "python-apsw")
2508 (version "3.20.1-r1")
2512 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2514 (file-name (string-append "apsw-" version ".tar.gz"))
2517 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2518 (build-system python-build-system)
2520 `(("sqlite" ,sqlite)))
2523 (modify-phases %standard-phases
2526 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2528 (add-after 'build 'build-test-helper
2530 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2531 "-I." "-Isqlite3" "src/testextension.c")
2534 (add-after 'install 'check
2535 (lambda* (#:key inputs outputs #:allow-other-keys)
2536 (add-installed-pythonpath inputs outputs)
2537 (invoke "python" "setup.py" "test")
2539 (home-page "https://github.com/rogerbinns/apsw/")
2540 (synopsis "Another Python SQLite Wrapper")
2541 (description "APSW is a Python wrapper for the SQLite
2542 embedded relational database engine. In contrast to other wrappers such as
2543 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2544 translate the complete SQLite API into Python.")
2545 (license license:zlib)))
2547 (define-public python2-apsw
2548 (package-with-python2 python-apsw))
2550 (define-public python2-neo4j-driver
2552 (name "python2-neo4j-driver")
2553 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2557 (uri (pypi-uri "neo4j-driver" version))
2560 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2561 (build-system python-build-system)
2563 `(#:python ,python-2))
2564 (home-page "https://neo4j.com/developer/python/")
2565 (synopsis "Neo4j driver code written in Python")
2566 (description "This package provides the Neo4j Python driver that connects
2567 to the database using Neo4j's binary protocol. It aims to be minimal, while
2568 being idiomatic to Python.")
2569 (license license:asl2.0)))
2571 (define-public python2-py2neo
2573 (name "python2-py2neo")
2577 (uri (pypi-uri "py2neo" version))
2580 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2581 (build-system python-build-system)
2583 `(#:python ,python-2))
2584 (home-page "http://py2neo.org")
2585 (synopsis "Library and toolkit for working with Neo4j in Python")
2586 (description "This package provides a client library and toolkit for
2587 working with Neo4j from within Python applications and from the command
2588 line. The core library has no external dependencies and has been carefully
2589 designed to be easy and intuitive to use.")
2590 (license license:asl2.0)))
2592 (define-public python-psycopg2
2594 (name "python-psycopg2")
2599 (uri (pypi-uri "psycopg2" version))
2601 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2602 (build-system python-build-system)
2604 ;; Tests would require a postgresql database "psycopg2_test"
2605 ;; and a running postgresql database management service.
2606 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2608 `(("postgresql" ,postgresql))) ; libpq
2609 (home-page "http://initd.org/psycopg/")
2610 (synopsis "Python PostgreSQL adapter")
2612 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2614 (license license:lgpl3+)))
2616 (define-public python2-psycopg2
2617 (package-with-python2 python-psycopg2))
2619 (define-public python-sadisplay
2621 (name "python-sadisplay")
2626 (uri (pypi-uri "sadisplay" version))
2629 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2630 (build-system python-build-system)
2632 `(("python-sqlalchemy" ,python-sqlalchemy)))
2635 `(("python-nose" ,python-nose)))
2636 (home-page "https://bitbucket.org/estin/sadisplay")
2637 (synopsis "SQLAlchemy schema displayer")
2638 (description "This package provides a program to build Entity
2639 Relationship diagrams from a SQLAlchemy model (or directly from the
2641 (license license:bsd-3)))
2643 (define-public python2-sadisplay
2644 (package-with-python2 python-sadisplay))
2646 (define-public python-mysqlclient
2648 (name "python-mysqlclient")
2653 (uri (pypi-uri "mysqlclient" version))
2656 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2657 (build-system python-build-system)
2659 `(("nose" ,python-nose)
2660 ("mock" ,python-mock)
2661 ("py.test" ,python-pytest)))
2663 `(("mysql" ,mariadb)
2665 ("openssl" ,openssl)))
2666 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2667 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2668 (description "MySQLdb is an interface to the popular MySQL database server
2669 for Python. The design goals are:
2671 @item Compliance with Python database API version 2.0 [PEP-0249],
2672 @item Thread-safety,
2673 @item Thread-friendliness (threads will not block each other).
2675 (license license:gpl2)))
2677 (define-public python2-mysqlclient
2678 (package-with-python2 python-mysqlclient))
2680 (define-public python-hiredis
2682 (name "python-hiredis")
2687 (uri (pypi-uri "hiredis" version))
2690 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2691 (build-system python-build-system)
2695 (home-page "https://github.com/redis/hiredis-py")
2696 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2697 (description "Python-hiredis is a python extension that wraps protocol
2698 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2699 (license license:bsd-3)))
2701 (define-public python2-hiredis
2702 (package-with-python2 python-hiredis))
2704 (define-public python-fakeredis
2706 (name "python-fakeredis")
2711 (uri (pypi-uri "fakeredis" version))
2714 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2715 (build-system python-build-system)
2719 (home-page "https://github.com/jamesls/fakeredis")
2720 (synopsis "Fake implementation of redis API for testing purposes")
2722 "Fakeredis is a pure-Python implementation of the redis-py Python client
2723 that simulates talking to a redis server. It was created for a single purpose:
2724 to write unit tests.
2726 Setting up redis is not hard, but one often wants to write unit tests that don't
2727 talk to an external server such as redis. This module can be used as a
2728 reasonable substitute.")
2729 (license license:bsd-3)))
2731 (define-public python2-fakeredis
2732 (package-with-python2 python-fakeredis))
2734 (define-public python-redis
2736 (name "python-redis")
2741 (uri (pypi-uri "redis" version))
2743 (base32 "0wwj8il4c3aff15xwwcjfci367zxsakq05ps1a2il6yavp91i94c"))))
2744 (build-system python-build-system)
2745 ;; Tests require a running Redis server.
2746 (arguments '(#:tests? #f))
2747 ;; As long as we are not running test, we do not need this input :-)
2749 ;; `(("python-pytest" ,python-pytest)))
2750 (home-page "https://github.com/andymccurdy/redis-py")
2751 (synopsis "Redis Python client")
2753 "This package provides a Python interface to the Redis key-value store.")
2754 (license license:expat)))
2756 (define-public python2-redis
2757 (package-with-python2 python-redis))
2759 (define-public python-rq
2766 (uri (pypi-uri "rq" version))
2768 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2769 (build-system python-build-system)
2771 `(("python-click" ,python-click)
2772 ("python-redis" ,python-redis)))
2773 (home-page "http://python-rq.org/")
2774 (synopsis "Simple job queues for Python")
2776 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2777 processing them in the background with workers. It is backed by Redis and it
2778 is designed to have a low barrier to entry.")
2779 (license license:bsd-2)))
2781 (define-public python2-rq
2782 (package-with-python2 python-rq))
2784 (define-public python-trollius-redis
2786 (name "python-trollius-redis")
2791 (uri (pypi-uri "trollius_redis" version))
2794 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2795 (build-system python-build-system)
2796 ;; TODO: Tests require packaging 'hiredis'.
2797 (arguments '(#:tests? #f))
2798 (home-page "https://github.com/benjolitz/trollius-redis")
2799 (synopsis "Port of asyncio-redis to trollius")
2800 (description "@code{trollius-redis} is a Redis client for Python
2801 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2803 (license license:bsd-2)))
2805 (define-public python2-trollius-redis
2806 (package-with-python2 python-trollius-redis))
2808 (define-public python-sqlparse
2810 (name "python-sqlparse")
2814 (uri (pypi-uri "sqlparse" version))
2817 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2818 (build-system python-build-system)
2821 (modify-phases %standard-phases
2823 (lambda _ (invoke "py.test"))))))
2825 `(("python-pytest" ,python-pytest)))
2826 (home-page "https://github.com/andialbrecht/sqlparse")
2827 (synopsis "Non-validating SQL parser")
2828 (description "Sqlparse is a non-validating SQL parser for Python. It
2829 provides support for parsing, splitting and formatting SQL statements.")
2830 (license license:bsd-3)))
2832 (define-public python2-sqlparse
2833 (package-with-python2 python-sqlparse))
2835 (define-public python-sql
2842 (uri (pypi-uri "python-sql" version))
2844 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
2845 (build-system python-build-system)
2846 (home-page "https://python-sql.tryton.org/")
2847 (synopsis "Library to write SQL queries in a pythonic way")
2848 (description "@code{python-sql} is a library to write SQL queries, that
2849 transforms idiomatic python function calls to well-formed SQL queries.")
2850 (license license:bsd-3)))
2852 (define-public python2-sql
2853 (package-with-python2 python-sql))
2855 (define-public mongo-tools
2857 (name "mongo-tools")
2860 (origin (method git-fetch)
2862 (url "https://github.com/mongodb/mongo-tools")
2863 (commit (string-append "r" version))))
2864 (file-name (git-file-name name version))
2867 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
2868 (build-system go-build-system)
2870 `(#:import-path "github.com/mongodb/mongo-tools"
2871 #:modules ((srfi srfi-1)
2872 (guix build go-build-system)
2874 #:install-source? #f
2877 '("bsondump" "mongodump" "mongoexport" "mongofiles"
2878 "mongoimport" "mongooplog" "mongorestore"
2879 "mongostat" "mongotop")))
2880 (modify-phases %standard-phases
2881 (add-after 'unpack 'delete-bundled-source-code
2883 (delete-file-recursively
2884 "src/github.com/mongodb/mongo-tools/vendor")
2886 (add-after 'delete-bundled-source-code 'patch-source
2888 ;; Remove a redundant argument that causes compilation to fail.
2890 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
2891 (("skipping restore of system.profile collection\", db)")
2892 "skipping restore of system.profile collection\")"))
2896 (for-each (lambda (tool)
2899 ;; This is where the tests expect to find the
2901 "-o" ,(string-append
2902 "src/github.com/mongodb/mongo-tools/bin/"
2905 "-tags=\"ssl sasl\""
2907 "-extldflags=-Wl,-z,now,-z,relro"
2909 "src/github.com/mongodb/mongo-tools/"
2910 tool "/main/" tool ".go"))))
2911 (simple-format #t "build: running ~A\n"
2912 (string-join command))
2913 (apply invoke command)))
2918 (with-directory-excursion "src"
2919 (for-each (lambda (tool)
2922 (string-append "github.com/mongodb/mongo-tools/"
2927 (lambda* (#:key outputs #:allow-other-keys)
2928 (for-each (lambda (tool)
2930 (string-append "src/github.com/mongodb/mongo-tools/bin/"
2932 (string-append (assoc-ref outputs "out")
2937 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
2938 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
2939 ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
2940 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
2941 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
2942 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
2943 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
2944 (home-page "https://github.com/mongodb/mongo-tools")
2945 (synopsis "Various tools for interacting with MongoDB and BSON")
2947 "This package includes a collection of tools related to MongoDB.
2950 Display BSON files in a human-readable format
2952 Convert data from JSON, TSV or CSV and insert them into a collection
2954 Write an existing collection to CSV or JSON format
2955 @item mongodump/mongorestore
2956 Dump MongoDB backups to disk in the BSON format
2958 Read MongoDB backups in the BSON format, and restore them to a live database
2960 Monitor live MongoDB servers, replica sets, or sharded clusters
2962 Read, write, delete, or update files in GridFS
2964 Replay oplog entries between MongoDB servers
2966 Monitor read/write activity on a mongo server
2968 (license license:asl2.0)))
2970 (define-public apache-arrow
2972 (name "apache-arrow")
2978 (url "https://github.com/apache/arrow")
2979 (commit (string-append "apache-arrow-" version))))
2980 (file-name (git-file-name name version))
2983 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
2984 (build-system cmake-build-system)
2988 (modify-phases %standard-phases
2989 (add-before 'configure 'enter-source-directory
2990 (lambda _ (chdir "cpp") #t))
2991 (add-after 'unpack 'set-env
2993 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
2994 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
2995 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
2996 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
2997 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
2999 #:build-type "Release"
3001 (list "-DARROW_PYTHON=ON"
3003 ;; Install to PREFIX/lib (the default is
3005 (string-append "-DCMAKE_INSTALL_LIBDIR="
3006 (assoc-ref %outputs "out")
3009 ;; XXX These Guix package offer static
3010 ;; libraries that are not position independent,
3011 ;; and ld fails to link them into the arrow .so
3012 "-DARROW_WITH_SNAPPY=OFF"
3013 "-DARROW_WITH_ZLIB=OFF"
3014 "-DARROW_WITH_ZSTD=OFF"
3015 "-DARROW_WITH_LZ4=OFF"
3017 ;; Building the tests forces on all the
3018 ;; optional features and the use of static
3020 "-DARROW_BUILD_TESTS=OFF"
3021 "-DARROW_BUILD_STATIC=OFF")))
3024 ("rapidjson" ,rapidjson)
3025 ("brotli" ,google-brotli)
3026 ("flatbuffers" ,flatbuffers)
3027 ("jemalloc" ,jemalloc)
3028 ("python-3" ,python)
3029 ("python-numpy" ,python-numpy)))
3030 (home-page "https://arrow.apache.org/")
3031 (synopsis "Columnar in-memory analytics")
3032 (description "Apache Arrow is a columnar in-memory analytics layer
3033 designed to accelerate big data. It houses a set of canonical in-memory
3034 representations of flat and hierarchical data along with multiple
3035 language-bindings for structure manipulation. It also provides IPC and common
3036 algorithm implementations.")
3037 (license license:asl2.0)))
3039 (define-public python-pyarrow
3041 (name "python-pyarrow")
3047 (url "https://github.com/apache/arrow")
3048 (commit (string-append "apache-arrow-" version))))
3049 (file-name (git-file-name name version))
3052 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3053 (build-system python-build-system)
3055 '(#:tests? #f ; XXX There are no tests in the "python" directory
3057 (modify-phases %standard-phases
3058 (delete 'build) ; XXX the build is performed again during the install phase
3059 (add-after 'unpack 'enter-source-directory
3060 (lambda _ (chdir "python") #t))
3061 (add-after 'unpack 'set-env
3063 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3066 `(("apache-arrow" ,apache-arrow)
3067 ("python-numpy" ,python-numpy)
3068 ("python-pandas" ,python-pandas)
3069 ("python-six" ,python-six)))
3072 ("python-cython" ,python-cython)
3073 ("python-pytest" ,python-pytest)
3074 ("python-pytest-runner" ,python-pytest-runner)
3075 ("python-setuptools-scm" ,python-setuptools-scm)))
3076 (home-page "https://arrow.apache.org/docs/python/")
3077 (synopsis "Python bindings for Apache Arrow")
3078 (description "This library provides a Pythonic API wrapper for the reference
3079 Arrow C++ implementation, along with tools for interoperability with pandas,
3080 NumPy, and other traditional Python scientific computing packages.")
3081 (license license:asl2.0)))
3083 (define-public python2-pyarrow
3084 (package-with-python2 python-pyarrow))
3086 (define-public python-crate
3088 (name "python-crate")
3092 (uri (pypi-uri "crate" version))
3095 "0s3s7yg4m2zflg9q96aibwb5hizsn10ql63fsj6h5z624qkavnlp"))))
3096 (build-system python-build-system)
3098 `(("python-urllib3" ,python-urllib3)))
3099 (home-page "https://github.com/crate/crate-python")
3100 (synopsis "CrateDB Python client")
3102 "This package provides a Python client library for CrateDB.
3103 It implements the Python DB API 2.0 specification and includes support for
3105 (license license:asl2.0)))