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