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