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