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