gnu: r-mnormt: Update to 2.0.1.
[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")
e24e345c 687 (version "10.1.45")
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
e24e345c 695 "1mfs0x4c0z7d306n128dxdawk3llk25vxif5zwl20fv1z5qhz3wx"))
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")
809a3f72 941 (version "3.1.9")
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
809a3f72 950 "1izjzf7yzjqzlk8dkp327fa9lawsv2hnnlnr7g5lshyx5azrk38h"))))
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")
4cff2303 966 (version "10.13")
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
4cff2303 973 "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d"))
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")
ec40d24f 1150 (version "6.10.2")
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
ec40d24f 1159 "1f2wqb6px812ijcivq3rsknqgkv01wblc6sd8wavhrw8qljgr3s1"))
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")
23ec2a0e 1484 (version "0.082842")
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
23ec2a0e 1491 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
feae3395
EB
1492 (build-system perl-build-system)
1493 (native-inputs
1494 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1495 ("perl-file-temp" ,perl-file-temp)
2f837cf7 1496 ("perl-module-install" ,perl-module-install)
feae3395
EB
1497 ("perl-package-stash" ,perl-package-stash)
1498 ("perl-test-deep" ,perl-test-deep)
1499 ("perl-test-exception" ,perl-test-exception)
1500 ("perl-test-warn" ,perl-test-warn)))
1501 (propagated-inputs
1502 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1503 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1504 ("perl-class-inspector" ,perl-class-inspector)
1505 ("perl-config-any" ,perl-config-any)
1506 ("perl-context-preserve" ,perl-context-preserve)
1507 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1508 ("perl-data-page" ,perl-data-page)
1509 ("perl-dbi" ,perl-dbi)
1510 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1511 ("perl-hash-merge" ,perl-hash-merge)
1512 ("perl-module-find" ,perl-module-find)
1513 ("perl-moo" ,perl-moo)
1514 ("perl-mro-compat" ,perl-mro-compat)
1515 ("perl-namespace-clean" ,perl-namespace-clean)
1516 ("perl-path-class" ,perl-path-class)
1517 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1518 ("perl-scope-guard" ,perl-scope-guard)
23ec2a0e 1519 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
feae3395
EB
1520 ("perl-sub-name" ,perl-sub-name)
1521 ("perl-text-balanced" ,perl-text-balanced)
1522 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 1523 (home-page "https://metacpan.org/release/DBIx-Class")
feae3395
EB
1524 (synopsis "Extensible and flexible object <-> relational mapper")
1525 (description "An SQL to OO mapper with an object API inspired by
1526Class::DBI (with a compatibility layer as a springboard for porting) and a
1527resultset API that allows abstract encapsulation of database operations. It
1528aims to make representing queries in your code as perl-ish as possible while
1529still providing access to as many of the capabilities of the database as
1530possible, including retrieving related records from multiple tables in a
1531single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1532\"ORDER BY\" and \"HAVING\" support.")
2f3108ad 1533 (license license:perl-license)))
e61fd0f0 1534
4e4039e5
EB
1535(define-public perl-dbix-class-cursor-cached
1536 (package
1537 (name "perl-dbix-class-cursor-cached")
180cb81b 1538 (version "1.001004")
4e4039e5
EB
1539 (source
1540 (origin
1541 (method url-fetch)
1542 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1543 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1544 (sha256
1545 (base32
180cb81b 1546 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
4e4039e5
EB
1547 (build-system perl-build-system)
1548 (native-inputs
1549 `(("perl-cache-cache" ,perl-cache-cache)
2f837cf7
MB
1550 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1551 ("perl-module-install" ,perl-module-install)))
4e4039e5
EB
1552 (propagated-inputs
1553 `(("perl-carp-clan" ,perl-carp-clan)
1554 ("perl-dbix-class" ,perl-dbix-class)))
9aba9b12 1555 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
4e4039e5
EB
1556 (synopsis "Cursor with built-in caching support")
1557 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1558built-in caching support.")
2f3108ad 1559 (license license:perl-license)))
4e4039e5 1560
e61fd0f0
EB
1561(define-public perl-dbix-class-introspectablem2m
1562 (package
1563 (name "perl-dbix-class-introspectablem2m")
7a462b80 1564 (version "0.001002")
e61fd0f0
EB
1565 (source
1566 (origin
1567 (method url-fetch)
68a9d6df 1568 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
e61fd0f0
EB
1569 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1570 (sha256
1571 (base32
7a462b80 1572 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
e61fd0f0 1573 (build-system perl-build-system)
2f837cf7
MB
1574 (native-inputs
1575 `(("perl-module-install" ,perl-module-install)))
e61fd0f0
EB
1576 (propagated-inputs
1577 `(("perl-dbix-class" ,perl-dbix-class)))
9aba9b12 1578 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
e61fd0f0
EB
1579 (synopsis "Introspect many-to-many relationships")
1580 (description "Because the many-to-many relationships are not real
1581relationships, they can not be introspected with DBIx::Class. Many-to-many
1582relationships are actually just a collection of convenience methods installed
1583to bridge two relationships. This DBIx::Class component can be used to store
1584all relevant information about these non-relationships so they can later be
1585introspected and examined.")
2f3108ad 1586 (license license:perl-license)))
708155df
EB
1587
1588(define-public perl-dbix-class-schema-loader
1589 (package
1590 (name "perl-dbix-class-schema-loader")
1672e7e7 1591 (version "0.07049")
708155df
EB
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1596 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1597 (sha256
1598 (base32
1672e7e7 1599 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
708155df
EB
1600 (build-system perl-build-system)
1601 (native-inputs
1602 `(("perl-config-any" ,perl-config-any)
1603 ("perl-config-general" ,perl-config-general)
1604 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1605 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
2f837cf7 1606 ("perl-module-install" ,perl-module-install)
708155df
EB
1607 ("perl-moose" ,perl-moose)
1608 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1609 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1610 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1611 ("perl-test-deep" ,perl-test-deep)
1612 ("perl-test-differences" ,perl-test-differences)
1613 ("perl-test-exception" ,perl-test-exception)
1614 ("perl-test-pod" ,perl-test-pod)
1615 ("perl-test-warn" ,perl-test-warn)))
1616 (propagated-inputs
1617 `(("perl-class-unload" ,perl-class-unload)
1618 ("perl-class-inspector" ,perl-class-inspector)
1619 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1620 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1621 ("perl-carp-clan" ,perl-carp-clan)
1622 ("perl-data-dump" ,perl-data-dump)
1623 ("perl-dbix-class" ,perl-dbix-class)
1624 ("perl-hash-merge" ,perl-hash-merge)
1625 ("perl-list-moreutils" ,perl-list-moreutils)
1626 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1627 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1628 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1629 ("perl-namespace-clean" ,perl-namespace-clean)
1630 ("perl-mro-compat" ,perl-mro-compat)
1631 ("perl-scope-guard" ,perl-scope-guard)
1632 ("perl-string-camelcase" ,perl-string-camelcase)
1633 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1634 ("perl-sub-name" ,perl-sub-name)
1635 ("perl-try-tiny" ,perl-try-tiny)))
1636 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
9aba9b12 1637 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
708155df
EB
1638 (synopsis "Create a DBIx::Class::Schema based on a database")
1639 (description "DBIx::Class::Schema::Loader automates the definition of a
1640DBIx::Class::Schema by scanning database table definitions and setting up the
1641columns, primary keys, unique constraints and relationships.")
2f3108ad 1642 (license license:perl-license)))
274da61d 1643
186eb132
EB
1644(define-public perl-dbd-pg
1645 (package
1646 (name "perl-dbd-pg")
8c078dde 1647 (version "3.7.4")
186eb132
EB
1648 (source
1649 (origin
1650 (method url-fetch)
1651 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1652 "DBD-Pg-" version ".tar.gz"))
1653 (sha256
1654 (base32
8c078dde 1655 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
186eb132
EB
1656 (build-system perl-build-system)
1657 (native-inputs
1658 `(("perl-dbi" ,perl-dbi)))
1659 (propagated-inputs
1660 `(("perl-dbi" ,perl-dbi)
1661 ("postgresql" ,postgresql)))
9aba9b12 1662 (home-page "https://metacpan.org/release/DBD-Pg")
186eb132 1663 (synopsis "DBI PostgreSQL interface")
f33e71fc
LC
1664 (description "This package provides a PostgreSQL driver for the Perl5
1665@dfn{Database Interface} (DBI).")
2f3108ad 1666 (license license:perl-license)))
186eb132 1667
4b7857a4
RW
1668(define-public perl-dbd-mysql
1669 (package
1670 (name "perl-dbd-mysql")
49596a54 1671 (version "4.050")
4b7857a4
RW
1672 (source
1673 (origin
1674 (method url-fetch)
49596a54 1675 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
4b7857a4
RW
1676 "DBD-mysql-" version ".tar.gz"))
1677 (sha256
49596a54 1678 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
4b7857a4 1679 (build-system perl-build-system)
702a87f2
TGR
1680 (arguments
1681 `(#:phases
1682 (modify-phases %standard-phases
1683 (add-before 'configure 'skip-library-detection
1684 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1685 ;; are really only needed for the test suite; their absence does not
1686 ;; affect the build or the end result.
1687 (lambda _
1688 (substitute* "Makefile.PL"
1689 (("use Devel::CheckLib;" match)
1690 (string-append "# " match))
1691 (("assert_lib")
1692 "print"))
1693 #t)))
1694 ;; Tests require running MySQL server.
1695 #:tests? #f))
4b7857a4
RW
1696 (propagated-inputs
1697 `(("perl-dbi" ,perl-dbi)
2b8491fb
JL
1698 ("mysql" ,mariadb "lib")
1699 ("mysql-dev" ,mariadb "dev")))
9aba9b12 1700 (home-page "https://metacpan.org/release/DBD-mysql")
4b7857a4
RW
1701 (synopsis "DBI MySQL interface")
1702 (description "This package provides a MySQL driver for the Perl5
1703@dfn{Database Interface} (DBI).")
2f3108ad 1704 (license license:perl-license)))
4b7857a4 1705
274da61d
LC
1706(define-public perl-dbd-sqlite
1707 (package
1708 (name "perl-dbd-sqlite")
26aa1fd2 1709 (version "1.64")
274da61d
LC
1710 (source (origin
1711 (method url-fetch)
1712 (uri (string-append
1713 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1714 version ".tar.gz"))
1715 (sha256
1716 (base32
26aa1fd2 1717 "00gz5aw3xrr92lf9nfk0dhmy7a8jzmxhznddd9b0a8w4a1xqzbpl"))))
274da61d
LC
1718 (build-system perl-build-system)
1719 (inputs `(("sqlite" ,sqlite)))
1720 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1721 (synopsis "SQlite interface for Perl")
1722 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1723the entire thing in the distribution. So in order to get a fast transaction
1724capable RDBMS working for your Perl project you simply have to install this
1725module, and nothing else.")
2f3108ad 1726 (license license:perl-license)
9aba9b12 1727 (home-page "https://metacpan.org/release/DBD-SQLite")))
14e84b2d 1728
55916fa2
CB
1729(define-public perl-mysql-config
1730 (package
1731 (name "perl-mysql-config")
1732 (version "1.04")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (string-append
1737 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1738 version
1739 ".tar.gz"))
1740 (sha256
1741 (base32
1742 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1743 (build-system perl-build-system)
1744 (home-page "https://metacpan.org/release/MySQL-Config")
1745 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1746 (description
1747 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1748libmysqlclient. It will fill an aray with long options, ready to be parsed by
1749@code{Getopt::Long}.")
1750 (license license:perl-license)))
1751
dd90952e
EB
1752(define-public perl-sql-abstract
1753 (package
1754 (name "perl-sql-abstract")
7a358c78 1755 (version "1.87")
dd90952e
EB
1756 (source
1757 (origin
1758 (method url-fetch)
439980b7 1759 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
dd90952e
EB
1760 "SQL-Abstract-" version ".tar.gz"))
1761 (sha256
7a358c78 1762 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
dd90952e
EB
1763 (build-system perl-build-system)
1764 (native-inputs
9dab5017
MB
1765 `(("perl-module-install" ,perl-module-install)
1766 ("perl-test-deep" ,perl-test-deep)
dd90952e
EB
1767 ("perl-test-exception" ,perl-test-exception)
1768 ("perl-test-warn" ,perl-test-warn)))
1769 (propagated-inputs
1770 `(("perl-hash-merge" ,perl-hash-merge)
1771 ("perl-moo" ,perl-moo)
1772 ("perl-mro-compat" ,perl-mro-compat)
1773 ("perl-text-balanced" ,perl-text-balanced)))
9aba9b12 1774 (home-page "https://metacpan.org/release/SQL-Abstract")
dd90952e
EB
1775 (synopsis "Generate SQL from Perl data structures")
1776 (description "This module was inspired by the excellent DBIx::Abstract.
1777While based on the concepts used by DBIx::Abstract, the concepts used have
1778been modified to make the SQL easier to generate from Perl data structures.
1779The underlying idea is for this module to do what you mean, based on the data
1780structures you provide it, so that you don't have to modify your code every
e881752c 1781time your data changes.")
2f3108ad 1782 (license license:perl-license)))
14e84b2d 1783
5d01aeba
TGR
1784(define-public perl-sql-abstract-classic
1785 (package
1786 (name "perl-sql-abstract-classic")
1787 (version "1.91")
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1792 "SQL-Abstract-Classic-" version ".tar.gz"))
1793 (sha256
1794 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
1795 (build-system perl-build-system)
1796 (native-inputs
1797 `(("perl-test-deep" ,perl-test-deep)
1798 ("perl-test-exception" ,perl-test-exception)
1799 ("perl-test-warn" ,perl-test-warn)))
1800 (propagated-inputs
1801 `(("perl-mro-compat" ,perl-mro-compat)
1802 ("perl-sql-abstract" ,perl-sql-abstract)))
1803 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
1804 (synopsis "Generate SQL from Perl data structures")
1805 (description
1806 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
1807to preserve the ability of users to opt into the new way of doing things in
1808later versions according to their own schedules.
1809
1810It is an abstract SQL generation module based on the concepts used by
1811@code{DBIx::Abstract}, with several important differences, especially when it
1812comes to @code{WHERE} clauses. These concepts were modified to make the SQL
1813easier to generate from Perl data structures.
1814
1815The underlying idea is for this module to do what you mean, based on the data
1816structures you provide it. You shouldn't have to modify your code every time
1817your data changes, as this module figures it out.")
1818 (license license:perl-license)))
1819
b4dcb026
EB
1820(define-public perl-sql-splitstatement
1821 (package
1822 (name "perl-sql-splitstatement")
1823 (version "1.00020")
1824 (source
1825 (origin
1826 (method url-fetch)
1827 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1828 "SQL-SplitStatement-" version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1832 (build-system perl-build-system)
1833 (native-inputs
1834 `(("perl-test-exception" ,perl-test-exception)))
1835 (propagated-inputs
1836 `(("perl-class-accessor" ,perl-class-accessor)
1837 ("perl-list-moreutils" ,perl-list-moreutils)
1838 ("perl-regexp-common" ,perl-regexp-common)
1839 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
9aba9b12 1840 (home-page "https://metacpan.org/release/SQL-SplitStatement")
b4dcb026
EB
1841 (synopsis "Split SQL code into atomic statements")
1842 (description "This module tries to split any SQL code, even including
1843non-standard extensions, into the atomic statements it is composed of.")
2f3108ad 1844 (license license:perl-license)))
b4dcb026 1845
718c89c1
EB
1846(define-public perl-sql-tokenizer
1847 (package
1848 (name "perl-sql-tokenizer")
1849 (version "0.24")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1854 "SQL-Tokenizer-" version ".tar.gz"))
1855 (sha256
1856 (base32
1857 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1858 (build-system perl-build-system)
9aba9b12 1859 (home-page "https://metacpan.org/release/SQL-Tokenizer")
718c89c1
EB
1860 (synopsis "SQL tokenizer")
1861 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1862claim to be a parser or query verifier. It just creates sane tokens from a
1863valid SQL query.")
2f3108ad 1864 (license license:perl-license)))
718c89c1 1865
14e84b2d
JD
1866(define-public unixodbc
1867 (package
1868 (name "unixodbc")
8327ffcc 1869 (version "2.3.7")
14e84b2d
JD
1870 (source (origin
1871 (method url-fetch)
e881752c 1872 (uri
14e84b2d 1873 (string-append
3fef0a2f
EF
1874 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1875 version ".tar.gz"))
14e84b2d 1876 (sha256
8327ffcc 1877 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
14e84b2d
JD
1878 (build-system gnu-build-system)
1879 (synopsis "Data source abstraction library")
1880 (description "Unixodbc is a library providing an API with which to access
1881data sources. Data sources include SQL Servers and any software with an ODBC
1882Driver.")
ba8b9f8d 1883 (license license:lgpl2.1+)
14e84b2d
JD
1884 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1885 (home-page "http://www.unixodbc.org")))
b4a9c924
EB
1886
1887(define-public unqlite
1888 (package
1889 (name "unqlite")
1890 (version "1.1.6")
1891 (source (origin
1892 (method url-fetch)
1893 ;; Contains bug fixes against the official release, and has an
1894 ;; autotooled build system.
1895 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1896 "download/v1.0.0/"
1897 "unqlite-unofficial-" version ".tar.gz"))
1898 (sha256
1899 (base32
1900 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1901 (build-system gnu-build-system)
1902 (arguments `(#:tests? #f)) ;No check target
f50ef349 1903 (home-page "https://www.unqlite.org")
b4a9c924
EB
1904 (synopsis "In-memory key/value and document store")
1905 (description
1906 "UnQLite is an in-process software library which implements a
1907self-contained, serverless, zero-configuration, transactional NoSQL
1908database engine. UnQLite is a document store database similar to
1909MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
69b4ffcf 1910similar to BerkeleyDB, LevelDB, etc.")
ba8b9f8d 1911 (license license:bsd-2)))
463f6766
DT
1912
1913(define-public redis
1914 (package
1915 (name "redis")
84032506 1916 (version "5.0.7")
463f6766
DT
1917 (source (origin
1918 (method url-fetch)
1919 (uri (string-append "http://download.redis.io/releases/redis-"
1920 version".tar.gz"))
1921 (sha256
1922 (base32
84032506 1923 "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
463f6766
DT
1924 (build-system gnu-build-system)
1925 (arguments
1926 '(#:tests? #f ; tests related to master/slave and replication fail
1927 #:phases (modify-phases %standard-phases
1928 (delete 'configure))
1929 #:make-flags `("CC=gcc"
1930 "MALLOC=libc"
b25f060f 1931 "LDFLAGS=-ldl"
463f6766
DT
1932 ,(string-append "PREFIX="
1933 (assoc-ref %outputs "out")))))
1934 (synopsis "Key-value cache and store")
1935 (description "Redis is an advanced key-value cache and store. Redis
1936supports many data structures including strings, hashes, lists, sets, sorted
1937sets, bitmaps and hyperloglogs.")
5a3cbfce 1938 (home-page "https://redis.io/")
ba8b9f8d 1939 (license license:bsd-3)))
a65e2a02 1940
1941(define-public kyotocabinet
1942 (package
1943 (name "kyotocabinet")
245e7a68 1944 (version "1.2.77")
a65e2a02 1945 (source (origin
1946 (method url-fetch)
1947 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1948 name "-" version ".tar.gz"))
1949 (sha256
1950 (base32
245e7a68 1951 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
a65e2a02 1952 (build-system gnu-build-system)
1953 (arguments
1954 `(#:configure-flags
1955 (list
9d59023e 1956 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
a65e2a02 1957 (string-append "LDFLAGS=-Wl,-rpath="
1958 (assoc-ref %outputs "out") "/lib"))))
1959 (inputs `(("zlib" ,zlib)))
1960 (home-page "http://fallabs.com/kyotocabinet/")
1961 (synopsis
1962 "Kyoto Cabinet is a modern implementation of the DBM database")
1963 (description
1964 "Kyoto Cabinet is a standalone file-based database that supports Hash
1965and B+ Tree data storage models. It is a fast key-value lightweight
1966database and supports many programming languages. It is a NoSQL database.")
ba8b9f8d 1967 (license license:gpl3+)))
6242b314 1968
bdc11dc4 1969(define-public tokyocabinet
1970 (package
1971 (name "tokyocabinet")
1972 (version "1.4.48")
1973 (source
1974 (origin
1975 (method url-fetch)
1976 (uri (string-append "http://fallabs.com/tokyocabinet/"
1977 name "-" version ".tar.gz"))
1978 (sha256
1979 (base32
1980 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1981 (build-system gnu-build-system)
1982 (arguments
1983 `(#:configure-flags
1984 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1985 (string-append "LDFLAGS=-Wl,-rpath="
1986 (assoc-ref %outputs "out") "/lib"))))
1987 (inputs
1988 `(("zlib" ,zlib)))
1989 (home-page "http://fallabs.com/tokyocabinet/")
1990 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1991 (description
1992 "Tokyo Cabinet is a library of routines for managing a database.
1993The database is a simple data file containing records, each is a pair of a
1994key and a value. Every key and value is serial bytes with variable length.
1995Both binary data and character string can be used as a key and a value.
1996There is neither concept of data tables nor data types. Records are
1997organized in hash table, B+ tree, or fixed-length array.")
1998 (license license:lgpl2.1+)))
1999
6242b314
SB
2000(define-public wiredtiger
2001 (package
2002 (name "wiredtiger")
81e95821 2003 (version "2.9.1")
6242b314
SB
2004 (source (origin
2005 (method url-fetch)
2006 (uri (string-append
2007 "http://source.wiredtiger.com/releases/wiredtiger-"
2008 version ".tar.bz2"))
2009 (sha256
2010 (base32
81e95821 2011 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
6242b314
SB
2012 (build-system gnu-build-system)
2013 (arguments
a469c695 2014 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
6242b314
SB
2015 #:phases
2016 (modify-phases %standard-phases
2017 (add-before 'check 'disable-test/fops
2018 (lambda _
2019 ;; XXX: timed out after 3600 seconds of silence
2020 (substitute* "Makefile"
2021 (("test/fops") ""))
2022 #t)))))
2023 (inputs
2024 `(("lz4" ,lz4)
3faa422d
CB
2025 ("zlib" ,zlib)
2026 ("snappy" ,snappy)))
6242b314
SB
2027 (home-page "http://source.wiredtiger.com/")
2028 (synopsis "NoSQL data engine")
2029 (description
2030 "WiredTiger is an extensible platform for data management. It supports
2031row-oriented storage (where all columns of a row are stored together),
2032column-oriented storage (where columns are stored in groups, allowing for
2033more efficient access and storage of column subsets) and log-structured merge
2034trees (LSM), for sustained throughput under random insert workloads.")
ba8b9f8d 2035 (license license:gpl3) ; or GPL-2
6242b314 2036 ;; configure.ac: WiredTiger requires a 64-bit build.
092b7b3e 2037 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
90c2ee88 2038
4680fef7
AB
2039(define-public wiredtiger-3
2040 (package
2041 (inherit wiredtiger)
2042 (name "wiredtiger")
2043 (version "3.1.0")
2044 (source (origin
2045 (method url-fetch)
2046 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2047 version ".tar.bz2"))
2048 (sha256
2049 (base32
2050 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2051
16973071
KB
2052(define-public guile-wiredtiger
2053 (package
2054 (name "guile-wiredtiger")
b1e6b938 2055 (version "0.7.0")
16973071
KB
2056 (source (origin
2057 (method git-fetch)
2058 (uri (git-reference
2059 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
b1e6b938 2060 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
16973071
KB
2061 (file-name (string-append name "-" version "-checkout"))
2062 (sha256
2063 (base32
b1e6b938 2064 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
16973071
KB
2065 (build-system gnu-build-system)
2066 (arguments
3926a099 2067 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
16973071
KB
2068 #:configure-flags
2069 (list (string-append "--with-libwiredtiger-prefix="
2070 (assoc-ref %build-inputs "wiredtiger")))
189be331 2071 #:make-flags '("GUILE_AUTO_COMPILE=0")))
16973071
KB
2072 (native-inputs
2073 `(("autoconf" ,autoconf)
2074 ("automake" ,automake)
2075 ("pkg-config" ,pkg-config)))
2076 (inputs
b1e6b938 2077 `(("wiredtiger" ,wiredtiger-3)
16973071
KB
2078 ("guile" ,guile-2.2)))
2079 (propagated-inputs
b1e6b938 2080 `(("guile-bytestructures" ,guile-bytestructures)))
3926a099 2081 (synopsis "WiredTiger bindings for GNU Guile")
16973071
KB
2082 (description
2083 "This package provides Guile bindings to the WiredTiger ``NoSQL''
b1e6b938 2084database.")
16973071
KB
2085 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2086 (license license:gpl3+)))
2087
90c2ee88
DM
2088(define-public perl-db-file
2089 (package
2090 (name "perl-db-file")
76899e92 2091 (version "1.853")
90c2ee88
DM
2092 (source
2093 (origin
2094 (method url-fetch)
76899e92
TGR
2095 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2096 version ".tar.gz"))
90c2ee88 2097 (sha256
76899e92 2098 (base32 "1y967si45vj0skip1hnhicbv9da29fv6qcfwnsbnvj06n36mkj6h"))))
90c2ee88
DM
2099 (build-system perl-build-system)
2100 (inputs `(("bdb" ,bdb)))
2101 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2102 (arguments
2103 `(#:phases (modify-phases %standard-phases
2104 (add-before
2105 'configure 'modify-config.in
2106 (lambda* (#:key inputs #:allow-other-keys)
2107 (substitute* "config.in"
2108 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2109 #t)))))
9aba9b12 2110 (home-page "https://metacpan.org/release/DB_File")
90c2ee88
DM
2111 (synopsis
2112 "Perl5 access to Berkeley DB version 1.x")
2113 (description
2114 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2f3108ad 2115 (license license:perl-license)))
0e1b262e
DC
2116
2117(define-public lmdb
2118 (package
2119 (name "lmdb")
8fc6059b 2120 (version "0.9.25")
f167b432
TGR
2121 (source
2122 (origin
2123 (method git-fetch)
2124 (uri (git-reference
8fc6059b 2125 (url "https://git.openldap.org/openldap/openldap.git")
f167b432
TGR
2126 (commit (string-append "LMDB_" version))))
2127 (file-name (git-file-name name version))
2128 (sha256
8fc6059b 2129 (base32 "0i60zlca8r6fib23gdgl4c80gxpx24772ggpvz94yr7zaai4k11w"))))
0e1b262e
DC
2130 (build-system gnu-build-system)
2131 (arguments
2132 `(#:test-target "test"
2133 #:phases
2134 (modify-phases %standard-phases
2135 (replace 'configure
2136 (lambda* (#:key outputs #:allow-other-keys)
f167b432 2137 (chdir "libraries/liblmdb")
0e1b262e
DC
2138 (substitute* "Makefile"
2139 (("/usr/local") (assoc-ref outputs "out")))
2140 #t)))))
669fde53 2141 (home-page "https://symas.com/lmdb/")
fda852ff
TGR
2142 (synopsis "Lightning Memory-Mapped Database library")
2143 (description
2144 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2145transactional database. Unlike more complex relational databases, LMDB handles
2146only key-value pairs (stored as arbitrary byte arrays) and relies on the
2147underlying operating system for caching and locking, keeping the code small and
2148simple.
2149The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2150disk-based databases with high read performance that scales linearly over
2151multiple cores. The size of each database is limited only by the size of the
2152virtual address space — not physical RAM.")
0e1b262e 2153 (license license:openldap2.8)))
fe71eee0 2154
659bc436 2155(define-public lmdbxx
2156 (package
2157 (name "lmdbxx")
2158 (version "0.9.14.0")
2159 (source
2160 (origin
2161 (method git-fetch)
2162 (uri (git-reference
2163 (url "https://github.com/drycpp/lmdbxx.git")
2164 (commit version)))
2165 (file-name (git-file-name name version))
2166 (sha256
2167 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2168 (arguments
2169 `(#:make-flags
2170 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2171 #:phases
2172 (modify-phases %standard-phases
2173 (delete 'configure))))
2174 (build-system gnu-build-system)
2175 (inputs `(("lmdb" ,lmdb)))
2176 (home-page "http://lmdbxx.sourceforge.net")
2177 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2178 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2179@code{LMDB} embedded database library, offering both an error-checked
2180procedural interface and an object-oriented resource interface with RAII
2181semantics.")
2182 (license license:unlicense)))
2183
fe71eee0
JN
2184(define-public libpqxx
2185 (package
2186 (name "libpqxx")
2187 (version "4.0.1")
2188 (source (origin
2189 (method url-fetch)
2190 (uri (string-append
2191 "http://pqxx.org/download/software/libpqxx/"
2192 name "-" version ".tar.gz"))
2193 (sha256
2194 (base32
2195 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2196 (build-system gnu-build-system)
2197 (native-inputs
2198 `(("python" ,python-2)))
2199 (inputs `(("postgresql" ,postgresql)))
2200 (arguments
5ac097e2
MB
2201 `(#:tests? #f ; # FAIL: 1
2202 #:phases
2203 (modify-phases %standard-phases
2204 (add-before 'configure 'fix-sed-command
2205 (lambda _
2206 ;; Newer sed versions error out if double brackets are not used.
2207 (substitute* "configure"
2208 (("\\[:space:\\]") "[[:space:]]"))
2209 #t)))))
fe71eee0
JN
2210 (synopsis "C++ connector for PostgreSQL")
2211 (description
2212 "Libpqxx is a C++ library to enable user programs to communicate with the
2213PostgreSQL database back-end. The database back-end can be local or it may be
2214on another machine, accessed via TCP/IP.")
2215 (home-page "http://pqxx.org/")
2216 (license license:bsd-3)))
4d98bfaf
EF
2217
2218(define-public python-peewee
2219 (package
2220 (name "python-peewee")
f5edd85d 2221 (version "3.9.6")
4d98bfaf
EF
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "peewee" version))
2226 (sha256
2227 (base32
f5edd85d 2228 "1j4sh946k0736m7pd54z0y6i2hjhgg3kdllx1pwq8xkzzcgrx1xw"))))
4d98bfaf
EF
2229 (build-system python-build-system)
2230 (arguments
2231 `(#:tests? #f)) ; Fails to import test data
2232 (native-inputs
2233 `(("python-cython" ,python-cython)))
2234 (home-page "https://github.com/coleifer/peewee/")
2235 (synopsis "Small object-relational mapping utility")
2236 (description
2237 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2238handles converting between pythonic values and those used by databases, so you
2239can use Python types in your code without having to worry. It has built-in
2240support for sqlite, mysql and postgresql. If you already have a database, you
2241can autogenerate peewee models using @code{pwiz}, a model generator.")
2242 (license license:expat)))
2243
2244(define-public python2-peewee
2245 (package-with-python2 python-peewee))
62ea44fc 2246
1110a421
LDB
2247(define-public python-tortoise-orm
2248 (package
2249 (name "python-tortoise-orm")
b9d96ed7 2250 (version "0.16.7")
1110a421
LDB
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "tortoise-orm" version))
2255 (sha256
2256 (base32
b9d96ed7 2257 "0wr7p4v0b16ypm9fcpwpl99kf491m6w3jkd13xcsgq13fy73fbqc"))))
1110a421
LDB
2258 (build-system python-build-system)
2259 ;; Disable tests for now. They pull in a lot of dependencies.
2260 (arguments `(#:tests? #f))
2261 (native-inputs
b9d96ed7 2262 `(("python-asynctest" ,python-asynctest)
1110a421
LDB
2263 ("python-nose2" ,python-nose2)))
2264 (propagated-inputs
2265 `(("python-aiosqlite" ,python-aiosqlite)
2266 ("python-pypika" ,python-pypika)
b9d96ed7 2267 ("python-ciso8601" ,python-ciso8601)
1110a421
LDB
2268 ("python-typing-extensions"
2269 ,python-typing-extensions)))
2270 (home-page
2271 "https://github.com/tortoise/tortoise-orm")
2272 (synopsis
2273 "Easy async ORM for python, built with relations in mind")
2274 (description
2275 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2276inspired by Django. Tortoise ORM was build with relations in mind and
2277admiration for the excellent and popular Django ORM. It’s engraved in its
2278design that you are working not with just tables, you work with relational
2279data.")
2280 (license license:asl2.0)))
2281
62ea44fc
AP
2282(define-public sqlcipher
2283 (package
2284 (name "sqlcipher")
682c2918 2285 (version "3.4.2")
62ea44fc
AP
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (string-append "https://github.com/sqlcipher/" name
2290 "/archive/v" version ".tar.gz"))
2291 (sha256
682c2918 2292 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
62ea44fc
AP
2293 (file-name (string-append name "-" version ".tar.gz"))))
2294 (build-system gnu-build-system)
2295 (inputs
2296 `(("libcrypto" ,openssl)
2297 ("libtcl8.6" ,tcl))) ; required for running the tests
2298 (native-inputs
2299 `(("tcl" ,tcl)))
2300 (arguments
2301 '(#:configure-flags
2302 '("--enable-tempstore=yes"
2303 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2304 "LDFLAGS=-lcrypto -ltcl8.6"
2305 "--disable-tcl")
2306 ;; tests cannot be run from the Makefile
2307 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2308 #:test-target "testfixture"
2309 #:phases
2310 (modify-phases %standard-phases
2311 (add-before 'check 'build-test-runner
2312 (assoc-ref %standard-phases 'check))
2313 (replace 'check
2314 (lambda _
96272e28 2315 (invoke "./testfixture" "test/crypto.test"))))))
62ea44fc
AP
2316 (home-page "https://www.zetetic.net/sqlcipher/")
2317 (synopsis
2318 "Library providing transparent encryption of SQLite database files")
2319 (description "SQLCipher is an implementation of SQLite, extended to
2320provide transparent 256-bit AES encryption of database files. Pages are
2321encrypted before being written to disk and are decrypted when read back. It’s
2322well suited for protecting embedded application databases and for mobile
2323development.")
2324 ;; The source files
2325 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2326 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2327 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2328 ;; source files are in the public domain.
2329 (license (list license:public-domain license:bsd-3))))
98d403bb
DM
2330
2331(define-public python-pyodbc-c
2332 (package
2333 (name "python-pyodbc-c")
c6b6a74e 2334 (version "3.1.4")
98d403bb
DM
2335 (source
2336 (origin
2337 (method url-fetch)
2338 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2339 "archive.tar.gz?ref=v" version))
2340 (sha256
2341 (base32
c6b6a74e 2342 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
98d403bb
DM
2343 (file-name (string-append name "-" version ".tar.gz"))))
2344 (build-system python-build-system)
2345 (inputs
2346 `(("unixodbc" ,unixodbc)))
2347 (arguments
2348 `(;; No unit tests exist.
2349 #:tests? #f))
2350 (home-page "https://github.com/mkleehammer/pyodbc")
2351 (synopsis "Python ODBC Library")
2352 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2353for ODBC.")
2354 (license (license:x11-style "file://LICENSE.TXT"))))
2355
2356(define-public python2-pyodbc-c
2357 (package-with-python2 python-pyodbc-c))
d39a84e8 2358
41916bea
DM
2359(define-public python-pyodbc
2360 (package
2361 (name "python-pyodbc")
dbc8a6e7 2362 (version "4.0.30")
41916bea
DM
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "pyodbc" version))
2367 (sha256
dbc8a6e7 2368 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
41916bea
DM
2369 (file-name (string-append name "-" version ".tar.gz"))))
2370 (build-system python-build-system)
2371 (inputs
2372 `(("unixodbc" ,unixodbc)))
2373 (arguments
d5be746a 2374 `(#:tests? #f)) ; no unit tests exist
41916bea
DM
2375 (home-page "https://github.com/mkleehammer/pyodbc")
2376 (synopsis "Python ODBC Library")
2377 (description "@code{python-pyodbc} provides a Python DB-API driver
2378for ODBC.")
2379 (license (license:x11-style "file:///LICENSE.TXT"))))
2380
2381(define-public python2-pyodbc
2382 (package-with-python2 python-pyodbc))
2383
d39a84e8
AI
2384(define-public mdbtools
2385 (package
2386 (name "mdbtools")
2387 (version "0.7.1")
2388 (source
2389 (origin
f1f1cebd
RW
2390 (method git-fetch)
2391 (uri (git-reference
2392 (url "https://github.com/brianb/mdbtools.git")
2393 (commit version)))
2394 (file-name (git-file-name name version))
d39a84e8
AI
2395 (sha256
2396 (base32
f1f1cebd 2397 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
d39a84e8
AI
2398 (build-system gnu-build-system)
2399 (inputs
2400 `(("glib" ,glib)))
2401 (native-inputs
2402 `(("autoconf" ,autoconf)
2403 ("automake" ,automake)
2404 ("libtool" ,libtool)
2405 ("pkg-config" ,pkg-config)
2406 ("txt2man" ,txt2man)
2407 ("which" ,which)))
d39a84e8
AI
2408 (home-page "http://mdbtools.sourceforge.net/")
2409 (synopsis "Read Microsoft Access databases")
2410 (description "MDB Tools is a set of tools and applications to read the
2411proprietary MDB file format used in Microsoft's Access database package. This
2412includes programs to export schema and data from Microsoft's Access database
2413file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2414etc., and an SQL engine for performing simple SQL queries.")
2415 (license (list license:lgpl2.0
2416 license:gpl2+))))
07041d95
TGR
2417
2418(define-public python-lmdb
2419 (package
2420 (name "python-lmdb")
b7dfd579 2421 (version "0.98")
07041d95
TGR
2422 (source (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "lmdb" version))
2425 (sha256
2426 (base32
b7dfd579 2427 "027pgbdhhdcbwj53vrzr6a60gjhmz4s75gl3180fd4q8pwlbq986"))
07041d95
TGR
2428 (modules '((guix build utils)))
2429 (snippet
2430 ;; Delete bundled lmdb source files.
6cbee49d
MW
2431 '(begin
2432 (for-each delete-file (list "lib/lmdb.h"
2433 "lib/mdb.c"
2434 "lib/midl.c"
2435 "lib/midl.h"))
2436 #t))))
07041d95
TGR
2437 (build-system python-build-system)
2438 (inputs
2439 `(("lmdb" ,lmdb)))
2440 (arguments
2441 `(#:phases
2442 (modify-phases %standard-phases
2443 (add-before 'build 'use-system-lmdb
2444 (lambda* (#:key inputs #:allow-other-keys)
2445 (let ((lmdb (assoc-ref inputs "lmdb")))
2446 (setenv "LMDB_FORCE_SYSTEM" "set")
2447 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2448 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2449 #t))))
2450 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2451 #:tests? #f))
2452 (home-page "https://github.com/dw/py-lmdb")
2453 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2454 (description
2455 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2456Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2457 (license
2458 (list license:openldap2.8
2459 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2460 ;; but not actually needed on platforms currently supported by Guix.
2461 license:bsd-3))))
2462
da1f7a9e
BW
2463(define-public python-orator
2464 (package
2465 (name "python-orator")
51d42caa 2466 (version "0.9.9")
da1f7a9e
BW
2467 (source (origin
2468 (method url-fetch)
2469 (uri (pypi-uri "orator" version))
2470 (sha256
2471 (base32
51d42caa 2472 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
da1f7a9e 2473 (build-system python-build-system)
51d42caa
MB
2474 ;; FIXME: Tests are not distributed with PyPI, and the repository
2475 ;; does not contain setup.py. How to test?
2476 (arguments '(#:tests? #f))
da1f7a9e
BW
2477 (propagated-inputs
2478 `(("python-backpack" ,python-backpack)
2479 ("python-blinker" ,python-blinker)
2480 ("python-cleo" ,python-cleo)
2481 ("python-faker" ,python-faker)
2482 ("python-inflection" ,python-inflection)
2483 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2484 ("python-pendulum" ,python-pendulum)
2485 ("python-pyaml" ,python-pyaml)
2486 ("python-pygments" ,python-pygments)
51d42caa 2487 ("python-pyyaml" ,python-pyyaml)
da1f7a9e
BW
2488 ("python-simplejson" ,python-simplejson)
2489 ("python-six" ,python-six)
2490 ("python-wrapt" ,python-wrapt)))
2491 (home-page "https://orator-orm.com/")
2492 (synopsis "ActiveRecord ORM for Python")
2493 (description
2494 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2495implementation for Python.")
2496 (license license:expat)
2497 (properties `((python2-variant . ,(delay python2-orator))))))
2498
2499(define-public python2-orator
2500 (package-with-python2 (strip-python2-variant python-orator)))
61ce0998
RJ
2501
2502(define-public virtuoso-ose
2503 (package
2504 (name "virtuoso-ose")
e63da346 2505 (version "7.2.5")
61ce0998
RJ
2506 (source
2507 (origin
2508 (method url-fetch)
2509 (uri (string-append
2510 "https://github.com/openlink/virtuoso-opensource/releases/"
2511 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2512 (sha256
e63da346 2513 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
61ce0998
RJ
2514 (build-system gnu-build-system)
2515 (arguments
6d09a7b5
RJ
2516 `(#:tests? #f ; Tests require a network connection.
2517 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2518 ;; This indicates that the internal zlib code may still be used.
2519 #:configure-flags '("--without-internal-zlib"
2520 "--with-readline")))
61ce0998 2521 (inputs
95c633e0 2522 `(("openssl" ,openssl-1.0)
6d09a7b5
RJ
2523 ("net-tools" ,net-tools)
2524 ("readline" ,readline)
2525 ("zlib" ,zlib)))
61ce0998
RJ
2526 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2527 (synopsis "Multi-model database system")
2528 (description "Virtuoso is a scalable cross-platform server that combines
2529relational, graph, and document data management with web application server
2530and web services platform functionality.")
48b68c61
EF
2531 ;; configure: error: ... can only be build on 64bit platforms
2532 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
61ce0998 2533 (license license:gpl2)))
74248d22 2534
a8714bf6
RW
2535(define-public python-ccm
2536 (package
2537 (name "python-ccm")
2538 (version "2.1.6")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "ccm" version))
2543 (sha256
2544 (base32
2545 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2546 (build-system python-build-system)
2547 (propagated-inputs
2548 `(("python-pyyaml" ,python-pyyaml)
2549 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2550 ;; functionality
2551 ("python-psutil" ,python-psutil)
2552 ("python-six" ,python-six)))
2553 (home-page "https://github.com/pcmanus/ccm")
2554 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2555localhost")
2556 (description "Cassandra Cluster Manager is a development tool for testing
2557local Cassandra clusters. It creates, launches and removes Cassandra clusters
2558on localhost.")
2559 (license license:asl2.0)))
2560
2561(define-public python2-ccm
2562 (package-with-python2 python-ccm))
2563
2564(define-public python2-pysqlite
2565 (package
2566 (name "python2-pysqlite")
2567 (version "2.8.3")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "pysqlite" version))
2572 (sha256
2573 (base32
2574 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2575 (build-system python-build-system)
2576 (inputs
2577 `(("sqlite" ,sqlite)))
2578 (arguments
2579 `(#:python ,python-2 ; incompatible with Python 3
2580 #:tests? #f)) ; no test target
2581 (home-page "https://github.com/ghaering/pysqlite")
2582 (synopsis "SQLite bindings for Python")
2583 (description
2584 "Pysqlite provides SQLite bindings for Python that comply to the
2585Database API 2.0T.")
2586 (license license:zlib)))
2587
2588(define-public python-sqlalchemy
2589 (package
2590 (name "python-sqlalchemy")
7d5f0795 2591 (version "1.3.15")
a8714bf6
RW
2592 (source
2593 (origin
2594 (method url-fetch)
aeec4a8f 2595 (uri (pypi-uri "SQLAlchemy" version))
a8714bf6 2596 (sha256
7d5f0795 2597 (base32 "0iglkvymfp35zm5pxy5kzqvcv96kkas0chqdx7xpla86sspa9k64"))))
a8714bf6
RW
2598 (build-system python-build-system)
2599 (native-inputs
6d04f694 2600 `(("python-cython" ,python-cython) ; for C extensions
a8714bf6 2601 ("python-pytest" ,python-pytest)
6d04f694 2602 ("python-mock" ,python-mock))) ; for tests
a8714bf6
RW
2603 (arguments
2604 `(#:phases
2605 (modify-phases %standard-phases
2606 (replace 'check
9871a896 2607 (lambda _ (invoke "py.test"))))))
5cfe650b 2608 (home-page "https://www.sqlalchemy.org")
a8714bf6
RW
2609 (synopsis "Database abstraction library")
2610 (description
2611 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2612gives application developers the full power and flexibility of SQL. It
2613provides a full suite of well known enterprise-level persistence patterns,
2614designed for efficient and high-performing database access, adapted into a
2615simple and Pythonic domain language.")
2616 (license license:x11)))
2617
2618(define-public python2-sqlalchemy
2619 (package-with-python2 python-sqlalchemy))
2620
2621(define-public python-sqlalchemy-utils
2622 (package
2623 (name "python-sqlalchemy-utils")
53ae35e4 2624 (version "0.32.21")
a8714bf6
RW
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "SQLAlchemy-Utils" version))
2629 (sha256
2630 (base32
53ae35e4 2631 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
a8714bf6
RW
2632 (build-system python-build-system)
2633 (arguments
2634 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2635 ;; #:phases
2636 ;; (modify-phases %standard-phases
2637 ;; (replace 'check
2638 ;; (lambda _
2639 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2640 (propagated-inputs
2641 `(("python-six" ,python-six)
2642 ("python-sqlalchemy" ,python-sqlalchemy)))
2643 (native-inputs
2644 `(("python-dateutil" ,python-dateutil)
2645 ("python-flexmock" ,python-flexmock)
2646 ("python-psycopg2" ,python-psycopg2)
2647 ("python-pytest" ,python-pytest)
2648 ("python-pytz" ,python-pytz)))
2649 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2650 (synopsis "Various utility functions for SQLAlchemy")
2651 (description
2652 "SQLAlchemy-utils provides various utility functions and custom data types
2653for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2654
2655You might also want to install the following optional dependencies:
2656@enumerate
2657@item @code{python-passlib}
2658@item @code{python-babel}
2659@item @code{python-cryptography}
2660@item @code{python-pytz}
2661@item @code{python-psycopg2}
2662@item @code{python-furl}
2663@item @code{python-flask-babel}
2664@end enumerate
2665")
2666 (license license:bsd-3)))
2667
2668(define-public python2-sqlalchemy-utils
2669 (package-with-python2 python-sqlalchemy-utils))
2670
2671(define-public python-alembic
2672 (package
2673 (name "python-alembic")
45ebd90c 2674 (version "1.4.1")
a8714bf6
RW
2675 (source
2676 (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "alembic" version))
45ebd90c 2679 (patches (search-patches "python-alembic-exceptions-cause.patch"))
a8714bf6
RW
2680 (sha256
2681 (base32
45ebd90c 2682 "0a4hzn76csgbf1px4f5vfm256byvjrqkgi9869nkcjrwjn35c6kr"))))
a8714bf6 2683 (build-system python-build-system)
45ebd90c
MB
2684 (arguments
2685 '(#:phases (modify-phases %standard-phases
2686 (replace 'check
2687 (lambda _
2688 (invoke "pytest" "-vv"))))))
a8714bf6
RW
2689 (native-inputs
2690 `(("python-mock" ,python-mock)
2691 ("python-pytest-cov" ,python-pytest-cov)))
2692 (propagated-inputs
2693 `(("python-dateutil" ,python-dateutil)
2694 ("python-sqlalchemy" ,python-sqlalchemy)
2695 ("python-mako" ,python-mako)
2696 ("python-editor" ,python-editor)))
a7f27da7 2697 (home-page "https://bitbucket.org/zzzeek/alembic")
6743080c 2698 (synopsis "Database migration tool for SQLAlchemy")
a8714bf6
RW
2699 (description
2700 "Alembic is a lightweight database migration tool for usage with the
2701SQLAlchemy Database Toolkit for Python.")
2702 (license license:expat)))
2703
2704(define-public python2-alembic
2705 (package-with-python2 python-alembic))
2706
2707(define-public python-pickleshare
2708 (package
2709 (name "python-pickleshare")
f825faa5 2710 (version "0.7.5")
a8714bf6
RW
2711 (source
2712 (origin
2713 (method url-fetch)
ed519b3c 2714 (uri (pypi-uri "pickleshare" version))
a8714bf6 2715 (sha256
f825faa5 2716 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
a8714bf6 2717 (build-system python-build-system)
ff856cfd
MB
2718 (arguments
2719 `(#:phases (modify-phases %standard-phases
2720 (replace 'check
2721 (lambda _
2722 (invoke "pytest"))))))
2723 (native-inputs
2724 `(("python-pytest" ,python-pytest)))
a8714bf6
RW
2725 (home-page "https://github.com/vivainio/pickleshare")
2726 (synopsis "Tiny key value database with concurrency support")
2727 (description
2728 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2729Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2730shelve, many processes can access the database simultaneously. Changing a
2731value in database is immediately visible to other processes accessing the same
2732database. Concurrency is possible because the values are stored in separate
2733files. Hence the “database” is a directory where all files are governed by
2734PickleShare.")
ed519b3c 2735 (properties `((python2-variant . ,(delay python2-pickleshare))))
a8714bf6
RW
2736 (license license:expat)))
2737
2738(define-public python2-pickleshare
ed519b3c
MB
2739 (let ((pickleshare (package-with-python2
2740 (strip-python2-variant python-pickleshare))))
2741 (package (inherit pickleshare)
2742 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2743 ,@(package-propagated-inputs pickleshare))))))
a8714bf6
RW
2744
2745(define-public python-apsw
2746 (package
2747 (name "python-apsw")
d05e3b08 2748 (version "3.31.1-r1")
a8714bf6
RW
2749 (source
2750 (origin
2751 (method url-fetch)
9930beb8
EF
2752 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2753 "/download/" version "/apsw-" version ".zip"))
a8714bf6
RW
2754 (sha256
2755 (base32
d05e3b08 2756 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
a8714bf6 2757 (build-system python-build-system)
9930beb8
EF
2758 (native-inputs
2759 `(("unzip" ,unzip)))
a8714bf6 2760 (inputs
c553b08b 2761 `(("sqlite" ,sqlite)))
a8714bf6
RW
2762 (arguments
2763 `(#:phases
2764 (modify-phases %standard-phases
2765 (replace 'build
2766 (lambda _
c553b08b
EF
2767 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2768 #t))
a8714bf6
RW
2769 (add-after 'build 'build-test-helper
2770 (lambda _
c553b08b
EF
2771 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2772 "-I." "-Isqlite3" "src/testextension.c")
2773 #t))
53a9970e 2774 (replace 'check
a8714bf6
RW
2775 (lambda* (#:key inputs outputs #:allow-other-keys)
2776 (add-installed-pythonpath inputs outputs)
c553b08b
EF
2777 (invoke "python" "setup.py" "test")
2778 #t)))))
a8714bf6
RW
2779 (home-page "https://github.com/rogerbinns/apsw/")
2780 (synopsis "Another Python SQLite Wrapper")
2781 (description "APSW is a Python wrapper for the SQLite
2782embedded relational database engine. In contrast to other wrappers such as
2783pysqlite it focuses on being a minimal layer over SQLite attempting just to
2784translate the complete SQLite API into Python.")
2785 (license license:zlib)))
2786
2787(define-public python2-apsw
2788 (package-with-python2 python-apsw))
2789
ba0b249d
LDB
2790(define-public python-aiosqlite
2791 (package
2792 (name "python-aiosqlite")
4b800bff 2793 (version "0.12.0")
ba0b249d
LDB
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (pypi-uri "aiosqlite" version))
2798 (sha256
2799 (base32
4b800bff 2800 "1w8248yz85xyzvvh4jaxnc59fqil45aka6h82kn1rcih4rjxbnn1"))))
ba0b249d
LDB
2801 (build-system python-build-system)
2802 (native-inputs
2803 `(("python-aiounittest" ,python-aiounittest)))
2804 (home-page "https://github.com/jreese/aiosqlite")
2805 (synopsis
2806 "Asyncio bridge for sqlite3")
2807 (description
2808 "The package aiosqlite replicates the standard sqlite3 module, but with
2809async versions of all the standard connection and cursor methods, and context
2810managers for automatically closing connections.")
2811 (license license:expat)))
2812
a8714bf6
RW
2813(define-public python2-neo4j-driver
2814 (package
2815 (name "python2-neo4j-driver")
2816 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2817 (version "1.4.0")
2818 (source (origin
2819 (method url-fetch)
2820 (uri (pypi-uri "neo4j-driver" version))
2821 (sha256
2822 (base32
2823 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2824 (build-system python-build-system)
2825 (arguments
2826 `(#:python ,python-2))
2827 (home-page "https://neo4j.com/developer/python/")
2828 (synopsis "Neo4j driver code written in Python")
2829 (description "This package provides the Neo4j Python driver that connects
2830to the database using Neo4j's binary protocol. It aims to be minimal, while
2831being idiomatic to Python.")
2832 (license license:asl2.0)))
2833
2834(define-public python2-py2neo
2835 (package
2836 (name "python2-py2neo")
2837 (version "3.1.2")
2838 (source (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "py2neo" version))
2841 (sha256
2842 (base32
2843 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2844 (build-system python-build-system)
2845 (arguments
2846 `(#:python ,python-2))
1084e86b 2847 (home-page "https://py2neo.org")
a8714bf6
RW
2848 (synopsis "Library and toolkit for working with Neo4j in Python")
2849 (description "This package provides a client library and toolkit for
2850working with Neo4j from within Python applications and from the command
2851line. The core library has no external dependencies and has been carefully
2852designed to be easy and intuitive to use.")
2853 (license license:asl2.0)))
2854
2855(define-public python-psycopg2
2856 (package
2857 (name "python-psycopg2")
ab6e4ab8 2858 (version "2.8.4")
a8714bf6
RW
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "psycopg2" version))
2863 (sha256
ab6e4ab8 2864 (base32 "1djvh98pi4hjd8rxbq8qzc63bg8v78k33yg6pl99wak61b6fb67q"))))
a8714bf6
RW
2865 (build-system python-build-system)
2866 (arguments
2867 ;; Tests would require a postgresql database "psycopg2_test"
2868 ;; and a running postgresql database management service.
2869 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2870 (inputs
2871 `(("postgresql" ,postgresql))) ; libpq
2872 (home-page "http://initd.org/psycopg/")
2873 (synopsis "Python PostgreSQL adapter")
2874 (description
19601e89
BW
2875 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
28762.0.")
a8714bf6
RW
2877 (license license:lgpl3+)))
2878
2879(define-public python2-psycopg2
2880 (package-with-python2 python-psycopg2))
2881
2882(define-public python-sadisplay
2883 (package
2884 (name "python-sadisplay")
bcdc5cae 2885 (version "0.4.8")
a8714bf6
RW
2886 (source
2887 (origin
2888 (method url-fetch)
2889 (uri (pypi-uri "sadisplay" version))
2890 (sha256
2891 (base32
bcdc5cae 2892 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
a8714bf6
RW
2893 (build-system python-build-system)
2894 (propagated-inputs
2895 `(("python-sqlalchemy" ,python-sqlalchemy)))
2896 (native-inputs
bcdc5cae 2897 ;; For tests.
a8714bf6
RW
2898 `(("python-nose" ,python-nose)))
2899 (home-page "https://bitbucket.org/estin/sadisplay")
2900 (synopsis "SQLAlchemy schema displayer")
2901 (description "This package provides a program to build Entity
2902Relationship diagrams from a SQLAlchemy model (or directly from the
2903database).")
2904 (license license:bsd-3)))
2905
2906(define-public python2-sadisplay
2907 (package-with-python2 python-sadisplay))
2908
2909(define-public python-mysqlclient
2910 (package
2911 (name "python-mysqlclient")
28635e52 2912 (version "1.3.13")
a8714bf6
RW
2913 (source
2914 (origin
2915 (method url-fetch)
2916 (uri (pypi-uri "mysqlclient" version))
2917 (sha256
2918 (base32
28635e52 2919 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
a8714bf6
RW
2920 (build-system python-build-system)
2921 (native-inputs
f94051e6 2922 `(("nose" ,python-nose)
a8714bf6
RW
2923 ("mock" ,python-mock)
2924 ("py.test" ,python-pytest)))
2925 (inputs
2b8491fb
JL
2926 `(("mysql" ,mariadb "lib")
2927 ("mysql-dev" ,mariadb "dev")
a8714bf6
RW
2928 ("libz" ,zlib)
2929 ("openssl" ,openssl)))
2930 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2931 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2932 (description "MySQLdb is an interface to the popular MySQL database server
2933for Python. The design goals are:
2934@enumerate
2935@item Compliance with Python database API version 2.0 [PEP-0249],
2936@item Thread-safety,
2937@item Thread-friendliness (threads will not block each other).
2938@end enumerate")
2939 (license license:gpl2)))
2940
2941(define-public python2-mysqlclient
2942 (package-with-python2 python-mysqlclient))
2943
2944(define-public python-hiredis
2945 (package
2946 (name "python-hiredis")
2947 (version "0.2.0")
2948 (source
2949 (origin
2950 (method url-fetch)
2951 (uri (pypi-uri "hiredis" version))
2952 (sha256
2953 (base32
2954 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2955 (build-system python-build-system)
2956 (arguments
2957 ;; no tests
2958 `(#:tests? #f))
2959 (home-page "https://github.com/redis/hiredis-py")
2960 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2961 (description "Python-hiredis is a python extension that wraps protocol
2962parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2963 (license license:bsd-3)))
2964
2965(define-public python2-hiredis
2966 (package-with-python2 python-hiredis))
2967
2968(define-public python-fakeredis
2969 (package
2970 (name "python-fakeredis")
1655e7be 2971 (version "1.2.1")
a8714bf6
RW
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (pypi-uri "fakeredis" version))
2976 (sha256
2977 (base32
1655e7be 2978 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
a8714bf6
RW
2979 (build-system python-build-system)
2980 (arguments
2981 ;; no tests
2982 `(#:tests? #f))
1655e7be
TLC
2983 (propagated-inputs
2984 `(("python-sortedcontainers" ,python-sortedcontainers)))
a8714bf6
RW
2985 (home-page "https://github.com/jamesls/fakeredis")
2986 (synopsis "Fake implementation of redis API for testing purposes")
a4764ff0
TGR
2987 (description
2988 "Fakeredis is a pure-Python implementation of the redis-py Python client
2989that simulates talking to a redis server. It was created for a single purpose:
2990to write unit tests.
2991
2992Setting up redis is not hard, but one often wants to write unit tests that don't
2993talk to an external server such as redis. This module can be used as a
2994reasonable substitute.")
a8714bf6
RW
2995 (license license:bsd-3)))
2996
2997(define-public python2-fakeredis
2998 (package-with-python2 python-fakeredis))
2999
3000(define-public python-redis
3001 (package
3002 (name "python-redis")
23503abb 3003 (version "3.3.8")
a8714bf6
RW
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "redis" version))
3008 (sha256
23503abb 3009 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
a8714bf6 3010 (build-system python-build-system)
a263a976 3011 ;; Tests require a running Redis server.
a8714bf6
RW
3012 (arguments '(#:tests? #f))
3013 ;; As long as we are not running test, we do not need this input :-)
3014 ;;(native-inputs
3015 ;; `(("python-pytest" ,python-pytest)))
3016 (home-page "https://github.com/andymccurdy/redis-py")
3017 (synopsis "Redis Python client")
3018 (description
3019 "This package provides a Python interface to the Redis key-value store.")
3020 (license license:expat)))
3021
3022(define-public python2-redis
3023 (package-with-python2 python-redis))
3024
3025(define-public python-rq
3026 (package
3027 (name "python-rq")
865c76ea 3028 (version "0.13.0")
a8714bf6
RW
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "rq" version))
3033 (sha256
865c76ea 3034 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
a8714bf6
RW
3035 (build-system python-build-system)
3036 (propagated-inputs
3037 `(("python-click" ,python-click)
3038 ("python-redis" ,python-redis)))
4e5ad79e 3039 (home-page "https://python-rq.org/")
a8714bf6
RW
3040 (synopsis "Simple job queues for Python")
3041 (description
3042 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3043processing them in the background with workers. It is backed by Redis and it
3044is designed to have a low barrier to entry.")
3045 (license license:bsd-2)))
3046
3047(define-public python2-rq
3048 (package-with-python2 python-rq))
3049
3050(define-public python-trollius-redis
3051 (package
3052 (name "python-trollius-redis")
3053 (version "0.1.4")
3054 (source
3055 (origin
3056 (method url-fetch)
3057 (uri (pypi-uri "trollius_redis" version))
3058 (sha256
3059 (base32
3060 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3061 (build-system python-build-system)
3062 ;; TODO: Tests require packaging 'hiredis'.
3063 (arguments '(#:tests? #f))
3064 (home-page "https://github.com/benjolitz/trollius-redis")
3065 (synopsis "Port of asyncio-redis to trollius")
3066 (description "@code{trollius-redis} is a Redis client for Python
d087a3a6 3067 trollius. It is an asynchronous IO (PEP 3156) implementation of the
a8714bf6
RW
3068 Redis protocol.")
3069 (license license:bsd-2)))
3070
3071(define-public python2-trollius-redis
3072 (package-with-python2 python-trollius-redis))
3073
3074(define-public python-sqlparse
3075 (package
3076 (name "python-sqlparse")
3077 (version "0.2.4")
3078 (source (origin
3079 (method url-fetch)
3080 (uri (pypi-uri "sqlparse" version))
3081 (sha256
3082 (base32
3083 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
3084 (build-system python-build-system)
3085 (arguments
3086 `(#:phases
3087 (modify-phases %standard-phases
3088 (replace 'check
96272e28 3089 (lambda _ (invoke "py.test"))))))
a8714bf6
RW
3090 (native-inputs
3091 `(("python-pytest" ,python-pytest)))
3092 (home-page "https://github.com/andialbrecht/sqlparse")
3093 (synopsis "Non-validating SQL parser")
3094 (description "Sqlparse is a non-validating SQL parser for Python. It
3095provides support for parsing, splitting and formatting SQL statements.")
3096 (license license:bsd-3)))
3097
3098(define-public python2-sqlparse
3099 (package-with-python2 python-sqlparse))
3100
3101(define-public python-sql
3102 (package
3103 (name "python-sql")
909404b5 3104 (version "1.0.0")
a8714bf6
RW
3105 (source
3106 (origin
3107 (method url-fetch)
3108 (uri (pypi-uri "python-sql" version))
3109 (sha256
909404b5 3110 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
a8714bf6
RW
3111 (build-system python-build-system)
3112 (home-page "https://python-sql.tryton.org/")
3113 (synopsis "Library to write SQL queries in a pythonic way")
3114 (description "@code{python-sql} is a library to write SQL queries, that
3115transforms idiomatic python function calls to well-formed SQL queries.")
3116 (license license:bsd-3)))
3117
3118(define-public python2-sql
3119 (package-with-python2 python-sql))
33c88fcb 3120
c8fdf86d
LDB
3121(define-public python-pypika
3122 (package
3123 (name "python-pypika")
510472f8 3124 (version "0.37.2")
c8fdf86d 3125 (source
510472f8
LDB
3126 (origin (method git-fetch)
3127 (uri (git-reference
3128 (url "https://github.com/kayak/pypika.git")
3129 (commit (string-append "v" version))))
3130 (file-name (git-file-name name version))
3131 (sha256
3132 (base32
3133 "089z1c778q1fwhzsc88ws8j5gm2hgxknibabn4wpax8rz2bfs3ck"))))
c8fdf86d
LDB
3134 (build-system python-build-system)
3135 (native-inputs
3136 `(("python-parameterized" ,python-parameterized)))
3137 (home-page "https://github.com/kayak/pypika")
3138 (synopsis "SQL query builder API for Python")
3139 (description
3140 "PyPika is a python SQL query builder that exposes the full richness of
3141the SQL language using a syntax that reflects the resulting query.")
3142 (license license:asl2.0)))
3143
33c88fcb
CB
3144(define-public mongo-tools
3145 (package
3146 (name "mongo-tools")
3147 (version "3.4.0")
3148 (source
3149 (origin (method git-fetch)
3150 (uri (git-reference
3151 (url "https://github.com/mongodb/mongo-tools")
3152 (commit (string-append "r" version))))
3153 (file-name (git-file-name name version))
3154 (sha256
3155 (base32
9b32bf6e 3156 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
33c88fcb
CB
3157 (build-system go-build-system)
3158 (arguments
9b32bf6e
CB
3159 `(#:import-path "github.com/mongodb/mongo-tools"
3160 #:modules ((srfi srfi-1)
3161 (guix build go-build-system)
3162 (guix build utils))
e3900a4d 3163 #:install-source? #f
33c88fcb 3164 #:phases
9b32bf6e
CB
3165 (let ((all-tools
3166 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3167 "mongoimport" "mongooplog" "mongorestore"
3168 "mongostat" "mongotop")))
3169 (modify-phases %standard-phases
3170 (add-after 'unpack 'delete-bundled-source-code
3171 (lambda _
3172 (delete-file-recursively
3173 "src/github.com/mongodb/mongo-tools/vendor")
3174 #t))
fe596965
CB
3175 (add-after 'delete-bundled-source-code 'patch-source
3176 (lambda _
3177 ;; Remove a redundant argument that causes compilation to fail.
3178 (substitute*
3179 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3180 (("skipping restore of system.profile collection\", db)")
3181 "skipping restore of system.profile collection\")"))
3182 #t))
9b32bf6e
CB
3183 (replace 'build
3184 (lambda _
96272e28
MW
3185 (for-each (lambda (tool)
3186 (let ((command
3187 `("go" "build"
3188 ;; This is where the tests expect to find the
3189 ;; executables
3190 "-o" ,(string-append
3191 "src/github.com/mongodb/mongo-tools/bin/"
3192 tool)
3193 "-v"
3194 "-tags=\"ssl sasl\""
3195 "-ldflags"
3196 "-extldflags=-Wl,-z,now,-z,relro"
3197 ,(string-append
3198 "src/github.com/mongodb/mongo-tools/"
3199 tool "/main/" tool ".go"))))
3200 (simple-format #t "build: running ~A\n"
3201 (string-join command))
3202 (apply invoke command)))
3203 all-tools)
3204 #t))
9b32bf6e
CB
3205 (replace 'check
3206 (lambda _
3207 (with-directory-excursion "src"
96272e28
MW
3208 (for-each (lambda (tool)
3209 (invoke
3210 "go" "test" "-v"
3211 (string-append "github.com/mongodb/mongo-tools/"
3212 tool)))
3213 all-tools))
3214 #t))
9b32bf6e
CB
3215 (replace 'install
3216 (lambda* (#:key outputs #:allow-other-keys)
3217 (for-each (lambda (tool)
3218 (install-file
96272e28
MW
3219 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3220 tool)
9b32bf6e
CB
3221 (string-append (assoc-ref outputs "out")
3222 "/bin")))
96272e28
MW
3223 all-tools)
3224 #t))))))
33c88fcb
CB
3225 (native-inputs
3226 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3227 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
561d391b 3228 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
33c88fcb
CB
3229 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3230 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
9b32bf6e
CB
3231 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3232 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
33c88fcb
CB
3233 (home-page "https://github.com/mongodb/mongo-tools")
3234 (synopsis "Various tools for interacting with MongoDB and BSON")
3235 (description
3236 "This package includes a collection of tools related to MongoDB.
3237@table @code
3238@item bsondump
3239Display BSON files in a human-readable format
3240@item mongoimport
3241Convert data from JSON, TSV or CSV and insert them into a collection
3242@item mongoexport
3243Write an existing collection to CSV or JSON format
3244@item mongodump/mongorestore
3245Dump MongoDB backups to disk in the BSON format
3246@item mongorestore
3247Read MongoDB backups in the BSON format, and restore them to a live database
3248@item mongostat
3249Monitor live MongoDB servers, replica sets, or sharded clusters
3250@item mongofiles
3251Read, write, delete, or update files in GridFS
3252@item mongooplog
3253Replay oplog entries between MongoDB servers
3254@item mongotop
3255Monitor read/write activity on a mongo server
3256@end table")
3257 (license license:asl2.0)))
dae7661a 3258
a50628bb
KCB
3259;; There are many wrappers for this in other languages. When touching, please
3260;; be sure to ensure all dependencies continue to build.
dae7661a
LF
3261(define-public apache-arrow
3262 (package
3263 (name "apache-arrow")
a50628bb 3264 (version "0.17.1")
dae7661a 3265 (source
a50628bb
KCB
3266 (origin
3267 (method git-fetch)
3268 (uri (git-reference
3269 (url "https://github.com/apache/arrow")
3270 (commit (string-append "apache-arrow-" version))))
3271 (file-name (git-file-name name version))
3272 (sha256
3273 (base32
3274 "02r6yx3yhywzikd3b0vfkjgddhfiriyx2vpm3jf5880wq59x798a"))))
dae7661a
LF
3275 (build-system cmake-build-system)
3276 (arguments
3277 `(#:tests? #f
3278 #:phases
3279 (modify-phases %standard-phases
3280 (add-before 'configure 'enter-source-directory
3281 (lambda _ (chdir "cpp") #t))
3282 (add-after 'unpack 'set-env
3283 (lambda _
3284 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3285 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3286 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
dae7661a
LF
3287 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3288 #t)))
3def739d 3289 #:build-type "Release"
dae7661a 3290 #:configure-flags
3def739d 3291 (list "-DARROW_PYTHON=ON"
a50628bb
KCB
3292 "-DARROW_GLOG=ON"
3293 ;; Parquet options
3294 "-DARROW_PARQUET=ON"
3295 "-DPARQUET_BUILD_EXECUTABLES=ON"
3296 ;; The maintainers disallow using system versions of
3297 ;; jemalloc:
3298 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3299 ;; is unfortunate because jemalloc increases performance:
3300 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3301 "-DARROW_JEMALLOC=OFF"
3302
3303 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3304 ;; option that instructs the build system how to resolve
3305 ;; each dependency. SYSTEM = Finding the dependency in
3306 ;; system paths using CMake's built-in find_package
3307 ;; function, or using pkg-config for packages that do not
3308 ;; have this feature
3309 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3310
3311 ;; Split output into its component packages.
3312 (string-append "-DCMAKE_INSTALL_PREFIX="
3313 (assoc-ref %outputs "lib"))
3314 (string-append "-DCMAKE_INSTALL_RPATH="
3315 (assoc-ref %outputs "lib")
dae7661a 3316 "/lib")
a50628bb
KCB
3317 (string-append "-DCMAKE_INSTALL_BINDIR="
3318 (assoc-ref %outputs "out")
3319 "/bin")
3320 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3321 (assoc-ref %outputs "include")
3322 "/share/include")
3323
3324
3325 "-DARROW_WITH_SNAPPY=ON"
3326 "-DARROW_WITH_ZLIB=ON"
3327 "-DARROW_WITH_ZSTD=ON"
3328 "-DARROW_WITH_LZ4=ON"
3329 "-DARROW_COMPUTE=ON"
3330 "-DARROW_CSV=ON"
3331 "-DARROW_DATASET=ON"
3332 "-DARROW_FILESYSTEM=ON"
3333 "-DARROW_HDFS=ON"
3334 "-DARROW_JSON=ON"
3335 ;; Arrow Python C++ integration library (required for
3336 ;; building pyarrow). This library must be built against
3337 ;; the same Python version for which you are building
3338 ;; pyarrow. NumPy must also be installed. Enabling this
3339 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3340 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3341 ;; ARROW_JSON.
3342 "-DARROW_PYTHON=ON"
dae7661a
LF
3343
3344 ;; Building the tests forces on all the
3345 ;; optional features and the use of static
3346 ;; libraries.
3347 "-DARROW_BUILD_TESTS=OFF"
a50628bb
KCB
3348 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3349 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
dae7661a
LF
3350 "-DARROW_BUILD_STATIC=OFF")))
3351 (inputs
3352 `(("boost" ,boost)
dae7661a 3353 ("brotli" ,google-brotli)
a50628bb
KCB
3354 ("double-conversion" ,double-conversion)
3355 ("snappy" ,snappy)
3356 ("gflags" ,gflags)
3357 ("glog" ,glog)
3358 ("apache-thrift" ,apache-thrift "lib")
3359 ("protobuf" ,protobuf)
3360 ("rapidjson" ,rapidjson)
3361 ("zlib" ,zlib)
3362 ("bzip2" ,bzip2)
3363 ("lz4" ,lz4)
3364 ("zstd" ,zstd "lib")
3365 ("re2" ,re2)
3366 ("grpc" ,grpc)
dae7661a
LF
3367 ("python-3" ,python)
3368 ("python-numpy" ,python-numpy)))
a50628bb
KCB
3369 (native-inputs
3370 `(("pkg-config" ,pkg-config)))
3371 (outputs '("out" "lib" "include"))
dae7661a
LF
3372 (home-page "https://arrow.apache.org/")
3373 (synopsis "Columnar in-memory analytics")
3374 (description "Apache Arrow is a columnar in-memory analytics layer
a50628bb 3375designed to accelerate big data. It houses a set of canonical in-memory
dae7661a 3376representations of flat and hierarchical data along with multiple
a50628bb 3377language-bindings for structure manipulation. It also provides IPC and common
dae7661a
LF
3378algorithm implementations.")
3379 (license license:asl2.0)))
5e5ac710
LF
3380
3381(define-public python-pyarrow
3382 (package
a50628bb 3383 (inherit apache-arrow)
5e5ac710 3384 (name "python-pyarrow")
5e5ac710
LF
3385 (build-system python-build-system)
3386 (arguments
a50628bb 3387 '(#:tests? #f ; XXX There are no tests in the "python" directory
5e5ac710
LF
3388 #:phases
3389 (modify-phases %standard-phases
0fa926c2 3390 (delete 'build) ; XXX the build is performed again during the install phase
5e5ac710
LF
3391 (add-after 'unpack 'enter-source-directory
3392 (lambda _ (chdir "python") #t))
a50628bb 3393 (add-after 'unpack 'make-git-checkout-writable
5e5ac710 3394 (lambda _
a50628bb 3395 (for-each make-file-writable (find-files "."))
5e5ac710
LF
3396 #t)))))
3397 (propagated-inputs
a50628bb 3398 `(("apache-arrow" ,apache-arrow "lib")
5e5ac710
LF
3399 ("python-numpy" ,python-numpy)
3400 ("python-pandas" ,python-pandas)
3401 ("python-six" ,python-six)))
3402 (native-inputs
c69959f0 3403 `(("cmake" ,cmake-minimal)
a50628bb 3404 ("pkg-config" ,pkg-config)
5e5ac710
LF
3405 ("python-cython" ,python-cython)
3406 ("python-pytest" ,python-pytest)
0fa926c2 3407 ("python-pytest-runner" ,python-pytest-runner)
5e5ac710 3408 ("python-setuptools-scm" ,python-setuptools-scm)))
a50628bb 3409 (outputs '("out"))
5e5ac710
LF
3410 (home-page "https://arrow.apache.org/docs/python/")
3411 (synopsis "Python bindings for Apache Arrow")
a50628bb
KCB
3412 (description
3413 "This library provides a Pythonic API wrapper for the reference Arrow C++
3414implementation, along with tools for interoperability with pandas, NumPy, and
3415other traditional Python scientific computing packages.")
5e5ac710
LF
3416 (license license:asl2.0)))
3417
3418(define-public python2-pyarrow
3419 (package-with-python2 python-pyarrow))
450d5dc2
PL
3420
3421(define-public python-crate
3422 (package
3423 (name "python-crate")
19181820 3424 (version "0.23.2")
450d5dc2
PL
3425 (source (origin
3426 (method url-fetch)
3427 (uri (pypi-uri "crate" version))
3428 (sha256
3429 (base32
19181820 3430 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
450d5dc2
PL
3431 (build-system python-build-system)
3432 (propagated-inputs
3433 `(("python-urllib3" ,python-urllib3)))
3434 (home-page "https://github.com/crate/crate-python")
3435 (synopsis "CrateDB Python client")
3436 (description
3437 "This package provides a Python client library for CrateDB.
3438It implements the Python DB API 2.0 specification and includes support for
3439SQLAlchemy.")
3440 (license license:asl2.0)))
ae8a0184
GLV
3441
3442(define-public libdbi
3443 (package
3444 (name "libdbi")
3445 (version "0.9.0")
3446 (source (origin
3447 (method url-fetch)
3448 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3449 version "/libdbi-" version ".tar.gz"))
3450 (sha256
3451 (base32
3452 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3453 (build-system gnu-build-system)
3454 (synopsis "Database independent abstraction layer in C")
3455 (description
3456 "This library implements a database independent abstraction layer in C,
3457similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3458programmers can leverage the power of multiple databases and multiple
3459simultaneous database connections by using this framework.")
3460 (home-page "http://libdbi.sourceforge.net/")
3461 (license license:lgpl2.1+)))
df81de86
GLV
3462
3463(define-public libdbi-drivers
3464 (package
3465 (name "libdbi-drivers")
3466 (version "0.9.0")
3467 (source (origin
3468 (method url-fetch)
3469 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3470 "libdbi-drivers/libdbi-drivers-" version
3471 "/libdbi-drivers-" version ".tar.gz"))
3472 (sha256
3473 (base32
3474 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3475 (build-system gnu-build-system)
3476 (native-inputs
9077cf68
MB
3477 `(;; For tests.
3478 ("inetutils" ,inetutils)
3479 ("glibc-locales" ,glibc-locales)
ca69163c 3480 ("mariadb" ,mariadb)))
df81de86
GLV
3481 (inputs
3482 `(("libdbi" ,libdbi)
9077cf68
MB
3483 ("mariadb:dev" ,mariadb "dev")
3484 ("mariadb:lib" ,mariadb "lib")
df81de86
GLV
3485 ("postgresql" ,postgresql)
3486 ("sqlite" ,sqlite)))
3487 (arguments
3488 `(#:configure-flags
3489 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
9077cf68
MB
3490 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3491 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
df81de86
GLV
3492 (postgresql (assoc-ref %build-inputs "postgresql"))
3493 (sqlite (assoc-ref %build-inputs "sqlite")))
3494 (list "--disable-docs"
3495 (string-append "--with-dbi-incdir=" libdbi "/include")
3496 (string-append "--with-dbi-libdir=" libdbi "/lib")
3497 "--with-mysql"
9077cf68
MB
3498 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3499 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
df81de86
GLV
3500 "--with-pgsql"
3501 (string-append "--with-pgsql-incdir=" postgresql "/include")
3502 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3503 "--with-sqlite3"
3504 (string-append "--with-sqlite-incdir=" sqlite "/include")
3505 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3506 #:phases
3507 (modify-phases %standard-phases
3508 (add-after 'unpack 'fix-tests
3509 (lambda* (#:key inputs #:allow-other-keys)
3510 (substitute* "tests/test_mysql.sh"
3511 (("^MYMYSQLD=.*")
3512 (string-append "MYMYSQLD="
9077cf68 3513 (assoc-ref inputs "mariadb")
df81de86
GLV
3514 "/bin/mysqld")))
3515 #t))
3516 (add-after 'install 'remove-empty-directories
3517 (lambda* (#:key outputs #:allow-other-keys)
3518 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3519 (delete-file-recursively var))
3520 #t)))))
3521 (synopsis "Database drivers for the libdbi framework")
3522 (description
3523 "The @code{libdbi-drivers} library provides the database specific drivers
3524for the @code{libdbi} framework.
3525
3526The drivers officially supported by @code{libdbi} are:
3527@itemize
3528@item MySQL,
3529@item PostgreSQL,
3530@item SQLite.
3531@end itemize")
3532 (home-page "http://libdbi-drivers.sourceforge.net/")
3533 (license license:lgpl2.1+)))
6d26ee3b
PN
3534
3535(define-public soci
3536 (package
3537 (name "soci")
3538 (version "4.0.0")
3539 (source (origin
3540 (method git-fetch)
3541 (uri (git-reference
3542 (url "https://github.com/SOCI/soci/")
3543 (commit version)))
3544 (file-name (git-file-name name version))
3545 (sha256
3546 (base32
3547 "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb"))))
3548 (build-system cmake-build-system)
3549 (inputs
3550 `(("postgresql" ,postgresql)
3551 ("sqlite" ,sqlite)
3552 ("odbc" ,unixodbc)
3553 ("boost" ,boost)
1ce65f5c
MB
3554 ("mariadb:dev" ,mariadb "dev")
3555 ("mariadb:lib" ,mariadb "lib")))
6d26ee3b
PN
3556 (arguments
3557 `(#:tests? #f ; Tests may require running database management systems.
3558 #:phases
3559 (modify-phases %standard-phases
3560 (add-after 'unpack 'fix-lib-path
3561 (lambda _
3562 (substitute* "CMakeLists.txt"
85a906dc
MB
3563 (("set\\(SOCI_LIBDIR \"lib64\"\\)") ""))
3564 #t)))))
6d26ee3b
PN
3565 (synopsis "C++ Database Access Library")
3566 (description
3567 "SOCI is an abstraction layer for several database backends, including
3568PostreSQL, SQLite, ODBC and MySQL.")
3569 (home-page "http://soci.sourceforge.net/")
3570 (license license:boost1.0)))