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