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