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