gnu: rust-tokio-macros-0.2: Don't skip build.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013, 2017 Cyril Roelandt <tipecaml@gmail.com>
5 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
11 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2017, 2018 Roel Janssen <roel@gnu.org>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
18 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
19 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
22 ;;; Copyright © 2017, 2020 Thomas Danckaert <post@thomasdanckaert.be>
23 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
24 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
25 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
26 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
34 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
35 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
36 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
37 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
38 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
39 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
40 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
41 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
42 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
43 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
44 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
45 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
46 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
47 ;;;
48 ;;; This file is part of GNU Guix.
49 ;;;
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
54 ;;;
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
59 ;;;
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
63 (define-module (gnu packages databases)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages admin)
66 #:use-module (gnu packages algebra)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages avahi)
69 #:use-module (gnu packages base)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages bison)
72 #:use-module (gnu packages boost)
73 #:use-module (gnu packages check)
74 #:use-module (gnu packages cmake)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages curl)
78 #:use-module (gnu packages cyrus-sasl)
79 #:use-module (gnu packages dbm)
80 #:use-module (gnu packages emacs)
81 #:use-module (gnu packages flex)
82 #:use-module (gnu packages gcc)
83 #:use-module (gnu packages gettext)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages gnupg)
86 #:use-module (gnu packages guile)
87 #:use-module (gnu packages time)
88 #:use-module (gnu packages golang)
89 #:use-module (gnu packages jemalloc)
90 #:use-module (gnu packages language)
91 #:use-module (gnu packages libevent)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages logging)
94 #:use-module (gnu packages man)
95 #:use-module (gnu packages maths)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages onc-rpc)
98 #:use-module (gnu packages parallel)
99 #:use-module (gnu packages pcre)
100 #:use-module (gnu packages perl)
101 #:use-module (gnu packages perl-check)
102 #:use-module (gnu packages perl-web)
103 #:use-module (gnu packages pkg-config)
104 #:use-module (gnu packages popt)
105 #:use-module (gnu packages protobuf)
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-crypto)
108 #:use-module (gnu packages python-web)
109 #:use-module (gnu packages python-science)
110 #:use-module (gnu packages python-xyz)
111 #:use-module (gnu packages rdf)
112 #:use-module (gnu packages readline)
113 #:use-module (gnu packages regex)
114 #:use-module (gnu packages rpc)
115 #:use-module (gnu packages ruby)
116 #:use-module (gnu packages serialization)
117 #:use-module (gnu packages sphinx)
118 #:use-module (gnu packages sqlite)
119 #:use-module (gnu packages tcl)
120 #:use-module (gnu packages terminals)
121 #:use-module (gnu packages textutils)
122 #:use-module (gnu packages tls)
123 #:use-module (gnu packages valgrind)
124 #:use-module (gnu packages web)
125 #:use-module (gnu packages xml)
126 #:use-module ((guix licenses) #:prefix license:)
127 #:use-module (guix packages)
128 #:use-module (guix download)
129 #:use-module (guix bzr-download)
130 #:use-module (guix git-download)
131 #:use-module (guix build-system emacs)
132 #:use-module (guix build-system gnu)
133 #:use-module (guix build-system go)
134 #:use-module (guix build-system perl)
135 #:use-module (guix build-system python)
136 #:use-module (guix build-system ruby)
137 #:use-module (guix build-system cmake)
138 #:use-module (guix build-system scons)
139 #:use-module (guix build-system trivial)
140 #:use-module (guix utils)
141 #:use-module (srfi srfi-1)
142 #:use-module (srfi srfi-26)
143 #:use-module (ice-9 match))
144
145 (define-public 4store
146 (package
147 (name "4store")
148 (version "1.1.6")
149 (source (origin
150 (method git-fetch)
151 (uri (git-reference
152 (url "https://github.com/4store/4store")
153 (commit (string-append "v" version))))
154 (file-name (git-file-name name version))
155 (sha256
156 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
157 (patches (search-patches "4store-unset-preprocessor-directive.patch"
158 "4store-fix-buildsystem.patch"))))
159 (build-system gnu-build-system)
160 (native-inputs
161 `(("perl" ,perl)
162 ("python" ,python-2)
163 ("autoconf" ,autoconf)
164 ("automake" ,automake)
165 ("gettext" ,gettext-minimal)
166 ("libtool" ,libtool)
167 ("pcre" ,pcre "bin") ;for 'pcre-config'
168 ("pkg-config" ,pkg-config)))
169 (inputs
170 `(("glib" ,glib)
171 ("rasqal" ,rasqal)
172 ("libxml2" ,libxml2)
173 ("raptor2" ,raptor2)
174 ("readline" ,readline)
175 ("avahi" ,avahi)
176 ("cyrus-sasl" ,cyrus-sasl)
177 ("openssl" ,openssl)
178 ("util-linux" ,util-linux "lib")))
179 ;; http://www.4store.org has been down for a while now.
180 (home-page "https://github.com/4store/4store")
181 (synopsis "Clustered RDF storage and query engine")
182 (description "4store is a RDF/SPARQL store written in C, supporting
183 either single machines or networked clusters.")
184 (license license:gpl3+)))
185
186 (define-public go-gopkg.in-mgo.v2
187 (package
188 (name "go-gopkg.in-mgo.v2")
189 (version "2016.08.01")
190 (source (origin
191 (method git-fetch)
192 (uri (git-reference
193 (url "https://github.com/go-mgo/mgo")
194 (commit (string-append "r" version))))
195 (file-name (git-file-name name version))
196 (sha256
197 (base32
198 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
199 (build-system go-build-system)
200 (arguments
201 `(#:import-path "gopkg.in/mgo.v2"
202 ;; TODO: The tests fail as MongoDB fails to start
203 ;; Error parsing command line: unrecognised option '--chunkSize'
204 #:tests? #f
205 #:phases
206 (modify-phases %standard-phases
207 (delete 'reset-gzip-timestamps)
208 (add-before 'check 'start-mongodb
209 (lambda* (#:key tests? #:allow-other-keys)
210 (when tests?
211 (with-directory-excursion "src/gopkg.in/mgo.v2"
212 (invoke "make" "startdb")))
213 #t))
214 (add-after 'check 'stop'mongodb
215 (lambda* (#:key tests? #:allow-other-keys)
216 (when tests?
217 (with-directory-excursion "src/gopkg.in/mgo.v2"
218 (invoke "make" "stopdb")))
219 #t)))))
220 (native-inputs
221 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
222 ("mongodb" ,mongodb)
223 ("daemontools" ,daemontools)))
224 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
225 (description
226 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
227 It implements a rich selection of features under a simple API following
228 standard Go idioms.")
229 (home-page "https://labix.org/mgo")
230 (license license:bsd-2)))
231
232 (define-public ephemeralpg
233 (package
234 (name "ephemeralpg")
235 (version "3.0")
236 (source
237 (origin
238 (method url-fetch)
239 (uri (string-append
240 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
241 version ".tar.gz"))
242 (sha256
243 (base32 "1j0g7g114ma7y7sadbng5p1ss1zsm9zpicm77qspym6565733vvh"))))
244 (build-system gnu-build-system)
245 (arguments
246 '(#:make-flags (list "CC=gcc"
247 (string-append "PREFIX=" %output))
248 #:phases
249 (modify-phases %standard-phases
250 (delete 'configure) ; no configure script
251 (add-after 'install 'wrap
252 (lambda* (#:key inputs outputs #:allow-other-keys)
253 (let ((out (assoc-ref outputs "out")))
254 (wrap-program (string-append out "/bin/pg_tmp")
255 `("PATH" ":" prefix
256 (,(string-append (assoc-ref inputs "util-linux")
257 "/bin")
258 ,(string-append (assoc-ref inputs "postgresql")
259 "/bin")
260 ;; For getsocket.
261 ,(string-append out "/bin")))))
262 #t)))
263 #:test-target "test"))
264 (inputs
265 `(("postgresql" ,postgresql)
266 ("util-linux" ,util-linux)))
267 (native-inputs
268 ;; For tests.
269 `(("ruby" ,ruby)
270 ("which" ,which)))
271 (home-page "https://eradman.com/ephemeralpg/")
272 (synopsis "Run temporary PostgreSQL databases")
273 (description
274 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
275 like running software test suites. Temporary databases created with
276 @code{pg_tmp} have a limited shared memory footprint and are automatically
277 garbage-collected after a configurable number of seconds (the default is
278 60).")
279 (license license:isc)))
280
281 (define-public es-dump-restore
282 (package
283 (name "es-dump-restore")
284 (version "2.1.0")
285 (source
286 (origin
287 (method url-fetch)
288 (uri (rubygems-uri "es_dump_restore" version))
289 (sha256
290 (base32
291 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
292 (build-system ruby-build-system)
293 (arguments
294 '(#:tests? #f)) ;; No testsuite.
295 (propagated-inputs
296 `(("ruby-httpclient" ,ruby-httpclient)
297 ("ruby-multi-json" ,ruby-multi-json)
298 ("ruby-progress_bar" ,ruby-progress_bar)
299 ("ruby-rubyzip" ,ruby-rubyzip)
300 ("ruby-thor" ,ruby-thor)))
301 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
302 (description
303 "This package provides a utility for dumping the contents of an
304 ElasticSearch index to a compressed file and restoring the dumpfile back to an
305 ElasticSearch server")
306 (home-page "https://github.com/patientslikeme/es_dump_restore")
307 (license license:expat)))
308
309 (define-public leveldb
310 (package
311 (name "leveldb")
312 (version "1.22")
313 (source (origin
314 (method git-fetch)
315 (uri (git-reference
316 (url "https://github.com/google/leveldb")
317 (commit version)))
318 (file-name (git-file-name name version))
319 (sha256
320 (base32
321 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
322 (build-system cmake-build-system)
323 (arguments
324 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
325 (inputs
326 `(("snappy" ,snappy)))
327 (home-page "https://github.com/google/leveldb")
328 (synopsis "Fast key-value storage library")
329 (description
330 "LevelDB is a fast key-value storage library that provides an ordered
331 mapping from string keys to string values.")
332 (license license:bsd-3)))
333
334 (define-public memcached
335 (package
336 (name "memcached")
337 (version "1.5.20")
338 (source
339 (origin
340 (method url-fetch)
341 (uri (string-append
342 "https://memcached.org/files/memcached-" version ".tar.gz"))
343 (sha256
344 (base32 "1r511qr95q0ywdaql3pdjiwzkfqxhhfzb13ilvl7mznfm4iv1myg"))))
345 (build-system gnu-build-system)
346 (inputs
347 `(("libevent" ,libevent)
348 ("cyrus-sasl" ,cyrus-sasl)))
349 (home-page "https://memcached.org/")
350 (synopsis "In-memory caching service")
351 (description "Memcached is an in-memory key-value store. It has a small
352 and generic API, and was originally intended for use with dynamic web
353 applications.")
354 (license license:bsd-3)))
355
356 (define-public libmemcached
357 (package
358 (name "libmemcached")
359 (version "1.0.18")
360 ;; We build from the sources since we want to build the extra HTML
361 ;; documentation which is not included with the release.
362 (source (origin
363 (method bzr-fetch)
364 (uri (bzr-reference
365 (url "lp:libmemcached/1.0")
366 (revision (string-append "tag:" version))))
367 (file-name (string-append name "-" version "-checkout"))
368 (sha256
369 (base32
370 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
371 (patches
372 (search-patches "libmemcached-build-with-gcc7.patch"))))
373 (build-system gnu-build-system)
374 (native-inputs
375 `(("memcached" ,memcached)
376 ("libtool" ,libtool)
377 ("autoconf" ,autoconf)
378 ("automake" ,automake)
379 ("bison" ,bison)
380 ("flex" ,flex)
381 ("perl" ,perl)
382 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
383 (inputs
384 `(("libevent" ,libevent)
385 ("cyrus-sasl" ,cyrus-sasl)))
386 (outputs '("out" "doc"))
387 (arguments
388 '(#:phases
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).
396 (lambda _
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")))
402 #t))
403 (add-before 'bootstrap 'disable-failing-tests
404 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
405 (lambda _
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 \\},.*") ""))
416 #t))
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"))))
426 #t)))))
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:
432 @itemize
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
438 @end itemize")
439 (license license:bsd-3)))
440
441 (define-public python-pylibmc
442 (package
443 (name "python-pylibmc")
444 (version "1.6.1")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (pypi-uri "pylibmc" version))
449 (sha256
450 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
451 (build-system python-build-system)
452 (arguments
453 '(#:phases
454 (modify-phases %standard-phases
455 (add-before 'check 'start-memcached-daemon
456 ;; The test suite requires a memcached server.
457 (lambda _
458 (invoke "memcached" "-d"))))))
459 (native-inputs
460 `(("memcached" ,memcached)
461 ("python-nose" ,python-nose)))
462 (inputs
463 `(("libmemcached" ,libmemcached)
464 ("zlib" ,zlib)
465 ("cyrus-sasl" ,cyrus-sasl)))
466 (home-page "http://sendapatch.se/projects/pylibmc/")
467 (synopsis "Python client for memcached")
468 (description
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)))
473
474 (define-public python2-pylibmc
475 (package-with-python2 python-pylibmc))
476
477 (define-public mongodb
478 (package
479 (name "mongodb")
480 (version "3.4.10")
481 (source (origin
482 (method url-fetch)
483 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
484 version ".tar.gz"))
485 (file-name (string-append name "-" version ".tar.gz"))
486 (sha256
487 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
488 (modules '((guix build utils)))
489 (snippet
490 '(begin
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"))
497 #t))
498 (patches
499 (list
500 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
501 (build-system scons-build-system)
502 (inputs
503 `(("openssl" ,openssl-1.0)
504 ("pcre" ,pcre)
505 ,@(match (%current-system)
506 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
507 `(("wiredtiger" ,wiredtiger)))
508 (_ `()))
509 ("yaml-cpp" ,yaml-cpp)
510 ("zlib" ,zlib)
511 ("snappy" ,snappy)))
512 (native-inputs
513 `(("valgrind" ,valgrind)
514 ("perl" ,perl)
515 ("python" ,python-2)
516 ("python2-pymongo" ,python2-pymongo)
517 ("python2-pyyaml" ,python2-pyyaml)
518 ("tzdata" ,tzdata-for-tests)))
519 (arguments
520 `(#:scons ,scons-python2
521 #:phases
522 (let ((common-options
523 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
524 "--use-system-pcre"
525 ;; wiredtiger is 64-bit only
526 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
527 (%current-system)))
528 '("i686-linux" "armhf-linux"))
529 ``"--wiredtiger=off"
530 ``"--use-system-wiredtiger")
531 ;; TODO
532 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
533 ;; --use-system-boost
534 "--use-system-snappy"
535 "--use-system-zlib"
536 "--use-system-valgrind"
537 ;; "--use-system-stemmer" TODO: Missing relevant package
538 "--use-system-yaml"
539 "--disable-warnings-as-errors"
540 ,(format #f "--jobs=~a" (parallel-job-count))
541 "--ssl")))
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch
544 (lambda _
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"))
551 #t))
552 (add-after 'unpack 'scons-propagate-environment
553 (lambda _
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, "))
559 #t))
560 (add-after 'unpack 'create-version-file
561 (lambda _
562 (call-with-output-file "version.json"
563 (lambda (port)
564 (display ,(simple-format #f "{
565 \"version\": \"~A\"
566 }" version) port)))
567 #t))
568 (replace 'build
569 (lambda _
570 (apply invoke `("scons"
571 ,@common-options
572 "mongod" "mongo" "mongos"))))
573 (replace 'check
574 (lambda* (#:key tests? inputs #:allow-other-keys)
575 (setenv "TZDIR"
576 (string-append (assoc-ref inputs "tzdata")
577 "/share/zoneinfo"))
578 (when tests?
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$")
587 "")
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$")
591 ""))
592 (invoke "python" "buildscripts/resmoke.py"
593 "--suites=dbtest,unittests"
594 (format #f "--jobs=~a" (parallel-job-count))))
595 #t))
596 (replace 'install
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))
602 #t))))))
603 (home-page "https://www.mongodb.org/")
604 (synopsis "High performance and high availability document database")
605 (description
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
612 license:asl2.0))))
613
614 (define-public mycli
615 (package
616 (name "mycli")
617 (version "1.22.1")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "mycli" version))
622 (sha256
623 (base32
624 "18qxxrpdksg3s73va7nkbkwi34kg9m1pls7w4fh5f4jk4p434zsf"))))
625 (build-system python-build-system)
626 (arguments
627 `(#:tests? #f)) ; tests expect a running MySQL
628 (propagated-inputs
629 `(("python-cli-helpers" ,python-cli-helpers)
630 ("python-click" ,python-click)
631 ("python-configobj" ,python-configobj)
632 ("python-cryptography" ,python-cryptography)
633 ("python-prompt-toolkit" ,python-prompt-toolkit)
634 ("python-pygments" ,python-pygments)
635 ("python-pymysql" ,python-pymysql)
636 ("python-sqlparse" ,python-sqlparse)))
637 (home-page "http://mycli.net")
638 (synopsis
639 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
640 (description
641 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
642 auto-completion and syntax highlighting.")
643 (license license:bsd-3)))
644
645 ;; XXX When updating, check whether boost-for-mysql is still needed.
646 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
647 (define-public mysql
648 (package
649 (name "mysql")
650 (version "5.7.27")
651 (source (origin
652 (method url-fetch)
653 (uri (list (string-append
654 "https://dev.mysql.com/get/Downloads/MySQL-"
655 (version-major+minor version) "/"
656 name "-" version ".tar.gz")
657 (string-append
658 "https://downloads.mysql.com/archives/get/file/"
659 name "-" version ".tar.gz")))
660 (sha256
661 (base32
662 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
663 (build-system cmake-build-system)
664 (arguments
665 `(#:configure-flags
666 '("-DBUILD_CONFIG=mysql_release"
667 "-DWITH_SSL=system"
668 "-DWITH_ZLIB=system"
669 "-DDEFAULT_CHARSET=utf8"
670 "-DDEFAULT_COLLATION=utf8_general_ci"
671 "-DMYSQL_DATADIR=/var/lib/mysql"
672 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
673 "-DINSTALL_INFODIR=share/mysql/docs"
674 "-DINSTALL_MANDIR=share/man"
675 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
676 "-DINSTALL_SCRIPTDIR=bin"
677 "-DINSTALL_INCLUDEDIR=include/mysql"
678 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
679 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
680 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
681 "-DINSTALL_DOCDIR=share/mysql/docs"
682 "-DINSTALL_SHAREDIR=share/mysql"
683 ;; Get rid of test data.
684 "-DINSTALL_MYSQLTESTDIR="
685 "-DINSTALL_SQLBENCHDIR=")
686 #:phases (modify-phases %standard-phases
687 (add-after
688 'install 'remove-extra-binaries
689 (lambda* (#:key outputs #:allow-other-keys)
690 (let ((out (assoc-ref outputs "out")))
691 ;; Remove the 3 *_embedded files, which weigh in at
692 ;; 14 MiB each.
693 (for-each delete-file
694 (find-files (string-append out "/bin")
695 "_embedded$"))
696 #t))))))
697 (native-inputs
698 `(("bison" ,bison)
699 ("perl" ,perl)
700 ("pkg-config" ,pkg-config)))
701 (inputs
702 `(("boost" ,boost-for-mysql)
703 ("libaio" ,libaio)
704 ("libtirpc" ,libtirpc)
705 ("ncurses" ,ncurses)
706 ("openssl" ,openssl)
707 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
708 ("zlib" ,zlib)))
709 (home-page "https://www.mysql.com/")
710 (synopsis "Fast, easy to use, and popular database")
711 (description
712 "MySQL is a fast, reliable, and easy to use relational database
713 management system that supports the standardized Structured Query
714 Language.")
715 (license license:gpl2)))
716
717 (define-public mariadb
718 (package
719 (name "mariadb")
720 (version "10.1.45")
721 (source (origin
722 (method url-fetch)
723 (uri (string-append "https://downloads.mariadb.com/MariaDB"
724 "/mariadb-" version "/source/mariadb-"
725 version ".tar.gz"))
726 (sha256
727 (base32
728 "1mfs0x4c0z7d306n128dxdawk3llk25vxif5zwl20fv1z5qhz3wx"))
729 (patches (search-patches "mariadb-client-test-32bit.patch"))
730 (modules '((guix build utils)))
731 (snippet
732 '(begin
733 ;; Delete bundled snappy and xz.
734 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
735 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
736 ;; This file checks that the bundled sources are present and
737 ;; declares build procedures for them.
738 (("^include\\(TokuThirdParty\\)") ""))
739 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
740 ;; Don't attempt to use the procedures we just removed.
741 ((" build_lzma build_snappy") ""))
742
743 ;; Preserve CMakeLists.txt for these.
744 (for-each (lambda (file)
745 (unless (string-suffix? "CMakeLists.txt" file)
746 (delete-file file)))
747 (append (find-files "extra/yassl")
748 (find-files "pcre") (find-files "zlib")))
749 #t))))
750 (build-system cmake-build-system)
751 (outputs '("out" "lib" "dev"))
752 (arguments
753 `(#:configure-flags
754 (list
755 "-DBUILD_CONFIG=mysql_release"
756 ;; Linking with libarchive fails, like this:
757
758 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
759 ;; relocation R_X86_64_32 against `.bss' can not be used when
760 ;; making a shared object; recompile with -fPIC
761
762 ;; For now, disable the features that that use libarchive (xtrabackup).
763 "-DWITH_LIBARCHIVE=OFF"
764
765 ;; Disable the TokuDB engine, because its test suite frequently fails,
766 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
767 "-DTOKUDB_OK=OFF"
768
769 ;; Ensure the system libraries are used.
770 "-DWITH_JEMALLOC=yes"
771 "-DWITH_PCRE=system"
772 "-DWITH_SSL=system"
773 "-DWITH_ZLIB=system"
774
775 "-DDEFAULT_CHARSET=utf8"
776 "-DDEFAULT_COLLATION=utf8_general_ci"
777 "-DMYSQL_DATADIR=/var/lib/mysql"
778 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
779 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
780 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
781 "/lib")
782 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
783 "/share/mysql/docs")
784 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
785 "/share/man")
786 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
787 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
788 "-DCMAKE_INSTALL_LIBDIR=lib"
789 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
790 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
791 "/include/mysql")
792 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
793 "/share/mysql/docs")
794 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
795 "/share/mysql/docs")
796 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
797 "/share/mysql/support-files")
798 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
799 "-DINSTALL_SHAREDIR=share")
800 #:phases
801 (modify-phases %standard-phases
802 ,@(if (string-prefix? "arm" (%current-system))
803 ;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from
804 ;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5.
805 '((add-after 'set-paths 'hide-default-gcc
806 (lambda* (#:key inputs #:allow-other-keys)
807 (let ((gcc (assoc-ref inputs "gcc")))
808 (setenv "CPLUS_INCLUDE_PATH"
809 (string-join
810 (delete (string-append gcc "/include/c++")
811 (string-split (getenv "CPLUS_INCLUDE_PATH")
812 #\:))
813 ":"))
814 #t))))
815 '())
816 (add-after 'unpack 'fix-pcre-detection
817 (lambda _
818 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
819 ;; in version 8.34. Unfortunately the upstream patch behaves
820 ;; slightly differently and the build system fails to detect it.
821 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
822 ;; XXX: Consider patching PCRE instead.
823 (substitute* "cmake/pcre.cmake"
824 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
825 #t))
826 (add-after 'unpack 'adjust-tests
827 (lambda _
828 (let ((disabled-tests
829 '(;; These fail because root@hostname == root@localhost in
830 ;; the build environment, causing a user count mismatch.
831 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
832 "main.join_cache"
833 "main.explain_non_select"
834 "main.stat_tables"
835 "main.stat_tables_innodb"
836 "roles.acl_statistics"
837
838 ;; This file contains a time bomb which makes it fail after
839 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
840 "main.mysqldump"
841
842 ;; FIXME: This test fails on i686:
843 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
844 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
845 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
846 ;; (all three tables must exist and be identical)
847 ;; in a loop it produces the same error around 1/240 times.
848 ;; montywi on #maria suggested removing the real_end check in
849 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
850 ;; reach the ending quote occasionally. Disable it for now.
851 "main.myisampack"
852 ;; FIXME: This test fails on armhf-linux:
853 "mroonga/storage.index_read_multiple_double"))
854
855 ;; This file contains a list of known-flaky tests for this
856 ;; release. Append our own items.
857 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
858 (for-each (lambda (test)
859 (format unstable-tests "~a : ~a\n"
860 test "Disabled in Guix"))
861 disabled-tests)
862 (close-port unstable-tests)
863
864 ;; XXX: This test fails because it expects a latin1 charset and
865 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
866 (substitute* "mysql-test/r/gis_notembedded.result"
867 (("latin1_swedish_ci") "utf8_general_ci")
868 (("\tlatin1") "\tutf8"))
869
870 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
871 (("/bin/bash")
872 (which "bash")))
873
874 (substitute* "mysql-test/mysql-test-run.pl"
875 (("/bin/ls") (which "ls"))
876 (("/bin/sh") (which "sh")))
877 #t)))
878 (add-before 'configure 'disable-plugins
879 (lambda _
880 (let ((disable-plugin (lambda (name)
881 (call-with-output-file
882 (string-append "plugin/" name
883 "/CMakeLists.txt")
884 (lambda (port)
885 (format port "\n")))))
886 (disabled-plugins '(;; XXX: Causes a test failure.
887 "disks")))
888 (for-each disable-plugin disabled-plugins)
889 #t)))
890 (replace 'check
891 (lambda* (#:key (tests? #t) #:allow-other-keys)
892 (if tests?
893 (with-directory-excursion "mysql-test"
894 (invoke "./mtr" "--verbose"
895 "--retry=3"
896 "--testcase-timeout=40"
897 "--suite-timeout=600"
898 "--parallel" (number->string (parallel-job-count))
899 "--skip-test-list=unstable-tests"))
900 (format #t "test suite not run~%"))
901 #t))
902 (add-after
903 'install 'post-install
904 (lambda* (#:key inputs outputs #:allow-other-keys)
905 (let* ((out (assoc-ref outputs "out"))
906 (dev (assoc-ref outputs "dev"))
907 (lib (assoc-ref outputs "lib"))
908 (openssl (assoc-ref inputs "openssl")))
909 (substitute* (string-append out "/bin/mysql_install_db")
910 (("basedir=\"\"")
911 (string-append "basedir=\"" out "\"")))
912 ;; Remove unneeded files for testing.
913 (with-directory-excursion lib
914 (for-each delete-file-recursively
915 '("data" "mysql-test" "sql-bench"))
916 ;; And static libraries.
917 (for-each delete-file (find-files "lib" "\\.a$")))
918 (with-directory-excursion out
919 (delete-file "share/man/man1/mysql-test-run.pl.1")
920 ;; Delete huge and unnecessary executables.
921 (for-each delete-file (find-files "bin" "(test|embedded)")))
922 (mkdir-p (string-append dev "/share"))
923 (mkdir-p (string-append dev "/bin"))
924 (rename-file (string-append lib "/bin/mysqld")
925 (string-append out "/bin/mysqld"))
926 (rename-file (string-append lib "/share/pkgconfig")
927 (string-append dev "/share/pkgconfig"))
928 (rename-file (string-append out "/bin/mysql_config")
929 (string-append dev "/bin/mysql_config"))
930
931
932 (substitute* (string-append out "/bin/mysql_install_db")
933 (("\\$basedir/share/mysql")
934 (string-append lib "/share/mysql")))
935
936 ;; Embed an absolute reference to OpenSSL in mysql_config
937 ;; and the pkg-config file to avoid propagation.
938 (substitute* (list (string-append dev "/bin/mysql_config")
939 (string-append dev "/share/pkgconfig/mariadb.pc"))
940 (("-lssl -lcrypto" all)
941 (string-append "-L" openssl "/lib " all)))
942
943 #t))))))
944 (native-inputs
945 `(("bison" ,bison)
946 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
947 ,@(if (string-prefix? "armhf" (%current-system))
948 `(("gcc@5", gcc-5))
949 '())
950 ("perl" ,perl)))
951 (inputs
952 `(("jemalloc" ,jemalloc)
953 ("libaio" ,libaio)
954 ("libxml2" ,libxml2)
955 ("ncurses" ,ncurses)
956 ("openssl" ,openssl-1.0)
957 ("pam" ,linux-pam)
958 ("pcre" ,pcre)
959 ("xz" ,xz)
960 ("zlib" ,zlib)))
961 ;; The test suite is very resource intensive and can take more than three
962 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
963 (properties '((timeout . 64800))) ;18 hours
964 (home-page "https://mariadb.org/")
965 (synopsis "SQL database server")
966 (description
967 "MariaDB is a multi-user and multi-threaded SQL database server, designed
968 as a drop-in replacement of MySQL.")
969 (license license:gpl2)))
970
971 (define-public mariadb-connector-c
972 (package
973 (name "mariadb-connector-c")
974 (version "3.1.9")
975 (source (origin
976 (method url-fetch)
977 (uri (string-append
978 "https://downloads.mariadb.org/f/connector-c-"
979 version "/mariadb-connector-c-"
980 version "-src.tar.gz"))
981 (sha256
982 (base32
983 "1izjzf7yzjqzlk8dkp327fa9lawsv2hnnlnr7g5lshyx5azrk38h"))))
984 (inputs
985 `(("openssl" ,openssl)))
986 (build-system cmake-build-system)
987 (arguments
988 '(#:tests? #f)) ; no tests
989 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
990 (synopsis "Client library to connect to MySQL or MariaDB")
991 (description "The MariaDB Connector/C is used to connect applications
992 developed in C/C++ to MariaDB and MySQL databases.")
993 (license license:lgpl2.1+)))
994
995 ;; Don't forget to update the other postgresql packages when upgrading this one.
996 (define-public postgresql
997 (package
998 (name "postgresql")
999 (version "10.13")
1000 (source (origin
1001 (method url-fetch)
1002 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1003 version "/postgresql-" version ".tar.bz2"))
1004 (sha256
1005 (base32
1006 "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d"))
1007 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1008 (build-system gnu-build-system)
1009 (arguments
1010 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
1011 #:phases
1012 (modify-phases %standard-phases
1013 (add-before 'configure 'patch-/bin/sh
1014 (lambda _
1015 ;; Refer to the actual shell.
1016 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1017 "src/bin/psql/command.c")
1018 (("/bin/sh") (which "sh")))
1019 #t))
1020 (add-after 'build 'build-contrib
1021 (lambda _
1022 (invoke "make" "-C" "contrib")))
1023 (add-after 'install 'install-contrib
1024 (lambda _
1025 (invoke "make" "-C" "contrib" "install"))))))
1026 (inputs
1027 `(("readline" ,readline)
1028 ("libuuid" ,util-linux "lib")
1029 ("openssl" ,openssl)
1030 ("zlib" ,zlib)))
1031 (home-page "https://www.postgresql.org/")
1032 (synopsis "Powerful object-relational database system")
1033 (description
1034 "PostgreSQL is a powerful object-relational database system. It is fully
1035 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1036 stored procedures (in multiple languages). It includes most SQL:2008 data
1037 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1038 TIMESTAMP. It also supports storage of binary large objects, including
1039 pictures, sounds, or video.")
1040 (license (license:x11-style "file://COPYRIGHT"))))
1041
1042 (define-public postgresql-11
1043 (package
1044 (inherit postgresql)
1045 (name "postgresql")
1046 (version "11.6")
1047 (source (origin
1048 (method url-fetch)
1049 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1050 version "/postgresql-" version ".tar.bz2"))
1051 (sha256
1052 (base32
1053 "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
1054
1055 (define-public postgresql-9.6
1056 (package
1057 (inherit postgresql)
1058 (name "postgresql")
1059 (version "9.6.16")
1060 (source (origin
1061 (method url-fetch)
1062 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1063 version "/postgresql-" version ".tar.bz2"))
1064 (sha256
1065 (base32
1066 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
1067
1068 (define-public python-pymysql
1069 (package
1070 (name "python-pymysql")
1071 (version "0.9.3")
1072 (source
1073 (origin
1074 (method url-fetch)
1075 (uri (pypi-uri "PyMySQL" version))
1076 (sha256
1077 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1078 (build-system python-build-system)
1079 (native-inputs
1080 `(("python-unittest2" ,python-unittest2)))
1081 (inputs
1082 `(("python-cryptography" ,python-cryptography)))
1083 (arguments
1084 `(#:tests? #f)) ; tests expect a running MySQL
1085 (home-page "https://github.com/PyMySQL/PyMySQL/")
1086 (synopsis "Pure-Python MySQL driver")
1087 (description
1088 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1089 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1090 (license license:expat)))
1091
1092 (define-public python2-pymysql
1093 (package-with-python2 python-pymysql))
1094
1095 (define-public qdbm
1096 (package
1097 (name "qdbm")
1098 (version "1.8.78")
1099 (source
1100 (origin
1101 (method url-fetch)
1102 (uri (string-append "http://fallabs.com/" name "/"
1103 name "-" version ".tar.gz"))
1104 (sha256
1105 (base32
1106 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1107 (build-system gnu-build-system)
1108 (arguments
1109 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1110 (assoc-ref %outputs "out")
1111 "/lib"))
1112 #:make-flags (list "CFLAGS=-fPIC")))
1113 (home-page "https://fallabs.com/qdbm/")
1114 (synopsis "Key-value database")
1115 (description "QDBM is a library of routines for managing a
1116 database. The database is a simple data file containing key-value
1117 pairs. Every key and value is serial bytes with variable length.
1118 Binary data as well as character strings can be used as a key or a
1119 value. There is no concept of data tables or data types. Records are
1120 organized in a hash table or B+ tree.")
1121 (license license:lgpl2.1+)))
1122
1123 (define-public recutils
1124 (package
1125 (name "recutils")
1126 (version "1.8")
1127 (source (origin
1128 (method url-fetch)
1129 (uri (string-append "mirror://gnu/recutils/recutils-"
1130 version ".tar.gz"))
1131 (sha256
1132 (base32
1133 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1134 (build-system gnu-build-system)
1135
1136 (arguments '(#:configure-flags
1137 (list (string-append "--with-bash-headers="
1138 (assoc-ref %build-inputs "bash:include")
1139 "/include/bash"))))
1140
1141 (native-inputs `(("bc" ,bc)
1142 ("bash:include" ,bash "include")
1143 ("check" ,check)
1144 ("libuuid" ,util-linux)
1145 ("pkg-config" ,pkg-config)))
1146
1147 ;; TODO: Add more optional inputs.
1148 (inputs `(("curl" ,curl)
1149 ("libgcrypt" ,libgcrypt)))
1150 (synopsis "Manipulate plain text files as databases")
1151 (description
1152 "GNU Recutils is a set of tools and libraries for creating and
1153 manipulating text-based, human-editable databases. Despite being text-based,
1154 databases created with Recutils carry all of the expected features such as
1155 unique fields, primary keys, time stamps and more. Many different field
1156 types are supported, as is encryption.")
1157 (license license:gpl3+)
1158 (home-page "https://www.gnu.org/software/recutils/")))
1159
1160 (define-public emacs-recutils
1161 (package
1162 (inherit recutils)
1163 (name "emacs-recutils")
1164 (build-system emacs-build-system)
1165 (arguments
1166 '(#:phases
1167 (modify-phases %standard-phases
1168 (add-after 'unpack 'change-directory
1169 (lambda _
1170 (chdir "etc")
1171 #t)))))
1172 (native-inputs '())
1173 (inputs '())
1174 (synopsis "Emacs mode for working with recutils database files")
1175 (description "This package provides an Emacs major mode @code{rec-mode}
1176 for working with GNU Recutils text-based, human-editable databases. It
1177 supports editing, navigation, and querying of recutils database files
1178 including field and record folding.")))
1179
1180 (define-public rocksdb
1181 (package
1182 (name "rocksdb")
1183 (version "6.11.4")
1184 (source (origin
1185 (method git-fetch)
1186 (uri (git-reference
1187 (url "https://github.com/facebook/rocksdb")
1188 (commit (string-append "v" version))))
1189 (file-name (git-file-name name version))
1190 (sha256
1191 (base32
1192 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1193 (modules '((guix build utils)))
1194 (snippet
1195 '(begin
1196 ;; TODO: unbundle gtest.
1197 (delete-file "build_tools/gnu_parallel")
1198 (substitute* "Makefile"
1199 (("build_tools/gnu_parallel") "parallel"))
1200 #t))))
1201 (build-system gnu-build-system)
1202 (arguments
1203 `(#:make-flags (list "CC=gcc" "V=1"
1204 ;; Ceph requires that RTTI is enabled.
1205 "USE_RTTI=1"
1206 (string-append "INSTALL_PATH="
1207 (assoc-ref %outputs "out"))
1208
1209 ;; Running the full test suite takes hours and require
1210 ;; a lot of disk space. Instead we only run a subset
1211 ;; (see .travis.yml and Makefile).
1212 "ROCKSDBTESTS_END=db_tailing_iter_test")
1213 #:test-target "check_some"
1214 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1215 ;; this upstream, but it's not going to be supported any time soon.
1216 #:tests? (let ((system ,(or (%current-target-system)
1217 (%current-system))))
1218 (or (string-prefix? "x86_64-linux" system)
1219 (string-prefix? "aarch64-linux" system)))
1220 #:phases
1221 (modify-phases %standard-phases
1222 (add-after 'unpack 'patch-Makefile
1223 (lambda _
1224 (substitute* "Makefile"
1225 ;; Don't depend on the static library when installing.
1226 (("install: install-static")
1227 "install: install-shared")
1228 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1229 #t))
1230 (delete 'configure)
1231 ;; The default target is only needed for tests and built on demand.
1232 (delete 'build)
1233 (add-before 'check 'disable-optimizations
1234 (lambda _
1235 ;; Prevent the build from passing '-march=native' to the compiler.
1236 (setenv "PORTABLE" "1")
1237 #t))
1238 (add-before 'check 'disable-failing-tests
1239 (lambda _
1240 (substitute* "Makefile"
1241 ;; These tests reliably fail due to "Too many open files".
1242 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1243 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1244 #t))
1245 (add-after 'check 'build
1246 ;; The default build target is a debug build for tests. The
1247 ;; install target depends on the "shared_lib" release target
1248 ;; so we build it here for clarity.
1249 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1250 (apply invoke "make" "shared_lib"
1251 `(,@(if parallel-build?
1252 `("-j" ,(number->string (parallel-job-count)))
1253 '())
1254 ,@make-flags)))))))
1255 (native-inputs
1256 `(("parallel" ,parallel)
1257 ("perl" ,perl)
1258 ("procps" ,procps)
1259 ("python" ,python-2)
1260 ("which" ,which)))
1261 (inputs
1262 `(("bzip2" ,bzip2)
1263 ("gflags" ,gflags)
1264 ("jemalloc" ,jemalloc)
1265 ("lz4" ,lz4)
1266 ("snappy" ,snappy)
1267 ("zlib" ,zlib)))
1268 (home-page "https://rocksdb.org/")
1269 (synopsis "Persistent key-value store for fast storage")
1270 (description
1271 "RocksDB is a library that forms the core building block for a fast
1272 key-value server, especially suited for storing data on flash drives. It
1273 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1274 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1275 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1276 compactions, making it specially suitable for storing multiple terabytes of
1277 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1278 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1279 ;; files carry the 3-clause BSD license.
1280 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1281
1282 (define-public sparql-query
1283 (package
1284 (name "sparql-query")
1285 (version "1.1")
1286 (source (origin
1287 (method git-fetch)
1288 (uri (git-reference
1289 (url "https://github.com/tialaramex/sparql-query")
1290 (commit version)))
1291 (sha256
1292 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1293 (file-name (git-file-name name version))))
1294 (build-system gnu-build-system)
1295 (inputs
1296 `(("curl" ,curl)
1297 ("glib" ,glib)
1298 ("libxml2" ,libxml2)
1299 ("ncurses" ,ncurses)
1300 ("readline" ,readline)))
1301 (native-inputs
1302 `(("pkg-config" ,pkg-config)))
1303 (arguments
1304 `(#:make-flags '("CC=gcc")
1305 #:phases
1306 (modify-phases %standard-phases
1307 (delete 'configure)
1308 ;; The Makefile uses git to obtain versioning information. This phase
1309 ;; substitutes the git invocation with the package version.
1310 (add-after 'unpack 'remove-git-dependency
1311 (lambda _
1312 (substitute* "Makefile"
1313 (("^gitrev :=.*$")
1314 (string-append "gitrev = \"v" ,version "\"")))
1315 #t))
1316 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1317 ;; This replacement does the same thing, except for using $PREFIX/bin
1318 ;; instead.
1319 (replace 'install
1320 (lambda* (#:key outputs #:allow-other-keys)
1321 (let* ((out (assoc-ref outputs "out"))
1322 (bin (string-append out "/bin")))
1323 (install-file "sparql-query" bin)
1324 (symlink (string-append bin "/sparql-query")
1325 (string-append bin "/sparql-update")))
1326 #t))
1327 (replace 'check
1328 (lambda* (#:key make-flags #:allow-other-keys)
1329 (apply invoke "make" `(,@make-flags "scan-test"))
1330 (invoke "./scan-test"))))))
1331 (home-page "https://github.com/tialaramex/sparql-query/")
1332 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1333 (description "Sparql-query is a command-line tool for accessing SPARQL
1334 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1335 tools for interrogating SQL databases. For example, you can enter a query over
1336 several lines, using a semi-colon at the end of a line to indicate the end of
1337 your query. It also supports readline so that you can more easily recall and
1338 edit previous queries, even across sessions. It can be used non-interactively,
1339 for example from a shell script.")
1340 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1341 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1342 (license (list license:gpl3+))))
1343
1344 (define-public sqitch
1345 (package
1346 (name "sqitch")
1347 (version "1.0.0")
1348 (source
1349 (origin
1350 (method url-fetch)
1351 (uri (string-append
1352 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1353 version ".tar.gz"))
1354 (sha256
1355 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1356 (build-system perl-build-system)
1357 (arguments
1358 '(#:phases
1359 (modify-phases %standard-phases
1360 (add-before 'check 'set-check-environment
1361 (lambda _
1362 (setenv "TZ" "UTC")
1363 (setenv "HOME" "/tmp")
1364 #t))
1365 (add-after 'install 'wrap-program
1366 (lambda* (#:key outputs #:allow-other-keys)
1367 (let* ((out (assoc-ref outputs "out"))
1368 (path (getenv "PERL5LIB")))
1369 (wrap-program (string-append out "/bin/sqitch")
1370 `("PERL5LIB" ":" prefix
1371 (,(string-append out "/lib/perl5/site_perl"
1372 ":"
1373 path)))))
1374 #t)))))
1375 (native-inputs
1376 `(("perl-capture-tiny" ,perl-capture-tiny)
1377 ("perl-io-pager" ,perl-io-pager)
1378 ("perl-module-build" ,perl-module-build)
1379 ("perl-module-runtime" ,perl-module-runtime)
1380 ("perl-path-class" ,perl-path-class)
1381 ("perl-test-deep" ,perl-test-deep)
1382 ("perl-test-dir" ,perl-test-dir)
1383 ("perl-test-exception" ,perl-test-exception)
1384 ("perl-test-file" ,perl-test-file)
1385 ("perl-test-file-contents" ,perl-test-file-contents)
1386 ("perl-test-mockmodule" ,perl-test-mockmodule)
1387 ("perl-test-nowarnings" ,perl-test-nowarnings)
1388 ("perl-test-warn" ,perl-test-warn)))
1389 (inputs
1390 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1391 ("perl-clone" ,perl-clone)
1392 ("perl-config-gitlike" ,perl-config-gitlike)
1393 ("perl-datetime" ,perl-datetime)
1394 ("perl-datetime-timezone" ,perl-datetime-timezone)
1395 ("perl-dbd-pg" ,perl-dbd-pg)
1396 ("perl-dbi" ,perl-dbi)
1397 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1398 ("perl-encode-locale" ,perl-encode-locale)
1399 ("perl-hash-merge" ,perl-hash-merge)
1400 ("perl-ipc-run3" ,perl-ipc-run3)
1401 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1402 ("perl-libintl-perl" ,perl-libintl-perl)
1403 ("perl-list-moreutils" ,perl-list-moreutils)
1404 ("perl-moo" ,perl-moo)
1405 ("perl-mysql-config" ,perl-mysql-config)
1406 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1407 ("perl-path-class" ,perl-path-class)
1408 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1409 ("perl-string-formatter" ,perl-string-formatter)
1410 ("perl-string-shellquote" ,perl-string-shellquote)
1411 ("perl-sub-exporter" ,perl-sub-exporter)
1412 ("perl-template-tiny" ,perl-template-tiny)
1413 ("perl-template-toolkit" ,perl-template-toolkit)
1414 ("perl-throwable" ,perl-throwable)
1415 ("perl-try-tiny" ,perl-try-tiny)
1416 ("perl-type-tiny" ,perl-type-tiny)
1417 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1418 ("perl-uri" ,perl-uri)
1419 ("perl-uri-db" ,perl-uri-db)))
1420 (home-page "https://sqitch.org/")
1421 (synopsis "Database change management tool")
1422 (description
1423 "Sqitch is a standalone change management system for database schemas,
1424 which uses SQL to describe changes.")
1425 (license license:x11)))
1426
1427 (define-public sqlcrush
1428 ;; Unfortunately, there is no proper upstream release and may never be.
1429 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1430 (revision "1"))
1431 (package
1432 (name "sqlcrush")
1433 (version (git-version "0.1.5" revision commit))
1434 (source (origin
1435 (method git-fetch)
1436 (uri (git-reference
1437 (url "https://github.com/coffeeandscripts/sqlcrush")
1438 (commit commit)))
1439 (file-name (git-file-name name version))
1440 (sha256
1441 (base32
1442 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1443 (build-system python-build-system)
1444 (inputs
1445 `(("python-cryptography" ,python-cryptography)
1446 ("python-psycopg2" ,python-psycopg2)
1447 ("python-pymysql" ,python-pymysql)
1448 ("python-sqlalchemy" ,python-sqlalchemy)))
1449 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1450 (synopsis "Text console-based database viewer and editor")
1451 (description
1452 "SQLcrush lets you view and edit a database directly from the text
1453 console through an ncurses interface. You can explore each table's structure,
1454 browse and edit the contents, add and delete entries, all while tracking your
1455 changes.")
1456 (license license:gpl3+)))) ; no headers, see README.md
1457
1458 (define-public tdb
1459 (package
1460 (name "tdb")
1461 (version "1.4.3")
1462 (source (origin
1463 (method url-fetch)
1464 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1465 version ".tar.gz"))
1466 (sha256
1467 (base32
1468 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1469 (build-system gnu-build-system)
1470 (arguments
1471 '(#:phases
1472 (modify-phases %standard-phases
1473 (replace 'configure
1474 (lambda* (#:key outputs #:allow-other-keys)
1475 (let ((out (assoc-ref outputs "out")))
1476 ;; The 'configure' script is a wrapper for Waf and
1477 ;; doesn't recognize things like '--enable-fast-install'.
1478 (invoke "./configure"
1479 (string-append "--prefix=" out))))))))
1480 (native-inputs
1481 `(;; TODO: Build the documentation.
1482 ;; ("docbook-xsl" ,docbook-xsl)
1483 ;; ("libxml2" ,libxml2)
1484 ;; ("libxslt" ,libxslt)
1485 ("python" ,python) ;for the Waf build system
1486 ("which" ,which)))
1487 (home-page "https://tdb.samba.org/")
1488 (synopsis "Trivial database")
1489 (description
1490 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1491 and BSD's DB except that it allows multiple simultaneous writers and uses
1492 locking internally to keep writers from trampling on each other. TDB is also
1493 extremely small.")
1494 (license license:lgpl3+)))
1495
1496 (define-public perl-dbi
1497 (package
1498 (name "perl-dbi")
1499 (version "1.643")
1500 (source (origin
1501 (method url-fetch)
1502 (uri (string-append
1503 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1504 version ".tar.gz"))
1505 (sha256
1506 (base32
1507 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1508 (build-system perl-build-system)
1509 (synopsis "Database independent interface for Perl")
1510 (description "This package provides an database interface for Perl.")
1511 (home-page "https://metacpan.org/release/DBI")
1512 (license license:perl-license)))
1513
1514 (define-public perl-dbix-class
1515 (package
1516 (name "perl-dbix-class")
1517 (version "0.082842")
1518 (source
1519 (origin
1520 (method url-fetch)
1521 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1522 "DBIx-Class-" version ".tar.gz"))
1523 (sha256
1524 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1525 (build-system perl-build-system)
1526 (native-inputs
1527 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1528 ("perl-file-temp" ,perl-file-temp)
1529 ("perl-module-install" ,perl-module-install)
1530 ("perl-package-stash" ,perl-package-stash)
1531 ("perl-test-deep" ,perl-test-deep)
1532 ("perl-test-exception" ,perl-test-exception)
1533 ("perl-test-warn" ,perl-test-warn)))
1534 (propagated-inputs
1535 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1536 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1537 ("perl-class-inspector" ,perl-class-inspector)
1538 ("perl-config-any" ,perl-config-any)
1539 ("perl-context-preserve" ,perl-context-preserve)
1540 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1541 ("perl-data-page" ,perl-data-page)
1542 ("perl-dbi" ,perl-dbi)
1543 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1544 ("perl-hash-merge" ,perl-hash-merge)
1545 ("perl-module-find" ,perl-module-find)
1546 ("perl-moo" ,perl-moo)
1547 ("perl-mro-compat" ,perl-mro-compat)
1548 ("perl-namespace-clean" ,perl-namespace-clean)
1549 ("perl-path-class" ,perl-path-class)
1550 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1551 ("perl-scope-guard" ,perl-scope-guard)
1552 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1553 ("perl-sub-name" ,perl-sub-name)
1554 ("perl-text-balanced" ,perl-text-balanced)
1555 ("perl-try-tiny" ,perl-try-tiny)))
1556 (home-page "https://metacpan.org/release/DBIx-Class")
1557 (synopsis "Extensible and flexible object <-> relational mapper")
1558 (description "An SQL to OO mapper with an object API inspired by
1559 Class::DBI (with a compatibility layer as a springboard for porting) and a
1560 resultset API that allows abstract encapsulation of database operations. It
1561 aims to make representing queries in your code as perl-ish as possible while
1562 still providing access to as many of the capabilities of the database as
1563 possible, including retrieving related records from multiple tables in a
1564 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1565 \"ORDER BY\" and \"HAVING\" support.")
1566 (license license:perl-license)))
1567
1568 (define-public perl-dbix-class-cursor-cached
1569 (package
1570 (name "perl-dbix-class-cursor-cached")
1571 (version "1.001004")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1576 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1580 (build-system perl-build-system)
1581 (native-inputs
1582 `(("perl-cache-cache" ,perl-cache-cache)
1583 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1584 ("perl-module-install" ,perl-module-install)))
1585 (propagated-inputs
1586 `(("perl-carp-clan" ,perl-carp-clan)
1587 ("perl-dbix-class" ,perl-dbix-class)))
1588 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1589 (synopsis "Cursor with built-in caching support")
1590 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1591 built-in caching support.")
1592 (license license:perl-license)))
1593
1594 (define-public perl-dbix-class-introspectablem2m
1595 (package
1596 (name "perl-dbix-class-introspectablem2m")
1597 (version "0.001002")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1602 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1603 (sha256
1604 (base32
1605 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1606 (build-system perl-build-system)
1607 (native-inputs
1608 `(("perl-module-install" ,perl-module-install)))
1609 (propagated-inputs
1610 `(("perl-dbix-class" ,perl-dbix-class)))
1611 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1612 (synopsis "Introspect many-to-many relationships")
1613 (description "Because the many-to-many relationships are not real
1614 relationships, they can not be introspected with DBIx::Class. Many-to-many
1615 relationships are actually just a collection of convenience methods installed
1616 to bridge two relationships. This DBIx::Class component can be used to store
1617 all relevant information about these non-relationships so they can later be
1618 introspected and examined.")
1619 (license license:perl-license)))
1620
1621 (define-public perl-dbix-class-schema-loader
1622 (package
1623 (name "perl-dbix-class-schema-loader")
1624 (version "0.07049")
1625 (source
1626 (origin
1627 (method url-fetch)
1628 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1629 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1630 (sha256
1631 (base32
1632 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1633 (build-system perl-build-system)
1634 (native-inputs
1635 `(("perl-config-any" ,perl-config-any)
1636 ("perl-config-general" ,perl-config-general)
1637 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1638 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1639 ("perl-module-install" ,perl-module-install)
1640 ("perl-moose" ,perl-moose)
1641 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1642 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1643 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1644 ("perl-test-deep" ,perl-test-deep)
1645 ("perl-test-differences" ,perl-test-differences)
1646 ("perl-test-exception" ,perl-test-exception)
1647 ("perl-test-pod" ,perl-test-pod)
1648 ("perl-test-warn" ,perl-test-warn)))
1649 (propagated-inputs
1650 `(("perl-class-unload" ,perl-class-unload)
1651 ("perl-class-inspector" ,perl-class-inspector)
1652 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1653 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1654 ("perl-carp-clan" ,perl-carp-clan)
1655 ("perl-data-dump" ,perl-data-dump)
1656 ("perl-dbix-class" ,perl-dbix-class)
1657 ("perl-hash-merge" ,perl-hash-merge)
1658 ("perl-list-moreutils" ,perl-list-moreutils)
1659 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1660 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1661 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1662 ("perl-namespace-clean" ,perl-namespace-clean)
1663 ("perl-mro-compat" ,perl-mro-compat)
1664 ("perl-scope-guard" ,perl-scope-guard)
1665 ("perl-string-camelcase" ,perl-string-camelcase)
1666 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1667 ("perl-sub-name" ,perl-sub-name)
1668 ("perl-try-tiny" ,perl-try-tiny)))
1669 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1670 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1671 (synopsis "Create a DBIx::Class::Schema based on a database")
1672 (description "DBIx::Class::Schema::Loader automates the definition of a
1673 DBIx::Class::Schema by scanning database table definitions and setting up the
1674 columns, primary keys, unique constraints and relationships.")
1675 (license license:perl-license)))
1676
1677 (define-public perl-dbd-pg
1678 (package
1679 (name "perl-dbd-pg")
1680 (version "3.7.4")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1685 "DBD-Pg-" version ".tar.gz"))
1686 (sha256
1687 (base32
1688 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1689 (build-system perl-build-system)
1690 (native-inputs
1691 `(("perl-dbi" ,perl-dbi)))
1692 (propagated-inputs
1693 `(("perl-dbi" ,perl-dbi)
1694 ("postgresql" ,postgresql)))
1695 (home-page "https://metacpan.org/release/DBD-Pg")
1696 (synopsis "DBI PostgreSQL interface")
1697 (description "This package provides a PostgreSQL driver for the Perl5
1698 @dfn{Database Interface} (DBI).")
1699 (license license:perl-license)))
1700
1701 (define-public perl-dbd-mysql
1702 (package
1703 (name "perl-dbd-mysql")
1704 (version "4.050")
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1709 "DBD-mysql-" version ".tar.gz"))
1710 (sha256
1711 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1712 (build-system perl-build-system)
1713 (arguments
1714 `(#:phases
1715 (modify-phases %standard-phases
1716 (add-before 'configure 'skip-library-detection
1717 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1718 ;; are really only needed for the test suite; their absence does not
1719 ;; affect the build or the end result.
1720 (lambda _
1721 (substitute* "Makefile.PL"
1722 (("use Devel::CheckLib;" match)
1723 (string-append "# " match))
1724 (("assert_lib")
1725 "print"))
1726 #t)))
1727 ;; Tests require running MySQL server.
1728 #:tests? #f))
1729 (propagated-inputs
1730 `(("perl-dbi" ,perl-dbi)
1731 ("mysql" ,mariadb "lib")
1732 ("mysql-dev" ,mariadb "dev")))
1733 (home-page "https://metacpan.org/release/DBD-mysql")
1734 (synopsis "DBI MySQL interface")
1735 (description "This package provides a MySQL driver for the Perl5
1736 @dfn{Database Interface} (DBI).")
1737 (license license:perl-license)))
1738
1739 (define-public perl-dbd-sqlite
1740 (package
1741 (name "perl-dbd-sqlite")
1742 (version "1.64")
1743 (source (origin
1744 (method url-fetch)
1745 (uri (string-append
1746 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1747 version ".tar.gz"))
1748 (sha256
1749 (base32
1750 "00gz5aw3xrr92lf9nfk0dhmy7a8jzmxhznddd9b0a8w4a1xqzbpl"))))
1751 (build-system perl-build-system)
1752 (inputs `(("sqlite" ,sqlite)))
1753 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1754 (synopsis "SQlite interface for Perl")
1755 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1756 the entire thing in the distribution. So in order to get a fast transaction
1757 capable RDBMS working for your Perl project you simply have to install this
1758 module, and nothing else.")
1759 (license license:perl-license)
1760 (home-page "https://metacpan.org/release/DBD-SQLite")))
1761
1762 (define-public perl-mysql-config
1763 (package
1764 (name "perl-mysql-config")
1765 (version "1.04")
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (string-append
1770 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1771 version
1772 ".tar.gz"))
1773 (sha256
1774 (base32
1775 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1776 (build-system perl-build-system)
1777 (home-page "https://metacpan.org/release/MySQL-Config")
1778 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1779 (description
1780 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1781 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1782 @code{Getopt::Long}.")
1783 (license license:perl-license)))
1784
1785 (define-public perl-sql-abstract
1786 (package
1787 (name "perl-sql-abstract")
1788 (version "1.87")
1789 (source
1790 (origin
1791 (method url-fetch)
1792 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1793 "SQL-Abstract-" version ".tar.gz"))
1794 (sha256
1795 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
1796 (build-system perl-build-system)
1797 (native-inputs
1798 `(("perl-module-install" ,perl-module-install)
1799 ("perl-test-deep" ,perl-test-deep)
1800 ("perl-test-exception" ,perl-test-exception)
1801 ("perl-test-warn" ,perl-test-warn)))
1802 (propagated-inputs
1803 `(("perl-hash-merge" ,perl-hash-merge)
1804 ("perl-moo" ,perl-moo)
1805 ("perl-mro-compat" ,perl-mro-compat)
1806 ("perl-text-balanced" ,perl-text-balanced)))
1807 (home-page "https://metacpan.org/release/SQL-Abstract")
1808 (synopsis "Generate SQL from Perl data structures")
1809 (description "This module was inspired by the excellent DBIx::Abstract.
1810 While based on the concepts used by DBIx::Abstract, the concepts used have
1811 been modified to make the SQL easier to generate from Perl data structures.
1812 The underlying idea is for this module to do what you mean, based on the data
1813 structures you provide it, so that you don't have to modify your code every
1814 time your data changes.")
1815 (license license:perl-license)))
1816
1817 (define-public perl-sql-abstract-classic
1818 (package
1819 (name "perl-sql-abstract-classic")
1820 (version "1.91")
1821 (source
1822 (origin
1823 (method url-fetch)
1824 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1825 "SQL-Abstract-Classic-" version ".tar.gz"))
1826 (sha256
1827 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
1828 (build-system perl-build-system)
1829 (native-inputs
1830 `(("perl-test-deep" ,perl-test-deep)
1831 ("perl-test-exception" ,perl-test-exception)
1832 ("perl-test-warn" ,perl-test-warn)))
1833 (propagated-inputs
1834 `(("perl-mro-compat" ,perl-mro-compat)
1835 ("perl-sql-abstract" ,perl-sql-abstract)))
1836 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
1837 (synopsis "Generate SQL from Perl data structures")
1838 (description
1839 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
1840 to preserve the ability of users to opt into the new way of doing things in
1841 later versions according to their own schedules.
1842
1843 It is an abstract SQL generation module based on the concepts used by
1844 @code{DBIx::Abstract}, with several important differences, especially when it
1845 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
1846 easier to generate from Perl data structures.
1847
1848 The underlying idea is for this module to do what you mean, based on the data
1849 structures you provide it. You shouldn't have to modify your code every time
1850 your data changes, as this module figures it out.")
1851 (license license:perl-license)))
1852
1853 (define-public perl-sql-splitstatement
1854 (package
1855 (name "perl-sql-splitstatement")
1856 (version "1.00020")
1857 (source
1858 (origin
1859 (method url-fetch)
1860 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1861 "SQL-SplitStatement-" version ".tar.gz"))
1862 (sha256
1863 (base32
1864 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1865 (build-system perl-build-system)
1866 (native-inputs
1867 `(("perl-test-exception" ,perl-test-exception)))
1868 (propagated-inputs
1869 `(("perl-class-accessor" ,perl-class-accessor)
1870 ("perl-list-moreutils" ,perl-list-moreutils)
1871 ("perl-regexp-common" ,perl-regexp-common)
1872 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1873 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1874 (synopsis "Split SQL code into atomic statements")
1875 (description "This module tries to split any SQL code, even including
1876 non-standard extensions, into the atomic statements it is composed of.")
1877 (license license:perl-license)))
1878
1879 (define-public perl-sql-tokenizer
1880 (package
1881 (name "perl-sql-tokenizer")
1882 (version "0.24")
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1887 "SQL-Tokenizer-" version ".tar.gz"))
1888 (sha256
1889 (base32
1890 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1891 (build-system perl-build-system)
1892 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1893 (synopsis "SQL tokenizer")
1894 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1895 claim to be a parser or query verifier. It just creates sane tokens from a
1896 valid SQL query.")
1897 (license license:perl-license)))
1898
1899 (define-public unixodbc
1900 (package
1901 (name "unixodbc")
1902 (version "2.3.7")
1903 (source (origin
1904 (method url-fetch)
1905 (uri
1906 (string-append
1907 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1908 version ".tar.gz"))
1909 (sha256
1910 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1911 (build-system gnu-build-system)
1912 (synopsis "Data source abstraction library")
1913 (description "Unixodbc is a library providing an API with which to access
1914 data sources. Data sources include SQL Servers and any software with an ODBC
1915 Driver.")
1916 (license license:lgpl2.1+)
1917 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1918 (home-page "http://www.unixodbc.org")))
1919
1920 (define-public unqlite
1921 (package
1922 (name "unqlite")
1923 (version "1.1.6")
1924 (source (origin
1925 (method url-fetch)
1926 ;; Contains bug fixes against the official release, and has an
1927 ;; autotooled build system.
1928 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1929 "download/v1.0.0/"
1930 "unqlite-unofficial-" version ".tar.gz"))
1931 (sha256
1932 (base32
1933 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1934 (build-system gnu-build-system)
1935 (arguments `(#:tests? #f)) ;No check target
1936 (home-page "https://www.unqlite.org")
1937 (synopsis "In-memory key/value and document store")
1938 (description
1939 "UnQLite is an in-process software library which implements a
1940 self-contained, serverless, zero-configuration, transactional NoSQL
1941 database engine. UnQLite is a document store database similar to
1942 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1943 similar to BerkeleyDB, LevelDB, etc.")
1944 (license license:bsd-2)))
1945
1946 (define-public redis
1947 (package
1948 (name "redis")
1949 (version "5.0.7")
1950 (source (origin
1951 (method url-fetch)
1952 (uri (string-append "http://download.redis.io/releases/redis-"
1953 version".tar.gz"))
1954 (sha256
1955 (base32
1956 "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
1957 (build-system gnu-build-system)
1958 (arguments
1959 '(#:tests? #f ; tests related to master/slave and replication fail
1960 #:phases (modify-phases %standard-phases
1961 (delete 'configure))
1962 #:make-flags `("CC=gcc"
1963 "MALLOC=libc"
1964 "LDFLAGS=-ldl"
1965 ,(string-append "PREFIX="
1966 (assoc-ref %outputs "out")))))
1967 (synopsis "Key-value cache and store")
1968 (description "Redis is an advanced key-value cache and store. Redis
1969 supports many data structures including strings, hashes, lists, sets, sorted
1970 sets, bitmaps and hyperloglogs.")
1971 (home-page "https://redis.io/")
1972 (license license:bsd-3)))
1973
1974 (define-public kyotocabinet
1975 (package
1976 (name "kyotocabinet")
1977 (version "1.2.78")
1978 (source (origin
1979 (method url-fetch)
1980 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
1981 "kyotocabinet-" version ".tar.gz"))
1982 (sha256
1983 (base32
1984 "1bxkf9kmcavq9rqridb8mvmrk3hj4447ffi24m2admsbm61n6k29"))))
1985 (build-system gnu-build-system)
1986 (arguments
1987 `(#:configure-flags
1988 (list
1989 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1990 (string-append "LDFLAGS=-Wl,-rpath="
1991 (assoc-ref %outputs "out") "/lib"))))
1992 (inputs `(("zlib" ,zlib)))
1993 (home-page "https://fallabs.com/kyotocabinet/")
1994 (synopsis
1995 "Kyoto Cabinet is a modern implementation of the DBM database")
1996 (description
1997 "Kyoto Cabinet is a standalone file-based database that supports Hash
1998 and B+ Tree data storage models. It is a fast key-value lightweight
1999 database and supports many programming languages. It is a NoSQL database.")
2000 (license license:gpl3+)))
2001
2002 (define-public tokyocabinet
2003 (package
2004 (name "tokyocabinet")
2005 (version "1.4.48")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (string-append "http://fallabs.com/tokyocabinet/"
2010 name "-" version ".tar.gz"))
2011 (sha256
2012 (base32
2013 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2014 (build-system gnu-build-system)
2015 (arguments
2016 `(#:configure-flags
2017 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2018 (string-append "LDFLAGS=-Wl,-rpath="
2019 (assoc-ref %outputs "out") "/lib"))))
2020 (inputs
2021 `(("zlib" ,zlib)))
2022 (home-page "http://fallabs.com/tokyocabinet/")
2023 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2024 (description
2025 "Tokyo Cabinet is a library of routines for managing a database.
2026 The database is a simple data file containing records, each is a pair of a
2027 key and a value. Every key and value is serial bytes with variable length.
2028 Both binary data and character string can be used as a key and a value.
2029 There is neither concept of data tables nor data types. Records are
2030 organized in hash table, B+ tree, or fixed-length array.")
2031 (license license:lgpl2.1+)))
2032
2033 (define-public wiredtiger
2034 (package
2035 (name "wiredtiger")
2036 (version "2.9.1")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (string-append
2040 "http://source.wiredtiger.com/releases/wiredtiger-"
2041 version ".tar.bz2"))
2042 (sha256
2043 (base32
2044 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2045 (build-system gnu-build-system)
2046 (arguments
2047 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2048 #:phases
2049 (modify-phases %standard-phases
2050 (add-before 'check 'disable-test/fops
2051 (lambda _
2052 ;; XXX: timed out after 3600 seconds of silence
2053 (substitute* "Makefile"
2054 (("test/fops") ""))
2055 #t)))))
2056 (inputs
2057 `(("lz4" ,lz4)
2058 ("zlib" ,zlib)
2059 ("snappy" ,snappy)))
2060 (home-page "http://source.wiredtiger.com/")
2061 (synopsis "NoSQL data engine")
2062 (description
2063 "WiredTiger is an extensible platform for data management. It supports
2064 row-oriented storage (where all columns of a row are stored together),
2065 column-oriented storage (where columns are stored in groups, allowing for
2066 more efficient access and storage of column subsets) and log-structured merge
2067 trees (LSM), for sustained throughput under random insert workloads.")
2068 (license license:gpl3) ; or GPL-2
2069 ;; configure.ac: WiredTiger requires a 64-bit build.
2070 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2071
2072 (define-public wiredtiger-3
2073 (package
2074 (inherit wiredtiger)
2075 (name "wiredtiger")
2076 (version "3.1.0")
2077 (source (origin
2078 (method url-fetch)
2079 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2080 version ".tar.bz2"))
2081 (sha256
2082 (base32
2083 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2084
2085 (define-public guile-wiredtiger
2086 (package
2087 (name "guile-wiredtiger")
2088 (version "0.7.0")
2089 (source (origin
2090 (method git-fetch)
2091 (uri (git-reference
2092 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2093 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2094 (file-name (string-append name "-" version "-checkout"))
2095 (sha256
2096 (base32
2097 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2098 (build-system gnu-build-system)
2099 (arguments
2100 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2101 #:configure-flags
2102 (list (string-append "--with-libwiredtiger-prefix="
2103 (assoc-ref %build-inputs "wiredtiger")))
2104 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2105 (native-inputs
2106 `(("autoconf" ,autoconf)
2107 ("automake" ,automake)
2108 ("pkg-config" ,pkg-config)))
2109 (inputs
2110 `(("wiredtiger" ,wiredtiger-3)
2111 ("guile" ,guile-2.2)))
2112 (propagated-inputs
2113 `(("guile-bytestructures" ,guile-bytestructures)))
2114 (synopsis "WiredTiger bindings for GNU Guile")
2115 (description
2116 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2117 database.")
2118 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2119 (license license:gpl3+)))
2120
2121 (define-public perl-db-file
2122 (package
2123 (name "perl-db-file")
2124 (version "1.853")
2125 (source
2126 (origin
2127 (method url-fetch)
2128 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2129 version ".tar.gz"))
2130 (sha256
2131 (base32 "1y967si45vj0skip1hnhicbv9da29fv6qcfwnsbnvj06n36mkj6h"))))
2132 (build-system perl-build-system)
2133 (inputs `(("bdb" ,bdb)))
2134 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2135 (arguments
2136 `(#:phases (modify-phases %standard-phases
2137 (add-before
2138 'configure 'modify-config.in
2139 (lambda* (#:key inputs #:allow-other-keys)
2140 (substitute* "config.in"
2141 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2142 #t)))))
2143 (home-page "https://metacpan.org/release/DB_File")
2144 (synopsis
2145 "Perl5 access to Berkeley DB version 1.x")
2146 (description
2147 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2148 (license license:perl-license)))
2149
2150 (define-public lmdb
2151 (package
2152 (name "lmdb")
2153 (version "0.9.25")
2154 (source
2155 (origin
2156 (method git-fetch)
2157 (uri (git-reference
2158 (url "https://git.openldap.org/openldap/openldap.git")
2159 (commit (string-append "LMDB_" version))))
2160 (file-name (git-file-name name version))
2161 (sha256
2162 (base32 "0i60zlca8r6fib23gdgl4c80gxpx24772ggpvz94yr7zaai4k11w"))))
2163 (build-system gnu-build-system)
2164 (arguments
2165 `(#:test-target "test"
2166 #:phases
2167 (modify-phases %standard-phases
2168 (replace 'configure
2169 (lambda* (#:key outputs #:allow-other-keys)
2170 (chdir "libraries/liblmdb")
2171 (substitute* "Makefile"
2172 (("/usr/local") (assoc-ref outputs "out")))
2173 #t)))))
2174 (home-page "https://symas.com/lmdb/")
2175 (synopsis "Lightning Memory-Mapped Database library")
2176 (description
2177 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2178 transactional database. Unlike more complex relational databases, LMDB handles
2179 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2180 underlying operating system for caching and locking, keeping the code small and
2181 simple.
2182 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2183 disk-based databases with high read performance that scales linearly over
2184 multiple cores. The size of each database is limited only by the size of the
2185 virtual address space — not physical RAM.")
2186 (license license:openldap2.8)))
2187
2188 (define-public lmdbxx
2189 (package
2190 (name "lmdbxx")
2191 (version "0.9.14.0")
2192 (source
2193 (origin
2194 (method git-fetch)
2195 (uri (git-reference
2196 (url "https://github.com/drycpp/lmdbxx")
2197 (commit version)))
2198 (file-name (git-file-name name version))
2199 (sha256
2200 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2201 (arguments
2202 `(#:make-flags
2203 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2204 #:phases
2205 (modify-phases %standard-phases
2206 (delete 'configure))))
2207 (build-system gnu-build-system)
2208 (inputs `(("lmdb" ,lmdb)))
2209 (home-page "http://lmdbxx.sourceforge.net")
2210 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2211 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2212 @code{LMDB} embedded database library, offering both an error-checked
2213 procedural interface and an object-oriented resource interface with RAII
2214 semantics.")
2215 (license license:unlicense)))
2216
2217 (define-public libpqxx
2218 (package
2219 (name "libpqxx")
2220 (version "4.0.1")
2221 (source (origin
2222 (method url-fetch)
2223 (uri (string-append
2224 "http://pqxx.org/download/software/libpqxx/"
2225 name "-" version ".tar.gz"))
2226 (sha256
2227 (base32
2228 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2229 (build-system gnu-build-system)
2230 (native-inputs
2231 `(("python" ,python-2)))
2232 (inputs `(("postgresql" ,postgresql)))
2233 (arguments
2234 `(#:tests? #f ; # FAIL: 1
2235 #:phases
2236 (modify-phases %standard-phases
2237 (add-before 'configure 'fix-sed-command
2238 (lambda _
2239 ;; Newer sed versions error out if double brackets are not used.
2240 (substitute* "configure"
2241 (("\\[:space:\\]") "[[:space:]]"))
2242 #t)))))
2243 (synopsis "C++ connector for PostgreSQL")
2244 (description
2245 "Libpqxx is a C++ library to enable user programs to communicate with the
2246 PostgreSQL database back-end. The database back-end can be local or it may be
2247 on another machine, accessed via TCP/IP.")
2248 (home-page "http://pqxx.org/")
2249 (license license:bsd-3)))
2250
2251 (define-public python-peewee
2252 (package
2253 (name "python-peewee")
2254 (version "3.9.6")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (pypi-uri "peewee" version))
2259 (sha256
2260 (base32
2261 "1j4sh946k0736m7pd54z0y6i2hjhgg3kdllx1pwq8xkzzcgrx1xw"))))
2262 (build-system python-build-system)
2263 (arguments
2264 `(#:tests? #f)) ; Fails to import test data
2265 (native-inputs
2266 `(("python-cython" ,python-cython)))
2267 (home-page "https://github.com/coleifer/peewee/")
2268 (synopsis "Small object-relational mapping utility")
2269 (description
2270 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2271 handles converting between pythonic values and those used by databases, so you
2272 can use Python types in your code without having to worry. It has built-in
2273 support for sqlite, mysql and postgresql. If you already have a database, you
2274 can autogenerate peewee models using @code{pwiz}, a model generator.")
2275 (license license:expat)))
2276
2277 (define-public python2-peewee
2278 (package-with-python2 python-peewee))
2279
2280 (define-public python-tortoise-orm
2281 (package
2282 (name "python-tortoise-orm")
2283 (version "0.16.7")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "tortoise-orm" version))
2288 (sha256
2289 (base32
2290 "0wr7p4v0b16ypm9fcpwpl99kf491m6w3jkd13xcsgq13fy73fbqc"))))
2291 (build-system python-build-system)
2292 ;; Disable tests for now. They pull in a lot of dependencies.
2293 (arguments `(#:tests? #f))
2294 (native-inputs
2295 `(("python-asynctest" ,python-asynctest)
2296 ("python-nose2" ,python-nose2)))
2297 (propagated-inputs
2298 `(("python-aiosqlite" ,python-aiosqlite)
2299 ("python-pypika" ,python-pypika)
2300 ("python-ciso8601" ,python-ciso8601)
2301 ("python-typing-extensions"
2302 ,python-typing-extensions)))
2303 (home-page
2304 "https://github.com/tortoise/tortoise-orm")
2305 (synopsis
2306 "Easy async ORM for python, built with relations in mind")
2307 (description
2308 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2309 inspired by Django. Tortoise ORM was build with relations in mind and
2310 admiration for the excellent and popular Django ORM. It’s engraved in its
2311 design that you are working not with just tables, you work with relational
2312 data.")
2313 (license license:asl2.0)))
2314
2315 (define-public sqlcipher
2316 (package
2317 (name "sqlcipher")
2318 (version "3.4.2")
2319 (source
2320 (origin
2321 (method url-fetch)
2322 (uri (string-append "https://github.com/sqlcipher/" name
2323 "/archive/v" version ".tar.gz"))
2324 (sha256
2325 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2326 (file-name (string-append name "-" version ".tar.gz"))))
2327 (build-system gnu-build-system)
2328 (inputs
2329 `(("libcrypto" ,openssl)
2330 ("libtcl8.6" ,tcl))) ; required for running the tests
2331 (native-inputs
2332 `(("tcl" ,tcl)))
2333 (arguments
2334 '(#:configure-flags
2335 '("--enable-tempstore=yes"
2336 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2337 "LDFLAGS=-lcrypto -ltcl8.6"
2338 "--disable-tcl")
2339 ;; tests cannot be run from the Makefile
2340 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2341 #:test-target "testfixture"
2342 #:phases
2343 (modify-phases %standard-phases
2344 (add-before 'check 'build-test-runner
2345 (assoc-ref %standard-phases 'check))
2346 (replace 'check
2347 (lambda _
2348 (invoke "./testfixture" "test/crypto.test"))))))
2349 (home-page "https://www.zetetic.net/sqlcipher/")
2350 (synopsis
2351 "Library providing transparent encryption of SQLite database files")
2352 (description "SQLCipher is an implementation of SQLite, extended to
2353 provide transparent 256-bit AES encryption of database files. Pages are
2354 encrypted before being written to disk and are decrypted when read back. It’s
2355 well suited for protecting embedded application databases and for mobile
2356 development.")
2357 ;; The source files
2358 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2359 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2360 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2361 ;; source files are in the public domain.
2362 (license (list license:public-domain license:bsd-3))))
2363
2364 (define-public python-pyodbc-c
2365 (package
2366 (name "python-pyodbc-c")
2367 (version "3.1.4")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2372 "archive.tar.gz?ref=v" version))
2373 (sha256
2374 (base32
2375 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2376 (file-name (string-append name "-" version ".tar.gz"))))
2377 (build-system python-build-system)
2378 (inputs
2379 `(("unixodbc" ,unixodbc)))
2380 (arguments
2381 `(;; No unit tests exist.
2382 #:tests? #f))
2383 (home-page "https://github.com/mkleehammer/pyodbc")
2384 (synopsis "Python ODBC Library")
2385 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2386 for ODBC.")
2387 (license (license:x11-style "file://LICENSE.TXT"))))
2388
2389 (define-public python2-pyodbc-c
2390 (package-with-python2 python-pyodbc-c))
2391
2392 (define-public python-pyodbc
2393 (package
2394 (name "python-pyodbc")
2395 (version "4.0.30")
2396 (source
2397 (origin
2398 (method url-fetch)
2399 (uri (pypi-uri "pyodbc" version))
2400 (sha256
2401 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2402 (file-name (string-append name "-" version ".tar.gz"))))
2403 (build-system python-build-system)
2404 (inputs
2405 `(("unixodbc" ,unixodbc)))
2406 (arguments
2407 `(#:tests? #f)) ; no unit tests exist
2408 (home-page "https://github.com/mkleehammer/pyodbc")
2409 (synopsis "Python ODBC Library")
2410 (description "@code{python-pyodbc} provides a Python DB-API driver
2411 for ODBC.")
2412 (license (license:x11-style "file:///LICENSE.TXT"))))
2413
2414 (define-public python2-pyodbc
2415 (package-with-python2 python-pyodbc))
2416
2417 (define-public mdbtools
2418 (package
2419 (name "mdbtools")
2420 (version "0.7.1")
2421 (source
2422 (origin
2423 (method git-fetch)
2424 (uri (git-reference
2425 (url "https://github.com/brianb/mdbtools")
2426 (commit version)))
2427 (file-name (git-file-name name version))
2428 (sha256
2429 (base32
2430 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2431 (build-system gnu-build-system)
2432 (inputs
2433 `(("glib" ,glib)))
2434 (native-inputs
2435 `(("autoconf" ,autoconf)
2436 ("automake" ,automake)
2437 ("libtool" ,libtool)
2438 ("pkg-config" ,pkg-config)
2439 ("txt2man" ,txt2man)
2440 ("which" ,which)))
2441 (home-page "http://mdbtools.sourceforge.net/")
2442 (synopsis "Read Microsoft Access databases")
2443 (description "MDB Tools is a set of tools and applications to read the
2444 proprietary MDB file format used in Microsoft's Access database package. This
2445 includes programs to export schema and data from Microsoft's Access database
2446 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2447 etc., and an SQL engine for performing simple SQL queries.")
2448 (license (list license:lgpl2.0
2449 license:gpl2+))))
2450
2451 (define-public python-lmdb
2452 (package
2453 (name "python-lmdb")
2454 (version "0.98")
2455 (source (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "lmdb" version))
2458 (sha256
2459 (base32
2460 "027pgbdhhdcbwj53vrzr6a60gjhmz4s75gl3180fd4q8pwlbq986"))
2461 (modules '((guix build utils)))
2462 (snippet
2463 ;; Delete bundled lmdb source files.
2464 '(begin
2465 (for-each delete-file (list "lib/lmdb.h"
2466 "lib/mdb.c"
2467 "lib/midl.c"
2468 "lib/midl.h"))
2469 #t))))
2470 (build-system python-build-system)
2471 (inputs
2472 `(("lmdb" ,lmdb)))
2473 (arguments
2474 `(#:phases
2475 (modify-phases %standard-phases
2476 (add-before 'build 'use-system-lmdb
2477 (lambda* (#:key inputs #:allow-other-keys)
2478 (let ((lmdb (assoc-ref inputs "lmdb")))
2479 (setenv "LMDB_FORCE_SYSTEM" "set")
2480 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2481 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2482 #t))))
2483 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2484 #:tests? #f))
2485 (home-page "https://github.com/dw/py-lmdb")
2486 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2487 (description
2488 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2489 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2490 (license
2491 (list license:openldap2.8
2492 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2493 ;; but not actually needed on platforms currently supported by Guix.
2494 license:bsd-3))))
2495
2496 (define-public python-orator
2497 (package
2498 (name "python-orator")
2499 (version "0.9.9")
2500 (source (origin
2501 (method url-fetch)
2502 (uri (pypi-uri "orator" version))
2503 (sha256
2504 (base32
2505 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2506 (build-system python-build-system)
2507 ;; FIXME: Tests are not distributed with PyPI, and the repository
2508 ;; does not contain setup.py. How to test?
2509 (arguments '(#:tests? #f))
2510 (propagated-inputs
2511 `(("python-backpack" ,python-backpack)
2512 ("python-blinker" ,python-blinker)
2513 ("python-cleo" ,python-cleo)
2514 ("python-faker" ,python-faker)
2515 ("python-inflection" ,python-inflection)
2516 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2517 ("python-pendulum" ,python-pendulum)
2518 ("python-pyaml" ,python-pyaml)
2519 ("python-pygments" ,python-pygments)
2520 ("python-pyyaml" ,python-pyyaml)
2521 ("python-simplejson" ,python-simplejson)
2522 ("python-six" ,python-six)
2523 ("python-wrapt" ,python-wrapt)))
2524 (home-page "https://orator-orm.com/")
2525 (synopsis "ActiveRecord ORM for Python")
2526 (description
2527 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2528 implementation for Python.")
2529 (license license:expat)
2530 (properties `((python2-variant . ,(delay python2-orator))))))
2531
2532 (define-public python2-orator
2533 (package-with-python2 (strip-python2-variant python-orator)))
2534
2535 (define-public virtuoso-ose
2536 (package
2537 (name "virtuoso-ose")
2538 (version "7.2.5")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (string-append
2543 "https://github.com/openlink/virtuoso-opensource/releases/"
2544 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2545 (sha256
2546 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2547 (build-system gnu-build-system)
2548 (arguments
2549 `(#:tests? #f ; Tests require a network connection.
2550 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2551 ;; This indicates that the internal zlib code may still be used.
2552 #:configure-flags '("--without-internal-zlib"
2553 "--with-readline")))
2554 (inputs
2555 `(("openssl" ,openssl-1.0)
2556 ("net-tools" ,net-tools)
2557 ("readline" ,readline)
2558 ("zlib" ,zlib)))
2559 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2560 (synopsis "Multi-model database system")
2561 (description "Virtuoso is a scalable cross-platform server that combines
2562 relational, graph, and document data management with web application server
2563 and web services platform functionality.")
2564 ;; configure: error: ... can only be build on 64bit platforms
2565 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2566 (license license:gpl2)))
2567
2568 (define-public python-ccm
2569 (package
2570 (name "python-ccm")
2571 (version "2.1.6")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (pypi-uri "ccm" version))
2576 (sha256
2577 (base32
2578 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2579 (build-system python-build-system)
2580 (propagated-inputs
2581 `(("python-pyyaml" ,python-pyyaml)
2582 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2583 ;; functionality
2584 ("python-psutil" ,python-psutil)
2585 ("python-six" ,python-six)))
2586 (home-page "https://github.com/pcmanus/ccm")
2587 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2588 localhost")
2589 (description "Cassandra Cluster Manager is a development tool for testing
2590 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2591 on localhost.")
2592 (license license:asl2.0)))
2593
2594 (define-public python2-ccm
2595 (package-with-python2 python-ccm))
2596
2597 (define-public python2-pysqlite
2598 (package
2599 (name "python2-pysqlite")
2600 (version "2.8.3")
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (pypi-uri "pysqlite" version))
2605 (sha256
2606 (base32
2607 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2608 (build-system python-build-system)
2609 (inputs
2610 `(("sqlite" ,sqlite)))
2611 (arguments
2612 `(#:python ,python-2 ; incompatible with Python 3
2613 #:tests? #f)) ; no test target
2614 (home-page "https://github.com/ghaering/pysqlite")
2615 (synopsis "SQLite bindings for Python")
2616 (description
2617 "Pysqlite provides SQLite bindings for Python that comply to the
2618 Database API 2.0T.")
2619 (license license:zlib)))
2620
2621 (define-public python-sqlalchemy
2622 (package
2623 (name "python-sqlalchemy")
2624 (version "1.3.18")
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "SQLAlchemy" version))
2629 (sha256
2630 (base32 "1rwc6ss1cnz3kxx0p9p6xw0w79r8qw03lcc29k31yb3rcigvfbys"))))
2631 (build-system python-build-system)
2632 (native-inputs
2633 `(("python-cython" ,python-cython) ; for C extensions
2634 ("python-pytest" ,python-pytest)
2635 ("python-mock" ,python-mock))) ; for tests
2636 (arguments
2637 `(#:phases
2638 (modify-phases %standard-phases
2639 (replace 'check
2640 (lambda _ (invoke "py.test"))))))
2641 (home-page "https://www.sqlalchemy.org")
2642 (synopsis "Database abstraction library")
2643 (description
2644 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2645 gives application developers the full power and flexibility of SQL. It
2646 provides a full suite of well known enterprise-level persistence patterns,
2647 designed for efficient and high-performing database access, adapted into a
2648 simple and Pythonic domain language.")
2649 (license license:x11)))
2650
2651 (define-public python2-sqlalchemy
2652 (package-with-python2 python-sqlalchemy))
2653
2654 (define-public python-sqlalchemy-utils
2655 (package
2656 (name "python-sqlalchemy-utils")
2657 (version "0.32.21")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "SQLAlchemy-Utils" version))
2662 (sha256
2663 (base32
2664 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2665 (build-system python-build-system)
2666 (arguments
2667 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2668 ;; #:phases
2669 ;; (modify-phases %standard-phases
2670 ;; (replace 'check
2671 ;; (lambda _
2672 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2673 (propagated-inputs
2674 `(("python-six" ,python-six)
2675 ("python-sqlalchemy" ,python-sqlalchemy)))
2676 (native-inputs
2677 `(("python-dateutil" ,python-dateutil)
2678 ("python-flexmock" ,python-flexmock)
2679 ("python-psycopg2" ,python-psycopg2)
2680 ("python-pytest" ,python-pytest)
2681 ("python-pytz" ,python-pytz)))
2682 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2683 (synopsis "Various utility functions for SQLAlchemy")
2684 (description
2685 "SQLAlchemy-utils provides various utility functions and custom data types
2686 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2687
2688 You might also want to install the following optional dependencies:
2689 @enumerate
2690 @item @code{python-passlib}
2691 @item @code{python-babel}
2692 @item @code{python-cryptography}
2693 @item @code{python-pytz}
2694 @item @code{python-psycopg2}
2695 @item @code{python-furl}
2696 @item @code{python-flask-babel}
2697 @end enumerate
2698 ")
2699 (license license:bsd-3)))
2700
2701 (define-public python2-sqlalchemy-utils
2702 (package-with-python2 python-sqlalchemy-utils))
2703
2704 (define-public python-alembic
2705 (package
2706 (name "python-alembic")
2707 (version "1.4.1")
2708 (source
2709 (origin
2710 (method url-fetch)
2711 (uri (pypi-uri "alembic" version))
2712 (patches (search-patches "python-alembic-exceptions-cause.patch"))
2713 (sha256
2714 (base32
2715 "0a4hzn76csgbf1px4f5vfm256byvjrqkgi9869nkcjrwjn35c6kr"))))
2716 (build-system python-build-system)
2717 (arguments
2718 '(#:phases (modify-phases %standard-phases
2719 (replace 'check
2720 (lambda _
2721 (invoke "pytest" "-vv"))))))
2722 (native-inputs
2723 `(("python-mock" ,python-mock)
2724 ("python-pytest-cov" ,python-pytest-cov)))
2725 (propagated-inputs
2726 `(("python-dateutil" ,python-dateutil)
2727 ("python-sqlalchemy" ,python-sqlalchemy)
2728 ("python-mako" ,python-mako)
2729 ("python-editor" ,python-editor)))
2730 (home-page "https://bitbucket.org/zzzeek/alembic")
2731 (synopsis "Database migration tool for SQLAlchemy")
2732 (description
2733 "Alembic is a lightweight database migration tool for usage with the
2734 SQLAlchemy Database Toolkit for Python.")
2735 (license license:expat)))
2736
2737 (define-public python2-alembic
2738 (package-with-python2 python-alembic))
2739
2740 (define-public python-pickleshare
2741 (package
2742 (name "python-pickleshare")
2743 (version "0.7.5")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "pickleshare" version))
2748 (sha256
2749 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2750 (build-system python-build-system)
2751 (arguments
2752 `(#:phases (modify-phases %standard-phases
2753 (replace 'check
2754 (lambda _
2755 (invoke "pytest"))))))
2756 (native-inputs
2757 `(("python-pytest" ,python-pytest)))
2758 (home-page "https://github.com/vivainio/pickleshare")
2759 (synopsis "Tiny key value database with concurrency support")
2760 (description
2761 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2762 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2763 shelve, many processes can access the database simultaneously. Changing a
2764 value in database is immediately visible to other processes accessing the same
2765 database. Concurrency is possible because the values are stored in separate
2766 files. Hence the “database” is a directory where all files are governed by
2767 PickleShare.")
2768 (properties `((python2-variant . ,(delay python2-pickleshare))))
2769 (license license:expat)))
2770
2771 (define-public python2-pickleshare
2772 (let ((pickleshare (package-with-python2
2773 (strip-python2-variant python-pickleshare))))
2774 (package (inherit pickleshare)
2775 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2776 ,@(package-propagated-inputs pickleshare))))))
2777
2778 (define-public python-apsw
2779 (package
2780 (name "python-apsw")
2781 (version "3.31.1-r1")
2782 (source
2783 (origin
2784 (method url-fetch)
2785 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2786 "/download/" version "/apsw-" version ".zip"))
2787 (sha256
2788 (base32
2789 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
2790 (build-system python-build-system)
2791 (native-inputs
2792 `(("unzip" ,unzip)))
2793 (inputs
2794 `(("sqlite" ,sqlite)))
2795 (arguments
2796 `(#:phases
2797 (modify-phases %standard-phases
2798 (replace 'build
2799 (lambda _
2800 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2801 #t))
2802 (add-after 'build 'build-test-helper
2803 (lambda _
2804 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2805 "-I." "-Isqlite3" "src/testextension.c")
2806 #t))
2807 (replace 'check
2808 (lambda* (#:key inputs outputs #:allow-other-keys)
2809 (add-installed-pythonpath inputs outputs)
2810 (invoke "python" "setup.py" "test")
2811 #t)))))
2812 (home-page "https://github.com/rogerbinns/apsw/")
2813 (synopsis "Another Python SQLite Wrapper")
2814 (description "APSW is a Python wrapper for the SQLite
2815 embedded relational database engine. In contrast to other wrappers such as
2816 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2817 translate the complete SQLite API into Python.")
2818 (license license:zlib)))
2819
2820 (define-public python2-apsw
2821 (package-with-python2 python-apsw))
2822
2823 (define-public python-aiosqlite
2824 (package
2825 (name "python-aiosqlite")
2826 (version "0.12.0")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "aiosqlite" version))
2831 (sha256
2832 (base32
2833 "1w8248yz85xyzvvh4jaxnc59fqil45aka6h82kn1rcih4rjxbnn1"))))
2834 (build-system python-build-system)
2835 (native-inputs
2836 `(("python-aiounittest" ,python-aiounittest)))
2837 (home-page "https://github.com/jreese/aiosqlite")
2838 (synopsis
2839 "Asyncio bridge for sqlite3")
2840 (description
2841 "The package aiosqlite replicates the standard sqlite3 module, but with
2842 async versions of all the standard connection and cursor methods, and context
2843 managers for automatically closing connections.")
2844 (license license:expat)))
2845
2846 (define-public python2-neo4j-driver
2847 (package
2848 (name "python2-neo4j-driver")
2849 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2850 (version "1.4.0")
2851 (source (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "neo4j-driver" version))
2854 (sha256
2855 (base32
2856 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2857 (build-system python-build-system)
2858 (arguments
2859 `(#:python ,python-2))
2860 (home-page "https://neo4j.com/developer/python/")
2861 (synopsis "Neo4j driver code written in Python")
2862 (description "This package provides the Neo4j Python driver that connects
2863 to the database using Neo4j's binary protocol. It aims to be minimal, while
2864 being idiomatic to Python.")
2865 (license license:asl2.0)))
2866
2867 (define-public python2-py2neo
2868 (package
2869 (name "python2-py2neo")
2870 (version "3.1.2")
2871 (source (origin
2872 (method url-fetch)
2873 (uri (pypi-uri "py2neo" version))
2874 (sha256
2875 (base32
2876 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2877 (build-system python-build-system)
2878 (arguments
2879 `(#:python ,python-2))
2880 (home-page "https://py2neo.org")
2881 (synopsis "Library and toolkit for working with Neo4j in Python")
2882 (description "This package provides a client library and toolkit for
2883 working with Neo4j from within Python applications and from the command
2884 line. The core library has no external dependencies and has been carefully
2885 designed to be easy and intuitive to use.")
2886 (license license:asl2.0)))
2887
2888 (define-public python-psycopg2
2889 (package
2890 (name "python-psycopg2")
2891 (version "2.8.5")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (pypi-uri "psycopg2" version))
2896 (sha256
2897 (base32 "06081jk9srkd4ra9j8b93x9ld3a2yxsbsf5bbbcivbm1yx065m7p"))))
2898 (build-system python-build-system)
2899 (arguments
2900 ;; Tests would require a postgresql database "psycopg2_test"
2901 ;; and a running postgresql database management service.
2902 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2903 (inputs
2904 `(("postgresql" ,postgresql))) ; libpq
2905 (home-page "http://initd.org/psycopg/")
2906 (synopsis "Python PostgreSQL adapter")
2907 (description
2908 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2909 2.0.")
2910 (license license:lgpl3+)))
2911
2912 (define-public python2-psycopg2
2913 (package-with-python2 python-psycopg2))
2914
2915 (define-public python-sadisplay
2916 (package
2917 (name "python-sadisplay")
2918 (version "0.4.8")
2919 (source
2920 (origin
2921 (method url-fetch)
2922 (uri (pypi-uri "sadisplay" version))
2923 (sha256
2924 (base32
2925 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2926 (build-system python-build-system)
2927 (propagated-inputs
2928 `(("python-sqlalchemy" ,python-sqlalchemy)))
2929 (native-inputs
2930 ;; For tests.
2931 `(("python-nose" ,python-nose)))
2932 (home-page "https://bitbucket.org/estin/sadisplay")
2933 (synopsis "SQLAlchemy schema displayer")
2934 (description "This package provides a program to build Entity
2935 Relationship diagrams from a SQLAlchemy model (or directly from the
2936 database).")
2937 (license license:bsd-3)))
2938
2939 (define-public python2-sadisplay
2940 (package-with-python2 python-sadisplay))
2941
2942 (define-public python-mysqlclient
2943 (package
2944 (name "python-mysqlclient")
2945 (version "1.3.13")
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "mysqlclient" version))
2950 (sha256
2951 (base32
2952 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2953 (build-system python-build-system)
2954 (native-inputs
2955 `(("nose" ,python-nose)
2956 ("mock" ,python-mock)
2957 ("py.test" ,python-pytest)))
2958 (inputs
2959 `(("mysql" ,mariadb "lib")
2960 ("mysql-dev" ,mariadb "dev")
2961 ("libz" ,zlib)
2962 ("openssl" ,openssl)))
2963 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2964 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2965 (description "MySQLdb is an interface to the popular MySQL database server
2966 for Python. The design goals are:
2967 @enumerate
2968 @item Compliance with Python database API version 2.0 [PEP-0249],
2969 @item Thread-safety,
2970 @item Thread-friendliness (threads will not block each other).
2971 @end enumerate")
2972 (license license:gpl2)))
2973
2974 (define-public python2-mysqlclient
2975 (package-with-python2 python-mysqlclient))
2976
2977 (define-public python-hiredis
2978 (package
2979 (name "python-hiredis")
2980 (version "0.2.0")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "hiredis" version))
2985 (sha256
2986 (base32
2987 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2988 (build-system python-build-system)
2989 (arguments
2990 ;; no tests
2991 `(#:tests? #f))
2992 (home-page "https://github.com/redis/hiredis-py")
2993 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2994 (description "Python-hiredis is a python extension that wraps protocol
2995 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2996 (license license:bsd-3)))
2997
2998 (define-public python2-hiredis
2999 (package-with-python2 python-hiredis))
3000
3001 (define-public python-fakeredis
3002 (package
3003 (name "python-fakeredis")
3004 (version "1.2.1")
3005 (source
3006 (origin
3007 (method url-fetch)
3008 (uri (pypi-uri "fakeredis" version))
3009 (sha256
3010 (base32
3011 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3012 (build-system python-build-system)
3013 (arguments
3014 ;; no tests
3015 `(#:tests? #f))
3016 (propagated-inputs
3017 `(("python-sortedcontainers" ,python-sortedcontainers)))
3018 (home-page "https://github.com/jamesls/fakeredis")
3019 (synopsis "Fake implementation of redis API for testing purposes")
3020 (description
3021 "Fakeredis is a pure-Python implementation of the redis-py Python client
3022 that simulates talking to a redis server. It was created for a single purpose:
3023 to write unit tests.
3024
3025 Setting up redis is not hard, but one often wants to write unit tests that don't
3026 talk to an external server such as redis. This module can be used as a
3027 reasonable substitute.")
3028 (license license:bsd-3)))
3029
3030 (define-public python2-fakeredis
3031 (package-with-python2 python-fakeredis))
3032
3033 (define-public python-redis
3034 (package
3035 (name "python-redis")
3036 (version "3.3.8")
3037 (source
3038 (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "redis" version))
3041 (sha256
3042 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
3043 (build-system python-build-system)
3044 ;; Tests require a running Redis server.
3045 (arguments '(#:tests? #f))
3046 ;; As long as we are not running test, we do not need this input :-)
3047 ;;(native-inputs
3048 ;; `(("python-pytest" ,python-pytest)))
3049 (home-page "https://github.com/andymccurdy/redis-py")
3050 (synopsis "Redis Python client")
3051 (description
3052 "This package provides a Python interface to the Redis key-value store.")
3053 (license license:expat)))
3054
3055 (define-public python2-redis
3056 (package-with-python2 python-redis))
3057
3058 (define-public python-rq
3059 (package
3060 (name "python-rq")
3061 (version "0.13.0")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (pypi-uri "rq" version))
3066 (sha256
3067 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
3068 (build-system python-build-system)
3069 (propagated-inputs
3070 `(("python-click" ,python-click)
3071 ("python-redis" ,python-redis)))
3072 (home-page "https://python-rq.org/")
3073 (synopsis "Simple job queues for Python")
3074 (description
3075 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3076 processing them in the background with workers. It is backed by Redis and it
3077 is designed to have a low barrier to entry.")
3078 (license license:bsd-2)))
3079
3080 (define-public python2-rq
3081 (package-with-python2 python-rq))
3082
3083 (define-public python-trollius-redis
3084 (package
3085 (name "python-trollius-redis")
3086 (version "0.1.4")
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "trollius_redis" version))
3091 (sha256
3092 (base32
3093 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3094 (build-system python-build-system)
3095 ;; TODO: Tests require packaging 'hiredis'.
3096 (arguments '(#:tests? #f))
3097 (home-page "https://github.com/benjolitz/trollius-redis")
3098 (synopsis "Port of asyncio-redis to trollius")
3099 (description "@code{trollius-redis} is a Redis client for Python
3100 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3101 Redis protocol.")
3102 (license license:bsd-2)))
3103
3104 (define-public python2-trollius-redis
3105 (package-with-python2 python-trollius-redis))
3106
3107 (define-public python-sqlparse
3108 (package
3109 (name "python-sqlparse")
3110 (version "0.3.1")
3111 (source (origin
3112 (method url-fetch)
3113 (uri (pypi-uri "sqlparse" version))
3114 (sha256
3115 (base32
3116 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3117 (build-system python-build-system)
3118 (arguments
3119 `(#:phases
3120 (modify-phases %standard-phases
3121 (replace 'check
3122 (lambda _ (invoke "py.test"))))))
3123 (native-inputs
3124 `(("python-pytest" ,python-pytest)))
3125 (home-page "https://github.com/andialbrecht/sqlparse")
3126 (synopsis "Non-validating SQL parser")
3127 (description "Sqlparse is a non-validating SQL parser for Python. It
3128 provides support for parsing, splitting and formatting SQL statements.")
3129 (license license:bsd-3)))
3130
3131 (define-public python2-sqlparse
3132 (package-with-python2 python-sqlparse))
3133
3134 (define-public python-sql
3135 (package
3136 (name "python-sql")
3137 (version "1.0.0")
3138 (source
3139 (origin
3140 (method url-fetch)
3141 (uri (pypi-uri "python-sql" version))
3142 (sha256
3143 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3144 (build-system python-build-system)
3145 (home-page "https://python-sql.tryton.org/")
3146 (synopsis "Library to write SQL queries in a pythonic way")
3147 (description "@code{python-sql} is a library to write SQL queries, that
3148 transforms idiomatic python function calls to well-formed SQL queries.")
3149 (license license:bsd-3)))
3150
3151 (define-public python2-sql
3152 (package-with-python2 python-sql))
3153
3154 (define-public python-pypika
3155 (package
3156 (name "python-pypika")
3157 (version "0.37.2")
3158 (source
3159 (origin (method git-fetch)
3160 (uri (git-reference
3161 (url "https://github.com/kayak/pypika")
3162 (commit (string-append "v" version))))
3163 (file-name (git-file-name name version))
3164 (sha256
3165 (base32
3166 "089z1c778q1fwhzsc88ws8j5gm2hgxknibabn4wpax8rz2bfs3ck"))))
3167 (build-system python-build-system)
3168 (native-inputs
3169 `(("python-parameterized" ,python-parameterized)))
3170 (home-page "https://github.com/kayak/pypika")
3171 (synopsis "SQL query builder API for Python")
3172 (description
3173 "PyPika is a python SQL query builder that exposes the full richness of
3174 the SQL language using a syntax that reflects the resulting query.")
3175 (license license:asl2.0)))
3176
3177 (define-public mongo-tools
3178 (package
3179 (name "mongo-tools")
3180 (version "3.4.0")
3181 (source
3182 (origin (method git-fetch)
3183 (uri (git-reference
3184 (url "https://github.com/mongodb/mongo-tools")
3185 (commit (string-append "r" version))))
3186 (file-name (git-file-name name version))
3187 (sha256
3188 (base32
3189 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3190 (build-system go-build-system)
3191 (arguments
3192 `(#:import-path "github.com/mongodb/mongo-tools"
3193 #:modules ((srfi srfi-1)
3194 (guix build go-build-system)
3195 (guix build utils))
3196 #:install-source? #f
3197 #:phases
3198 (let ((all-tools
3199 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3200 "mongoimport" "mongooplog" "mongorestore"
3201 "mongostat" "mongotop")))
3202 (modify-phases %standard-phases
3203 (add-after 'unpack 'delete-bundled-source-code
3204 (lambda _
3205 (delete-file-recursively
3206 "src/github.com/mongodb/mongo-tools/vendor")
3207 #t))
3208 (add-after 'delete-bundled-source-code 'patch-source
3209 (lambda _
3210 ;; Remove a redundant argument that causes compilation to fail.
3211 (substitute*
3212 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3213 (("skipping restore of system.profile collection\", db)")
3214 "skipping restore of system.profile collection\")"))
3215 #t))
3216 (replace 'build
3217 (lambda _
3218 (for-each (lambda (tool)
3219 (let ((command
3220 `("go" "build"
3221 ;; This is where the tests expect to find the
3222 ;; executables
3223 "-o" ,(string-append
3224 "src/github.com/mongodb/mongo-tools/bin/"
3225 tool)
3226 "-v"
3227 "-tags=\"ssl sasl\""
3228 "-ldflags"
3229 "-extldflags=-Wl,-z,now,-z,relro"
3230 ,(string-append
3231 "src/github.com/mongodb/mongo-tools/"
3232 tool "/main/" tool ".go"))))
3233 (simple-format #t "build: running ~A\n"
3234 (string-join command))
3235 (apply invoke command)))
3236 all-tools)
3237 #t))
3238 (replace 'check
3239 (lambda _
3240 (with-directory-excursion "src"
3241 (for-each (lambda (tool)
3242 (invoke
3243 "go" "test" "-v"
3244 (string-append "github.com/mongodb/mongo-tools/"
3245 tool)))
3246 all-tools))
3247 #t))
3248 (replace 'install
3249 (lambda* (#:key outputs #:allow-other-keys)
3250 (for-each (lambda (tool)
3251 (install-file
3252 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3253 tool)
3254 (string-append (assoc-ref outputs "out")
3255 "/bin")))
3256 all-tools)
3257 #t))))))
3258 (native-inputs
3259 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3260 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3261 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3262 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3263 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3264 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3265 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3266 (home-page "https://github.com/mongodb/mongo-tools")
3267 (synopsis "Various tools for interacting with MongoDB and BSON")
3268 (description
3269 "This package includes a collection of tools related to MongoDB.
3270 @table @code
3271 @item bsondump
3272 Display BSON files in a human-readable format
3273 @item mongoimport
3274 Convert data from JSON, TSV or CSV and insert them into a collection
3275 @item mongoexport
3276 Write an existing collection to CSV or JSON format
3277 @item mongodump/mongorestore
3278 Dump MongoDB backups to disk in the BSON format
3279 @item mongorestore
3280 Read MongoDB backups in the BSON format, and restore them to a live database
3281 @item mongostat
3282 Monitor live MongoDB servers, replica sets, or sharded clusters
3283 @item mongofiles
3284 Read, write, delete, or update files in GridFS
3285 @item mongooplog
3286 Replay oplog entries between MongoDB servers
3287 @item mongotop
3288 Monitor read/write activity on a mongo server
3289 @end table")
3290 (license license:asl2.0)))
3291
3292 ;; There are many wrappers for this in other languages. When touching, please
3293 ;; be sure to ensure all dependencies continue to build.
3294 (define-public apache-arrow
3295 (package
3296 (name "apache-arrow")
3297 (version "0.17.1")
3298 (source
3299 (origin
3300 (method git-fetch)
3301 (uri (git-reference
3302 (url "https://github.com/apache/arrow")
3303 (commit (string-append "apache-arrow-" version))))
3304 (file-name (git-file-name name version))
3305 (sha256
3306 (base32
3307 "02r6yx3yhywzikd3b0vfkjgddhfiriyx2vpm3jf5880wq59x798a"))))
3308 (build-system cmake-build-system)
3309 (arguments
3310 `(#:tests? #f
3311 #:phases
3312 (modify-phases %standard-phases
3313 (add-before 'configure 'enter-source-directory
3314 (lambda _ (chdir "cpp") #t))
3315 (add-after 'unpack 'set-env
3316 (lambda _
3317 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3318 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3319 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3320 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3321 #t)))
3322 #:build-type "Release"
3323 #:configure-flags
3324 (list "-DARROW_PYTHON=ON"
3325 "-DARROW_GLOG=ON"
3326 ;; Parquet options
3327 "-DARROW_PARQUET=ON"
3328 "-DPARQUET_BUILD_EXECUTABLES=ON"
3329 ;; The maintainers disallow using system versions of
3330 ;; jemalloc:
3331 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3332 ;; is unfortunate because jemalloc increases performance:
3333 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3334 "-DARROW_JEMALLOC=OFF"
3335
3336 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3337 ;; option that instructs the build system how to resolve
3338 ;; each dependency. SYSTEM = Finding the dependency in
3339 ;; system paths using CMake's built-in find_package
3340 ;; function, or using pkg-config for packages that do not
3341 ;; have this feature
3342 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3343
3344 ;; Split output into its component packages.
3345 (string-append "-DCMAKE_INSTALL_PREFIX="
3346 (assoc-ref %outputs "lib"))
3347 (string-append "-DCMAKE_INSTALL_RPATH="
3348 (assoc-ref %outputs "lib")
3349 "/lib")
3350 (string-append "-DCMAKE_INSTALL_BINDIR="
3351 (assoc-ref %outputs "out")
3352 "/bin")
3353 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3354 (assoc-ref %outputs "include")
3355 "/share/include")
3356
3357
3358 "-DARROW_WITH_SNAPPY=ON"
3359 "-DARROW_WITH_ZLIB=ON"
3360 "-DARROW_WITH_ZSTD=ON"
3361 "-DARROW_WITH_LZ4=ON"
3362 "-DARROW_COMPUTE=ON"
3363 "-DARROW_CSV=ON"
3364 "-DARROW_DATASET=ON"
3365 "-DARROW_FILESYSTEM=ON"
3366 "-DARROW_HDFS=ON"
3367 "-DARROW_JSON=ON"
3368 ;; Arrow Python C++ integration library (required for
3369 ;; building pyarrow). This library must be built against
3370 ;; the same Python version for which you are building
3371 ;; pyarrow. NumPy must also be installed. Enabling this
3372 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3373 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3374 ;; ARROW_JSON.
3375 "-DARROW_PYTHON=ON"
3376
3377 ;; Building the tests forces on all the
3378 ;; optional features and the use of static
3379 ;; libraries.
3380 "-DARROW_BUILD_TESTS=OFF"
3381 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3382 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3383 "-DARROW_BUILD_STATIC=OFF")))
3384 (inputs
3385 `(("boost" ,boost)
3386 ("brotli" ,google-brotli)
3387 ("double-conversion" ,double-conversion)
3388 ("snappy" ,snappy)
3389 ("gflags" ,gflags)
3390 ("glog" ,glog)
3391 ("apache-thrift" ,apache-thrift "lib")
3392 ("protobuf" ,protobuf)
3393 ("rapidjson" ,rapidjson)
3394 ("zlib" ,zlib)
3395 ("bzip2" ,bzip2)
3396 ("lz4" ,lz4)
3397 ("zstd" ,zstd "lib")
3398 ("re2" ,re2)
3399 ("grpc" ,grpc)
3400 ("python-3" ,python)
3401 ("python-numpy" ,python-numpy)))
3402 (native-inputs
3403 `(("pkg-config" ,pkg-config)))
3404 (outputs '("out" "lib" "include"))
3405 (home-page "https://arrow.apache.org/")
3406 (synopsis "Columnar in-memory analytics")
3407 (description "Apache Arrow is a columnar in-memory analytics layer
3408 designed to accelerate big data. It houses a set of canonical in-memory
3409 representations of flat and hierarchical data along with multiple
3410 language-bindings for structure manipulation. It also provides IPC and common
3411 algorithm implementations.")
3412 (license license:asl2.0)))
3413
3414 (define-public python-pyarrow
3415 (package
3416 (inherit apache-arrow)
3417 (name "python-pyarrow")
3418 (build-system python-build-system)
3419 (arguments
3420 '(#:tests? #f ; XXX There are no tests in the "python" directory
3421 #:phases
3422 (modify-phases %standard-phases
3423 (delete 'build) ; XXX the build is performed again during the install phase
3424 (add-after 'unpack 'enter-source-directory
3425 (lambda _ (chdir "python") #t))
3426 (add-after 'unpack 'make-git-checkout-writable
3427 (lambda _
3428 (for-each make-file-writable (find-files "."))
3429 #t)))))
3430 (propagated-inputs
3431 `(("apache-arrow" ,apache-arrow "lib")
3432 ("python-numpy" ,python-numpy)
3433 ("python-pandas" ,python-pandas)
3434 ("python-six" ,python-six)))
3435 (native-inputs
3436 `(("cmake" ,cmake-minimal)
3437 ("pkg-config" ,pkg-config)
3438 ("python-cython" ,python-cython)
3439 ("python-pytest" ,python-pytest)
3440 ("python-pytest-runner" ,python-pytest-runner)
3441 ("python-setuptools-scm" ,python-setuptools-scm)))
3442 (outputs '("out"))
3443 (home-page "https://arrow.apache.org/docs/python/")
3444 (synopsis "Python bindings for Apache Arrow")
3445 (description
3446 "This library provides a Pythonic API wrapper for the reference Arrow C++
3447 implementation, along with tools for interoperability with pandas, NumPy, and
3448 other traditional Python scientific computing packages.")
3449 (license license:asl2.0)))
3450
3451 (define-public python2-pyarrow
3452 (package-with-python2 python-pyarrow))
3453
3454 (define-public python-crate
3455 (package
3456 (name "python-crate")
3457 (version "0.23.2")
3458 (source (origin
3459 (method url-fetch)
3460 (uri (pypi-uri "crate" version))
3461 (sha256
3462 (base32
3463 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3464 (build-system python-build-system)
3465 (propagated-inputs
3466 `(("python-urllib3" ,python-urllib3)))
3467 (home-page "https://github.com/crate/crate-python")
3468 (synopsis "CrateDB Python client")
3469 (description
3470 "This package provides a Python client library for CrateDB.
3471 It implements the Python DB API 2.0 specification and includes support for
3472 SQLAlchemy.")
3473 (license license:asl2.0)))
3474
3475 (define-public libdbi
3476 (package
3477 (name "libdbi")
3478 (version "0.9.0")
3479 (source (origin
3480 (method url-fetch)
3481 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3482 version "/libdbi-" version ".tar.gz"))
3483 (sha256
3484 (base32
3485 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3486 (build-system gnu-build-system)
3487 (synopsis "Database independent abstraction layer in C")
3488 (description
3489 "This library implements a database independent abstraction layer in C,
3490 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3491 programmers can leverage the power of multiple databases and multiple
3492 simultaneous database connections by using this framework.")
3493 (home-page "http://libdbi.sourceforge.net/")
3494 (license license:lgpl2.1+)))
3495
3496 (define-public libdbi-drivers
3497 (package
3498 (name "libdbi-drivers")
3499 (version "0.9.0")
3500 (source (origin
3501 (method url-fetch)
3502 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3503 "libdbi-drivers/libdbi-drivers-" version
3504 "/libdbi-drivers-" version ".tar.gz"))
3505 (sha256
3506 (base32
3507 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3508 (build-system gnu-build-system)
3509 (native-inputs
3510 `(;; For tests.
3511 ("inetutils" ,inetutils)
3512 ("glibc-locales" ,glibc-locales)
3513 ("mariadb" ,mariadb)))
3514 (inputs
3515 `(("libdbi" ,libdbi)
3516 ("mariadb:dev" ,mariadb "dev")
3517 ("mariadb:lib" ,mariadb "lib")
3518 ("postgresql" ,postgresql)
3519 ("sqlite" ,sqlite)))
3520 (arguments
3521 `(#:configure-flags
3522 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3523 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3524 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3525 (postgresql (assoc-ref %build-inputs "postgresql"))
3526 (sqlite (assoc-ref %build-inputs "sqlite")))
3527 (list "--disable-docs"
3528 (string-append "--with-dbi-incdir=" libdbi "/include")
3529 (string-append "--with-dbi-libdir=" libdbi "/lib")
3530 "--with-mysql"
3531 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3532 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3533 "--with-pgsql"
3534 (string-append "--with-pgsql-incdir=" postgresql "/include")
3535 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3536 "--with-sqlite3"
3537 (string-append "--with-sqlite-incdir=" sqlite "/include")
3538 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3539 #:phases
3540 (modify-phases %standard-phases
3541 (add-after 'unpack 'fix-tests
3542 (lambda* (#:key inputs #:allow-other-keys)
3543 (substitute* "tests/test_mysql.sh"
3544 (("^MYMYSQLD=.*")
3545 (string-append "MYMYSQLD="
3546 (assoc-ref inputs "mariadb")
3547 "/bin/mysqld")))
3548 #t))
3549 (add-after 'install 'remove-empty-directories
3550 (lambda* (#:key outputs #:allow-other-keys)
3551 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3552 (delete-file-recursively var))
3553 #t)))))
3554 (synopsis "Database drivers for the libdbi framework")
3555 (description
3556 "The @code{libdbi-drivers} library provides the database specific drivers
3557 for the @code{libdbi} framework.
3558
3559 The drivers officially supported by @code{libdbi} are:
3560 @itemize
3561 @item MySQL,
3562 @item PostgreSQL,
3563 @item SQLite.
3564 @end itemize")
3565 (home-page "http://libdbi-drivers.sourceforge.net/")
3566 (license license:lgpl2.1+)))
3567
3568 (define-public soci
3569 (package
3570 (name "soci")
3571 (version "4.0.0")
3572 (source (origin
3573 (method git-fetch)
3574 (uri (git-reference
3575 (url "https://github.com/SOCI/soci/")
3576 (commit version)))
3577 (file-name (git-file-name name version))
3578 (sha256
3579 (base32
3580 "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb"))))
3581 (build-system cmake-build-system)
3582 (inputs
3583 `(("postgresql" ,postgresql)
3584 ("sqlite" ,sqlite)
3585 ("odbc" ,unixodbc)
3586 ("boost" ,boost)
3587 ("mariadb:dev" ,mariadb "dev")
3588 ("mariadb:lib" ,mariadb "lib")))
3589 (arguments
3590 `(#:tests? #f ; Tests may require running database management systems.
3591 #:phases
3592 (modify-phases %standard-phases
3593 (add-after 'unpack 'fix-lib-path
3594 (lambda _
3595 (substitute* "CMakeLists.txt"
3596 (("set\\(SOCI_LIBDIR \"lib64\"\\)") ""))
3597 #t)))))
3598 (synopsis "C++ Database Access Library")
3599 (description
3600 "SOCI is an abstraction layer for several database backends, including
3601 PostreSQL, SQLite, ODBC and MySQL.")
3602 (home-page "http://soci.sourceforge.net/")
3603 (license license:boost1.0)))