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>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages databases)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages admin)
54 #:use-module (gnu packages algebra)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages avahi)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bash)
59 #:use-module (gnu packages bison)
60 #:use-module (gnu packages boost)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages cmake)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages cyrus-sasl)
67 #:use-module (gnu packages dbm)
68 #:use-module (gnu packages emacs)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnupg)
72 #:use-module (gnu packages guile)
73 #:use-module (gnu packages time)
74 #:use-module (gnu packages golang)
75 #:use-module (gnu packages jemalloc)
76 #:use-module (gnu packages language)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages man)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages parallel)
82 #:use-module (gnu packages pcre)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages perl-check)
85 #:use-module (gnu packages perl-web)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages popt)
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-crypto)
90 #:use-module (gnu packages python-xyz)
91 #:use-module (gnu packages rdf)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages ruby)
94 #:use-module (gnu packages serialization)
95 #:use-module (gnu packages sqlite)
96 #:use-module (gnu packages tcl)
97 #:use-module (gnu packages terminals)
98 #:use-module (gnu packages textutils)
99 #:use-module (gnu packages tls)
100 #:use-module (gnu packages valgrind)
101 #:use-module (gnu packages web)
102 #:use-module (gnu packages xml)
103 #:use-module ((guix licenses) #:prefix license:)
104 #:use-module (guix packages)
105 #:use-module (guix download)
106 #:use-module (guix git-download)
107 #:use-module (guix build-system gnu)
108 #:use-module (guix build-system go)
109 #:use-module (guix build-system perl)
110 #:use-module (guix build-system python)
111 #:use-module (guix build-system ruby)
112 #:use-module (guix build-system cmake)
113 #:use-module (guix build-system scons)
114 #:use-module ((guix build utils) #:hide (which))
115 #:use-module (guix utils)
116 #:use-module (srfi srfi-1)
117 #:use-module (srfi srfi-26)
118 #:use-module (ice-9 match))
120 (define-public 4store
126 (uri (string-append "https://github.com/4store/4store/archive/v"
128 (file-name (string-append name "-" version ".tar.gz"))
130 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
131 (patches (search-patches "4store-unset-preprocessor-directive.patch"
132 "4store-fix-buildsystem.patch"))))
133 (build-system gnu-build-system)
137 ("autoconf" ,autoconf)
138 ("automake" ,automake)
139 ("gettext" ,gettext-minimal)
141 ("pcre" ,pcre "bin") ;for 'pcre-config'
142 ("pkg-config" ,pkg-config)))
148 ("readline" ,readline)
150 ("cyrus-sasl" ,cyrus-sasl)
152 ("util-linux" ,util-linux)))
155 (modify-phases %standard-phases
156 (add-after 'unpack 'generate-configure
158 (invoke "sh" "autogen.sh"))))))
159 ;; http://www.4store.org has been down for a while now.
160 (home-page "https://github.com/4store/4store")
161 (synopsis "Clustered RDF storage and query engine")
162 (description "4store is a RDF/SPARQL store written in C, supporting
163 either single machines or networked clusters.")
164 (license license:gpl3+)))
166 (define-public go-gopkg.in-mgo.v2
168 (name "go-gopkg.in-mgo.v2")
169 (version "2016.08.01")
173 (url "https://github.com/go-mgo/mgo")
174 (commit (string-append "r" version))))
175 (file-name (git-file-name name version))
178 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
179 (build-system go-build-system)
181 `(#:import-path "gopkg.in/mgo.v2"
182 ;; TODO: The tests fail as MongoDB fails to start
183 ;; Error parsing command line: unrecognised option '--chunkSize'
186 (modify-phases %standard-phases
187 (delete 'reset-gzip-timestamps)
188 (add-before 'check 'start-mongodb
189 (lambda* (#:key tests? #:allow-other-keys)
191 (with-directory-excursion "src/gopkg.in/mgo.v2"
192 (invoke "make" "startdb")))
194 (add-after 'check 'stop'mongodb
195 (lambda* (#:key tests? #:allow-other-keys)
197 (with-directory-excursion "src/gopkg.in/mgo.v2"
198 (invoke "make" "stopdb")))
201 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
203 ("daemontools" ,daemontools)))
204 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
206 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
207 It implements a rich selection of features under a simple API following
208 standard Go idioms.")
209 (home-page "http://labix.org/mgo")
210 (license license:bsd-2)))
212 (define-public es-dump-restore
214 (name "es-dump-restore")
219 (uri (rubygems-uri "es_dump_restore" version))
222 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
223 (build-system ruby-build-system)
225 '(#:tests? #f)) ;; No testsuite.
227 `(("ruby-httpclient" ,ruby-httpclient)
228 ("ruby-multi-json" ,ruby-multi-json)
229 ("ruby-progress_bar" ,ruby-progress_bar)
230 ("ruby-rubyzip" ,ruby-rubyzip)
231 ("ruby-thor" ,ruby-thor)))
232 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
234 "This package provides a utility for dumping the contents of an
235 ElasticSearch index to a compressed file and restoring the dumpfile back to an
236 ElasticSearch server")
237 (home-page "https://github.com/patientslikeme/es_dump_restore")
238 (license license:expat)))
240 (define-public leveldb
247 (url "https://github.com/google/leveldb")
249 (file-name (git-file-name name version))
252 "00v0w6883z7a6204894j59nd5v6dazn3c8hvh3sbczv4wiabppw2"))))
253 (build-system cmake-build-system)
255 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
257 `(("snappy" ,snappy)))
258 (home-page "http://leveldb.org/")
259 (synopsis "Fast key-value storage library")
261 "LevelDB is a fast key-value storage library that provides an ordered
262 mapping from string keys to string values.")
263 (license license:bsd-3)))
265 (define-public memcached
273 "https://memcached.org/files/memcached-" version ".tar.gz"))
275 (base32 "0qsdkjrns4f02lmabq8c7mzl5n4382q2p6a0dvmsjdcpjisagqb1"))))
276 (build-system gnu-build-system)
278 `(("libevent" ,libevent)
279 ("cyrus-sasl" ,cyrus-sasl)))
280 (home-page "https://memcached.org/")
281 (synopsis "In-memory caching service")
282 (description "Memcached is an in-memory key-value store. It has a small
283 and generic API, and was originally intended for use with dynamic web
285 (license license:bsd-3)))
287 (define-public mongodb
293 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
295 (file-name (string-append name "-" version ".tar.gz"))
297 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
298 (modules '((guix build utils)))
301 (for-each (lambda (dir)
302 (delete-file-recursively
303 (string-append "src/third_party/" dir)))
304 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
305 "valgrind-3.11.0" "wiredtiger"
306 "yaml-cpp-0.5.3" "zlib-1.2.8"))
310 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
311 (build-system scons-build-system)
313 `(("openssl" ,openssl)
315 ,@(match (%current-system)
316 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
317 `(("wiredtiger" ,wiredtiger)))
319 ("yaml-cpp" ,yaml-cpp)
323 `(("valgrind" ,valgrind)
326 ("python2-pymongo" ,python2-pymongo)
327 ("python2-pyyaml" ,python2-pyyaml)
330 `(#:scons ,scons-python2
332 (let ((common-options
333 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
335 ;; wiredtiger is 64-bit only
336 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
338 '("i686-linux" "armhf-linux"))
340 ``"--use-system-wiredtiger")
342 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
343 ;; --use-system-boost
344 "--use-system-snappy"
346 "--use-system-valgrind"
347 ;; "--use-system-stemmer" TODO: Missing relevant package
349 "--disable-warnings-as-errors"
350 ,(format #f "--jobs=~a" (parallel-job-count))
352 (modify-phases %standard-phases
353 (add-after 'unpack 'scons-propagate-environment
355 ;; Modify the SConstruct file to arrange for
356 ;; environment variables to be propagated.
357 (substitute* "SConstruct"
358 (("^env = Environment\\(")
359 "env = Environment(ENV=os.environ, "))
361 (add-after 'unpack 'create-version-file
363 (call-with-output-file "version.json"
365 (display ,(simple-format #f "{
371 (apply invoke `("scons"
373 "mongod" "mongo" "mongos"))))
375 (lambda* (#:key tests? inputs #:allow-other-keys)
377 (string-append (assoc-ref inputs "tzdata")
380 ;; Note that with the tests, especially the unittests, the
381 ;; build can take up to ~45GB of space, as many tests are
382 ;; individual executable files, with some being hundreds of
383 ;; megabytes in size.
384 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
385 (substitute* "build/unittests.txt"
386 ;; TODO: Don't run the async_stream_test, as it hangs
387 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
389 ;; TODO: This test fails
390 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
391 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
393 (invoke "python" "buildscripts/resmoke.py"
394 "--suites=dbtest,unittests"
395 (format #f "--jobs=~a" (parallel-job-count))))
398 (lambda* (#:key outputs #:allow-other-keys)
399 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
400 (install-file "mongod" bin)
401 (install-file "mongos" bin)
402 (install-file "mongo" bin))
404 (home-page "https://www.mongodb.org/")
405 (synopsis "High performance and high availability document database")
407 "Mongo is a high-performance, high availability, schema-free
408 document-oriented database. A key goal of MongoDB is to bridge the gap
409 between key/value stores (which are fast and highly scalable) and traditional
410 RDBMS systems (which are deep in functionality).")
411 (license (list license:agpl3
412 ;; Some parts are licensed under the Apache License
415 ;; XXX When updating, check whether boost-for-mysql is still needed.
416 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
423 (uri (list (string-append
424 "https://dev.mysql.com/get/Downloads/MySQL-"
425 (version-major+minor version) "/"
426 name "-" version ".tar.gz")
428 "https://downloads.mysql.com/archives/get/file/"
429 name "-" version ".tar.gz")))
432 "0rbc3xsc11lq2dm0ip6gxa16c06hi74scb97x5cw7yhbabaz4c07"))))
433 (build-system cmake-build-system)
436 '("-DBUILD_CONFIG=mysql_release"
439 "-DDEFAULT_CHARSET=utf8"
440 "-DDEFAULT_COLLATION=utf8_general_ci"
441 "-DMYSQL_DATADIR=/var/lib/mysql"
442 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
443 "-DINSTALL_INFODIR=share/mysql/docs"
444 "-DINSTALL_MANDIR=share/man"
445 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
446 "-DINSTALL_SCRIPTDIR=bin"
447 "-DINSTALL_INCLUDEDIR=include/mysql"
448 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
449 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
450 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
451 "-DINSTALL_DOCDIR=share/mysql/docs"
452 "-DINSTALL_SHAREDIR=share/mysql"
453 ;; Get rid of test data.
454 "-DINSTALL_MYSQLTESTDIR="
455 "-DINSTALL_SQLBENCHDIR=")
456 #:phases (modify-phases %standard-phases
458 'install 'remove-extra-binaries
459 (lambda* (#:key outputs #:allow-other-keys)
460 (let ((out (assoc-ref outputs "out")))
461 ;; Remove the 3 *_embedded files, which weigh in at
463 (for-each delete-file
464 (find-files (string-append out "/bin")
471 `(("boost" ,boost-for-mysql)
476 (home-page "https://www.mysql.com/")
477 (synopsis "Fast, easy to use, and popular database")
479 "MySQL is a fast, reliable, and easy to use relational database
480 management system that supports the standardized Structured Query
482 (license license:gpl2)))
484 (define-public mariadb
490 (uri (string-append "https://downloads.mariadb.org/f/"
491 name "-" version "/source/"
492 name "-" version ".tar.gz"))
495 "0zq77w3ff9q781fn8cv46vy1v4ggb8vjarjvk51k653x4gyg9wfa"))
496 (patches (search-patches "mariadb-client-test-32bit.patch"))
497 (modules '((guix build utils)))
500 ;; Delete bundled snappy and xz.
501 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
502 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
503 ;; This file checks that the bundled sources are present and
504 ;; declares build procedures for them.
505 (("^include\\(TokuThirdParty\\)") ""))
506 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
507 ;; Don't attempt to use the procedures we just removed.
508 ((" build_lzma build_snappy") ""))
510 ;; Preserve CMakeLists.txt for these.
511 (for-each (lambda (file)
512 (unless (string-suffix? "CMakeLists.txt" file)
514 (append (find-files "extra/yassl")
515 (find-files "pcre") (find-files "zlib")))
517 (build-system cmake-build-system)
520 '("-DBUILD_CONFIG=mysql_release"
521 ;; Linking with libarchive fails, like this:
523 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
524 ;; relocation R_X86_64_32 against `.bss' can not be used when
525 ;; making a shared object; recompile with -fPIC
527 ;; For now, disable the features that that use libarchive (xtrabackup).
528 "-DWITH_LIBARCHIVE=OFF"
530 ;; Ensure the system libraries are used.
531 "-DWITH_JEMALLOC=yes"
536 "-DDEFAULT_CHARSET=utf8"
537 "-DDEFAULT_COLLATION=utf8_general_ci"
538 "-DMYSQL_DATADIR=/var/lib/mysql"
539 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
540 "-DINSTALL_INFODIR=share/mysql/docs"
541 "-DINSTALL_MANDIR=share/man"
542 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
543 "-DINSTALL_SCRIPTDIR=bin"
544 "-DINSTALL_INCLUDEDIR=include/mysql"
545 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
546 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
547 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
548 "-DINSTALL_DOCDIR=share/mysql/docs"
549 "-DINSTALL_SHAREDIR=share")
551 (modify-phases %standard-phases
552 (add-after 'unpack 'fix-pcre-detection
554 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
555 ;; in version 8.34. Unfortunately the upstream patch behaves
556 ;; slightly differently and the build system fails to detect it.
557 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
558 ;; XXX: Consider patching PCRE instead.
559 (substitute* "cmake/pcre.cmake"
560 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
562 (add-after 'unpack 'adjust-tests
564 (let ((disabled-tests
565 '(;; These fail because root@hostname == root@localhost in
566 ;; the build environment, causing a user count mismatch.
567 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
569 "main.explain_non_select"
570 "main.stat_tables_innodb"
571 "roles.acl_statistics"
573 ;; This file contains a time bomb which makes it fail after
574 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
577 ;; XXX: Fails sporadically.
578 "innodb_fts.crash_recovery"
580 ;; FIXME: This test fails on i686:
581 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
582 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
583 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
584 ;; (all three tables must exist and be identical)
585 ;; in a loop it produces the same error around 1/240 times.
586 ;; montywi on #maria suggested removing the real_end check in
587 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
588 ;; reach the ending quote occasionally. Disable it for now.
590 ;; FIXME: This test fails on armhf-linux:
591 "mroonga/storage.index_read_multiple_double"))
593 ;; This file contains a list of known-flaky tests for this
594 ;; release. Append our own items.
595 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
596 (for-each (lambda (test)
597 (format unstable-tests "~a : ~a\n"
598 test "Disabled in Guix"))
600 (close-port unstable-tests)
602 (substitute* "mysql-test/mysql-test-run.pl"
603 (("/bin/ls") (which "ls"))
604 (("/bin/sh") (which "sh")))
606 (add-before 'configure 'disable-plugins
608 (let ((disable-plugin (lambda (name)
609 (call-with-output-file
610 (string-append "plugin/" name
613 (format port "\n")))))
614 (disabled-plugins '(;; XXX: Causes a test failure.
616 (for-each disable-plugin disabled-plugins)
619 (lambda* (#:key (tests? #t) #:allow-other-keys)
621 (with-directory-excursion "mysql-test"
622 (invoke "./mtr" "--verbose"
624 "--testcase-timeout=40"
625 "--suite-timeout=600"
626 "--parallel" (number->string (parallel-job-count))
627 "--skip-test-list=unstable-tests"))
628 (format #t "test suite not run~%"))
631 'install 'post-install
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let* ((out (assoc-ref outputs "out"))
634 (test (assoc-ref outputs "test")))
635 (substitute* (string-append out "/bin/mysql_install_db")
637 (string-append "basedir=\"" out "\"")))
638 ;; Remove unneeded files for testing.
639 (with-directory-excursion out
640 (for-each delete-file-recursively
641 '("data" "mysql-test" "sql-bench"
642 "share/man/man1/mysql-test-run.pl.1"))
643 ;; Delete huge and unnecessary executables.
644 (for-each delete-file (find-files "bin" "(test|embedded)"))
645 ;; And static libraries.
646 (for-each delete-file (find-files "lib" "\\.a$")))
652 `(("jemalloc" ,jemalloc)
661 ;; mariadb.pc says -lssl -lcrypto, so propagate it.
662 `(("openssl" ,openssl)))
663 ;; The test suite is very resource intensive and can take more than three
664 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
665 (properties '((timeout . 64800))) ;18 hours
666 (home-page "https://mariadb.org/")
667 (synopsis "SQL database server")
669 "MariaDB is a multi-user and multi-threaded SQL database server, designed
670 as a drop-in replacement of MySQL.")
671 (license license:gpl2)))
673 ;; Don't forget to update the other postgresql packages when upgrading this one.
674 (define-public postgresql
680 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
681 version "/postgresql-" version ".tar.bz2"))
684 "1piyfcrcqscjhnnwn91kdvr764s7d0qz4lgygf9bl6qc71ji1vdz"))
685 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
686 (build-system gnu-build-system)
688 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
690 (modify-phases %standard-phases
691 (add-before 'configure 'patch-/bin/sh
693 ;; Refer to the actual shell.
694 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
695 "src/bin/psql/command.c")
696 (("/bin/sh") (which "sh")))
698 (add-after 'build 'build-contrib
700 (invoke "make" "-C" "contrib")))
701 (add-after 'install 'install-contrib
703 (invoke "make" "-C" "contrib" "install"))))))
705 `(("readline" ,readline)
706 ("libuuid" ,util-linux)
709 (home-page "https://www.postgresql.org/")
710 (synopsis "Powerful object-relational database system")
712 "PostgreSQL is a powerful object-relational database system. It is fully
713 ACID compliant, has full support for foreign keys, joins, views, triggers, and
714 stored procedures (in multiple languages). It includes most SQL:2008 data
715 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
716 TIMESTAMP. It also supports storage of binary large objects, including
717 pictures, sounds, or video.")
718 (license (license:x11-style "file://COPYRIGHT"))))
720 (define-public postgresql-9.6
727 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
728 version "/postgresql-" version ".tar.bz2"))
731 "114xay230xia2fagisxahs5fc2mza8hmmkr6ibd7nxllp938931f"))))))
733 (define-public python-pymysql
735 (name "python-pymysql")
740 (uri (pypi-uri "PyMySQL" version))
742 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
743 (build-system python-build-system)
745 `(("python-unittest2" ,python-unittest2)))
747 `(("python-cryptography" ,python-cryptography)))
749 `(#:tests? #f)) ; tests expect a running MySQL
750 (home-page "https://github.com/PyMySQL/PyMySQL/")
751 (synopsis "Pure-Python MySQL driver")
753 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
754 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
755 (license license:expat)))
757 (define-public python2-pymysql
758 (package-with-python2 python-pymysql))
767 (uri (string-append "http://fallabs.com/" name "/"
768 name "-" version ".tar.gz"))
771 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
772 (build-system gnu-build-system)
774 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
775 (assoc-ref %outputs "out")
777 (home-page "http://fallabs.com/qdbm")
778 (synopsis "Key-value database")
779 (description "QDBM is a library of routines for managing a
780 database. The database is a simple data file containing key-value
781 pairs. Every key and value is serial bytes with variable length.
782 Binary data as well as character strings can be used as a key or a
783 value. There is no concept of data tables or data types. Records are
784 organized in a hash table or B+ tree.")
785 (license license:lgpl2.1+)))
787 (define-public recutils
793 (uri (string-append "mirror://gnu/recutils/recutils-"
797 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
798 (build-system gnu-build-system)
800 (arguments '(#:configure-flags
801 (list (string-append "--with-bash-headers="
802 (assoc-ref %build-inputs "bash:include")
805 (native-inputs `(("emacs" ,emacs-minimal)
807 ("bash:include" ,bash "include")
809 ("libuuid" ,util-linux)
810 ("pkg-config" ,pkg-config)))
812 ;; TODO: Add more optional inputs.
813 (inputs `(("curl" ,curl)
814 ("libgcrypt" ,libgcrypt)))
815 (synopsis "Manipulate plain text files as databases")
817 "GNU Recutils is a set of tools and libraries for creating and
818 manipulating text-based, human-editable databases. Despite being text-based,
819 databases created with Recutils carry all of the expected features such as
820 unique fields, primary keys, time stamps and more. Many different field
821 types are supported, as is encryption.")
822 (license license:gpl3+)
823 (home-page "https://www.gnu.org/software/recutils/")))
825 (define-public rocksdb
832 (url "https://github.com/facebook/rocksdb")
833 (commit (string-append "v" version))))
834 (file-name (git-file-name name version))
837 "1v2slmmr1dsgf8z0qcfg1y9x1al96859rg48b66p9nsawczd5zv9"))
838 (modules '((guix build utils)))
841 ;; TODO: unbundle gtest.
842 (delete-file "build_tools/gnu_parallel")
843 (substitute* "Makefile"
844 (("build_tools/gnu_parallel") "parallel"))
846 (build-system gnu-build-system)
848 `(#:make-flags (list "CC=gcc" "V=1"
849 ;; Ceph requires that RTTI is enabled.
851 (string-append "INSTALL_PATH="
852 (assoc-ref %outputs "out"))
854 ;; Running the full test suite takes hours and require
855 ;; a lot of disk space. Instead we only run a subset
856 ;; (see .travis.yml and Makefile).
857 "ROCKSDBTESTS_END=db_tailing_iter_test")
858 #:test-target "check_some"
859 ;; Many tests fail on 32-bit platforms. There are multiple reports about
860 ;; this upstream, but it's not going to be supported any time soon.
861 #:tests? (let ((system ,(or (%current-target-system)
863 (or (string-prefix? "x86_64-linux" system)
864 (string-prefix? "aarch64-linux" system)))
866 (modify-phases %standard-phases
867 (add-after 'unpack 'patch-Makefile
869 (substitute* "Makefile"
870 ;; Don't depend on the static library when installing.
871 (("install: install-static")
872 "install: install-shared")
873 (("#!/bin/sh") (string-append "#!" (which "sh"))))
876 ;; The default target is only needed for tests and built on demand.
878 (add-before 'check 'disable-optimizations
880 ;; Prevent the build from passing '-march=native' to the compiler.
881 (setenv "PORTABLE" "1")
883 (add-before 'check 'disable-failing-tests
885 (substitute* "Makefile"
886 ;; These tests reliably fail due to "Too many open files".
887 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
888 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
890 (add-after 'check 'build
891 ;; The default build target is a debug build for tests. The
892 ;; install target depends on the "shared_lib" release target
893 ;; so we build it here for clarity.
894 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
895 (apply invoke "make" "shared_lib"
896 `(,@(if parallel-build?
897 `("-j" ,(number->string (parallel-job-count)))
901 `(("parallel" ,parallel)
909 ("jemalloc" ,jemalloc)
913 (home-page "http://rocksdb.org/")
914 (synopsis "Persistent key-value store for fast storage")
916 "RocksDB is a library that forms the core building block for a fast
917 key-value server, especially suited for storing data on flash drives. It
918 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
919 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
920 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
921 compactions, making it specially suitable for storing multiple terabytes of
922 data in a single database. RocksDB is partially based on @code{LevelDB}.")
923 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
924 ;; files carry the 3-clause BSD license.
925 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
927 (define-public sparql-query
929 (name "sparql-query")
933 (uri (string-append "https://github.com/tialaramex/"
934 name "/archive/" version ".tar.gz"))
936 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
937 (file-name (string-append name "-" version ".tar.gz"))))
938 (build-system gnu-build-system)
940 `(("readline" ,readline)
946 `(("pkg-config" ,pkg-config)))
948 `(#:make-flags '("CC=gcc")
950 (modify-phases %standard-phases
952 ;; The Makefile uses git to obtain versioning information. This phase
953 ;; substitutes the git invocation with the package version.
954 (add-after 'unpack 'remove-git-dependency
956 (substitute* "Makefile"
958 (string-append "gitrev = \"v" ,version "\"")))
960 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
961 ;; This replacement does the same thing, except for using $PREFIX/bin
964 (lambda* (#:key outputs #:allow-other-keys)
965 (let* ((out (assoc-ref outputs "out"))
966 (bin (string-append out "/bin")))
967 (install-file "sparql-query" bin)
968 (symlink (string-append bin "/sparql-query")
969 (string-append bin "/sparql-update")))
972 (lambda* (#:key make-flags #:allow-other-keys)
973 (apply invoke "make" `(,@make-flags "scan-test"))
974 (invoke "./scan-test"))))))
975 (home-page "https://github.com/tialaramex/sparql-query/")
976 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
977 (description "Sparql-query is a command-line tool for accessing SPARQL
978 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
979 tools for interrogating SQL databases. For example, you can enter a query over
980 several lines, using a semi-colon at the end of a line to indicate the end of
981 your query. It also supports readline so that you can more easily recall and
982 edit previous queries, even across sessions. It can be used non-interactively,
983 for example from a shell script.")
984 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
985 ;; others (like sparql-query.c) contain a GPLv2+ license header.
986 (license (list license:gpl3+))))
988 (define-public sqitch
996 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-"
1001 "1cvj8grs3bzc4g7dw1zc26g4biv1frav18sq0fkvi2kk0q1aigzm"))))
1002 (build-system perl-build-system)
1005 (modify-phases %standard-phases
1006 (add-before 'check 'set-check-environment
1009 (setenv "HOME" "/tmp")
1011 (add-after 'install 'wrap-program
1012 (lambda* (#:key outputs #:allow-other-keys)
1013 (let* ((out (assoc-ref outputs "out"))
1014 (path (getenv "PERL5LIB")))
1015 (wrap-program (string-append out "/bin/sqitch")
1016 `("PERL5LIB" ":" prefix
1017 (,(string-append out "/lib/perl5/site_perl"
1022 `(("perl-capture-tiny" ,perl-capture-tiny)
1023 ("perl-io-pager" ,perl-io-pager)
1024 ("perl-module-build" ,perl-module-build)
1025 ("perl-module-runtime" ,perl-module-runtime)
1026 ("perl-path-class" ,perl-path-class)
1027 ("perl-test-deep" ,perl-test-deep)
1028 ("perl-test-dir" ,perl-test-dir)
1029 ("perl-test-exception" ,perl-test-exception)
1030 ("perl-test-file" ,perl-test-file)
1031 ("perl-test-file-contents" ,perl-test-file-contents)
1032 ("perl-test-mockmodule" ,perl-test-mockmodule)
1033 ("perl-test-nowarnings" ,perl-test-nowarnings)
1034 ("perl-test-warn" ,perl-test-warn)))
1036 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1037 ("perl-clone" ,perl-clone)
1038 ("perl-config-gitlike" ,perl-config-gitlike)
1039 ("perl-datetime" ,perl-datetime)
1040 ("perl-datetime-timezone" ,perl-datetime-timezone)
1041 ("perl-dbd-pg" ,perl-dbd-pg)
1042 ("perl-dbi" ,perl-dbi)
1043 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1044 ("perl-encode-locale" ,perl-encode-locale)
1045 ("perl-file-homedir" ,perl-file-homedir)
1046 ("perl-hash-merge" ,perl-hash-merge)
1047 ("perl-ipc-run3" ,perl-ipc-run3)
1048 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1049 ("perl-libintl-perl" ,perl-libintl-perl)
1050 ("perl-list-moreutils" ,perl-list-moreutils)
1051 ("perl-moo" ,perl-moo)
1052 ("perl-mysql-config" ,perl-mysql-config)
1053 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1054 ("perl-path-class" ,perl-path-class)
1055 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1056 ("perl-string-formatter" ,perl-string-formatter)
1057 ("perl-string-shellquote" ,perl-string-shellquote)
1058 ("perl-sub-exporter" ,perl-sub-exporter)
1059 ("perl-template-tiny" ,perl-template-tiny)
1060 ("perl-template-toolkit" ,perl-template-toolkit)
1061 ("perl-throwable" ,perl-throwable)
1062 ("perl-try-tiny" ,perl-try-tiny)
1063 ("perl-type-tiny" ,perl-type-tiny)
1064 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1065 ("perl-uri" ,perl-uri)
1066 ("perl-uri-db" ,perl-uri-db)))
1067 (home-page "https://sqitch.org/")
1068 (synopsis "Database change management tool")
1070 "Sqitch is a standalone change management system for database schemas,
1071 which uses SQL to describe changes.")
1072 (license license:x11)))
1074 (define-public sqlcrush
1075 ;; Unfortunately, there is no proper upstream release and may never be.
1076 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1080 (version (git-version "0.1.5" revision commit))
1084 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1086 (file-name (git-file-name name version))
1089 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1090 (build-system python-build-system)
1092 `(("python-cryptography" ,python-cryptography)
1093 ("python-psycopg2" ,python-psycopg2)
1094 ("python-pymysql" ,python-pymysql)
1095 ("python-sqlalchemy" ,python-sqlalchemy)))
1096 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1097 (synopsis "Text console-based database viewer and editor")
1099 "SQLcrush lets you view and edit a database directly from the text
1100 console through an ncurses interface. You can explore each table's structure,
1101 browse and edit the contents, add and delete entries, all while tracking your
1103 (license license:gpl3+)))) ; no headers, see README.md
1111 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1115 "0d9d2f1c83gmmq30bkfs50yb8399mr9xjjzscma4kyq0ajf75861"))))
1116 (build-system gnu-build-system)
1119 (modify-phases %standard-phases
1121 (lambda* (#:key outputs #:allow-other-keys)
1122 (let ((out (assoc-ref outputs "out")))
1123 ;; The 'configure' script is a wrapper for Waf and
1124 ;; doesn't recognize things like '--enable-fast-install'.
1125 (invoke "./configure"
1126 (string-append "--prefix=" out))))))))
1128 `(;; TODO: Build the documentation.
1129 ;; ("docbook-xsl" ,docbook-xsl)
1130 ;; ("libxml2" ,libxml2)
1131 ;; ("libxslt" ,libxslt)
1132 ("python" ,python) ;for the Waf build system
1134 (home-page "https://tdb.samba.org/")
1135 (synopsis "Trivial database")
1137 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1138 and BSD's DB except that it allows multiple simultaneous writers and uses
1139 locking internally to keep writers from trampling on each other. TDB is also
1141 (license license:lgpl3+)))
1143 (define-public perl-dbi
1150 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1154 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1155 (build-system perl-build-system)
1156 (synopsis "Database independent interface for Perl")
1157 (description "This package provides an database interface for Perl.")
1158 (home-page "https://metacpan.org/release/DBI")
1159 (license license:perl-license)))
1161 (define-public perl-dbix-class
1163 (name "perl-dbix-class")
1164 (version "0.082841")
1168 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1169 "DBIx-Class-" version ".tar.gz"))
1172 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1173 (build-system perl-build-system)
1175 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1176 ("perl-file-temp" ,perl-file-temp)
1177 ("perl-module-install" ,perl-module-install)
1178 ("perl-package-stash" ,perl-package-stash)
1179 ("perl-test-deep" ,perl-test-deep)
1180 ("perl-test-exception" ,perl-test-exception)
1181 ("perl-test-warn" ,perl-test-warn)))
1183 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1184 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1185 ("perl-class-inspector" ,perl-class-inspector)
1186 ("perl-config-any" ,perl-config-any)
1187 ("perl-context-preserve" ,perl-context-preserve)
1188 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1189 ("perl-data-page" ,perl-data-page)
1190 ("perl-dbi" ,perl-dbi)
1191 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1192 ("perl-hash-merge" ,perl-hash-merge)
1193 ("perl-module-find" ,perl-module-find)
1194 ("perl-moo" ,perl-moo)
1195 ("perl-mro-compat" ,perl-mro-compat)
1196 ("perl-namespace-clean" ,perl-namespace-clean)
1197 ("perl-path-class" ,perl-path-class)
1198 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1199 ("perl-scope-guard" ,perl-scope-guard)
1200 ("perl-sql-abstract" ,perl-sql-abstract)
1201 ("perl-sub-name" ,perl-sub-name)
1202 ("perl-text-balanced" ,perl-text-balanced)
1203 ("perl-try-tiny" ,perl-try-tiny)))
1204 (home-page "https://metacpan.org/release/DBIx-Class")
1205 (synopsis "Extensible and flexible object <-> relational mapper")
1206 (description "An SQL to OO mapper with an object API inspired by
1207 Class::DBI (with a compatibility layer as a springboard for porting) and a
1208 resultset API that allows abstract encapsulation of database operations. It
1209 aims to make representing queries in your code as perl-ish as possible while
1210 still providing access to as many of the capabilities of the database as
1211 possible, including retrieving related records from multiple tables in a
1212 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1213 \"ORDER BY\" and \"HAVING\" support.")
1214 (license license:perl-license)))
1216 (define-public perl-dbix-class-cursor-cached
1218 (name "perl-dbix-class-cursor-cached")
1219 (version "1.001004")
1223 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1224 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1227 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1228 (build-system perl-build-system)
1230 `(("perl-cache-cache" ,perl-cache-cache)
1231 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1232 ("perl-module-install" ,perl-module-install)))
1234 `(("perl-carp-clan" ,perl-carp-clan)
1235 ("perl-dbix-class" ,perl-dbix-class)))
1236 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1237 (synopsis "Cursor with built-in caching support")
1238 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1239 built-in caching support.")
1240 (license license:perl-license)))
1242 (define-public perl-dbix-class-introspectablem2m
1244 (name "perl-dbix-class-introspectablem2m")
1245 (version "0.001002")
1249 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1250 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1253 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1254 (build-system perl-build-system)
1256 `(("perl-module-install" ,perl-module-install)))
1258 `(("perl-dbix-class" ,perl-dbix-class)))
1259 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1260 (synopsis "Introspect many-to-many relationships")
1261 (description "Because the many-to-many relationships are not real
1262 relationships, they can not be introspected with DBIx::Class. Many-to-many
1263 relationships are actually just a collection of convenience methods installed
1264 to bridge two relationships. This DBIx::Class component can be used to store
1265 all relevant information about these non-relationships so they can later be
1266 introspected and examined.")
1267 (license license:perl-license)))
1269 (define-public perl-dbix-class-schema-loader
1271 (name "perl-dbix-class-schema-loader")
1276 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1277 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1280 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1281 (build-system perl-build-system)
1283 `(("perl-config-any" ,perl-config-any)
1284 ("perl-config-general" ,perl-config-general)
1285 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1286 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1287 ("perl-module-install" ,perl-module-install)
1288 ("perl-moose" ,perl-moose)
1289 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1290 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1291 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1292 ("perl-test-deep" ,perl-test-deep)
1293 ("perl-test-differences" ,perl-test-differences)
1294 ("perl-test-exception" ,perl-test-exception)
1295 ("perl-test-pod" ,perl-test-pod)
1296 ("perl-test-warn" ,perl-test-warn)))
1298 `(("perl-class-unload" ,perl-class-unload)
1299 ("perl-class-inspector" ,perl-class-inspector)
1300 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1301 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1302 ("perl-carp-clan" ,perl-carp-clan)
1303 ("perl-data-dump" ,perl-data-dump)
1304 ("perl-dbix-class" ,perl-dbix-class)
1305 ("perl-hash-merge" ,perl-hash-merge)
1306 ("perl-list-moreutils" ,perl-list-moreutils)
1307 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1308 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1309 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1310 ("perl-namespace-clean" ,perl-namespace-clean)
1311 ("perl-mro-compat" ,perl-mro-compat)
1312 ("perl-scope-guard" ,perl-scope-guard)
1313 ("perl-string-camelcase" ,perl-string-camelcase)
1314 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1315 ("perl-sub-name" ,perl-sub-name)
1316 ("perl-try-tiny" ,perl-try-tiny)))
1317 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1318 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1319 (synopsis "Create a DBIx::Class::Schema based on a database")
1320 (description "DBIx::Class::Schema::Loader automates the definition of a
1321 DBIx::Class::Schema by scanning database table definitions and setting up the
1322 columns, primary keys, unique constraints and relationships.")
1323 (license license:perl-license)))
1325 (define-public perl-dbd-pg
1327 (name "perl-dbd-pg")
1332 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1333 "DBD-Pg-" version ".tar.gz"))
1336 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1337 (build-system perl-build-system)
1339 `(("perl-dbi" ,perl-dbi)))
1341 `(("perl-dbi" ,perl-dbi)
1342 ("postgresql" ,postgresql)))
1343 (home-page "https://metacpan.org/release/DBD-Pg")
1344 (synopsis "DBI PostgreSQL interface")
1345 (description "This package provides a PostgreSQL driver for the Perl5
1346 @dfn{Database Interface} (DBI).")
1347 (license license:perl-license)))
1349 (define-public perl-dbd-mysql
1351 (name "perl-dbd-mysql")
1356 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1357 "DBD-mysql-" version ".tar.gz"))
1359 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1360 (build-system perl-build-system)
1363 (modify-phases %standard-phases
1364 (add-before 'configure 'skip-library-detection
1365 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1366 ;; are really only needed for the test suite; their absence does not
1367 ;; affect the build or the end result.
1369 (substitute* "Makefile.PL"
1370 (("use Devel::CheckLib;" match)
1371 (string-append "# " match))
1375 ;; Tests require running MySQL server.
1378 `(("perl-dbi" ,perl-dbi)
1380 (home-page "https://metacpan.org/release/DBD-mysql")
1381 (synopsis "DBI MySQL interface")
1382 (description "This package provides a MySQL driver for the Perl5
1383 @dfn{Database Interface} (DBI).")
1384 (license license:perl-license)))
1386 (define-public perl-dbd-sqlite
1388 (name "perl-dbd-sqlite")
1393 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1397 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1398 (build-system perl-build-system)
1399 (inputs `(("sqlite" ,sqlite)))
1400 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1401 (synopsis "SQlite interface for Perl")
1402 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1403 the entire thing in the distribution. So in order to get a fast transaction
1404 capable RDBMS working for your Perl project you simply have to install this
1405 module, and nothing else.")
1406 (license license:perl-license)
1407 (home-page "https://metacpan.org/release/DBD-SQLite")))
1409 (define-public perl-mysql-config
1411 (name "perl-mysql-config")
1417 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1422 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1423 (build-system perl-build-system)
1424 (home-page "https://metacpan.org/release/MySQL-Config")
1425 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1427 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1428 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1429 @code{Getopt::Long}.")
1430 (license license:perl-license)))
1432 (define-public perl-sql-abstract
1434 (name "perl-sql-abstract")
1439 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1440 "SQL-Abstract-" version ".tar.gz"))
1442 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1443 (build-system perl-build-system)
1445 `(("perl-module-install" ,perl-module-install)
1446 ("perl-test-deep" ,perl-test-deep)
1447 ("perl-test-exception" ,perl-test-exception)
1448 ("perl-test-warn" ,perl-test-warn)))
1450 `(("perl-hash-merge" ,perl-hash-merge)
1451 ("perl-moo" ,perl-moo)
1452 ("perl-mro-compat" ,perl-mro-compat)
1453 ("perl-text-balanced" ,perl-text-balanced)))
1454 (home-page "https://metacpan.org/release/SQL-Abstract")
1455 (synopsis "Generate SQL from Perl data structures")
1456 (description "This module was inspired by the excellent DBIx::Abstract.
1457 While based on the concepts used by DBIx::Abstract, the concepts used have
1458 been modified to make the SQL easier to generate from Perl data structures.
1459 The underlying idea is for this module to do what you mean, based on the data
1460 structures you provide it, so that you don't have to modify your code every
1461 time your data changes.")
1462 (license license:perl-license)))
1464 (define-public perl-sql-splitstatement
1466 (name "perl-sql-splitstatement")
1471 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1472 "SQL-SplitStatement-" version ".tar.gz"))
1475 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1476 (build-system perl-build-system)
1478 `(("perl-test-exception" ,perl-test-exception)))
1480 `(("perl-class-accessor" ,perl-class-accessor)
1481 ("perl-list-moreutils" ,perl-list-moreutils)
1482 ("perl-regexp-common" ,perl-regexp-common)
1483 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1484 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1485 (synopsis "Split SQL code into atomic statements")
1486 (description "This module tries to split any SQL code, even including
1487 non-standard extensions, into the atomic statements it is composed of.")
1488 (license license:perl-license)))
1490 (define-public perl-sql-tokenizer
1492 (name "perl-sql-tokenizer")
1497 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1498 "SQL-Tokenizer-" version ".tar.gz"))
1501 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1502 (build-system perl-build-system)
1503 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1504 (synopsis "SQL tokenizer")
1505 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1506 claim to be a parser or query verifier. It just creates sane tokens from a
1508 (license license:perl-license)))
1510 (define-public unixodbc
1518 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1521 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1522 (build-system gnu-build-system)
1523 (synopsis "Data source abstraction library")
1524 (description "Unixodbc is a library providing an API with which to access
1525 data sources. Data sources include SQL Servers and any software with an ODBC
1527 (license license:lgpl2.1+)
1528 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1529 (home-page "http://www.unixodbc.org")))
1531 (define-public unqlite
1537 ;; Contains bug fixes against the official release, and has an
1538 ;; autotooled build system.
1539 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1541 "unqlite-unofficial-" version ".tar.gz"))
1544 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1545 (build-system gnu-build-system)
1546 (arguments `(#:tests? #f)) ;No check target
1547 (home-page "http://www.unqlite.org")
1548 (synopsis "In-memory key/value and document store")
1550 "UnQLite is an in-process software library which implements a
1551 self-contained, serverless, zero-configuration, transactional NoSQL
1552 database engine. UnQLite is a document store database similar to
1553 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1554 similar to BerkeleyDB, LevelDB, etc.")
1555 (license license:bsd-2)))
1557 (define-public redis
1563 (uri (string-append "http://download.redis.io/releases/redis-"
1567 "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx"))))
1568 (build-system gnu-build-system)
1570 '(#:tests? #f ; tests related to master/slave and replication fail
1571 #:phases (modify-phases %standard-phases
1572 (delete 'configure))
1573 #:make-flags `("CC=gcc"
1576 ,(string-append "PREFIX="
1577 (assoc-ref %outputs "out")))))
1578 (synopsis "Key-value cache and store")
1579 (description "Redis is an advanced key-value cache and store. Redis
1580 supports many data structures including strings, hashes, lists, sets, sorted
1581 sets, bitmaps and hyperloglogs.")
1582 (home-page "http://redis.io/")
1583 (license license:bsd-3)))
1585 (define-public kyotocabinet
1587 (name "kyotocabinet")
1591 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1592 name "-" version ".tar.gz"))
1595 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1596 (build-system gnu-build-system)
1600 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1601 (string-append "LDFLAGS=-Wl,-rpath="
1602 (assoc-ref %outputs "out") "/lib"))))
1603 (inputs `(("zlib" ,zlib)))
1604 (home-page "http://fallabs.com/kyotocabinet/")
1606 "Kyoto Cabinet is a modern implementation of the DBM database")
1608 "Kyoto Cabinet is a standalone file-based database that supports Hash
1609 and B+ Tree data storage models. It is a fast key-value lightweight
1610 database and supports many programming languages. It is a NoSQL database.")
1611 (license license:gpl3+)))
1613 (define-public tokyocabinet
1615 (name "tokyocabinet")
1620 (uri (string-append "http://fallabs.com/tokyocabinet/"
1621 name "-" version ".tar.gz"))
1624 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1625 (build-system gnu-build-system)
1628 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1629 (string-append "LDFLAGS=-Wl,-rpath="
1630 (assoc-ref %outputs "out") "/lib"))))
1633 (home-page "http://fallabs.com/tokyocabinet/")
1634 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1636 "Tokyo Cabinet is a library of routines for managing a database.
1637 The database is a simple data file containing records, each is a pair of a
1638 key and a value. Every key and value is serial bytes with variable length.
1639 Both binary data and character string can be used as a key and a value.
1640 There is neither concept of data tables nor data types. Records are
1641 organized in hash table, B+ tree, or fixed-length array.")
1642 (license license:lgpl2.1+)))
1644 (define-public wiredtiger
1651 "http://source.wiredtiger.com/releases/wiredtiger-"
1652 version ".tar.bz2"))
1655 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1656 (build-system gnu-build-system)
1658 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1660 (modify-phases %standard-phases
1661 (add-before 'check 'disable-test/fops
1663 ;; XXX: timed out after 3600 seconds of silence
1664 (substitute* "Makefile"
1670 ("snappy" ,snappy)))
1671 (home-page "http://source.wiredtiger.com/")
1672 (synopsis "NoSQL data engine")
1674 "WiredTiger is an extensible platform for data management. It supports
1675 row-oriented storage (where all columns of a row are stored together),
1676 column-oriented storage (where columns are stored in groups, allowing for
1677 more efficient access and storage of column subsets) and log-structured merge
1678 trees (LSM), for sustained throughput under random insert workloads.")
1679 (license license:gpl3) ; or GPL-2
1680 ;; configure.ac: WiredTiger requires a 64-bit build.
1681 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1683 (define-public wiredtiger-3
1685 (inherit wiredtiger)
1690 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1691 version ".tar.bz2"))
1694 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
1696 (define-public guile-wiredtiger
1698 (name "guile-wiredtiger")
1703 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1704 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
1705 (file-name (string-append name "-" version "-checkout"))
1708 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
1709 (build-system gnu-build-system)
1711 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
1713 (list (string-append "--with-libwiredtiger-prefix="
1714 (assoc-ref %build-inputs "wiredtiger")))
1715 #:make-flags '("GUILE_AUTO_COMPILE=0")))
1717 `(("autoconf" ,autoconf)
1718 ("automake" ,automake)
1719 ("pkg-config" ,pkg-config)))
1721 `(("wiredtiger" ,wiredtiger-3)
1722 ("guile" ,guile-2.2)))
1724 `(("guile-bytestructures" ,guile-bytestructures)))
1725 (synopsis "WiredTiger bindings for GNU Guile")
1727 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1729 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1730 (license license:gpl3+)))
1732 (define-public perl-db-file
1734 (name "perl-db-file")
1740 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1745 "0sildz1i3fmh949w1scpjsyjx0cbmfw0yna3y70mc6vbwp8y696y"))))
1746 (build-system perl-build-system)
1747 (inputs `(("bdb" ,bdb)))
1748 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1750 `(#:phases (modify-phases %standard-phases
1752 'configure 'modify-config.in
1753 (lambda* (#:key inputs #:allow-other-keys)
1754 (substitute* "config.in"
1755 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1757 (home-page "https://metacpan.org/release/DB_File")
1759 "Perl5 access to Berkeley DB version 1.x")
1761 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1762 (license license:perl-license)))
1772 (url "https://github.com/LMDB/lmdb.git")
1773 (commit (string-append "LMDB_" version))))
1774 (file-name (git-file-name name version))
1776 (base32 "0ag7l5180ajvm73y59m7sn3p52xm8m972d08cshxhpwgwa4v35k6"))))
1777 (build-system gnu-build-system)
1779 `(#:test-target "test"
1781 (modify-phases %standard-phases
1783 (lambda* (#:key outputs #:allow-other-keys)
1784 (chdir "libraries/liblmdb")
1785 (substitute* "Makefile"
1786 (("/usr/local") (assoc-ref outputs "out")))
1788 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1789 (synopsis "Lightning Memory-Mapped Database library")
1791 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1792 transactional database. Unlike more complex relational databases, LMDB handles
1793 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1794 underlying operating system for caching and locking, keeping the code small and
1796 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1797 disk-based databases with high read performance that scales linearly over
1798 multiple cores. The size of each database is limited only by the size of the
1799 virtual address space — not physical RAM.")
1800 (license license:openldap2.8)))
1802 (define-public libpqxx
1809 "http://pqxx.org/download/software/libpqxx/"
1810 name "-" version ".tar.gz"))
1813 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1814 (build-system gnu-build-system)
1816 `(("python" ,python-2)))
1817 (inputs `(("postgresql" ,postgresql)))
1819 `(#:tests? #f ; # FAIL: 1
1821 (modify-phases %standard-phases
1822 (add-before 'configure 'fix-sed-command
1824 ;; Newer sed versions error out if double brackets are not used.
1825 (substitute* "configure"
1826 (("\\[:space:\\]") "[[:space:]]"))
1828 (synopsis "C++ connector for PostgreSQL")
1830 "Libpqxx is a C++ library to enable user programs to communicate with the
1831 PostgreSQL database back-end. The database back-end can be local or it may be
1832 on another machine, accessed via TCP/IP.")
1833 (home-page "http://pqxx.org/")
1834 (license license:bsd-3)))
1836 (define-public python-peewee
1838 (name "python-peewee")
1843 (uri (pypi-uri "peewee" version))
1846 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
1847 (build-system python-build-system)
1849 `(#:tests? #f)) ; Fails to import test data
1851 `(("python-cython" ,python-cython)))
1852 (home-page "https://github.com/coleifer/peewee/")
1853 (synopsis "Small object-relational mapping utility")
1855 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1856 handles converting between pythonic values and those used by databases, so you
1857 can use Python types in your code without having to worry. It has built-in
1858 support for sqlite, mysql and postgresql. If you already have a database, you
1859 can autogenerate peewee models using @code{pwiz}, a model generator.")
1860 (license license:expat)))
1862 (define-public python2-peewee
1863 (package-with-python2 python-peewee))
1865 (define-public sqlcipher
1872 (uri (string-append "https://github.com/sqlcipher/" name
1873 "/archive/v" version ".tar.gz"))
1875 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
1876 (file-name (string-append name "-" version ".tar.gz"))))
1877 (build-system gnu-build-system)
1879 `(("libcrypto" ,openssl)
1880 ("libtcl8.6" ,tcl))) ; required for running the tests
1885 '("--enable-tempstore=yes"
1886 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1887 "LDFLAGS=-lcrypto -ltcl8.6"
1889 ;; tests cannot be run from the Makefile
1890 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1891 #:test-target "testfixture"
1893 (modify-phases %standard-phases
1894 (add-before 'check 'build-test-runner
1895 (assoc-ref %standard-phases 'check))
1898 (invoke "./testfixture" "test/crypto.test"))))))
1899 (home-page "https://www.zetetic.net/sqlcipher/")
1901 "Library providing transparent encryption of SQLite database files")
1902 (description "SQLCipher is an implementation of SQLite, extended to
1903 provide transparent 256-bit AES encryption of database files. Pages are
1904 encrypted before being written to disk and are decrypted when read back. It’s
1905 well suited for protecting embedded application databases and for mobile
1908 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1909 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1910 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1911 ;; source files are in the public domain.
1912 (license (list license:public-domain license:bsd-3))))
1914 (define-public python-pyodbc-c
1916 (name "python-pyodbc-c")
1921 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1922 "archive.tar.gz?ref=v" version))
1925 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1926 (file-name (string-append name "-" version ".tar.gz"))))
1927 (build-system python-build-system)
1929 `(("unixodbc" ,unixodbc)))
1931 `(;; No unit tests exist.
1933 (home-page "https://github.com/mkleehammer/pyodbc")
1934 (synopsis "Python ODBC Library")
1935 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1937 (license (license:x11-style "file://LICENSE.TXT"))))
1939 (define-public python2-pyodbc-c
1940 (package-with-python2 python-pyodbc-c))
1942 (define-public python-pyodbc
1944 (name "python-pyodbc")
1949 (uri (pypi-uri "pyodbc" version))
1951 (base32 "1qrxnf7ji5hml7z4y669k4wmk3iz2pcsr05bnn1n912asash09z5"))
1952 (file-name (string-append name "-" version ".tar.gz"))))
1953 (build-system python-build-system)
1955 `(("unixodbc" ,unixodbc)))
1957 `(;; No unit tests exist.
1959 (home-page "https://github.com/mkleehammer/pyodbc")
1960 (synopsis "Python ODBC Library")
1961 (description "@code{python-pyodbc} provides a Python DB-API driver
1963 (license (license:x11-style "file:///LICENSE.TXT"))))
1965 (define-public python2-pyodbc
1966 (package-with-python2 python-pyodbc))
1968 (define-public mdbtools
1976 (url "https://github.com/brianb/mdbtools.git")
1978 (file-name (git-file-name name version))
1981 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
1982 (build-system gnu-build-system)
1986 `(("autoconf" ,autoconf)
1987 ("automake" ,automake)
1988 ("libtool" ,libtool)
1989 ("pkg-config" ,pkg-config)
1990 ("txt2man" ,txt2man)
1992 (home-page "http://mdbtools.sourceforge.net/")
1993 (synopsis "Read Microsoft Access databases")
1994 (description "MDB Tools is a set of tools and applications to read the
1995 proprietary MDB file format used in Microsoft's Access database package. This
1996 includes programs to export schema and data from Microsoft's Access database
1997 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
1998 etc., and an SQL engine for performing simple SQL queries.")
1999 (license (list license:lgpl2.0
2002 (define-public python-lmdb
2004 (name "python-lmdb")
2008 (uri (pypi-uri "lmdb" version))
2011 "1zh38gvkqw1jm5105if6rr7ccbgyxr7k2rm5ygb9ab3bq82pyaww"))
2012 (modules '((guix build utils)))
2014 ;; Delete bundled lmdb source files.
2016 (for-each delete-file (list "lib/lmdb.h"
2021 (build-system python-build-system)
2026 (modify-phases %standard-phases
2027 (add-before 'build 'use-system-lmdb
2028 (lambda* (#:key inputs #:allow-other-keys)
2029 (let ((lmdb (assoc-ref inputs "lmdb")))
2030 (setenv "LMDB_FORCE_SYSTEM" "set")
2031 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2032 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2034 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2036 (home-page "https://github.com/dw/py-lmdb")
2037 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2039 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2040 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2042 (list license:openldap2.8
2043 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2044 ;; but not actually needed on platforms currently supported by Guix.
2047 (define-public python2-lmdb
2048 (package-with-python2 python-lmdb))
2050 (define-public python-orator
2052 (name "python-orator")
2056 (uri (pypi-uri "orator" version))
2059 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2060 (build-system python-build-system)
2063 (modify-phases %standard-phases
2064 (add-after 'unpack 'loosen-dependencies
2065 ;; Tests are not actually run since they are not included with the
2066 ;; distributed package, but dependencies are checked.
2068 (substitute* "setup.py"
2070 (("flexmock==0.9.7") "flexmock")
2071 ;; The pytest-mock package is out of date, so we remove minimum
2072 ;; version requirement.
2073 (("pytest-mock.*'") "pytest-mock'"))
2076 `(("python-pytest-mock" ,python-pytest-mock)
2077 ("python-pytest" ,python-pytest)
2078 ("python-flexmock" ,python-flexmock)))
2080 `(("python-backpack" ,python-backpack)
2081 ("python-blinker" ,python-blinker)
2082 ("python-cleo" ,python-cleo)
2083 ("python-faker" ,python-faker)
2084 ("python-inflection" ,python-inflection)
2085 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2086 ("python-pendulum" ,python-pendulum)
2087 ("python-pyaml" ,python-pyaml)
2088 ("python-pygments" ,python-pygments)
2089 ("python-simplejson" ,python-simplejson)
2090 ("python-six" ,python-six)
2091 ("python-wrapt" ,python-wrapt)))
2092 (home-page "https://orator-orm.com/")
2093 (synopsis "ActiveRecord ORM for Python")
2095 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2096 implementation for Python.")
2097 (license license:expat)
2098 (properties `((python2-variant . ,(delay python2-orator))))))
2100 (define-public python2-orator
2101 (package-with-python2 (strip-python2-variant python-orator)))
2103 (define-public virtuoso-ose
2105 (name "virtuoso-ose")
2111 "https://github.com/openlink/virtuoso-opensource/releases/"
2112 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2114 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2115 (build-system gnu-build-system)
2117 `(#:tests? #f ; Tests require a network connection.
2118 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2119 ;; This indicates that the internal zlib code may still be used.
2120 #:configure-flags '("--without-internal-zlib"
2121 "--with-readline")))
2123 `(("openssl" ,openssl)
2124 ("net-tools" ,net-tools)
2125 ("readline" ,readline)
2127 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2128 (synopsis "Multi-model database system")
2129 (description "Virtuoso is a scalable cross-platform server that combines
2130 relational, graph, and document data management with web application server
2131 and web services platform functionality.")
2132 ;; configure: error: ... can only be build on 64bit platforms
2133 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2134 (license license:gpl2)))
2136 (define-public python-ccm
2143 (uri (pypi-uri "ccm" version))
2146 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2147 (build-system python-build-system)
2149 `(("python-pyyaml" ,python-pyyaml)
2150 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2152 ("python-psutil" ,python-psutil)
2153 ("python-six" ,python-six)))
2154 (home-page "https://github.com/pcmanus/ccm")
2155 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2157 (description "Cassandra Cluster Manager is a development tool for testing
2158 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2160 (license license:asl2.0)))
2162 (define-public python2-ccm
2163 (package-with-python2 python-ccm))
2165 (define-public python2-pysqlite
2167 (name "python2-pysqlite")
2172 (uri (pypi-uri "pysqlite" version))
2175 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2176 (build-system python-build-system)
2178 `(("sqlite" ,sqlite)))
2180 `(#:python ,python-2 ; incompatible with Python 3
2181 #:tests? #f)) ; no test target
2182 (home-page "https://github.com/ghaering/pysqlite")
2183 (synopsis "SQLite bindings for Python")
2185 "Pysqlite provides SQLite bindings for Python that comply to the
2186 Database API 2.0T.")
2187 (license license:zlib)))
2189 (define-public python-sqlalchemy
2191 (name "python-sqlalchemy")
2196 (uri (pypi-uri "SQLAlchemy" version))
2198 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2199 (build-system python-build-system)
2201 `(("python-cython" ,python-cython) ; for C extensions
2202 ("python-pytest" ,python-pytest)
2203 ("python-mock" ,python-mock))) ; for tests
2206 (modify-phases %standard-phases
2208 (lambda _ (invoke "py.test"))))))
2209 (home-page "https://www.sqlalchemy.org")
2210 (synopsis "Database abstraction library")
2212 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2213 gives application developers the full power and flexibility of SQL. It
2214 provides a full suite of well known enterprise-level persistence patterns,
2215 designed for efficient and high-performing database access, adapted into a
2216 simple and Pythonic domain language.")
2217 (license license:x11)))
2219 (define-public python2-sqlalchemy
2220 (package-with-python2 python-sqlalchemy))
2222 (define-public python-sqlalchemy-utils
2224 (name "python-sqlalchemy-utils")
2229 (uri (pypi-uri "SQLAlchemy-Utils" version))
2232 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2233 (build-system python-build-system)
2235 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2237 ;; (modify-phases %standard-phases
2240 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2242 `(("python-six" ,python-six)
2243 ("python-sqlalchemy" ,python-sqlalchemy)))
2245 `(("python-dateutil" ,python-dateutil)
2246 ("python-flexmock" ,python-flexmock)
2247 ("python-psycopg2" ,python-psycopg2)
2248 ("python-pytest" ,python-pytest)
2249 ("python-pytz" ,python-pytz)))
2250 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2251 (synopsis "Various utility functions for SQLAlchemy")
2253 "SQLAlchemy-utils provides various utility functions and custom data types
2254 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2256 You might also want to install the following optional dependencies:
2258 @item @code{python-passlib}
2259 @item @code{python-babel}
2260 @item @code{python-cryptography}
2261 @item @code{python-pytz}
2262 @item @code{python-psycopg2}
2263 @item @code{python-furl}
2264 @item @code{python-flask-babel}
2267 (license license:bsd-3)))
2269 (define-public python2-sqlalchemy-utils
2270 (package-with-python2 python-sqlalchemy-utils))
2272 (define-public python-alembic
2274 (name "python-alembic")
2279 (uri (pypi-uri "alembic" version))
2282 "0asqz9mwc4w8bsar1icv3ik9jslxrj3gv3yxgmhc6nc6r9qbkg04"))))
2283 (build-system python-build-system)
2285 `(("python-mock" ,python-mock)
2286 ("python-pytest-cov" ,python-pytest-cov)))
2288 `(("python-dateutil" ,python-dateutil)
2289 ("python-sqlalchemy" ,python-sqlalchemy)
2290 ("python-mako" ,python-mako)
2291 ("python-editor" ,python-editor)))
2292 (home-page "https://bitbucket.org/zzzeek/alembic")
2294 "Database migration tool for SQLAlchemy")
2296 "Alembic is a lightweight database migration tool for usage with the
2297 SQLAlchemy Database Toolkit for Python.")
2298 (license license:expat)))
2300 (define-public python2-alembic
2301 (package-with-python2 python-alembic))
2303 (define-public python-pickleshare
2305 (name "python-pickleshare")
2310 (uri (pypi-uri "pickleshare" version))
2312 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2313 (build-system python-build-system)
2315 `(#:phases (modify-phases %standard-phases
2318 (invoke "pytest"))))))
2320 `(("python-pytest" ,python-pytest)))
2321 (home-page "https://github.com/vivainio/pickleshare")
2322 (synopsis "Tiny key value database with concurrency support")
2324 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2325 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2326 shelve, many processes can access the database simultaneously. Changing a
2327 value in database is immediately visible to other processes accessing the same
2328 database. Concurrency is possible because the values are stored in separate
2329 files. Hence the “database” is a directory where all files are governed by
2331 (properties `((python2-variant . ,(delay python2-pickleshare))))
2332 (license license:expat)))
2334 (define-public python2-pickleshare
2335 (let ((pickleshare (package-with-python2
2336 (strip-python2-variant python-pickleshare))))
2337 (package (inherit pickleshare)
2338 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2339 ,@(package-propagated-inputs pickleshare))))))
2341 (define-public python-apsw
2343 (name "python-apsw")
2344 (version "3.20.1-r1")
2348 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
2350 (file-name (string-append "apsw-" version ".tar.gz"))
2353 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
2354 (build-system python-build-system)
2356 `(("sqlite" ,sqlite)))
2359 (modify-phases %standard-phases
2362 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2364 (add-after 'build 'build-test-helper
2366 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2367 "-I." "-Isqlite3" "src/testextension.c")
2370 (add-after 'install 'check
2371 (lambda* (#:key inputs outputs #:allow-other-keys)
2372 (add-installed-pythonpath inputs outputs)
2373 (invoke "python" "setup.py" "test")
2375 (home-page "https://github.com/rogerbinns/apsw/")
2376 (synopsis "Another Python SQLite Wrapper")
2377 (description "APSW is a Python wrapper for the SQLite
2378 embedded relational database engine. In contrast to other wrappers such as
2379 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2380 translate the complete SQLite API into Python.")
2381 (license license:zlib)))
2383 (define-public python2-apsw
2384 (package-with-python2 python-apsw))
2386 (define-public python2-neo4j-driver
2388 (name "python2-neo4j-driver")
2389 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2393 (uri (pypi-uri "neo4j-driver" version))
2396 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2397 (build-system python-build-system)
2399 `(#:python ,python-2))
2400 (home-page "https://neo4j.com/developer/python/")
2401 (synopsis "Neo4j driver code written in Python")
2402 (description "This package provides the Neo4j Python driver that connects
2403 to the database using Neo4j's binary protocol. It aims to be minimal, while
2404 being idiomatic to Python.")
2405 (license license:asl2.0)))
2407 (define-public python2-py2neo
2409 (name "python2-py2neo")
2413 (uri (pypi-uri "py2neo" version))
2416 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2417 (build-system python-build-system)
2419 `(#:python ,python-2))
2420 (home-page "http://py2neo.org")
2421 (synopsis "Library and toolkit for working with Neo4j in Python")
2422 (description "This package provides a client library and toolkit for
2423 working with Neo4j from within Python applications and from the command
2424 line. The core library has no external dependencies and has been carefully
2425 designed to be easy and intuitive to use.")
2426 (license license:asl2.0)))
2428 (define-public python-psycopg2
2430 (name "python-psycopg2")
2435 (uri (pypi-uri "psycopg2" version))
2437 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2438 (build-system python-build-system)
2440 ;; Tests would require a postgresql database "psycopg2_test"
2441 ;; and a running postgresql database management service.
2442 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2444 `(("postgresql" ,postgresql))) ; libpq
2445 (home-page "http://initd.org/psycopg/")
2446 (synopsis "Python PostgreSQL adapter")
2448 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2450 (license license:lgpl3+)))
2452 (define-public python2-psycopg2
2453 (package-with-python2 python-psycopg2))
2455 (define-public python-sadisplay
2457 (name "python-sadisplay")
2462 (uri (pypi-uri "sadisplay" version))
2465 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2466 (build-system python-build-system)
2468 `(("python-sqlalchemy" ,python-sqlalchemy)))
2471 `(("python-nose" ,python-nose)))
2472 (home-page "https://bitbucket.org/estin/sadisplay")
2473 (synopsis "SQLAlchemy schema displayer")
2474 (description "This package provides a program to build Entity
2475 Relationship diagrams from a SQLAlchemy model (or directly from the
2477 (license license:bsd-3)))
2479 (define-public python2-sadisplay
2480 (package-with-python2 python-sadisplay))
2482 (define-public python-mysqlclient
2484 (name "python-mysqlclient")
2489 (uri (pypi-uri "mysqlclient" version))
2492 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2493 (build-system python-build-system)
2495 `(("mariadb" ,mariadb)
2496 ("nose" ,python-nose)
2497 ("mock" ,python-mock)
2498 ("py.test" ,python-pytest)))
2502 ("openssl" ,openssl)))
2503 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2504 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2505 (description "MySQLdb is an interface to the popular MySQL database server
2506 for Python. The design goals are:
2508 @item Compliance with Python database API version 2.0 [PEP-0249],
2509 @item Thread-safety,
2510 @item Thread-friendliness (threads will not block each other).
2512 (license license:gpl2)))
2514 (define-public python2-mysqlclient
2515 (package-with-python2 python-mysqlclient))
2517 (define-public python-hiredis
2519 (name "python-hiredis")
2524 (uri (pypi-uri "hiredis" version))
2527 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2528 (build-system python-build-system)
2532 (home-page "https://github.com/redis/hiredis-py")
2533 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2534 (description "Python-hiredis is a python extension that wraps protocol
2535 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2536 (license license:bsd-3)))
2538 (define-public python2-hiredis
2539 (package-with-python2 python-hiredis))
2541 (define-public python-fakeredis
2543 (name "python-fakeredis")
2548 (uri (pypi-uri "fakeredis" version))
2551 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2552 (build-system python-build-system)
2556 (home-page "https://github.com/jamesls/fakeredis")
2557 (synopsis "Fake implementation of redis API for testing purposes")
2559 "Fakeredis is a pure-Python implementation of the redis-py Python client
2560 that simulates talking to a redis server. It was created for a single purpose:
2561 to write unit tests.
2563 Setting up redis is not hard, but one often wants to write unit tests that don't
2564 talk to an external server such as redis. This module can be used as a
2565 reasonable substitute.")
2566 (license license:bsd-3)))
2568 (define-public python2-fakeredis
2569 (package-with-python2 python-fakeredis))
2571 (define-public python-redis
2573 (name "python-redis")
2578 (uri (pypi-uri "redis" version))
2580 (base32 "0wwj8il4c3aff15xwwcjfci367zxsakq05ps1a2il6yavp91i94c"))))
2581 (build-system python-build-system)
2582 ;; Tests require a running Redis server.
2583 (arguments '(#:tests? #f))
2584 ;; As long as we are not running test, we do not need this input :-)
2586 ;; `(("python-pytest" ,python-pytest)))
2587 (home-page "https://github.com/andymccurdy/redis-py")
2588 (synopsis "Redis Python client")
2590 "This package provides a Python interface to the Redis key-value store.")
2591 (license license:expat)))
2593 (define-public python2-redis
2594 (package-with-python2 python-redis))
2596 (define-public python-rq
2603 (uri (pypi-uri "rq" version))
2605 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2606 (build-system python-build-system)
2608 `(("python-click" ,python-click)
2609 ("python-redis" ,python-redis)))
2610 (home-page "http://python-rq.org/")
2611 (synopsis "Simple job queues for Python")
2613 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2614 processing them in the background with workers. It is backed by Redis and it
2615 is designed to have a low barrier to entry.")
2616 (license license:bsd-2)))
2618 (define-public python2-rq
2619 (package-with-python2 python-rq))
2621 (define-public python-trollius-redis
2623 (name "python-trollius-redis")
2628 (uri (pypi-uri "trollius_redis" version))
2631 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2632 (build-system python-build-system)
2633 ;; TODO: Tests require packaging 'hiredis'.
2634 (arguments '(#:tests? #f))
2635 (home-page "https://github.com/benjolitz/trollius-redis")
2636 (synopsis "Port of asyncio-redis to trollius")
2637 (description "@code{trollius-redis} is a Redis client for Python
2638 trollius. It is an asynchronious IO (PEP 3156) implementation of the
2640 (license license:bsd-2)))
2642 (define-public python2-trollius-redis
2643 (package-with-python2 python-trollius-redis))
2645 (define-public python-sqlparse
2647 (name "python-sqlparse")
2651 (uri (pypi-uri "sqlparse" version))
2654 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2655 (build-system python-build-system)
2658 (modify-phases %standard-phases
2660 (lambda _ (invoke "py.test"))))))
2662 `(("python-pytest" ,python-pytest)))
2663 (home-page "https://github.com/andialbrecht/sqlparse")
2664 (synopsis "Non-validating SQL parser")
2665 (description "Sqlparse is a non-validating SQL parser for Python. It
2666 provides support for parsing, splitting and formatting SQL statements.")
2667 (license license:bsd-3)))
2669 (define-public python2-sqlparse
2670 (package-with-python2 python-sqlparse))
2672 (define-public python-sql
2679 (uri (pypi-uri "python-sql" version))
2681 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
2682 (build-system python-build-system)
2683 (home-page "https://python-sql.tryton.org/")
2684 (synopsis "Library to write SQL queries in a pythonic way")
2685 (description "@code{python-sql} is a library to write SQL queries, that
2686 transforms idiomatic python function calls to well-formed SQL queries.")
2687 (license license:bsd-3)))
2689 (define-public python2-sql
2690 (package-with-python2 python-sql))
2692 (define-public mongo-tools
2694 (name "mongo-tools")
2697 (origin (method git-fetch)
2699 (url "https://github.com/mongodb/mongo-tools")
2700 (commit (string-append "r" version))))
2701 (file-name (git-file-name name version))
2704 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
2705 (build-system go-build-system)
2707 `(#:import-path "github.com/mongodb/mongo-tools"
2708 #:modules ((srfi srfi-1)
2709 (guix build go-build-system)
2711 #:install-source? #f
2714 '("bsondump" "mongodump" "mongoexport" "mongofiles"
2715 "mongoimport" "mongooplog" "mongorestore"
2716 "mongostat" "mongotop")))
2717 (modify-phases %standard-phases
2718 (add-after 'unpack 'delete-bundled-source-code
2720 (delete-file-recursively
2721 "src/github.com/mongodb/mongo-tools/vendor")
2723 (add-after 'delete-bundled-source-code 'patch-source
2725 ;; Remove a redundant argument that causes compilation to fail.
2727 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
2728 (("skipping restore of system.profile collection\", db)")
2729 "skipping restore of system.profile collection\")"))
2733 (for-each (lambda (tool)
2736 ;; This is where the tests expect to find the
2738 "-o" ,(string-append
2739 "src/github.com/mongodb/mongo-tools/bin/"
2742 "-tags=\"ssl sasl\""
2744 "-extldflags=-Wl,-z,now,-z,relro"
2746 "src/github.com/mongodb/mongo-tools/"
2747 tool "/main/" tool ".go"))))
2748 (simple-format #t "build: running ~A\n"
2749 (string-join command))
2750 (apply invoke command)))
2755 (with-directory-excursion "src"
2756 (for-each (lambda (tool)
2759 (string-append "github.com/mongodb/mongo-tools/"
2764 (lambda* (#:key outputs #:allow-other-keys)
2765 (for-each (lambda (tool)
2767 (string-append "src/github.com/mongodb/mongo-tools/bin/"
2769 (string-append (assoc-ref outputs "out")
2774 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
2775 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
2776 ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
2777 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
2778 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
2779 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
2780 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
2781 (home-page "https://github.com/mongodb/mongo-tools")
2782 (synopsis "Various tools for interacting with MongoDB and BSON")
2784 "This package includes a collection of tools related to MongoDB.
2787 Display BSON files in a human-readable format
2789 Convert data from JSON, TSV or CSV and insert them into a collection
2791 Write an existing collection to CSV or JSON format
2792 @item mongodump/mongorestore
2793 Dump MongoDB backups to disk in the BSON format
2795 Read MongoDB backups in the BSON format, and restore them to a live database
2797 Monitor live MongoDB servers, replica sets, or sharded clusters
2799 Read, write, delete, or update files in GridFS
2801 Replay oplog entries between MongoDB servers
2803 Monitor read/write activity on a mongo server
2805 (license license:asl2.0)))
2807 (define-public apache-arrow
2809 (name "apache-arrow")
2815 (url "https://github.com/apache/arrow")
2816 (commit (string-append "apache-arrow-" version))))
2817 (file-name (git-file-name name version))
2820 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
2821 (build-system cmake-build-system)
2825 (modify-phases %standard-phases
2826 (add-before 'configure 'enter-source-directory
2827 (lambda _ (chdir "cpp") #t))
2828 (add-after 'unpack 'set-env
2830 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
2831 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
2832 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
2833 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
2834 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
2836 #:build-type "Release"
2838 (list "-DARROW_PYTHON=ON"
2840 ;; Install to PREFIX/lib (the default is
2842 (string-append "-DCMAKE_INSTALL_LIBDIR="
2843 (assoc-ref %outputs "out")
2846 ;; XXX These Guix package offer static
2847 ;; libraries that are not position independent,
2848 ;; and ld fails to link them into the arrow .so
2849 "-DARROW_WITH_SNAPPY=OFF"
2850 "-DARROW_WITH_ZLIB=OFF"
2851 "-DARROW_WITH_ZSTD=OFF"
2852 "-DARROW_WITH_LZ4=OFF"
2854 ;; Building the tests forces on all the
2855 ;; optional features and the use of static
2857 "-DARROW_BUILD_TESTS=OFF"
2858 "-DARROW_BUILD_STATIC=OFF")))
2861 ("rapidjson" ,rapidjson)
2862 ("brotli" ,google-brotli)
2863 ("flatbuffers" ,flatbuffers)
2864 ("jemalloc" ,jemalloc)
2865 ("python-3" ,python)
2866 ("python-numpy" ,python-numpy)))
2867 (home-page "https://arrow.apache.org/")
2868 (synopsis "Columnar in-memory analytics")
2869 (description "Apache Arrow is a columnar in-memory analytics layer
2870 designed to accelerate big data. It houses a set of canonical in-memory
2871 representations of flat and hierarchical data along with multiple
2872 language-bindings for structure manipulation. It also provides IPC and common
2873 algorithm implementations.")
2874 (license license:asl2.0)))
2876 (define-public python-pyarrow
2878 (name "python-pyarrow")
2884 (url "https://github.com/apache/arrow")
2885 (commit (string-append "apache-arrow-" version))))
2886 (file-name (git-file-name name version))
2889 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
2890 (build-system python-build-system)
2892 '(#:tests? #f ; XXX There are no tests in the "python" directory
2894 (modify-phases %standard-phases
2895 (delete 'build) ; XXX the build is performed again during the install phase
2896 (add-after 'unpack 'enter-source-directory
2897 (lambda _ (chdir "python") #t))
2898 (add-after 'unpack 'set-env
2900 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
2903 `(("apache-arrow" ,apache-arrow)
2904 ("python-numpy" ,python-numpy)
2905 ("python-pandas" ,python-pandas)
2906 ("python-six" ,python-six)))
2909 ("python-cython" ,python-cython)
2910 ("python-pytest" ,python-pytest)
2911 ("python-pytest-runner" ,python-pytest-runner)
2912 ("python-setuptools-scm" ,python-setuptools-scm)))
2913 (home-page "https://arrow.apache.org/docs/python/")
2914 (synopsis "Python bindings for Apache Arrow")
2915 (description "This library provides a Pythonic API wrapper for the reference
2916 Arrow C++ implementation, along with tools for interoperability with pandas,
2917 NumPy, and other traditional Python scientific computing packages.")
2918 (license license:asl2.0)))
2920 (define-public python2-pyarrow
2921 (package-with-python2 python-pyarrow))