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>
40 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
42 ;;; This file is part of GNU Guix.
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57 (define-module (gnu packages databases)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages admin)
60 #:use-module (gnu packages algebra)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages avahi)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages bash)
65 #:use-module (gnu packages bison)
66 #:use-module (gnu packages boost)
67 #:use-module (gnu packages check)
68 #:use-module (gnu packages cmake)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages crypto)
71 #:use-module (gnu packages curl)
72 #:use-module (gnu packages cyrus-sasl)
73 #:use-module (gnu packages dbm)
74 #:use-module (gnu packages emacs)
75 #:use-module (gnu packages flex)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnupg)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages time)
82 #:use-module (gnu packages golang)
83 #:use-module (gnu packages jemalloc)
84 #:use-module (gnu packages language)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages ncurses)
89 #:use-module (gnu packages onc-rpc)
90 #:use-module (gnu packages parallel)
91 #:use-module (gnu packages pcre)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages perl-check)
94 #:use-module (gnu packages perl-web)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages popt)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages python-crypto)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-science)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages rdf)
103 #:use-module (gnu packages readline)
104 #:use-module (gnu packages ruby)
105 #:use-module (gnu packages serialization)
106 #:use-module (gnu packages sphinx)
107 #:use-module (gnu packages sqlite)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages terminals)
110 #:use-module (gnu packages textutils)
111 #:use-module (gnu packages tls)
112 #:use-module (gnu packages valgrind)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages xml)
115 #:use-module ((guix licenses) #:prefix license:)
116 #:use-module (guix packages)
117 #:use-module (guix download)
118 #:use-module (guix bzr-download)
119 #:use-module (guix git-download)
120 #:use-module (guix build-system emacs)
121 #:use-module (guix build-system gnu)
122 #:use-module (guix build-system go)
123 #:use-module (guix build-system perl)
124 #:use-module (guix build-system python)
125 #:use-module (guix build-system ruby)
126 #:use-module (guix build-system cmake)
127 #:use-module (guix build-system scons)
128 #:use-module ((guix build utils) #:hide (which))
129 #:use-module (guix utils)
130 #:use-module (srfi srfi-1)
131 #:use-module (srfi srfi-26)
132 #:use-module (ice-9 match))
134 (define-public 4store
141 (url "https://github.com/4store/4store.git")
142 (commit (string-append "v" version))))
143 (file-name (git-file-name name version))
145 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
146 (patches (search-patches "4store-unset-preprocessor-directive.patch"
147 "4store-fix-buildsystem.patch"))))
148 (build-system gnu-build-system)
152 ("autoconf" ,autoconf)
153 ("automake" ,automake)
154 ("gettext" ,gettext-minimal)
156 ("pcre" ,pcre "bin") ;for 'pcre-config'
157 ("pkg-config" ,pkg-config)))
163 ("readline" ,readline)
165 ("cyrus-sasl" ,cyrus-sasl)
167 ("util-linux" ,util-linux)))
168 ;; http://www.4store.org has been down for a while now.
169 (home-page "https://github.com/4store/4store")
170 (synopsis "Clustered RDF storage and query engine")
171 (description "4store is a RDF/SPARQL store written in C, supporting
172 either single machines or networked clusters.")
173 (license license:gpl3+)))
175 (define-public go-gopkg.in-mgo.v2
177 (name "go-gopkg.in-mgo.v2")
178 (version "2016.08.01")
182 (url "https://github.com/go-mgo/mgo")
183 (commit (string-append "r" version))))
184 (file-name (git-file-name name version))
187 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
188 (build-system go-build-system)
190 `(#:import-path "gopkg.in/mgo.v2"
191 ;; TODO: The tests fail as MongoDB fails to start
192 ;; Error parsing command line: unrecognised option '--chunkSize'
195 (modify-phases %standard-phases
196 (delete 'reset-gzip-timestamps)
197 (add-before 'check 'start-mongodb
198 (lambda* (#:key tests? #:allow-other-keys)
200 (with-directory-excursion "src/gopkg.in/mgo.v2"
201 (invoke "make" "startdb")))
203 (add-after 'check 'stop'mongodb
204 (lambda* (#:key tests? #:allow-other-keys)
206 (with-directory-excursion "src/gopkg.in/mgo.v2"
207 (invoke "make" "stopdb")))
210 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
212 ("daemontools" ,daemontools)))
213 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
215 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
216 It implements a rich selection of features under a simple API following
217 standard Go idioms.")
218 (home-page "http://labix.org/mgo")
219 (license license:bsd-2)))
221 (define-public ephemeralpg
229 "http://eradman.com/ephemeralpg/code/ephemeralpg-"
232 (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4"))))
233 (build-system gnu-build-system)
235 '(#:make-flags (list "CC=gcc"
236 (string-append "PREFIX=" %output))
238 (modify-phases %standard-phases
241 (lambda* (#:key inputs #:allow-other-keys)
242 ;; The intention for one test is to test without PostgreSQL on
243 ;; the $PATH, so replace the test $PATH with just the util-linux
244 ;; bin, which contains getopt. It will hopefully be possible to
245 ;; remove this for releases after 2.8.
246 (substitute* "test.rb"
248 (string-append (assoc-ref inputs "util-linux")
250 ;; Set the LC_ALL=C as some tests use sort, and the locale
251 ;; affects the order. It will hopefully be possible to remove
252 ;; this for releases after 2.8.
253 (setenv "LC_ALL" "C")
254 (invoke "ruby" "test.rb")
256 (add-after 'install 'wrap
257 (lambda* (#:key inputs outputs #:allow-other-keys)
258 (let ((out (assoc-ref outputs "out")))
259 (wrap-program (string-append out "/bin/pg_tmp")
261 (,(string-append (assoc-ref inputs "util-linux")
263 ,(string-append (assoc-ref inputs "postgresql")
266 ,(string-append out "/bin")))))
269 `(("postgresql" ,postgresql)
270 ("util-linux" ,util-linux)))
273 (home-page "http://eradman.com/ephemeralpg/")
274 (synopsis "Run temporary PostgreSQL databases")
276 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
277 like running software test suites. Temporary databases created with
278 @code{pg_tmp} have a limited shared memory footprint and are automatically
279 garbage-collected after a configurable number of seconds (the default is
281 (license license:isc)))
283 (define-public es-dump-restore
285 (name "es-dump-restore")
290 (uri (rubygems-uri "es_dump_restore" version))
293 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
294 (build-system ruby-build-system)
296 '(#:tests? #f)) ;; No testsuite.
298 `(("ruby-httpclient" ,ruby-httpclient)
299 ("ruby-multi-json" ,ruby-multi-json)
300 ("ruby-progress_bar" ,ruby-progress_bar)
301 ("ruby-rubyzip" ,ruby-rubyzip)
302 ("ruby-thor" ,ruby-thor)))
303 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
305 "This package provides a utility for dumping the contents of an
306 ElasticSearch index to a compressed file and restoring the dumpfile back to an
307 ElasticSearch server")
308 (home-page "https://github.com/patientslikeme/es_dump_restore")
309 (license license:expat)))
311 (define-public leveldb
318 (url "https://github.com/google/leveldb")
320 (file-name (git-file-name name version))
323 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
324 (build-system cmake-build-system)
326 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
328 `(("snappy" ,snappy)))
329 (home-page "https://github.com/google/leveldb")
330 (synopsis "Fast key-value storage library")
332 "LevelDB is a fast key-value storage library that provides an ordered
333 mapping from string keys to string values.")
334 (license license:bsd-3)))
336 (define-public memcached
344 "https://memcached.org/files/memcached-" version ".tar.gz"))
346 (base32 "0nnccb697jhdn5gqrh3phibzs6xr4nf4ryv7nmyv5vf11n4jr8j5"))))
347 (build-system gnu-build-system)
349 `(("libevent" ,libevent)
350 ("cyrus-sasl" ,cyrus-sasl)))
351 (home-page "https://memcached.org/")
352 (synopsis "In-memory caching service")
353 (description "Memcached is an in-memory key-value store. It has a small
354 and generic API, and was originally intended for use with dynamic web
356 (license license:bsd-3)))
358 (define-public libmemcached
360 (name "libmemcached")
362 ;; We build from the sources since we want to build the extra HTML
363 ;; documentation which is not included with the release.
367 (url "lp:libmemcached/1.0")
368 (revision (string-append "tag:" version))))
369 (file-name (string-append name "-" version "-checkout"))
372 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))))
373 (build-system gnu-build-system)
375 `(("memcached" ,memcached)
377 ("autoconf" ,autoconf)
378 ("automake" ,automake)
382 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
384 `(("libevent" ,libevent)
385 ("cyrus-sasl" ,cyrus-sasl)))
386 (outputs '("out" "doc"))
389 (modify-phases %standard-phases
390 (add-before 'bootstrap 'fix-configure.ac
391 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
392 ;; get the error ``configure: error: cannot find install-sh,
393 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
394 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
395 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
397 (delete-file "bootstrap.sh") ;not useful in the context of Guix
398 (substitute* "configure.ac"
399 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
400 (("(^AC_INIT.*)" anchor)
401 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
403 (add-before 'bootstrap 'disable-failing-tests
404 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
406 ;; Mark some heavily failing test suites as expected to fail.
407 (substitute* "Makefile.am"
408 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
409 (string-append xfail_tests " tests/testudp"
410 " tests/libmemcached-1.0/testapp"
411 " tests/libmemcached-1.0/testsocket")))
412 ;; Disable two tests of the unittest test suite.
413 (substitute* "libtest/unittest.cc"
414 ((".*echo_fubar_BINARY \\},.*") "")
415 ((".*application_doesnotexist_BINARY \\},.*") ""))
417 (add-after 'disable-dns-tests 'build-and-install-html-doc
418 (lambda* (#:key outputs #:allow-other-keys)
419 (let ((html (string-append (assoc-ref outputs "doc")
420 "/share/doc/libmemcached/html/")))
421 (invoke "make" "install-html")
422 ;; Cleanup useless files.
423 (for-each delete-file-recursively
424 (map (lambda (x) (string-append html x))
425 '("_sources" ".doctrees" ".buildinfo"))))
427 (home-page "https://libmemcached.org/")
428 (synopsis "C++ library for memcached")
429 (description "libMemcached is a library to use memcached in C/C++
430 applications. It comes with a complete reference guide and documentation of
431 the API, and provides features such as:
433 @item Asynchronous and synchronous transport support
434 @item Consistent hashing and distribution
435 @item Tunable hashing algorithm to match keys
436 @item Access to large object support
437 @item Local replication
439 (license license:bsd-3)))
441 (define-public python-pylibmc
443 (name "python-pylibmc")
448 (uri (pypi-uri "pylibmc" version))
450 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
451 (build-system python-build-system)
454 (modify-phases %standard-phases
455 (add-before 'check 'start-memcached-daemon
456 ;; The test suite requires a memcached server.
458 (invoke "memcached" "-d"))))))
460 `(("memcached" ,memcached)
461 ("python-nose" ,python-nose)))
463 `(("libmemcached" ,libmemcached)
465 ("cyrus-sasl" ,cyrus-sasl)))
466 (home-page "http://sendapatch.se/projects/pylibmc/")
467 (synopsis "Python client for memcached")
469 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
470 around TangentOrg’s libmemcached library, and can be used as a drop-in
471 replacement for the code@{python-memcached} library.")
472 (license license:bsd-3)))
474 (define-public python2-pylibmc
475 (package-with-python2 python-pylibmc))
477 (define-public mongodb
483 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
485 (file-name (string-append name "-" version ".tar.gz"))
487 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
488 (modules '((guix build utils)))
491 (for-each (lambda (dir)
492 (delete-file-recursively
493 (string-append "src/third_party/" dir)))
494 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
495 "valgrind-3.11.0" "wiredtiger"
496 "yaml-cpp-0.5.3" "zlib-1.2.8"))
500 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
501 (build-system scons-build-system)
503 `(("openssl" ,openssl-1.0)
505 ,@(match (%current-system)
506 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
507 `(("wiredtiger" ,wiredtiger)))
509 ("yaml-cpp" ,yaml-cpp)
513 `(("valgrind" ,valgrind)
516 ("python2-pymongo" ,python2-pymongo)
517 ("python2-pyyaml" ,python2-pyyaml)
520 `(#:scons ,scons-python2
522 (let ((common-options
523 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
525 ;; wiredtiger is 64-bit only
526 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
528 '("i686-linux" "armhf-linux"))
530 ``"--use-system-wiredtiger")
532 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
533 ;; --use-system-boost
534 "--use-system-snappy"
536 "--use-system-valgrind"
537 ;; "--use-system-stemmer" TODO: Missing relevant package
539 "--disable-warnings-as-errors"
540 ,(format #f "--jobs=~a" (parallel-job-count))
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch
545 ;; Remove use of GNU extensions in parse_number_test.cpp, to
546 ;; allow compiling with GCC 7 or later
547 ;; https://jira.mongodb.org/browse/SERVER-28063
548 (substitute* "src/mongo/base/parse_number_test.cpp"
549 (("0xabcab\\.defdefP-10")
550 "687.16784283419838"))
552 (add-after 'unpack 'scons-propagate-environment
554 ;; Modify the SConstruct file to arrange for
555 ;; environment variables to be propagated.
556 (substitute* "SConstruct"
557 (("^env = Environment\\(")
558 "env = Environment(ENV=os.environ, "))
560 (add-after 'unpack 'create-version-file
562 (call-with-output-file "version.json"
564 (display ,(simple-format #f "{
570 (apply invoke `("scons"
572 "mongod" "mongo" "mongos"))))
574 (lambda* (#:key tests? inputs #:allow-other-keys)
576 (string-append (assoc-ref inputs "tzdata")
579 ;; Note that with the tests, especially the unittests, the
580 ;; build can take up to ~45GB of space, as many tests are
581 ;; individual executable files, with some being hundreds of
582 ;; megabytes in size.
583 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
584 (substitute* "build/unittests.txt"
585 ;; TODO: Don't run the async_stream_test, as it hangs
586 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
588 ;; TODO: This test fails
589 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
590 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
592 (invoke "python" "buildscripts/resmoke.py"
593 "--suites=dbtest,unittests"
594 (format #f "--jobs=~a" (parallel-job-count))))
597 (lambda* (#:key outputs #:allow-other-keys)
598 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
599 (install-file "mongod" bin)
600 (install-file "mongos" bin)
601 (install-file "mongo" bin))
603 (home-page "https://www.mongodb.org/")
604 (synopsis "High performance and high availability document database")
606 "Mongo is a high-performance, high availability, schema-free
607 document-oriented database. A key goal of MongoDB is to bridge the gap
608 between key/value stores (which are fast and highly scalable) and traditional
609 RDBMS systems (which are deep in functionality).")
610 (license (list license:agpl3
611 ;; Some parts are licensed under the Apache License
614 ;; XXX When updating, check whether boost-for-mysql is still needed.
615 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
622 (uri (list (string-append
623 "https://dev.mysql.com/get/Downloads/MySQL-"
624 (version-major+minor version) "/"
625 name "-" version ".tar.gz")
627 "https://downloads.mysql.com/archives/get/file/"
628 name "-" version ".tar.gz")))
631 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
632 (build-system cmake-build-system)
635 '("-DBUILD_CONFIG=mysql_release"
638 "-DDEFAULT_CHARSET=utf8"
639 "-DDEFAULT_COLLATION=utf8_general_ci"
640 "-DMYSQL_DATADIR=/var/lib/mysql"
641 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
642 "-DINSTALL_INFODIR=share/mysql/docs"
643 "-DINSTALL_MANDIR=share/man"
644 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
645 "-DINSTALL_SCRIPTDIR=bin"
646 "-DINSTALL_INCLUDEDIR=include/mysql"
647 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
648 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
649 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
650 "-DINSTALL_DOCDIR=share/mysql/docs"
651 "-DINSTALL_SHAREDIR=share/mysql"
652 ;; Get rid of test data.
653 "-DINSTALL_MYSQLTESTDIR="
654 "-DINSTALL_SQLBENCHDIR=")
655 #:phases (modify-phases %standard-phases
657 'install 'remove-extra-binaries
658 (lambda* (#:key outputs #:allow-other-keys)
659 (let ((out (assoc-ref outputs "out")))
660 ;; Remove the 3 *_embedded files, which weigh in at
662 (for-each delete-file
663 (find-files (string-append out "/bin")
669 ("pkg-config" ,pkg-config)))
671 `(("boost" ,boost-for-mysql)
673 ("libtirpc" ,libtirpc)
676 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
678 (home-page "https://www.mysql.com/")
679 (synopsis "Fast, easy to use, and popular database")
681 "MySQL is a fast, reliable, and easy to use relational database
682 management system that supports the standardized Structured Query
684 (license license:gpl2)))
686 (define-public mariadb
692 (uri (string-append "https://downloads.mariadb.com/MariaDB"
693 "/mariadb-" version "/source/mariadb-"
697 "1wh0073lqw3d9xs150bf2q3qvjwa6886mfi9khmsn7p8vapw6irb"))
698 (patches (search-patches "mariadb-client-test-32bit.patch"))
699 (modules '((guix build utils)))
702 ;; Delete bundled snappy and xz.
703 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
704 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
705 ;; This file checks that the bundled sources are present and
706 ;; declares build procedures for them.
707 (("^include\\(TokuThirdParty\\)") ""))
708 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
709 ;; Don't attempt to use the procedures we just removed.
710 ((" build_lzma build_snappy") ""))
712 ;; Preserve CMakeLists.txt for these.
713 (for-each (lambda (file)
714 (unless (string-suffix? "CMakeLists.txt" file)
716 (append (find-files "extra/yassl")
717 (find-files "pcre") (find-files "zlib")))
719 (build-system cmake-build-system)
720 (outputs '("out" "lib" "dev"))
724 "-DBUILD_CONFIG=mysql_release"
725 ;; Linking with libarchive fails, like this:
727 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
728 ;; relocation R_X86_64_32 against `.bss' can not be used when
729 ;; making a shared object; recompile with -fPIC
731 ;; For now, disable the features that that use libarchive (xtrabackup).
732 "-DWITH_LIBARCHIVE=OFF"
734 ;; Disable the TokuDB engine, because its test suite frequently fails,
735 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
738 ;; Ensure the system libraries are used.
739 "-DWITH_JEMALLOC=yes"
744 "-DDEFAULT_CHARSET=utf8"
745 "-DDEFAULT_COLLATION=utf8_general_ci"
746 "-DMYSQL_DATADIR=/var/lib/mysql"
747 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
748 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
749 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
751 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
753 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
755 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
756 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
757 "-DCMAKE_INSTALL_LIBDIR=lib"
758 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
759 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
761 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
763 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
765 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
766 "/share/mysql/support-files")
767 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
768 "-DINSTALL_SHAREDIR=share")
770 (modify-phases %standard-phases
771 (add-after 'unpack 'fix-pcre-detection
773 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
774 ;; in version 8.34. Unfortunately the upstream patch behaves
775 ;; slightly differently and the build system fails to detect it.
776 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
777 ;; XXX: Consider patching PCRE instead.
778 (substitute* "cmake/pcre.cmake"
779 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
781 (add-after 'unpack 'adjust-tests
783 (let ((disabled-tests
784 '(;; These fail because root@hostname == root@localhost in
785 ;; the build environment, causing a user count mismatch.
786 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
788 "main.explain_non_select"
789 "main.stat_tables_innodb"
790 "roles.acl_statistics"
792 ;; This file contains a time bomb which makes it fail after
793 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
796 ;; FIXME: This test fails on i686:
797 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
798 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
799 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
800 ;; (all three tables must exist and be identical)
801 ;; in a loop it produces the same error around 1/240 times.
802 ;; montywi on #maria suggested removing the real_end check in
803 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
804 ;; reach the ending quote occasionally. Disable it for now.
806 ;; FIXME: This test fails on armhf-linux:
807 "mroonga/storage.index_read_multiple_double"))
809 ;; This file contains a list of known-flaky tests for this
810 ;; release. Append our own items.
811 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
812 (for-each (lambda (test)
813 (format unstable-tests "~a : ~a\n"
814 test "Disabled in Guix"))
816 (close-port unstable-tests)
818 (substitute* "mysql-test/mysql-test-run.pl"
819 (("/bin/ls") (which "ls"))
820 (("/bin/sh") (which "sh")))
822 (add-before 'configure 'disable-plugins
824 (let ((disable-plugin (lambda (name)
825 (call-with-output-file
826 (string-append "plugin/" name
829 (format port "\n")))))
830 (disabled-plugins '(;; XXX: Causes a test failure.
832 (for-each disable-plugin disabled-plugins)
835 (lambda* (#:key (tests? #t) #:allow-other-keys)
837 (with-directory-excursion "mysql-test"
838 (invoke "./mtr" "--verbose"
840 "--testcase-timeout=40"
841 "--suite-timeout=600"
842 "--parallel" (number->string (parallel-job-count))
843 "--skip-test-list=unstable-tests"))
844 (format #t "test suite not run~%"))
847 'install 'post-install
848 (lambda* (#:key outputs #:allow-other-keys)
849 (let* ((out (assoc-ref outputs "out"))
850 (dev (assoc-ref outputs "dev"))
851 (lib (assoc-ref outputs "lib")))
852 (substitute* (string-append out "/bin/mysql_install_db")
854 (string-append "basedir=\"" out "\"")))
855 ;; Remove unneeded files for testing.
856 (with-directory-excursion lib
857 (for-each delete-file-recursively
858 '("data" "mysql-test" "sql-bench"))
859 ;; And static libraries.
860 (for-each delete-file (find-files "lib" "\\.a$")))
861 (with-directory-excursion out
862 (delete-file "share/man/man1/mysql-test-run.pl.1")
863 ;; Delete huge and unnecessary executables.
864 (for-each delete-file (find-files "bin" "(test|embedded)")))
865 (mkdir-p (string-append dev "/share"))
866 (mkdir-p (string-append dev "/bin"))
867 (rename-file (string-append lib "/bin/mysqld")
868 (string-append out "/bin/mysqld"))
869 (rename-file (string-append lib "/share/pkgconfig")
870 (string-append dev "/share/pkgconfig"))
871 (rename-file (string-append out "/bin/mysql_config")
872 (string-append dev "/bin/mysql_config"))
876 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
877 ,@(if (string-prefix? "armhf" (%current-system))
882 `(("jemalloc" ,jemalloc)
890 ;; mariadb.pc says -lssl -lcrypto, so propagate it.
891 `(("openssl" ,openssl-1.0)))
892 ;; The test suite is very resource intensive and can take more than three
893 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
894 (properties '((timeout . 64800))) ;18 hours
895 (home-page "https://mariadb.org/")
896 (synopsis "SQL database server")
898 "MariaDB is a multi-user and multi-threaded SQL database server, designed
899 as a drop-in replacement of MySQL.")
900 (license license:gpl2)))
902 ;; Don't forget to update the other postgresql packages when upgrading this one.
903 (define-public postgresql
909 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
910 version "/postgresql-" version ".tar.bz2"))
913 "0lzj46dwd9cw94gnqm36bxd7jlhfdyqjrfzr3c4xd3prfn2rnkxd"))
914 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
915 (build-system gnu-build-system)
917 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
919 (modify-phases %standard-phases
920 (add-before 'configure 'patch-/bin/sh
922 ;; Refer to the actual shell.
923 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
924 "src/bin/psql/command.c")
925 (("/bin/sh") (which "sh")))
927 (add-after 'build 'build-contrib
929 (invoke "make" "-C" "contrib")))
930 (add-after 'install 'install-contrib
932 (invoke "make" "-C" "contrib" "install"))))))
934 `(("readline" ,readline)
935 ("libuuid" ,util-linux)
938 (home-page "https://www.postgresql.org/")
939 (synopsis "Powerful object-relational database system")
941 "PostgreSQL is a powerful object-relational database system. It is fully
942 ACID compliant, has full support for foreign keys, joins, views, triggers, and
943 stored procedures (in multiple languages). It includes most SQL:2008 data
944 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
945 TIMESTAMP. It also supports storage of binary large objects, including
946 pictures, sounds, or video.")
947 (license (license:x11-style "file://COPYRIGHT"))))
949 (define-public postgresql-11
956 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
957 version "/postgresql-" version ".tar.bz2"))
960 "106ikalvrilihlvhq7xj7snq98hgbgq6qsgjrd252wgw1c327pvz"))))))
962 (define-public postgresql-9.6
969 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
970 version "/postgresql-" version ".tar.bz2"))
973 "02hp69h2p02asfblkaahblzdz2zmawd2r11h6237y5j7yadgxn9w"))))))
975 (define-public python-pymysql
977 (name "python-pymysql")
982 (uri (pypi-uri "PyMySQL" version))
984 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
985 (build-system python-build-system)
987 `(("python-unittest2" ,python-unittest2)))
989 `(("python-cryptography" ,python-cryptography)))
991 `(#:tests? #f)) ; tests expect a running MySQL
992 (home-page "https://github.com/PyMySQL/PyMySQL/")
993 (synopsis "Pure-Python MySQL driver")
995 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
996 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
997 (license license:expat)))
999 (define-public python2-pymysql
1000 (package-with-python2 python-pymysql))
1009 (uri (string-append "http://fallabs.com/" name "/"
1010 name "-" version ".tar.gz"))
1013 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1014 (build-system gnu-build-system)
1016 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1017 (assoc-ref %outputs "out")
1019 (home-page "http://fallabs.com/qdbm")
1020 (synopsis "Key-value database")
1021 (description "QDBM is a library of routines for managing a
1022 database. The database is a simple data file containing key-value
1023 pairs. Every key and value is serial bytes with variable length.
1024 Binary data as well as character strings can be used as a key or a
1025 value. There is no concept of data tables or data types. Records are
1026 organized in a hash table or B+ tree.")
1027 (license license:lgpl2.1+)))
1029 (define-public recutils
1035 (uri (string-append "mirror://gnu/recutils/recutils-"
1039 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1040 (build-system gnu-build-system)
1042 (arguments '(#:configure-flags
1043 (list (string-append "--with-bash-headers="
1044 (assoc-ref %build-inputs "bash:include")
1047 (native-inputs `(("bc" ,bc)
1048 ("bash:include" ,bash "include")
1050 ("libuuid" ,util-linux)
1051 ("pkg-config" ,pkg-config)))
1053 ;; TODO: Add more optional inputs.
1054 (inputs `(("curl" ,curl)
1055 ("libgcrypt" ,libgcrypt)))
1056 (synopsis "Manipulate plain text files as databases")
1058 "GNU Recutils is a set of tools and libraries for creating and
1059 manipulating text-based, human-editable databases. Despite being text-based,
1060 databases created with Recutils carry all of the expected features such as
1061 unique fields, primary keys, time stamps and more. Many different field
1062 types are supported, as is encryption.")
1063 (license license:gpl3+)
1064 (home-page "https://www.gnu.org/software/recutils/")))
1066 (define-public emacs-recutils
1069 (name "emacs-recutils")
1070 (build-system emacs-build-system)
1073 (modify-phases %standard-phases
1074 (add-after 'unpack 'change-directory
1080 (synopsis "Emacs mode for working with recutils database files")
1081 (description "This package provides an Emacs major mode @code{rec-mode}
1082 for working with GNU Recutils text-based, human-editable databases. It
1083 supports editing, navigation, and querying of recutils database files
1084 including field and record folding.")))
1086 (define-public rocksdb
1093 (url "https://github.com/facebook/rocksdb")
1094 (commit (string-append "v" version))))
1095 (file-name (git-file-name name version))
1098 "1v2slmmr1dsgf8z0qcfg1y9x1al96859rg48b66p9nsawczd5zv9"))
1099 (modules '((guix build utils)))
1102 ;; TODO: unbundle gtest.
1103 (delete-file "build_tools/gnu_parallel")
1104 (substitute* "Makefile"
1105 (("build_tools/gnu_parallel") "parallel"))
1107 (build-system gnu-build-system)
1109 `(#:make-flags (list "CC=gcc" "V=1"
1110 ;; Ceph requires that RTTI is enabled.
1112 (string-append "INSTALL_PATH="
1113 (assoc-ref %outputs "out"))
1115 ;; Running the full test suite takes hours and require
1116 ;; a lot of disk space. Instead we only run a subset
1117 ;; (see .travis.yml and Makefile).
1118 "ROCKSDBTESTS_END=db_tailing_iter_test")
1119 #:test-target "check_some"
1120 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1121 ;; this upstream, but it's not going to be supported any time soon.
1122 #:tests? (let ((system ,(or (%current-target-system)
1123 (%current-system))))
1124 (or (string-prefix? "x86_64-linux" system)
1125 (string-prefix? "aarch64-linux" system)))
1127 (modify-phases %standard-phases
1128 (add-after 'unpack 'patch-Makefile
1130 (substitute* "Makefile"
1131 ;; Don't depend on the static library when installing.
1132 (("install: install-static")
1133 "install: install-shared")
1134 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1137 ;; The default target is only needed for tests and built on demand.
1139 (add-before 'check 'disable-optimizations
1141 ;; Prevent the build from passing '-march=native' to the compiler.
1142 (setenv "PORTABLE" "1")
1144 (add-before 'check 'disable-failing-tests
1146 (substitute* "Makefile"
1147 ;; These tests reliably fail due to "Too many open files".
1148 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1149 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1151 (add-after 'check 'build
1152 ;; The default build target is a debug build for tests. The
1153 ;; install target depends on the "shared_lib" release target
1154 ;; so we build it here for clarity.
1155 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1156 (apply invoke "make" "shared_lib"
1157 `(,@(if parallel-build?
1158 `("-j" ,(number->string (parallel-job-count)))
1162 `(("parallel" ,parallel)
1165 ("python" ,python-2)
1170 ("jemalloc" ,jemalloc)
1174 (home-page "http://rocksdb.org/")
1175 (synopsis "Persistent key-value store for fast storage")
1177 "RocksDB is a library that forms the core building block for a fast
1178 key-value server, especially suited for storing data on flash drives. It
1179 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1180 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1181 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1182 compactions, making it specially suitable for storing multiple terabytes of
1183 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1184 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1185 ;; files carry the 3-clause BSD license.
1186 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1188 (define-public sparql-query
1190 (name "sparql-query")
1194 (uri (string-append "https://github.com/tialaramex/"
1195 name "/archive/" version ".tar.gz"))
1197 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1198 (file-name (string-append name "-" version ".tar.gz"))))
1199 (build-system gnu-build-system)
1201 `(("readline" ,readline)
1202 ("ncurses" ,ncurses)
1204 ("libxml2" ,libxml2)
1207 `(("pkg-config" ,pkg-config)))
1209 `(#:make-flags '("CC=gcc")
1211 (modify-phases %standard-phases
1213 ;; The Makefile uses git to obtain versioning information. This phase
1214 ;; substitutes the git invocation with the package version.
1215 (add-after 'unpack 'remove-git-dependency
1217 (substitute* "Makefile"
1219 (string-append "gitrev = \"v" ,version "\"")))
1221 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1222 ;; This replacement does the same thing, except for using $PREFIX/bin
1225 (lambda* (#:key outputs #:allow-other-keys)
1226 (let* ((out (assoc-ref outputs "out"))
1227 (bin (string-append out "/bin")))
1228 (install-file "sparql-query" bin)
1229 (symlink (string-append bin "/sparql-query")
1230 (string-append bin "/sparql-update")))
1233 (lambda* (#:key make-flags #:allow-other-keys)
1234 (apply invoke "make" `(,@make-flags "scan-test"))
1235 (invoke "./scan-test"))))))
1236 (home-page "https://github.com/tialaramex/sparql-query/")
1237 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1238 (description "Sparql-query is a command-line tool for accessing SPARQL
1239 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1240 tools for interrogating SQL databases. For example, you can enter a query over
1241 several lines, using a semi-colon at the end of a line to indicate the end of
1242 your query. It also supports readline so that you can more easily recall and
1243 edit previous queries, even across sessions. It can be used non-interactively,
1244 for example from a shell script.")
1245 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1246 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1247 (license (list license:gpl3+))))
1249 (define-public sqitch
1257 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1260 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1261 (build-system perl-build-system)
1264 (modify-phases %standard-phases
1265 (add-before 'check 'set-check-environment
1268 (setenv "HOME" "/tmp")
1270 (add-after 'install 'wrap-program
1271 (lambda* (#:key outputs #:allow-other-keys)
1272 (let* ((out (assoc-ref outputs "out"))
1273 (path (getenv "PERL5LIB")))
1274 (wrap-program (string-append out "/bin/sqitch")
1275 `("PERL5LIB" ":" prefix
1276 (,(string-append out "/lib/perl5/site_perl"
1281 `(("perl-capture-tiny" ,perl-capture-tiny)
1282 ("perl-io-pager" ,perl-io-pager)
1283 ("perl-module-build" ,perl-module-build)
1284 ("perl-module-runtime" ,perl-module-runtime)
1285 ("perl-path-class" ,perl-path-class)
1286 ("perl-test-deep" ,perl-test-deep)
1287 ("perl-test-dir" ,perl-test-dir)
1288 ("perl-test-exception" ,perl-test-exception)
1289 ("perl-test-file" ,perl-test-file)
1290 ("perl-test-file-contents" ,perl-test-file-contents)
1291 ("perl-test-mockmodule" ,perl-test-mockmodule)
1292 ("perl-test-nowarnings" ,perl-test-nowarnings)
1293 ("perl-test-warn" ,perl-test-warn)))
1295 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1296 ("perl-clone" ,perl-clone)
1297 ("perl-config-gitlike" ,perl-config-gitlike)
1298 ("perl-datetime" ,perl-datetime)
1299 ("perl-datetime-timezone" ,perl-datetime-timezone)
1300 ("perl-dbd-pg" ,perl-dbd-pg)
1301 ("perl-dbi" ,perl-dbi)
1302 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1303 ("perl-encode-locale" ,perl-encode-locale)
1304 ("perl-hash-merge" ,perl-hash-merge)
1305 ("perl-ipc-run3" ,perl-ipc-run3)
1306 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1307 ("perl-libintl-perl" ,perl-libintl-perl)
1308 ("perl-list-moreutils" ,perl-list-moreutils)
1309 ("perl-moo" ,perl-moo)
1310 ("perl-mysql-config" ,perl-mysql-config)
1311 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1312 ("perl-path-class" ,perl-path-class)
1313 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1314 ("perl-string-formatter" ,perl-string-formatter)
1315 ("perl-string-shellquote" ,perl-string-shellquote)
1316 ("perl-sub-exporter" ,perl-sub-exporter)
1317 ("perl-template-tiny" ,perl-template-tiny)
1318 ("perl-template-toolkit" ,perl-template-toolkit)
1319 ("perl-throwable" ,perl-throwable)
1320 ("perl-try-tiny" ,perl-try-tiny)
1321 ("perl-type-tiny" ,perl-type-tiny)
1322 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1323 ("perl-uri" ,perl-uri)
1324 ("perl-uri-db" ,perl-uri-db)))
1325 (home-page "https://sqitch.org/")
1326 (synopsis "Database change management tool")
1328 "Sqitch is a standalone change management system for database schemas,
1329 which uses SQL to describe changes.")
1330 (license license:x11)))
1332 (define-public sqlcrush
1333 ;; Unfortunately, there is no proper upstream release and may never be.
1334 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1338 (version (git-version "0.1.5" revision commit))
1342 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1344 (file-name (git-file-name name version))
1347 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1348 (build-system python-build-system)
1350 `(("python-cryptography" ,python-cryptography)
1351 ("python-psycopg2" ,python-psycopg2)
1352 ("python-pymysql" ,python-pymysql)
1353 ("python-sqlalchemy" ,python-sqlalchemy)))
1354 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1355 (synopsis "Text console-based database viewer and editor")
1357 "SQLcrush lets you view and edit a database directly from the text
1358 console through an ncurses interface. You can explore each table's structure,
1359 browse and edit the contents, add and delete entries, all while tracking your
1361 (license license:gpl3+)))) ; no headers, see README.md
1369 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1373 "0jh0iqbb6pkvqrqn033w5g6gwa4bdgkvp49z0qpkk3h2wk6b4h4h"))))
1374 (build-system gnu-build-system)
1377 (modify-phases %standard-phases
1379 (lambda* (#:key outputs #:allow-other-keys)
1380 (let ((out (assoc-ref outputs "out")))
1381 ;; The 'configure' script is a wrapper for Waf and
1382 ;; doesn't recognize things like '--enable-fast-install'.
1383 (invoke "./configure"
1384 (string-append "--prefix=" out))))))))
1386 `(;; TODO: Build the documentation.
1387 ;; ("docbook-xsl" ,docbook-xsl)
1388 ;; ("libxml2" ,libxml2)
1389 ;; ("libxslt" ,libxslt)
1390 ("python" ,python) ;for the Waf build system
1392 (home-page "https://tdb.samba.org/")
1393 (synopsis "Trivial database")
1395 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1396 and BSD's DB except that it allows multiple simultaneous writers and uses
1397 locking internally to keep writers from trampling on each other. TDB is also
1399 (license license:lgpl3+)))
1401 (define-public perl-dbi
1408 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1412 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1413 (build-system perl-build-system)
1414 (synopsis "Database independent interface for Perl")
1415 (description "This package provides an database interface for Perl.")
1416 (home-page "https://metacpan.org/release/DBI")
1417 (license license:perl-license)))
1419 (define-public perl-dbix-class
1421 (name "perl-dbix-class")
1422 (version "0.082841")
1426 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1427 "DBIx-Class-" version ".tar.gz"))
1430 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1431 (build-system perl-build-system)
1433 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1434 ("perl-file-temp" ,perl-file-temp)
1435 ("perl-module-install" ,perl-module-install)
1436 ("perl-package-stash" ,perl-package-stash)
1437 ("perl-test-deep" ,perl-test-deep)
1438 ("perl-test-exception" ,perl-test-exception)
1439 ("perl-test-warn" ,perl-test-warn)))
1441 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1442 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1443 ("perl-class-inspector" ,perl-class-inspector)
1444 ("perl-config-any" ,perl-config-any)
1445 ("perl-context-preserve" ,perl-context-preserve)
1446 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1447 ("perl-data-page" ,perl-data-page)
1448 ("perl-dbi" ,perl-dbi)
1449 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1450 ("perl-hash-merge" ,perl-hash-merge)
1451 ("perl-module-find" ,perl-module-find)
1452 ("perl-moo" ,perl-moo)
1453 ("perl-mro-compat" ,perl-mro-compat)
1454 ("perl-namespace-clean" ,perl-namespace-clean)
1455 ("perl-path-class" ,perl-path-class)
1456 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1457 ("perl-scope-guard" ,perl-scope-guard)
1458 ("perl-sql-abstract" ,perl-sql-abstract)
1459 ("perl-sub-name" ,perl-sub-name)
1460 ("perl-text-balanced" ,perl-text-balanced)
1461 ("perl-try-tiny" ,perl-try-tiny)))
1462 (home-page "https://metacpan.org/release/DBIx-Class")
1463 (synopsis "Extensible and flexible object <-> relational mapper")
1464 (description "An SQL to OO mapper with an object API inspired by
1465 Class::DBI (with a compatibility layer as a springboard for porting) and a
1466 resultset API that allows abstract encapsulation of database operations. It
1467 aims to make representing queries in your code as perl-ish as possible while
1468 still providing access to as many of the capabilities of the database as
1469 possible, including retrieving related records from multiple tables in a
1470 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1471 \"ORDER BY\" and \"HAVING\" support.")
1472 (license license:perl-license)))
1474 (define-public perl-dbix-class-cursor-cached
1476 (name "perl-dbix-class-cursor-cached")
1477 (version "1.001004")
1481 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1482 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1485 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1486 (build-system perl-build-system)
1488 `(("perl-cache-cache" ,perl-cache-cache)
1489 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1490 ("perl-module-install" ,perl-module-install)))
1492 `(("perl-carp-clan" ,perl-carp-clan)
1493 ("perl-dbix-class" ,perl-dbix-class)))
1494 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1495 (synopsis "Cursor with built-in caching support")
1496 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1497 built-in caching support.")
1498 (license license:perl-license)))
1500 (define-public perl-dbix-class-introspectablem2m
1502 (name "perl-dbix-class-introspectablem2m")
1503 (version "0.001002")
1507 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1508 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1511 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1512 (build-system perl-build-system)
1514 `(("perl-module-install" ,perl-module-install)))
1516 `(("perl-dbix-class" ,perl-dbix-class)))
1517 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1518 (synopsis "Introspect many-to-many relationships")
1519 (description "Because the many-to-many relationships are not real
1520 relationships, they can not be introspected with DBIx::Class. Many-to-many
1521 relationships are actually just a collection of convenience methods installed
1522 to bridge two relationships. This DBIx::Class component can be used to store
1523 all relevant information about these non-relationships so they can later be
1524 introspected and examined.")
1525 (license license:perl-license)))
1527 (define-public perl-dbix-class-schema-loader
1529 (name "perl-dbix-class-schema-loader")
1534 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1535 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1538 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1539 (build-system perl-build-system)
1541 `(("perl-config-any" ,perl-config-any)
1542 ("perl-config-general" ,perl-config-general)
1543 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1544 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1545 ("perl-module-install" ,perl-module-install)
1546 ("perl-moose" ,perl-moose)
1547 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1548 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1549 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1550 ("perl-test-deep" ,perl-test-deep)
1551 ("perl-test-differences" ,perl-test-differences)
1552 ("perl-test-exception" ,perl-test-exception)
1553 ("perl-test-pod" ,perl-test-pod)
1554 ("perl-test-warn" ,perl-test-warn)))
1556 `(("perl-class-unload" ,perl-class-unload)
1557 ("perl-class-inspector" ,perl-class-inspector)
1558 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1559 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1560 ("perl-carp-clan" ,perl-carp-clan)
1561 ("perl-data-dump" ,perl-data-dump)
1562 ("perl-dbix-class" ,perl-dbix-class)
1563 ("perl-hash-merge" ,perl-hash-merge)
1564 ("perl-list-moreutils" ,perl-list-moreutils)
1565 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1566 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1567 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1568 ("perl-namespace-clean" ,perl-namespace-clean)
1569 ("perl-mro-compat" ,perl-mro-compat)
1570 ("perl-scope-guard" ,perl-scope-guard)
1571 ("perl-string-camelcase" ,perl-string-camelcase)
1572 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1573 ("perl-sub-name" ,perl-sub-name)
1574 ("perl-try-tiny" ,perl-try-tiny)))
1575 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1576 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1577 (synopsis "Create a DBIx::Class::Schema based on a database")
1578 (description "DBIx::Class::Schema::Loader automates the definition of a
1579 DBIx::Class::Schema by scanning database table definitions and setting up the
1580 columns, primary keys, unique constraints and relationships.")
1581 (license license:perl-license)))
1583 (define-public perl-dbd-pg
1585 (name "perl-dbd-pg")
1590 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1591 "DBD-Pg-" version ".tar.gz"))
1594 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1595 (build-system perl-build-system)
1597 `(("perl-dbi" ,perl-dbi)))
1599 `(("perl-dbi" ,perl-dbi)
1600 ("postgresql" ,postgresql)))
1601 (home-page "https://metacpan.org/release/DBD-Pg")
1602 (synopsis "DBI PostgreSQL interface")
1603 (description "This package provides a PostgreSQL driver for the Perl5
1604 @dfn{Database Interface} (DBI).")
1605 (license license:perl-license)))
1607 (define-public perl-dbd-mysql
1609 (name "perl-dbd-mysql")
1614 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1615 "DBD-mysql-" version ".tar.gz"))
1617 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1618 (build-system perl-build-system)
1621 (modify-phases %standard-phases
1622 (add-before 'configure 'skip-library-detection
1623 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1624 ;; are really only needed for the test suite; their absence does not
1625 ;; affect the build or the end result.
1627 (substitute* "Makefile.PL"
1628 (("use Devel::CheckLib;" match)
1629 (string-append "# " match))
1633 ;; Tests require running MySQL server.
1636 `(("perl-dbi" ,perl-dbi)
1637 ("mysql" ,mariadb "lib")
1638 ("mysql-dev" ,mariadb "dev")))
1639 (home-page "https://metacpan.org/release/DBD-mysql")
1640 (synopsis "DBI MySQL interface")
1641 (description "This package provides a MySQL driver for the Perl5
1642 @dfn{Database Interface} (DBI).")
1643 (license license:perl-license)))
1645 (define-public perl-dbd-sqlite
1647 (name "perl-dbd-sqlite")
1652 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1656 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1657 (build-system perl-build-system)
1658 (inputs `(("sqlite" ,sqlite)))
1659 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1660 (synopsis "SQlite interface for Perl")
1661 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1662 the entire thing in the distribution. So in order to get a fast transaction
1663 capable RDBMS working for your Perl project you simply have to install this
1664 module, and nothing else.")
1665 (license license:perl-license)
1666 (home-page "https://metacpan.org/release/DBD-SQLite")))
1668 (define-public perl-mysql-config
1670 (name "perl-mysql-config")
1676 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1681 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1682 (build-system perl-build-system)
1683 (home-page "https://metacpan.org/release/MySQL-Config")
1684 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1686 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1687 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1688 @code{Getopt::Long}.")
1689 (license license:perl-license)))
1691 (define-public perl-sql-abstract
1693 (name "perl-sql-abstract")
1698 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1699 "SQL-Abstract-" version ".tar.gz"))
1701 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1702 (build-system perl-build-system)
1704 `(("perl-module-install" ,perl-module-install)
1705 ("perl-test-deep" ,perl-test-deep)
1706 ("perl-test-exception" ,perl-test-exception)
1707 ("perl-test-warn" ,perl-test-warn)))
1709 `(("perl-hash-merge" ,perl-hash-merge)
1710 ("perl-moo" ,perl-moo)
1711 ("perl-mro-compat" ,perl-mro-compat)
1712 ("perl-text-balanced" ,perl-text-balanced)))
1713 (home-page "https://metacpan.org/release/SQL-Abstract")
1714 (synopsis "Generate SQL from Perl data structures")
1715 (description "This module was inspired by the excellent DBIx::Abstract.
1716 While based on the concepts used by DBIx::Abstract, the concepts used have
1717 been modified to make the SQL easier to generate from Perl data structures.
1718 The underlying idea is for this module to do what you mean, based on the data
1719 structures you provide it, so that you don't have to modify your code every
1720 time your data changes.")
1721 (license license:perl-license)))
1723 (define-public perl-sql-splitstatement
1725 (name "perl-sql-splitstatement")
1730 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1731 "SQL-SplitStatement-" version ".tar.gz"))
1734 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1735 (build-system perl-build-system)
1737 `(("perl-test-exception" ,perl-test-exception)))
1739 `(("perl-class-accessor" ,perl-class-accessor)
1740 ("perl-list-moreutils" ,perl-list-moreutils)
1741 ("perl-regexp-common" ,perl-regexp-common)
1742 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1743 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1744 (synopsis "Split SQL code into atomic statements")
1745 (description "This module tries to split any SQL code, even including
1746 non-standard extensions, into the atomic statements it is composed of.")
1747 (license license:perl-license)))
1749 (define-public perl-sql-tokenizer
1751 (name "perl-sql-tokenizer")
1756 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1757 "SQL-Tokenizer-" version ".tar.gz"))
1760 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1761 (build-system perl-build-system)
1762 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1763 (synopsis "SQL tokenizer")
1764 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1765 claim to be a parser or query verifier. It just creates sane tokens from a
1767 (license license:perl-license)))
1769 (define-public unixodbc
1777 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1780 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1781 (build-system gnu-build-system)
1782 (synopsis "Data source abstraction library")
1783 (description "Unixodbc is a library providing an API with which to access
1784 data sources. Data sources include SQL Servers and any software with an ODBC
1786 (license license:lgpl2.1+)
1787 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1788 (home-page "http://www.unixodbc.org")))
1790 (define-public unqlite
1796 ;; Contains bug fixes against the official release, and has an
1797 ;; autotooled build system.
1798 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1800 "unqlite-unofficial-" version ".tar.gz"))
1803 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1804 (build-system gnu-build-system)
1805 (arguments `(#:tests? #f)) ;No check target
1806 (home-page "http://www.unqlite.org")
1807 (synopsis "In-memory key/value and document store")
1809 "UnQLite is an in-process software library which implements a
1810 self-contained, serverless, zero-configuration, transactional NoSQL
1811 database engine. UnQLite is a document store database similar to
1812 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1813 similar to BerkeleyDB, LevelDB, etc.")
1814 (license license:bsd-2)))
1816 (define-public redis
1822 (uri (string-append "http://download.redis.io/releases/redis-"
1826 "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx"))))
1827 (build-system gnu-build-system)
1829 '(#:tests? #f ; tests related to master/slave and replication fail
1830 #:phases (modify-phases %standard-phases
1831 (delete 'configure))
1832 #:make-flags `("CC=gcc"
1835 ,(string-append "PREFIX="
1836 (assoc-ref %outputs "out")))))
1837 (synopsis "Key-value cache and store")
1838 (description "Redis is an advanced key-value cache and store. Redis
1839 supports many data structures including strings, hashes, lists, sets, sorted
1840 sets, bitmaps and hyperloglogs.")
1841 (home-page "http://redis.io/")
1842 (license license:bsd-3)))
1844 (define-public kyotocabinet
1846 (name "kyotocabinet")
1850 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1851 name "-" version ".tar.gz"))
1854 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1855 (build-system gnu-build-system)
1859 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1860 (string-append "LDFLAGS=-Wl,-rpath="
1861 (assoc-ref %outputs "out") "/lib"))))
1862 (inputs `(("zlib" ,zlib)))
1863 (home-page "http://fallabs.com/kyotocabinet/")
1865 "Kyoto Cabinet is a modern implementation of the DBM database")
1867 "Kyoto Cabinet is a standalone file-based database that supports Hash
1868 and B+ Tree data storage models. It is a fast key-value lightweight
1869 database and supports many programming languages. It is a NoSQL database.")
1870 (license license:gpl3+)))
1872 (define-public tokyocabinet
1874 (name "tokyocabinet")
1879 (uri (string-append "http://fallabs.com/tokyocabinet/"
1880 name "-" version ".tar.gz"))
1883 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1884 (build-system gnu-build-system)
1887 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1888 (string-append "LDFLAGS=-Wl,-rpath="
1889 (assoc-ref %outputs "out") "/lib"))))
1892 (home-page "http://fallabs.com/tokyocabinet/")
1893 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1895 "Tokyo Cabinet is a library of routines for managing a database.
1896 The database is a simple data file containing records, each is a pair of a
1897 key and a value. Every key and value is serial bytes with variable length.
1898 Both binary data and character string can be used as a key and a value.
1899 There is neither concept of data tables nor data types. Records are
1900 organized in hash table, B+ tree, or fixed-length array.")
1901 (license license:lgpl2.1+)))
1903 (define-public wiredtiger
1910 "http://source.wiredtiger.com/releases/wiredtiger-"
1911 version ".tar.bz2"))
1914 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1915 (build-system gnu-build-system)
1917 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1919 (modify-phases %standard-phases
1920 (add-before 'check 'disable-test/fops
1922 ;; XXX: timed out after 3600 seconds of silence
1923 (substitute* "Makefile"
1929 ("snappy" ,snappy)))
1930 (home-page "http://source.wiredtiger.com/")
1931 (synopsis "NoSQL data engine")
1933 "WiredTiger is an extensible platform for data management. It supports
1934 row-oriented storage (where all columns of a row are stored together),
1935 column-oriented storage (where columns are stored in groups, allowing for
1936 more efficient access and storage of column subsets) and log-structured merge
1937 trees (LSM), for sustained throughput under random insert workloads.")
1938 (license license:gpl3) ; or GPL-2
1939 ;; configure.ac: WiredTiger requires a 64-bit build.
1940 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1942 (define-public wiredtiger-3
1944 (inherit wiredtiger)
1949 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1950 version ".tar.bz2"))
1953 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
1955 (define-public guile-wiredtiger
1957 (name "guile-wiredtiger")
1962 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1963 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
1964 (file-name (string-append name "-" version "-checkout"))
1967 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
1968 (build-system gnu-build-system)
1970 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
1972 (list (string-append "--with-libwiredtiger-prefix="
1973 (assoc-ref %build-inputs "wiredtiger")))
1974 #:make-flags '("GUILE_AUTO_COMPILE=0")))
1976 `(("autoconf" ,autoconf)
1977 ("automake" ,automake)
1978 ("pkg-config" ,pkg-config)))
1980 `(("wiredtiger" ,wiredtiger-3)
1981 ("guile" ,guile-2.2)))
1983 `(("guile-bytestructures" ,guile-bytestructures)))
1984 (synopsis "WiredTiger bindings for GNU Guile")
1986 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1988 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1989 (license license:gpl3+)))
1991 (define-public perl-db-file
1993 (name "perl-db-file")
1999 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2004 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
2005 (build-system perl-build-system)
2006 (inputs `(("bdb" ,bdb)))
2007 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2009 `(#:phases (modify-phases %standard-phases
2011 'configure 'modify-config.in
2012 (lambda* (#:key inputs #:allow-other-keys)
2013 (substitute* "config.in"
2014 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2016 (home-page "https://metacpan.org/release/DB_File")
2018 "Perl5 access to Berkeley DB version 1.x")
2020 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2021 (license license:perl-license)))
2031 (url "https://github.com/LMDB/lmdb.git")
2032 (commit (string-append "LMDB_" version))))
2033 (file-name (git-file-name name version))
2035 (base32 "0ag7l5180ajvm73y59m7sn3p52xm8m972d08cshxhpwgwa4v35k6"))))
2036 (build-system gnu-build-system)
2038 `(#:test-target "test"
2040 (modify-phases %standard-phases
2042 (lambda* (#:key outputs #:allow-other-keys)
2043 (chdir "libraries/liblmdb")
2044 (substitute* "Makefile"
2045 (("/usr/local") (assoc-ref outputs "out")))
2047 (home-page "https://symas.com/products/lightning-memory-mapped-database")
2048 (synopsis "Lightning Memory-Mapped Database library")
2050 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2051 transactional database. Unlike more complex relational databases, LMDB handles
2052 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2053 underlying operating system for caching and locking, keeping the code small and
2055 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2056 disk-based databases with high read performance that scales linearly over
2057 multiple cores. The size of each database is limited only by the size of the
2058 virtual address space — not physical RAM.")
2059 (license license:openldap2.8)))
2061 (define-public libpqxx
2068 "http://pqxx.org/download/software/libpqxx/"
2069 name "-" version ".tar.gz"))
2072 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2073 (build-system gnu-build-system)
2075 `(("python" ,python-2)))
2076 (inputs `(("postgresql" ,postgresql)))
2078 `(#:tests? #f ; # FAIL: 1
2080 (modify-phases %standard-phases
2081 (add-before 'configure 'fix-sed-command
2083 ;; Newer sed versions error out if double brackets are not used.
2084 (substitute* "configure"
2085 (("\\[:space:\\]") "[[:space:]]"))
2087 (synopsis "C++ connector for PostgreSQL")
2089 "Libpqxx is a C++ library to enable user programs to communicate with the
2090 PostgreSQL database back-end. The database back-end can be local or it may be
2091 on another machine, accessed via TCP/IP.")
2092 (home-page "http://pqxx.org/")
2093 (license license:bsd-3)))
2095 (define-public python-peewee
2097 (name "python-peewee")
2102 (uri (pypi-uri "peewee" version))
2105 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2106 (build-system python-build-system)
2108 `(#:tests? #f)) ; Fails to import test data
2110 `(("python-cython" ,python-cython)))
2111 (home-page "https://github.com/coleifer/peewee/")
2112 (synopsis "Small object-relational mapping utility")
2114 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2115 handles converting between pythonic values and those used by databases, so you
2116 can use Python types in your code without having to worry. It has built-in
2117 support for sqlite, mysql and postgresql. If you already have a database, you
2118 can autogenerate peewee models using @code{pwiz}, a model generator.")
2119 (license license:expat)))
2121 (define-public python2-peewee
2122 (package-with-python2 python-peewee))
2124 (define-public sqlcipher
2131 (uri (string-append "https://github.com/sqlcipher/" name
2132 "/archive/v" version ".tar.gz"))
2134 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2135 (file-name (string-append name "-" version ".tar.gz"))))
2136 (build-system gnu-build-system)
2138 `(("libcrypto" ,openssl)
2139 ("libtcl8.6" ,tcl))) ; required for running the tests
2144 '("--enable-tempstore=yes"
2145 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2146 "LDFLAGS=-lcrypto -ltcl8.6"
2148 ;; tests cannot be run from the Makefile
2149 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2150 #:test-target "testfixture"
2152 (modify-phases %standard-phases
2153 (add-before 'check 'build-test-runner
2154 (assoc-ref %standard-phases 'check))
2157 (invoke "./testfixture" "test/crypto.test"))))))
2158 (home-page "https://www.zetetic.net/sqlcipher/")
2160 "Library providing transparent encryption of SQLite database files")
2161 (description "SQLCipher is an implementation of SQLite, extended to
2162 provide transparent 256-bit AES encryption of database files. Pages are
2163 encrypted before being written to disk and are decrypted when read back. It’s
2164 well suited for protecting embedded application databases and for mobile
2167 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2168 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2169 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2170 ;; source files are in the public domain.
2171 (license (list license:public-domain license:bsd-3))))
2173 (define-public python-pyodbc-c
2175 (name "python-pyodbc-c")
2180 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2181 "archive.tar.gz?ref=v" version))
2184 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2185 (file-name (string-append name "-" version ".tar.gz"))))
2186 (build-system python-build-system)
2188 `(("unixodbc" ,unixodbc)))
2190 `(;; No unit tests exist.
2192 (home-page "https://github.com/mkleehammer/pyodbc")
2193 (synopsis "Python ODBC Library")
2194 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2196 (license (license:x11-style "file://LICENSE.TXT"))))
2198 (define-public python2-pyodbc-c
2199 (package-with-python2 python-pyodbc-c))
2201 (define-public python-pyodbc
2203 (name "python-pyodbc")
2208 (uri (pypi-uri "pyodbc" version))
2210 (base32 "1kd2i7hc1330cli72vawzby17c3039cqn1aba4i0zrjnpghjhmib"))
2211 (file-name (string-append name "-" version ".tar.gz"))))
2212 (build-system python-build-system)
2214 `(("unixodbc" ,unixodbc)))
2216 `(#:tests? #f)) ; no unit tests exist
2217 (home-page "https://github.com/mkleehammer/pyodbc")
2218 (synopsis "Python ODBC Library")
2219 (description "@code{python-pyodbc} provides a Python DB-API driver
2221 (license (license:x11-style "file:///LICENSE.TXT"))))
2223 (define-public python2-pyodbc
2224 (package-with-python2 python-pyodbc))
2226 (define-public mdbtools
2234 (url "https://github.com/brianb/mdbtools.git")
2236 (file-name (git-file-name name version))
2239 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2240 (build-system gnu-build-system)
2244 `(("autoconf" ,autoconf)
2245 ("automake" ,automake)
2246 ("libtool" ,libtool)
2247 ("pkg-config" ,pkg-config)
2248 ("txt2man" ,txt2man)
2250 (home-page "http://mdbtools.sourceforge.net/")
2251 (synopsis "Read Microsoft Access databases")
2252 (description "MDB Tools is a set of tools and applications to read the
2253 proprietary MDB file format used in Microsoft's Access database package. This
2254 includes programs to export schema and data from Microsoft's Access database
2255 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2256 etc., and an SQL engine for performing simple SQL queries.")
2257 (license (list license:lgpl2.0
2260 (define-public python-lmdb
2262 (name "python-lmdb")
2266 (uri (pypi-uri "lmdb" version))
2269 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2270 (modules '((guix build utils)))
2272 ;; Delete bundled lmdb source files.
2274 (for-each delete-file (list "lib/lmdb.h"
2279 (build-system python-build-system)
2284 (modify-phases %standard-phases
2285 (add-before 'build 'use-system-lmdb
2286 (lambda* (#:key inputs #:allow-other-keys)
2287 (let ((lmdb (assoc-ref inputs "lmdb")))
2288 (setenv "LMDB_FORCE_SYSTEM" "set")
2289 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2290 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2292 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2294 (home-page "https://github.com/dw/py-lmdb")
2295 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2297 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2298 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2300 (list license:openldap2.8
2301 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2302 ;; but not actually needed on platforms currently supported by Guix.
2305 (define-public python2-lmdb
2306 (package-with-python2 python-lmdb))
2308 (define-public python-orator
2310 (name "python-orator")
2314 (uri (pypi-uri "orator" version))
2317 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2318 (build-system python-build-system)
2321 (modify-phases %standard-phases
2322 (add-after 'unpack 'loosen-dependencies
2323 ;; Tests are not actually run since they are not included with the
2324 ;; distributed package, but dependencies are checked.
2326 (substitute* "setup.py"
2328 (("flexmock==0.9.7") "flexmock")
2329 ;; The pytest-mock package is out of date, so we remove minimum
2330 ;; version requirement.
2331 (("pytest-mock.*'") "pytest-mock'"))
2334 `(("python-pytest-mock" ,python-pytest-mock)
2335 ("python-pytest" ,python-pytest)
2336 ("python-flexmock" ,python-flexmock)))
2338 `(("python-backpack" ,python-backpack)
2339 ("python-blinker" ,python-blinker)
2340 ("python-cleo" ,python-cleo)
2341 ("python-faker" ,python-faker)
2342 ("python-inflection" ,python-inflection)
2343 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2344 ("python-pendulum" ,python-pendulum)
2345 ("python-pyaml" ,python-pyaml)
2346 ("python-pygments" ,python-pygments)
2347 ("python-simplejson" ,python-simplejson)
2348 ("python-six" ,python-six)
2349 ("python-wrapt" ,python-wrapt)))
2350 (home-page "https://orator-orm.com/")
2351 (synopsis "ActiveRecord ORM for Python")
2353 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2354 implementation for Python.")
2355 (license license:expat)
2356 (properties `((python2-variant . ,(delay python2-orator))))))
2358 (define-public python2-orator
2359 (package-with-python2 (strip-python2-variant python-orator)))
2361 (define-public virtuoso-ose
2363 (name "virtuoso-ose")
2369 "https://github.com/openlink/virtuoso-opensource/releases/"
2370 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2372 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2373 (build-system gnu-build-system)
2375 `(#:tests? #f ; Tests require a network connection.
2376 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2377 ;; This indicates that the internal zlib code may still be used.
2378 #:configure-flags '("--without-internal-zlib"
2379 "--with-readline")))
2381 `(("openssl" ,openssl-1.0)
2382 ("net-tools" ,net-tools)
2383 ("readline" ,readline)
2385 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2386 (synopsis "Multi-model database system")
2387 (description "Virtuoso is a scalable cross-platform server that combines
2388 relational, graph, and document data management with web application server
2389 and web services platform functionality.")
2390 ;; configure: error: ... can only be build on 64bit platforms
2391 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2392 (license license:gpl2)))
2394 (define-public python-ccm
2401 (uri (pypi-uri "ccm" version))
2404 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2405 (build-system python-build-system)
2407 `(("python-pyyaml" ,python-pyyaml)
2408 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2410 ("python-psutil" ,python-psutil)
2411 ("python-six" ,python-six)))
2412 (home-page "https://github.com/pcmanus/ccm")
2413 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2415 (description "Cassandra Cluster Manager is a development tool for testing
2416 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2418 (license license:asl2.0)))
2420 (define-public python2-ccm
2421 (package-with-python2 python-ccm))
2423 (define-public python2-pysqlite
2425 (name "python2-pysqlite")
2430 (uri (pypi-uri "pysqlite" version))
2433 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2434 (build-system python-build-system)
2436 `(("sqlite" ,sqlite)))
2438 `(#:python ,python-2 ; incompatible with Python 3
2439 #:tests? #f)) ; no test target
2440 (home-page "https://github.com/ghaering/pysqlite")
2441 (synopsis "SQLite bindings for Python")
2443 "Pysqlite provides SQLite bindings for Python that comply to the
2444 Database API 2.0T.")
2445 (license license:zlib)))
2447 (define-public python-sqlalchemy
2449 (name "python-sqlalchemy")
2454 (uri (pypi-uri "SQLAlchemy" version))
2456 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2457 (build-system python-build-system)
2459 `(("python-cython" ,python-cython) ; for C extensions
2460 ("python-pytest" ,python-pytest)
2461 ("python-mock" ,python-mock))) ; for tests
2464 (modify-phases %standard-phases
2466 (lambda _ (invoke "py.test"))))))
2467 (home-page "https://www.sqlalchemy.org")
2468 (synopsis "Database abstraction library")
2470 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2471 gives application developers the full power and flexibility of SQL. It
2472 provides a full suite of well known enterprise-level persistence patterns,
2473 designed for efficient and high-performing database access, adapted into a
2474 simple and Pythonic domain language.")
2475 (license license:x11)))
2477 (define-public python2-sqlalchemy
2478 (package-with-python2 python-sqlalchemy))
2480 (define-public python-sqlalchemy-utils
2482 (name "python-sqlalchemy-utils")
2487 (uri (pypi-uri "SQLAlchemy-Utils" version))
2490 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2491 (build-system python-build-system)
2493 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2495 ;; (modify-phases %standard-phases
2498 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2500 `(("python-six" ,python-six)
2501 ("python-sqlalchemy" ,python-sqlalchemy)))
2503 `(("python-dateutil" ,python-dateutil)
2504 ("python-flexmock" ,python-flexmock)
2505 ("python-psycopg2" ,python-psycopg2)
2506 ("python-pytest" ,python-pytest)
2507 ("python-pytz" ,python-pytz)))
2508 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2509 (synopsis "Various utility functions for SQLAlchemy")
2511 "SQLAlchemy-utils provides various utility functions and custom data types
2512 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2514 You might also want to install the following optional dependencies:
2516 @item @code{python-passlib}
2517 @item @code{python-babel}
2518 @item @code{python-cryptography}
2519 @item @code{python-pytz}
2520 @item @code{python-psycopg2}
2521 @item @code{python-furl}
2522 @item @code{python-flask-babel}
2525 (license license:bsd-3)))
2527 (define-public python2-sqlalchemy-utils
2528 (package-with-python2 python-sqlalchemy-utils))
2530 (define-public python-alembic
2532 (name "python-alembic")
2537 (uri (pypi-uri "alembic" version))
2540 "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd"))))
2541 (build-system python-build-system)
2543 `(("python-mock" ,python-mock)
2544 ("python-pytest-cov" ,python-pytest-cov)))
2546 `(("python-dateutil" ,python-dateutil)
2547 ("python-sqlalchemy" ,python-sqlalchemy)
2548 ("python-mako" ,python-mako)
2549 ("python-editor" ,python-editor)))
2550 (home-page "https://bitbucket.org/zzzeek/alembic")
2551 (synopsis "Database migration tool for SQLAlchemy")
2553 "Alembic is a lightweight database migration tool for usage with the
2554 SQLAlchemy Database Toolkit for Python.")
2555 (license license:expat)))
2557 (define-public python2-alembic
2558 (package-with-python2 python-alembic))
2560 (define-public python-pickleshare
2562 (name "python-pickleshare")
2567 (uri (pypi-uri "pickleshare" version))
2569 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2570 (build-system python-build-system)
2572 `(#:phases (modify-phases %standard-phases
2575 (invoke "pytest"))))))
2577 `(("python-pytest" ,python-pytest)))
2578 (home-page "https://github.com/vivainio/pickleshare")
2579 (synopsis "Tiny key value database with concurrency support")
2581 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2582 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2583 shelve, many processes can access the database simultaneously. Changing a
2584 value in database is immediately visible to other processes accessing the same
2585 database. Concurrency is possible because the values are stored in separate
2586 files. Hence the “database” is a directory where all files are governed by
2588 (properties `((python2-variant . ,(delay python2-pickleshare))))
2589 (license license:expat)))
2591 (define-public python2-pickleshare
2592 (let ((pickleshare (package-with-python2
2593 (strip-python2-variant python-pickleshare))))
2594 (package (inherit pickleshare)
2595 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2596 ,@(package-propagated-inputs pickleshare))))))
2598 (define-public python-apsw
2600 (name "python-apsw")
2601 (version "3.20.1-r1")
2605 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2607 (file-name (string-append "apsw-" version ".tar.gz"))
2610 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2611 (build-system python-build-system)
2613 `(("sqlite" ,sqlite)))
2616 (modify-phases %standard-phases
2619 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2621 (add-after 'build 'build-test-helper
2623 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2624 "-I." "-Isqlite3" "src/testextension.c")
2627 (add-after 'install 'check
2628 (lambda* (#:key inputs outputs #:allow-other-keys)
2629 (add-installed-pythonpath inputs outputs)
2630 (invoke "python" "setup.py" "test")
2632 (home-page "https://github.com/rogerbinns/apsw/")
2633 (synopsis "Another Python SQLite Wrapper")
2634 (description "APSW is a Python wrapper for the SQLite
2635 embedded relational database engine. In contrast to other wrappers such as
2636 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2637 translate the complete SQLite API into Python.")
2638 (license license:zlib)))
2640 (define-public python2-apsw
2641 (package-with-python2 python-apsw))
2643 (define-public python2-neo4j-driver
2645 (name "python2-neo4j-driver")
2646 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2650 (uri (pypi-uri "neo4j-driver" version))
2653 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2654 (build-system python-build-system)
2656 `(#:python ,python-2))
2657 (home-page "https://neo4j.com/developer/python/")
2658 (synopsis "Neo4j driver code written in Python")
2659 (description "This package provides the Neo4j Python driver that connects
2660 to the database using Neo4j's binary protocol. It aims to be minimal, while
2661 being idiomatic to Python.")
2662 (license license:asl2.0)))
2664 (define-public python2-py2neo
2666 (name "python2-py2neo")
2670 (uri (pypi-uri "py2neo" version))
2673 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2674 (build-system python-build-system)
2676 `(#:python ,python-2))
2677 (home-page "http://py2neo.org")
2678 (synopsis "Library and toolkit for working with Neo4j in Python")
2679 (description "This package provides a client library and toolkit for
2680 working with Neo4j from within Python applications and from the command
2681 line. The core library has no external dependencies and has been carefully
2682 designed to be easy and intuitive to use.")
2683 (license license:asl2.0)))
2685 (define-public python-psycopg2
2687 (name "python-psycopg2")
2692 (uri (pypi-uri "psycopg2" version))
2694 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2695 (build-system python-build-system)
2697 ;; Tests would require a postgresql database "psycopg2_test"
2698 ;; and a running postgresql database management service.
2699 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2701 `(("postgresql" ,postgresql))) ; libpq
2702 (home-page "http://initd.org/psycopg/")
2703 (synopsis "Python PostgreSQL adapter")
2705 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2707 (license license:lgpl3+)))
2709 (define-public python2-psycopg2
2710 (package-with-python2 python-psycopg2))
2712 (define-public python-sadisplay
2714 (name "python-sadisplay")
2719 (uri (pypi-uri "sadisplay" version))
2722 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2723 (build-system python-build-system)
2725 `(("python-sqlalchemy" ,python-sqlalchemy)))
2728 `(("python-nose" ,python-nose)))
2729 (home-page "https://bitbucket.org/estin/sadisplay")
2730 (synopsis "SQLAlchemy schema displayer")
2731 (description "This package provides a program to build Entity
2732 Relationship diagrams from a SQLAlchemy model (or directly from the
2734 (license license:bsd-3)))
2736 (define-public python2-sadisplay
2737 (package-with-python2 python-sadisplay))
2739 (define-public python-mysqlclient
2741 (name "python-mysqlclient")
2746 (uri (pypi-uri "mysqlclient" version))
2749 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2750 (build-system python-build-system)
2752 `(("nose" ,python-nose)
2753 ("mock" ,python-mock)
2754 ("py.test" ,python-pytest)))
2756 `(("mysql" ,mariadb "lib")
2757 ("mysql-dev" ,mariadb "dev")
2759 ("openssl" ,openssl)))
2760 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2761 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2762 (description "MySQLdb is an interface to the popular MySQL database server
2763 for Python. The design goals are:
2765 @item Compliance with Python database API version 2.0 [PEP-0249],
2766 @item Thread-safety,
2767 @item Thread-friendliness (threads will not block each other).
2769 (license license:gpl2)))
2771 (define-public python2-mysqlclient
2772 (package-with-python2 python-mysqlclient))
2774 (define-public python-hiredis
2776 (name "python-hiredis")
2781 (uri (pypi-uri "hiredis" version))
2784 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2785 (build-system python-build-system)
2789 (home-page "https://github.com/redis/hiredis-py")
2790 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2791 (description "Python-hiredis is a python extension that wraps protocol
2792 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2793 (license license:bsd-3)))
2795 (define-public python2-hiredis
2796 (package-with-python2 python-hiredis))
2798 (define-public python-fakeredis
2800 (name "python-fakeredis")
2805 (uri (pypi-uri "fakeredis" version))
2808 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2809 (build-system python-build-system)
2813 (home-page "https://github.com/jamesls/fakeredis")
2814 (synopsis "Fake implementation of redis API for testing purposes")
2816 "Fakeredis is a pure-Python implementation of the redis-py Python client
2817 that simulates talking to a redis server. It was created for a single purpose:
2818 to write unit tests.
2820 Setting up redis is not hard, but one often wants to write unit tests that don't
2821 talk to an external server such as redis. This module can be used as a
2822 reasonable substitute.")
2823 (license license:bsd-3)))
2825 (define-public python2-fakeredis
2826 (package-with-python2 python-fakeredis))
2828 (define-public python-redis
2830 (name "python-redis")
2835 (uri (pypi-uri "redis" version))
2837 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
2838 (build-system python-build-system)
2839 ;; Tests require a running Redis server.
2840 (arguments '(#:tests? #f))
2841 ;; As long as we are not running test, we do not need this input :-)
2843 ;; `(("python-pytest" ,python-pytest)))
2844 (home-page "https://github.com/andymccurdy/redis-py")
2845 (synopsis "Redis Python client")
2847 "This package provides a Python interface to the Redis key-value store.")
2848 (license license:expat)))
2850 (define-public python2-redis
2851 (package-with-python2 python-redis))
2853 (define-public python-rq
2860 (uri (pypi-uri "rq" version))
2862 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2863 (build-system python-build-system)
2865 `(("python-click" ,python-click)
2866 ("python-redis" ,python-redis)))
2867 (home-page "http://python-rq.org/")
2868 (synopsis "Simple job queues for Python")
2870 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2871 processing them in the background with workers. It is backed by Redis and it
2872 is designed to have a low barrier to entry.")
2873 (license license:bsd-2)))
2875 (define-public python2-rq
2876 (package-with-python2 python-rq))
2878 (define-public python-trollius-redis
2880 (name "python-trollius-redis")
2885 (uri (pypi-uri "trollius_redis" version))
2888 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2889 (build-system python-build-system)
2890 ;; TODO: Tests require packaging 'hiredis'.
2891 (arguments '(#:tests? #f))
2892 (home-page "https://github.com/benjolitz/trollius-redis")
2893 (synopsis "Port of asyncio-redis to trollius")
2894 (description "@code{trollius-redis} is a Redis client for Python
2895 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2897 (license license:bsd-2)))
2899 (define-public python2-trollius-redis
2900 (package-with-python2 python-trollius-redis))
2902 (define-public python-sqlparse
2904 (name "python-sqlparse")
2908 (uri (pypi-uri "sqlparse" version))
2911 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2912 (build-system python-build-system)
2915 (modify-phases %standard-phases
2917 (lambda _ (invoke "py.test"))))))
2919 `(("python-pytest" ,python-pytest)))
2920 (home-page "https://github.com/andialbrecht/sqlparse")
2921 (synopsis "Non-validating SQL parser")
2922 (description "Sqlparse is a non-validating SQL parser for Python. It
2923 provides support for parsing, splitting and formatting SQL statements.")
2924 (license license:bsd-3)))
2926 (define-public python2-sqlparse
2927 (package-with-python2 python-sqlparse))
2929 (define-public python-sql
2936 (uri (pypi-uri "python-sql" version))
2938 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
2939 (build-system python-build-system)
2940 (home-page "https://python-sql.tryton.org/")
2941 (synopsis "Library to write SQL queries in a pythonic way")
2942 (description "@code{python-sql} is a library to write SQL queries, that
2943 transforms idiomatic python function calls to well-formed SQL queries.")
2944 (license license:bsd-3)))
2946 (define-public python2-sql
2947 (package-with-python2 python-sql))
2949 (define-public mongo-tools
2951 (name "mongo-tools")
2954 (origin (method git-fetch)
2956 (url "https://github.com/mongodb/mongo-tools")
2957 (commit (string-append "r" version))))
2958 (file-name (git-file-name name version))
2961 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
2962 (build-system go-build-system)
2964 `(#:import-path "github.com/mongodb/mongo-tools"
2965 #:modules ((srfi srfi-1)
2966 (guix build go-build-system)
2968 #:install-source? #f
2971 '("bsondump" "mongodump" "mongoexport" "mongofiles"
2972 "mongoimport" "mongooplog" "mongorestore"
2973 "mongostat" "mongotop")))
2974 (modify-phases %standard-phases
2975 (add-after 'unpack 'delete-bundled-source-code
2977 (delete-file-recursively
2978 "src/github.com/mongodb/mongo-tools/vendor")
2980 (add-after 'delete-bundled-source-code 'patch-source
2982 ;; Remove a redundant argument that causes compilation to fail.
2984 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
2985 (("skipping restore of system.profile collection\", db)")
2986 "skipping restore of system.profile collection\")"))
2990 (for-each (lambda (tool)
2993 ;; This is where the tests expect to find the
2995 "-o" ,(string-append
2996 "src/github.com/mongodb/mongo-tools/bin/"
2999 "-tags=\"ssl sasl\""
3001 "-extldflags=-Wl,-z,now,-z,relro"
3003 "src/github.com/mongodb/mongo-tools/"
3004 tool "/main/" tool ".go"))))
3005 (simple-format #t "build: running ~A\n"
3006 (string-join command))
3007 (apply invoke command)))
3012 (with-directory-excursion "src"
3013 (for-each (lambda (tool)
3016 (string-append "github.com/mongodb/mongo-tools/"
3021 (lambda* (#:key outputs #:allow-other-keys)
3022 (for-each (lambda (tool)
3024 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3026 (string-append (assoc-ref outputs "out")
3031 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3032 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3033 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3034 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3035 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3036 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3037 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3038 (home-page "https://github.com/mongodb/mongo-tools")
3039 (synopsis "Various tools for interacting with MongoDB and BSON")
3041 "This package includes a collection of tools related to MongoDB.
3044 Display BSON files in a human-readable format
3046 Convert data from JSON, TSV or CSV and insert them into a collection
3048 Write an existing collection to CSV or JSON format
3049 @item mongodump/mongorestore
3050 Dump MongoDB backups to disk in the BSON format
3052 Read MongoDB backups in the BSON format, and restore them to a live database
3054 Monitor live MongoDB servers, replica sets, or sharded clusters
3056 Read, write, delete, or update files in GridFS
3058 Replay oplog entries between MongoDB servers
3060 Monitor read/write activity on a mongo server
3062 (license license:asl2.0)))
3064 (define-public apache-arrow
3066 (name "apache-arrow")
3072 (url "https://github.com/apache/arrow")
3073 (commit (string-append "apache-arrow-" version))))
3074 (file-name (git-file-name name version))
3077 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3078 (build-system cmake-build-system)
3082 (modify-phases %standard-phases
3083 (add-before 'configure 'enter-source-directory
3084 (lambda _ (chdir "cpp") #t))
3085 (add-after 'unpack 'set-env
3087 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3088 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3089 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3090 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
3091 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3093 #:build-type "Release"
3095 (list "-DARROW_PYTHON=ON"
3097 ;; Install to PREFIX/lib (the default is
3099 (string-append "-DCMAKE_INSTALL_LIBDIR="
3100 (assoc-ref %outputs "out")
3103 ;; XXX These Guix package offer static
3104 ;; libraries that are not position independent,
3105 ;; and ld fails to link them into the arrow .so
3106 "-DARROW_WITH_SNAPPY=OFF"
3107 "-DARROW_WITH_ZLIB=OFF"
3108 "-DARROW_WITH_ZSTD=OFF"
3109 "-DARROW_WITH_LZ4=OFF"
3111 ;; Building the tests forces on all the
3112 ;; optional features and the use of static
3114 "-DARROW_BUILD_TESTS=OFF"
3115 "-DARROW_BUILD_STATIC=OFF")))
3118 ("rapidjson" ,rapidjson)
3119 ("brotli" ,google-brotli)
3120 ("flatbuffers" ,flatbuffers)
3121 ("jemalloc" ,jemalloc)
3122 ("python-3" ,python)
3123 ("python-numpy" ,python-numpy)))
3124 (home-page "https://arrow.apache.org/")
3125 (synopsis "Columnar in-memory analytics")
3126 (description "Apache Arrow is a columnar in-memory analytics layer
3127 designed to accelerate big data. It houses a set of canonical in-memory
3128 representations of flat and hierarchical data along with multiple
3129 language-bindings for structure manipulation. It also provides IPC and common
3130 algorithm implementations.")
3131 (license license:asl2.0)))
3133 (define-public python-pyarrow
3135 (name "python-pyarrow")
3141 (url "https://github.com/apache/arrow")
3142 (commit (string-append "apache-arrow-" version))))
3143 (file-name (git-file-name name version))
3146 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3147 (build-system python-build-system)
3149 '(#:tests? #f ; XXX There are no tests in the "python" directory
3151 (modify-phases %standard-phases
3152 (delete 'build) ; XXX the build is performed again during the install phase
3153 (add-after 'unpack 'enter-source-directory
3154 (lambda _ (chdir "python") #t))
3155 (add-after 'unpack 'set-env
3157 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3160 `(("apache-arrow" ,apache-arrow)
3161 ("python-numpy" ,python-numpy)
3162 ("python-pandas" ,python-pandas)
3163 ("python-six" ,python-six)))
3165 `(("cmake" ,cmake-minimal)
3166 ("python-cython" ,python-cython)
3167 ("python-pytest" ,python-pytest)
3168 ("python-pytest-runner" ,python-pytest-runner)
3169 ("python-setuptools-scm" ,python-setuptools-scm)))
3170 (home-page "https://arrow.apache.org/docs/python/")
3171 (synopsis "Python bindings for Apache Arrow")
3172 (description "This library provides a Pythonic API wrapper for the reference
3173 Arrow C++ implementation, along with tools for interoperability with pandas,
3174 NumPy, and other traditional Python scientific computing packages.")
3175 (license license:asl2.0)))
3177 (define-public python2-pyarrow
3178 (package-with-python2 python-pyarrow))
3180 (define-public python-crate
3182 (name "python-crate")
3186 (uri (pypi-uri "crate" version))
3189 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3190 (build-system python-build-system)
3192 `(("python-urllib3" ,python-urllib3)))
3193 (home-page "https://github.com/crate/crate-python")
3194 (synopsis "CrateDB Python client")
3196 "This package provides a Python client library for CrateDB.
3197 It implements the Python DB API 2.0 specification and includes support for
3199 (license license:asl2.0)))
3201 (define-public libdbi
3207 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3208 version "/libdbi-" version ".tar.gz"))
3211 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3212 (build-system gnu-build-system)
3213 (synopsis "Database independent abstraction layer in C")
3215 "This library implements a database independent abstraction layer in C,
3216 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3217 programmers can leverage the power of multiple databases and multiple
3218 simultaneous database connections by using this framework.")
3219 (home-page "http://libdbi.sourceforge.net/")
3220 (license license:lgpl2.1+)))
3222 (define-public libdbi-drivers
3224 (name "libdbi-drivers")
3228 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3229 "libdbi-drivers/libdbi-drivers-" version
3230 "/libdbi-drivers-" version ".tar.gz"))
3233 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3234 (build-system gnu-build-system)
3236 `(("inetutils" ,inetutils)
3237 ("glibc-locales" ,glibc-locales)))
3239 `(("libdbi" ,libdbi)
3241 ("postgresql" ,postgresql)
3242 ("sqlite" ,sqlite)))
3245 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3246 (mysql (assoc-ref %build-inputs "mysql"))
3247 (postgresql (assoc-ref %build-inputs "postgresql"))
3248 (sqlite (assoc-ref %build-inputs "sqlite")))
3249 (list "--disable-docs"
3250 (string-append "--with-dbi-incdir=" libdbi "/include")
3251 (string-append "--with-dbi-libdir=" libdbi "/lib")
3253 (string-append "--with-mysql-incdir=" mysql "/include/mysql")
3254 (string-append "--with-mysql-libdir=" mysql "/lib")
3256 (string-append "--with-pgsql-incdir=" postgresql "/include")
3257 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3259 (string-append "--with-sqlite-incdir=" sqlite "/include")
3260 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3262 (modify-phases %standard-phases
3263 (add-after 'unpack 'fix-tests
3264 (lambda* (#:key inputs #:allow-other-keys)
3265 (substitute* "tests/test_mysql.sh"
3267 (string-append "MYMYSQLD="
3268 (assoc-ref inputs "mysql")
3271 (add-after 'install 'remove-empty-directories
3272 (lambda* (#:key outputs #:allow-other-keys)
3273 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3274 (delete-file-recursively var))
3276 (synopsis "Database drivers for the libdbi framework")
3278 "The @code{libdbi-drivers} library provides the database specific drivers
3279 for the @code{libdbi} framework.
3281 The drivers officially supported by @code{libdbi} are:
3287 (home-page "http://libdbi-drivers.sourceforge.net/")
3288 (license license:lgpl2.1+)))