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