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