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