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