gnu: fish: Update to 2.7.1.
[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
1503 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
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)
1514 ("zlib" ,zlib)))
1515 (home-page "http://source.wiredtiger.com/")
1516 (synopsis "NoSQL data engine")
1517 (description
1518 "WiredTiger is an extensible platform for data management. It supports
1519row-oriented storage (where all columns of a row are stored together),
1520column-oriented storage (where columns are stored in groups, allowing for
1521more efficient access and storage of column subsets) and log-structured merge
1522trees (LSM), for sustained throughput under random insert workloads.")
ba8b9f8d 1523 (license license:gpl3) ; or GPL-2
6242b314 1524 ;; configure.ac: WiredTiger requires a 64-bit build.
092b7b3e 1525 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
90c2ee88 1526
16973071
KB
1527(define-public guile-wiredtiger
1528 (package
1529 (name "guile-wiredtiger")
1530 (version "20171113.6cbc51da")
1531 (source (origin
1532 (method git-fetch)
1533 (uri (git-reference
1534 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
1535 (commit "6cbc51dab95d28fe31ae025fbdd88f3ecbf2111b")))
1536 (file-name (string-append name "-" version "-checkout"))
1537 (sha256
1538 (base32
1539 "0x3qwpgch5pg0k21kc792h4y6b36a8xd1zkfq8ar2l2mqmpzkzyd"))))
1540 (build-system gnu-build-system)
1541 (arguments
1542 '(#:tests? #f
1543 #:configure-flags
1544 (list (string-append "--with-libwiredtiger-prefix="
1545 (assoc-ref %build-inputs "wiredtiger")))
1546 #:make-flags '("GUILE_AUTO_COMPILE=0")
1547 #:phases
1548 (modify-phases %standard-phases
1549 (add-after 'unpack 'bootstrap
1550 (lambda _
1551 (zero? (system* "sh" "bootstrap"))))
1552 (add-before 'bootstrap 'remove-bundled-dependencies
1553 (lambda _
1554 ;; TODO: Remove microkanren.scm when we have a separate package
1555 ;; for it.
1556 (delete-file "htmlprag.scm")
1557 (substitute* "Makefile.am"
1558 (("htmlprag\\.scm") ""))
1559 #t)))))
1560 (native-inputs
1561 `(("autoconf" ,autoconf)
1562 ("automake" ,automake)
1563 ("pkg-config" ,pkg-config)))
1564 (inputs
1565 `(("wiredtiger" ,wiredtiger)
1566 ("guile" ,guile-2.2)))
1567 (propagated-inputs
1568 `(("guile-lib" ,guile-lib))) ;for (htmlprag)
1569 (synopsis "Wired Tiger bindings for GNU Guile")
1570 (description
1571 "This package provides Guile bindings to the WiredTiger ``NoSQL''
1572database.")
1573 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
1574 (license license:gpl3+)))
1575
90c2ee88
DM
1576(define-public perl-db-file
1577 (package
1578 (name "perl-db-file")
dd0cfb37 1579 (version "1.840")
90c2ee88
DM
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (string-append
1584 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1585 version
1586 ".tar.gz"))
1587 (sha256
1588 (base32
dd0cfb37 1589 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
90c2ee88
DM
1590 (build-system perl-build-system)
1591 (inputs `(("bdb" ,bdb)))
1592 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1593 (arguments
1594 `(#:phases (modify-phases %standard-phases
1595 (add-before
1596 'configure 'modify-config.in
1597 (lambda* (#:key inputs #:allow-other-keys)
1598 (substitute* "config.in"
1599 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1600 #t)))))
1601 (home-page "http://search.cpan.org/dist/DB_File")
1602 (synopsis
1603 "Perl5 access to Berkeley DB version 1.x")
1604 (description
1605 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2f3108ad 1606 (license license:perl-license)))
0e1b262e
DC
1607
1608(define-public lmdb
1609 (package
1610 (name "lmdb")
603fd6b9 1611 (version "0.9.21")
0e1b262e
DC
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1615 "LMDB_" version ".tar.gz"))
1616 (sha256
1617 (base32
603fd6b9 1618 "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
0e1b262e
DC
1619 (build-system gnu-build-system)
1620 (arguments
1621 `(#:test-target "test"
1622 #:phases
1623 (modify-phases %standard-phases
1624 (replace 'configure
1625 (lambda* (#:key outputs #:allow-other-keys)
1626 (chdir (string-append
1627 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1628 (substitute* "Makefile"
1629 (("/usr/local") (assoc-ref outputs "out")))
1630 #t)))))
1631 (home-page "https://symas.com/products/lightning-memory-mapped-database")
fda852ff
TGR
1632 (synopsis "Lightning Memory-Mapped Database library")
1633 (description
1634 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1635transactional database. Unlike more complex relational databases, LMDB handles
1636only key-value pairs (stored as arbitrary byte arrays) and relies on the
1637underlying operating system for caching and locking, keeping the code small and
1638simple.
1639The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1640disk-based databases with high read performance that scales linearly over
1641multiple cores. The size of each database is limited only by the size of the
1642virtual address space — not physical RAM.")
0e1b262e 1643 (license license:openldap2.8)))
fe71eee0
JN
1644
1645(define-public libpqxx
1646 (package
1647 (name "libpqxx")
1648 (version "4.0.1")
1649 (source (origin
1650 (method url-fetch)
1651 (uri (string-append
1652 "http://pqxx.org/download/software/libpqxx/"
1653 name "-" version ".tar.gz"))
1654 (sha256
1655 (base32
1656 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1657 (build-system gnu-build-system)
1658 (native-inputs
1659 `(("python" ,python-2)))
1660 (inputs `(("postgresql" ,postgresql)))
1661 (arguments
5ac097e2
MB
1662 `(#:tests? #f ; # FAIL: 1
1663 #:phases
1664 (modify-phases %standard-phases
1665 (add-before 'configure 'fix-sed-command
1666 (lambda _
1667 ;; Newer sed versions error out if double brackets are not used.
1668 (substitute* "configure"
1669 (("\\[:space:\\]") "[[:space:]]"))
1670 #t)))))
fe71eee0
JN
1671 (synopsis "C++ connector for PostgreSQL")
1672 (description
1673 "Libpqxx is a C++ library to enable user programs to communicate with the
1674PostgreSQL database back-end. The database back-end can be local or it may be
1675on another machine, accessed via TCP/IP.")
1676 (home-page "http://pqxx.org/")
1677 (license license:bsd-3)))
4d98bfaf
EF
1678
1679(define-public python-peewee
1680 (package
1681 (name "python-peewee")
afd84536 1682 (version "2.10.2")
4d98bfaf
EF
1683 (source
1684 (origin
1685 (method url-fetch)
1686 (uri (pypi-uri "peewee" version))
1687 (sha256
1688 (base32
afd84536 1689 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
4d98bfaf
EF
1690 (build-system python-build-system)
1691 (arguments
1692 `(#:tests? #f)) ; Fails to import test data
1693 (native-inputs
1694 `(("python-cython" ,python-cython)))
1695 (home-page "https://github.com/coleifer/peewee/")
1696 (synopsis "Small object-relational mapping utility")
1697 (description
1698 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1699handles converting between pythonic values and those used by databases, so you
1700can use Python types in your code without having to worry. It has built-in
1701support for sqlite, mysql and postgresql. If you already have a database, you
1702can autogenerate peewee models using @code{pwiz}, a model generator.")
1703 (license license:expat)))
1704
1705(define-public python2-peewee
1706 (package-with-python2 python-peewee))
62ea44fc
AP
1707
1708(define-public sqlcipher
1709 (package
1710 (name "sqlcipher")
1711 (version "3.3.1")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (string-append "https://github.com/sqlcipher/" name
1716 "/archive/v" version ".tar.gz"))
1717 (sha256
1718 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1719 (file-name (string-append name "-" version ".tar.gz"))))
1720 (build-system gnu-build-system)
1721 (inputs
1722 `(("libcrypto" ,openssl)
1723 ("libtcl8.6" ,tcl))) ; required for running the tests
1724 (native-inputs
1725 `(("tcl" ,tcl)))
1726 (arguments
1727 '(#:configure-flags
1728 '("--enable-tempstore=yes"
1729 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1730 "LDFLAGS=-lcrypto -ltcl8.6"
1731 "--disable-tcl")
1732 ;; tests cannot be run from the Makefile
1733 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1734 #:test-target "testfixture"
1735 #:phases
1736 (modify-phases %standard-phases
1737 (add-before 'check 'build-test-runner
1738 (assoc-ref %standard-phases 'check))
1739 (replace 'check
1740 (lambda _
1741 (zero?
1742 (system* "./testfixture" "test/crypto.test")))))))
1743 (home-page "https://www.zetetic.net/sqlcipher/")
1744 (synopsis
1745 "Library providing transparent encryption of SQLite database files")
1746 (description "SQLCipher is an implementation of SQLite, extended to
1747provide transparent 256-bit AES encryption of database files. Pages are
1748encrypted before being written to disk and are decrypted when read back. It’s
1749well suited for protecting embedded application databases and for mobile
1750development.")
1751 ;; The source files
1752 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1753 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1754 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1755 ;; source files are in the public domain.
1756 (license (list license:public-domain license:bsd-3))))
98d403bb
DM
1757
1758(define-public python-pyodbc-c
1759 (package
1760 (name "python-pyodbc-c")
c6b6a74e 1761 (version "3.1.4")
98d403bb
DM
1762 (source
1763 (origin
1764 (method url-fetch)
1765 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1766 "archive.tar.gz?ref=v" version))
1767 (sha256
1768 (base32
c6b6a74e 1769 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
98d403bb
DM
1770 (file-name (string-append name "-" version ".tar.gz"))))
1771 (build-system python-build-system)
1772 (inputs
1773 `(("unixodbc" ,unixodbc)))
1774 (arguments
1775 `(;; No unit tests exist.
1776 #:tests? #f))
1777 (home-page "https://github.com/mkleehammer/pyodbc")
1778 (synopsis "Python ODBC Library")
1779 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1780for ODBC.")
1781 (license (license:x11-style "file://LICENSE.TXT"))))
1782
1783(define-public python2-pyodbc-c
1784 (package-with-python2 python-pyodbc-c))
d39a84e8 1785
41916bea
DM
1786(define-public python-pyodbc
1787 (package
1788 (name "python-pyodbc")
1789 (version "4.0.21")
1790 (source
1791 (origin
1792 (method url-fetch)
1793 (uri (pypi-uri "pyodbc" version))
1794 (sha256
1795 (base32
1796 "0a83zwz3h1agshnsc6r7al6q83222w8601gpzzzjvjz5m56ghmcn"))
1797 (file-name (string-append name "-" version ".tar.gz"))))
1798 (build-system python-build-system)
1799 (inputs
1800 `(("unixodbc" ,unixodbc)))
1801 (arguments
1802 `(;; No unit tests exist.
1803 #:tests? #f))
1804 (home-page "https://github.com/mkleehammer/pyodbc")
1805 (synopsis "Python ODBC Library")
1806 (description "@code{python-pyodbc} provides a Python DB-API driver
1807for ODBC.")
1808 (license (license:x11-style "file:///LICENSE.TXT"))))
1809
1810(define-public python2-pyodbc
1811 (package-with-python2 python-pyodbc))
1812
d39a84e8
AI
1813(define-public mdbtools
1814 (package
1815 (name "mdbtools")
1816 (version "0.7.1")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (string-append "https://github.com/brianb/mdbtools/archive/"
1821 version ".tar.gz"))
1822 (sha256
1823 (base32
1824 "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
1825 (file-name (string-append name "-" version ".tar.gz"))))
1826 (build-system gnu-build-system)
1827 (inputs
1828 `(("glib" ,glib)))
1829 (native-inputs
1830 `(("autoconf" ,autoconf)
1831 ("automake" ,automake)
1832 ("libtool" ,libtool)
1833 ("pkg-config" ,pkg-config)
1834 ("txt2man" ,txt2man)
1835 ("which" ,which)))
1836 (arguments
1837 `(#:phases
1838 (modify-phases %standard-phases
d10092b8 1839 (add-after 'unpack 'autoreconf
d39a84e8
AI
1840 (lambda _
1841 (zero? (system* "autoreconf" "-vfi")))))))
1842 (home-page "http://mdbtools.sourceforge.net/")
1843 (synopsis "Read Microsoft Access databases")
1844 (description "MDB Tools is a set of tools and applications to read the
1845proprietary MDB file format used in Microsoft's Access database package. This
1846includes programs to export schema and data from Microsoft's Access database
1847file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
1848etc., and an SQL engine for performing simple SQL queries.")
1849 (license (list license:lgpl2.0
1850 license:gpl2+))))
07041d95
TGR
1851
1852(define-public python-lmdb
1853 (package
1854 (name "python-lmdb")
57af0d13 1855 (version "0.93")
07041d95
TGR
1856 (source (origin
1857 (method url-fetch)
1858 (uri (pypi-uri "lmdb" version))
1859 (sha256
1860 (base32
57af0d13 1861 "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql"))
07041d95
TGR
1862 (modules '((guix build utils)))
1863 (snippet
1864 ;; Delete bundled lmdb source files.
1865 '(for-each delete-file (list "lib/lmdb.h"
1866 "lib/mdb.c"
1867 "lib/midl.c"
1868 "lib/midl.h")))))
1869 (build-system python-build-system)
1870 (inputs
1871 `(("lmdb" ,lmdb)))
1872 (arguments
1873 `(#:phases
1874 (modify-phases %standard-phases
1875 (add-before 'build 'use-system-lmdb
1876 (lambda* (#:key inputs #:allow-other-keys)
1877 (let ((lmdb (assoc-ref inputs "lmdb")))
1878 (setenv "LMDB_FORCE_SYSTEM" "set")
1879 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
1880 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
1881 #t))))
1882 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
1883 #:tests? #f))
1884 (home-page "https://github.com/dw/py-lmdb")
1885 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
1886 (description
1887 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
1888Memory-Mapped Database} (LMDB), a high-performance key-value store.")
1889 (license
1890 (list license:openldap2.8
1891 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
1892 ;; but not actually needed on platforms currently supported by Guix.
1893 license:bsd-3))))
1894
1895(define-public python2-lmdb
1896 (package-with-python2 python-lmdb))
da1f7a9e
BW
1897
1898(define-public python-orator
1899 (package
1900 (name "python-orator")
1901 (version "0.9.7")
1902 (source (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "orator" version))
1905 (sha256
1906 (base32
1907 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
1908 (build-system python-build-system)
1909 (arguments
1910 `(#:phases
1911 (modify-phases %standard-phases
1912 (add-after 'unpack 'loosen-dependencies
1913 ;; Tests are not actually run since they are not included with the
1914 ;; distributed package, but dependencies are checked.
1915 (lambda _
1916 (substitute* "setup.py"
1917 ((",<.*'") "'")
1918 (("flexmock==0.9.7") "flexmock")
1919 ;; The pytest-mock package is out of date, so we remove minimum
1920 ;; version requirement.
1921 (("pytest-mock.*'") "pytest-mock'"))
1922 #t)))))
1923 (native-inputs
1924 `(("python-pytest-mock" ,python-pytest-mock)
1925 ("python-pytest" ,python-pytest-3.0)
1926 ("python-flexmock" ,python-flexmock)))
1927 (propagated-inputs
1928 `(("python-backpack" ,python-backpack)
1929 ("python-blinker" ,python-blinker)
1930 ("python-cleo" ,python-cleo)
1931 ("python-faker" ,python-faker)
1932 ("python-inflection" ,python-inflection)
1933 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
1934 ("python-pendulum" ,python-pendulum)
1935 ("python-pyaml" ,python-pyaml)
1936 ("python-pygments" ,python-pygments)
1937 ("python-simplejson" ,python-simplejson)
1938 ("python-six" ,python-six)
1939 ("python-wrapt" ,python-wrapt)))
1940 (home-page "https://orator-orm.com/")
1941 (synopsis "ActiveRecord ORM for Python")
1942 (description
1943 "Orator provides a simple ActiveRecord-like Object Relational Mapping
1944implementation for Python.")
1945 (license license:expat)
1946 (properties `((python2-variant . ,(delay python2-orator))))))
1947
1948(define-public python2-orator
1949 (package-with-python2 (strip-python2-variant python-orator)))
61ce0998
RJ
1950
1951(define-public virtuoso-ose
1952 (package
1953 (name "virtuoso-ose")
1954 (version "7.2.4.2")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "https://github.com/openlink/virtuoso-opensource/releases/"
1960 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
1961 (sha256
1962 (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002"))))
1963 (build-system gnu-build-system)
1964 (arguments
1965 `(#:tests? #f)) ; Tests require a network connection.
1966 (inputs
1967 `(("openssl" ,openssl)
1968 ("net-tools" ,net-tools)))
1969 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
1970 (synopsis "Multi-model database system")
1971 (description "Virtuoso is a scalable cross-platform server that combines
1972relational, graph, and document data management with web application server
1973and web services platform functionality.")
48b68c61
EF
1974 ;; configure: error: ... can only be build on 64bit platforms
1975 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
61ce0998 1976 (license license:gpl2)))
74248d22
RW
1977
1978(define-public r-rmysql
1979 (package
1980 (name "r-rmysql")
1981 (version "0.10.13")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (cran-uri "RMySQL" version))
1986 (sha256
1987 (base32
1988 "1j0vr2l4s02cg2hzgr3pla96pjj4h85sxw28lidy58rg5awnsf82"))))
1989 (properties `((upstream-name . "RMySQL")))
1990 (build-system r-build-system)
1991 (native-inputs
1992 `(("pkg-config" ,pkg-config)))
1993 (inputs
1994 `(("mariadb" ,mariadb)
1995 ("zlib" ,zlib)))
1996 (propagated-inputs
1997 `(("r-dbi" ,r-dbi)))
1998 (home-page "https://github.com/r-dbi/RMySQL")
1999 (synopsis "Database interface and MySQL driver for R")
2000 (description
2001 "This package provides a DBI interface to MySQL / MariaDB. The RMySQL
2002package contains an old implementation based on legacy code from S-PLUS which
2003is being phased out. A modern MySQL client based on Rcpp is available from
2004the RMariaDB package.")
2005 (license license:gpl2)))
a8714bf6
RW
2006
2007(define-public python-ccm
2008 (package
2009 (name "python-ccm")
2010 (version "2.1.6")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (pypi-uri "ccm" version))
2015 (sha256
2016 (base32
2017 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2018 (build-system python-build-system)
2019 (propagated-inputs
2020 `(("python-pyyaml" ,python-pyyaml)
2021 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2022 ;; functionality
2023 ("python-psutil" ,python-psutil)
2024 ("python-six" ,python-six)))
2025 (home-page "https://github.com/pcmanus/ccm")
2026 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2027localhost")
2028 (description "Cassandra Cluster Manager is a development tool for testing
2029local Cassandra clusters. It creates, launches and removes Cassandra clusters
2030on localhost.")
2031 (license license:asl2.0)))
2032
2033(define-public python2-ccm
2034 (package-with-python2 python-ccm))
2035
2036(define-public python2-pysqlite
2037 (package
2038 (name "python2-pysqlite")
2039 (version "2.8.3")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "pysqlite" version))
2044 (sha256
2045 (base32
2046 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2047 (build-system python-build-system)
2048 (inputs
2049 `(("sqlite" ,sqlite)))
2050 (arguments
2051 `(#:python ,python-2 ; incompatible with Python 3
2052 #:tests? #f)) ; no test target
2053 (home-page "https://github.com/ghaering/pysqlite")
2054 (synopsis "SQLite bindings for Python")
2055 (description
2056 "Pysqlite provides SQLite bindings for Python that comply to the
2057Database API 2.0T.")
2058 (license license:zlib)))
2059
2060(define-public python-sqlalchemy
2061 (package
2062 (name "python-sqlalchemy")
2063 (version "1.0.12")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (string-append "https://pypi.python.org/packages/source/S/"
2068 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2069 (sha256
2070 (base32
2071 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
2072 (build-system python-build-system)
2073 (native-inputs
2074 `(("python-cython" ,python-cython) ;for c extensions
2075 ("python-pytest" ,python-pytest)
2076 ("python-mock" ,python-mock))) ;for tests
2077 (arguments
2078 `(#:phases
2079 (modify-phases %standard-phases
2080 (replace 'check
2081 (lambda _ (zero? (system* "py.test")))))))
2082 (home-page "http://www.sqlalchemy.org")
2083 (synopsis "Database abstraction library")
2084 (description
2085 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2086gives application developers the full power and flexibility of SQL. It
2087provides a full suite of well known enterprise-level persistence patterns,
2088designed for efficient and high-performing database access, adapted into a
2089simple and Pythonic domain language.")
2090 (license license:x11)))
2091
2092(define-public python2-sqlalchemy
2093 (package-with-python2 python-sqlalchemy))
2094
2095(define-public python-sqlalchemy-utils
2096 (package
2097 (name "python-sqlalchemy-utils")
2098 (version "0.32.13")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "SQLAlchemy-Utils" version))
2103 (sha256
2104 (base32
2105 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
2106 (build-system python-build-system)
2107 (arguments
2108 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2109 ;; #:phases
2110 ;; (modify-phases %standard-phases
2111 ;; (replace 'check
2112 ;; (lambda _
2113 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2114 (propagated-inputs
2115 `(("python-six" ,python-six)
2116 ("python-sqlalchemy" ,python-sqlalchemy)))
2117 (native-inputs
2118 `(("python-dateutil" ,python-dateutil)
2119 ("python-flexmock" ,python-flexmock)
2120 ("python-psycopg2" ,python-psycopg2)
2121 ("python-pytest" ,python-pytest)
2122 ("python-pytz" ,python-pytz)))
2123 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2124 (synopsis "Various utility functions for SQLAlchemy")
2125 (description
2126 "SQLAlchemy-utils provides various utility functions and custom data types
2127for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2128
2129You might also want to install the following optional dependencies:
2130@enumerate
2131@item @code{python-passlib}
2132@item @code{python-babel}
2133@item @code{python-cryptography}
2134@item @code{python-pytz}
2135@item @code{python-psycopg2}
2136@item @code{python-furl}
2137@item @code{python-flask-babel}
2138@end enumerate
2139")
2140 (license license:bsd-3)))
2141
2142(define-public python2-sqlalchemy-utils
2143 (package-with-python2 python-sqlalchemy-utils))
2144
2145(define-public python-alembic
2146 (package
2147 (name "python-alembic")
2148 (version "0.9.5")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "alembic" version))
2153 (sha256
2154 (base32
2155 "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
2156 (build-system python-build-system)
2157 (native-inputs
2158 `(("python-mock" ,python-mock)
2159 ("python-pytest-cov" ,python-pytest-cov)))
2160 (propagated-inputs
2161 `(("python-dateutil" ,python-dateutil)
2162 ("python-sqlalchemy" ,python-sqlalchemy)
2163 ("python-mako" ,python-mako)
2164 ("python-editor" ,python-editor)))
2165 (home-page "http://bitbucket.org/zzzeek/alembic")
2166 (synopsis
2167 "Database migration tool for SQLAlchemy")
2168 (description
2169 "Alembic is a lightweight database migration tool for usage with the
2170SQLAlchemy Database Toolkit for Python.")
2171 (license license:expat)))
2172
2173(define-public python2-alembic
2174 (package-with-python2 python-alembic))
2175
2176(define-public python-pickleshare
2177 (package
2178 (name "python-pickleshare")
2179 (version "0.5")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (string-append "https://pypi.python.org/packages/source/p/"
2184 "pickleshare/pickleshare-" version ".tar.gz"))
2185 (sha256
2186 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
2187 (build-system python-build-system)
2188 (propagated-inputs
2189 `(("python-pathpy" ,python-pathpy)))
2190 (home-page "https://github.com/vivainio/pickleshare")
2191 (synopsis "Tiny key value database with concurrency support")
2192 (description
2193 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2194Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2195shelve, many processes can access the database simultaneously. Changing a
2196value in database is immediately visible to other processes accessing the same
2197database. Concurrency is possible because the values are stored in separate
2198files. Hence the “database” is a directory where all files are governed by
2199PickleShare.")
2200 (license license:expat)))
2201
2202(define-public python2-pickleshare
2203 (package-with-python2 python-pickleshare))
2204
2205(define-public python-apsw
2206 (package
2207 (name "python-apsw")
2208 (version "3.9.2-r1")
2209 (source
2210 (origin
2211 (method url-fetch)
2212 (uri (pypi-uri "apsw" version))
2213 (sha256
2214 (base32
2215 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
2216 (build-system python-build-system)
2217 (inputs
2218 `(("sqlite" ,sqlite)))
2219 (arguments
2220 `(#:phases
2221 (modify-phases %standard-phases
2222 (replace 'build
2223 (lambda _
2224 (zero?
2225 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
2226 (add-after 'build 'build-test-helper
2227 (lambda _
2228 (zero?
2229 (system
2230 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
2231 "-I. -Isqlite3 src/testextension.c") ))))
2232 (delete 'check)
2233 (add-after 'install 'check
2234 (lambda* (#:key inputs outputs #:allow-other-keys)
2235 (add-installed-pythonpath inputs outputs)
2236 (zero? (system* "python" "setup.py" "test")))))))
2237 (home-page "https://github.com/rogerbinns/apsw/")
2238 (synopsis "Another Python SQLite Wrapper")
2239 (description "APSW is a Python wrapper for the SQLite
2240embedded relational database engine. In contrast to other wrappers such as
2241pysqlite it focuses on being a minimal layer over SQLite attempting just to
2242translate the complete SQLite API into Python.")
2243 (license license:zlib)))
2244
2245(define-public python2-apsw
2246 (package-with-python2 python-apsw))
2247
2248(define-public python2-neo4j-driver
2249 (package
2250 (name "python2-neo4j-driver")
2251 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2252 (version "1.4.0")
2253 (source (origin
2254 (method url-fetch)
2255 (uri (pypi-uri "neo4j-driver" version))
2256 (sha256
2257 (base32
2258 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2259 (build-system python-build-system)
2260 (arguments
2261 `(#:python ,python-2))
2262 (home-page "https://neo4j.com/developer/python/")
2263 (synopsis "Neo4j driver code written in Python")
2264 (description "This package provides the Neo4j Python driver that connects
2265to the database using Neo4j's binary protocol. It aims to be minimal, while
2266being idiomatic to Python.")
2267 (license license:asl2.0)))
2268
2269(define-public python2-py2neo
2270 (package
2271 (name "python2-py2neo")
2272 (version "3.1.2")
2273 (source (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "py2neo" version))
2276 (sha256
2277 (base32
2278 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2279 (build-system python-build-system)
2280 (arguments
2281 `(#:python ,python-2))
2282 (home-page "http://py2neo.org")
2283 (synopsis "Library and toolkit for working with Neo4j in Python")
2284 (description "This package provides a client library and toolkit for
2285working with Neo4j from within Python applications and from the command
2286line. The core library has no external dependencies and has been carefully
2287designed to be easy and intuitive to use.")
2288 (license license:asl2.0)))
2289
2290(define-public python-psycopg2
2291 (package
2292 (name "python-psycopg2")
2293 (version "2.7.3.1")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "psycopg2" version))
2298 (sha256
2299 (base32
2300 "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
2301 (build-system python-build-system)
2302 (arguments
2303 ;; Tests would require a postgresql database "psycopg2_test"
2304 ;; and a running postgresql database management service.
2305 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2306 (inputs
2307 `(("postgresql" ,postgresql))) ; libpq
2308 (home-page "http://initd.org/psycopg/")
2309 (synopsis "Python PostgreSQL adapter")
2310 (description
2311 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
2312 (license license:lgpl3+)))
2313
2314(define-public python2-psycopg2
2315 (package-with-python2 python-psycopg2))
2316
2317(define-public python-sadisplay
2318 (package
2319 (name "python-sadisplay")
2320 (version "0.4.6")
2321 (source
2322 (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "sadisplay" version))
2325 (sha256
2326 (base32
2327 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
2328 (build-system python-build-system)
2329 (propagated-inputs
2330 `(("python-sqlalchemy" ,python-sqlalchemy)))
2331 (native-inputs
2332 `(("python-nose" ,python-nose)))
2333 (home-page "https://bitbucket.org/estin/sadisplay")
2334 (synopsis "SQLAlchemy schema displayer")
2335 (description "This package provides a program to build Entity
2336Relationship diagrams from a SQLAlchemy model (or directly from the
2337database).")
2338 (license license:bsd-3)))
2339
2340(define-public python2-sadisplay
2341 (package-with-python2 python-sadisplay))
2342
2343(define-public python-mysqlclient
2344 (package
2345 (name "python-mysqlclient")
2346 (version "1.3.10")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (pypi-uri "mysqlclient" version))
2351 (sha256
2352 (base32
2353 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
2354 (build-system python-build-system)
2355 (native-inputs
2356 `(("mariadb" ,mariadb)
2357 ("nose" ,python-nose)
2358 ("mock" ,python-mock)
2359 ("py.test" ,python-pytest)))
2360 (inputs
2361 `(("mysql" ,mysql)
2362 ("libz" ,zlib)
2363 ("openssl" ,openssl)))
2364 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2365 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2366 (description "MySQLdb is an interface to the popular MySQL database server
2367for Python. The design goals are:
2368@enumerate
2369@item Compliance with Python database API version 2.0 [PEP-0249],
2370@item Thread-safety,
2371@item Thread-friendliness (threads will not block each other).
2372@end enumerate")
2373 (license license:gpl2)))
2374
2375(define-public python2-mysqlclient
2376 (package-with-python2 python-mysqlclient))
2377
2378(define-public python-hiredis
2379 (package
2380 (name "python-hiredis")
2381 (version "0.2.0")
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "hiredis" version))
2386 (sha256
2387 (base32
2388 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2389 (build-system python-build-system)
2390 (arguments
2391 ;; no tests
2392 `(#:tests? #f))
2393 (home-page "https://github.com/redis/hiredis-py")
2394 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2395 (description "Python-hiredis is a python extension that wraps protocol
2396parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2397 (license license:bsd-3)))
2398
2399(define-public python2-hiredis
2400 (package-with-python2 python-hiredis))
2401
2402(define-public python-fakeredis
2403 (package
2404 (name "python-fakeredis")
2405 (version "0.8.2")
2406 (source
2407 (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "fakeredis" version))
2410 (sha256
2411 (base32
2412 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2413 (build-system python-build-system)
2414 (arguments
2415 ;; no tests
2416 `(#:tests? #f))
2417 (home-page "https://github.com/jamesls/fakeredis")
2418 (synopsis "Fake implementation of redis API for testing purposes")
2419 (description "Fakeredis is a pure python implementation of the redis-py
2420python client that simulates talking to a redis server. This was created for a
2421single purpose: to write unittests. Setting up redis is not hard, but many time
2422 you want to write unittests that do not talk to an external server (such as
2423redis). This module now allows tests to simply use this module as a reasonable
2424substitute for redis.")
2425 (license license:bsd-3)))
2426
2427(define-public python2-fakeredis
2428 (package-with-python2 python-fakeredis))
2429
2430(define-public python-redis
2431 (package
2432 (name "python-redis")
2433 (version "2.10.5")
2434 (source
2435 (origin
2436 (method url-fetch)
2437 (uri (pypi-uri "redis" version))
2438 (sha256
2439 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
2440 (build-system python-build-system)
2441 ;; Tests require a running Redis server
2442 (arguments '(#:tests? #f))
2443 ;; As long as we are not running test, we do not need this input :-)
2444 ;;(native-inputs
2445 ;; `(("python-pytest" ,python-pytest)))
2446 (home-page "https://github.com/andymccurdy/redis-py")
2447 (synopsis "Redis Python client")
2448 (description
2449 "This package provides a Python interface to the Redis key-value store.")
2450 (license license:expat)))
2451
2452(define-public python2-redis
2453 (package-with-python2 python-redis))
2454
2455(define-public python-rq
2456 (package
2457 (name "python-rq")
2458 (version "0.7.1")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "rq" version))
2463 (sha256
2464 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
2465 (build-system python-build-system)
2466 (propagated-inputs
2467 `(("python-click" ,python-click)
2468 ("python-redis" ,python-redis)))
2469 (home-page "http://python-rq.org/")
2470 (synopsis "Simple job queues for Python")
2471 (description
2472 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2473processing them in the background with workers. It is backed by Redis and it
2474is designed to have a low barrier to entry.")
2475 (license license:bsd-2)))
2476
2477(define-public python2-rq
2478 (package-with-python2 python-rq))
2479
2480(define-public python-trollius-redis
2481 (package
2482 (name "python-trollius-redis")
2483 (version "0.1.4")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "trollius_redis" version))
2488 (sha256
2489 (base32
2490 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2491 (build-system python-build-system)
2492 ;; TODO: Tests require packaging 'hiredis'.
2493 (arguments '(#:tests? #f))
2494 (home-page "https://github.com/benjolitz/trollius-redis")
2495 (synopsis "Port of asyncio-redis to trollius")
2496 (description "@code{trollius-redis} is a Redis client for Python
2497 trollius. It is an asynchronious IO (PEP 3156) implementation of the
2498 Redis protocol.")
2499 (license license:bsd-2)))
2500
2501(define-public python2-trollius-redis
2502 (package-with-python2 python-trollius-redis))
2503
2504(define-public python-sqlparse
2505 (package
2506 (name "python-sqlparse")
2507 (version "0.2.4")
2508 (source (origin
2509 (method url-fetch)
2510 (uri (pypi-uri "sqlparse" version))
2511 (sha256
2512 (base32
2513 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2514 (build-system python-build-system)
2515 (arguments
2516 `(#:phases
2517 (modify-phases %standard-phases
2518 (replace 'check
2519 (lambda _ (zero? (system* "py.test")))))))
2520 (native-inputs
2521 `(("python-pytest" ,python-pytest)))
2522 (home-page "https://github.com/andialbrecht/sqlparse")
2523 (synopsis "Non-validating SQL parser")
2524 (description "Sqlparse is a non-validating SQL parser for Python. It
2525provides support for parsing, splitting and formatting SQL statements.")
2526 (license license:bsd-3)))
2527
2528(define-public python2-sqlparse
2529 (package-with-python2 python-sqlparse))
2530
2531(define-public python-sql
2532 (package
2533 (name "python-sql")
2534 (version "0.9")
2535 (source
2536 (origin
2537 (method url-fetch)
2538 (uri (pypi-uri "python-sql" version))
2539 (sha256
2540 (base32
2541 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
2542 (build-system python-build-system)
2543 (home-page "https://python-sql.tryton.org/")
2544 (synopsis "Library to write SQL queries in a pythonic way")
2545 (description "@code{python-sql} is a library to write SQL queries, that
2546transforms idiomatic python function calls to well-formed SQL queries.")
2547 (license license:bsd-3)))
2548
2549(define-public python2-sql
2550 (package-with-python2 python-sql))