gnu: hidapi: Fix 'license'.
[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, 2014, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013 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 © 2015 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
12 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
13 ;;; Copyright © 2016 David Craven <david@craven.ch>
14 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages databases)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages avahi)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages crypto)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages language)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages tcl)
45 #:use-module (gnu packages tls)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages emacs)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages cyrus-sasl)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages rdf)
59 #:use-module (gnu packages xml)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages jemalloc)
62 #:use-module ((guix licenses)
63 #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
64 bsd-2 bsd-3 public-domain))
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system perl)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix utils)
73 #:use-module (srfi srfi-26)
74 #:use-module (ice-9 match))
75
76 (define-public 4store
77 (package
78 (name "4store")
79 (version "1.1.6")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "https://github.com/garlik/4store/archive/v"
83 version ".tar.gz"))
84 (file-name (string-append name "-" version ".tar.gz"))
85 (sha256
86 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
87 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
88 (build-system gnu-build-system)
89 (native-inputs
90 `(("perl" ,perl)
91 ("python" ,python-2)
92 ("autoconf" ,autoconf)
93 ("automake" ,automake)
94 ("gettext" ,gnu-gettext)
95 ("libtool" ,libtool)
96 ("pcre" ,pcre "bin") ;for 'pcre-config'
97 ("pkg-config" ,pkg-config)))
98 (inputs
99 `(("glib" ,glib)
100 ("rasqal" ,rasqal)
101 ("libxml2" ,libxml2)
102 ("raptor2" ,raptor2)
103 ("readline" ,readline)
104 ("avahi" ,avahi)
105 ("cyrus-sasl" ,cyrus-sasl)
106 ("openssl" ,openssl)
107 ("util-linux" ,util-linux)))
108 (arguments
109 `(#:phases
110 (modify-phases %standard-phases
111 (add-before 'configure 'generate-configure
112 (lambda _
113 (zero? (system* "./autogen.sh")))))))
114 ;; http://www.4store.org has been down for a while now.
115 (home-page "https://github.com/garlik/4store")
116 (synopsis "Clustered RDF storage and query engine")
117 (description "4store is a RDF/SPARQL store written in C, supporting
118 either single machines or networked clusters.")
119 (license gpl3+)))
120
121 (define-public gdbm
122 (package
123 (name "gdbm")
124 (version "1.12")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/gdbm/gdbm-"
128 version ".tar.gz"))
129 (sha256
130 (base32
131 "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
132 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
133 (build-system gnu-build-system)
134 (home-page "http://www.gnu.org/software/gdbm/")
135 (synopsis
136 "Hash library of database functions compatible with traditional dbm")
137 (description
138 "GDBM is a library for manipulating hashed databases. It is used to
139 store key/value pairs in a file in a manner similar to the Unix dbm library
140 and provides interfaces to the traditional file format.")
141 (license gpl3+)))
142
143 (define-public bdb
144 (package
145 (name "bdb")
146 (version "6.2.23")
147 (source (origin
148 (method url-fetch)
149 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
150 version ".tar.gz"))
151 (sha256
152 (base32
153 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
154 (build-system gnu-build-system)
155 (outputs '("out" ; programs, libraries, headers
156 "doc")) ; 94 MiB of HTML docs
157 (arguments
158 '(#:tests? #f ; no check target available
159 #:disallowed-references ("doc")
160 #:phases
161 (alist-replace
162 'configure
163 (lambda* (#:key outputs #:allow-other-keys)
164 (let ((out (assoc-ref outputs "out"))
165 (doc (assoc-ref outputs "doc")))
166 ;; '--docdir' is not honored, so we need to patch.
167 (substitute* "dist/Makefile.in"
168 (("docdir[[:blank:]]*=.*")
169 (string-append "docdir = " doc "/share/doc/bdb")))
170
171 (zero?
172 (system* "./dist/configure"
173 (string-append "--prefix=" out)
174 (string-append "CONFIG_SHELL=" (which "bash"))
175 (string-append "SHELL=" (which "bash"))
176
177 ;; Remove 7 MiB of .a files.
178 "--disable-static"
179
180 ;; The compatibility mode is needed by some packages,
181 ;; notably iproute2.
182 "--enable-compat185"
183
184 ;; The following flag is needed so that the inclusion
185 ;; of db_cxx.h into C++ files works; it leads to
186 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
187 "--enable-cxx"))))
188 %standard-phases)))
189 (synopsis "Berkeley database")
190 (description
191 "Berkeley DB is an embeddable database allowing developers the choice of
192 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
193 (license (non-copyleft "file://LICENSE"
194 "See LICENSE in the distribution."))
195 (home-page
196 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
197
198 (define-public bdb-5.3
199 (package (inherit bdb)
200 (name "bdb")
201 (version "5.3.28")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
205 version ".tar.gz"))
206 (sha256
207 (base32
208 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
209
210 (define-public mysql
211 (package
212 (name "mysql")
213 (version "5.7.16")
214 (source (origin
215 (method url-fetch)
216 (uri (list (string-append
217 "http://dev.mysql.com/get/Downloads/MySQL-"
218 (version-major+minor version) "/"
219 name "-" version ".tar.gz")
220 (string-append
221 "http://downloads.mysql.com/archives/get/file/"
222 name "-" version ".tar.gz")))
223 (sha256
224 (base32
225 "198qhd9bdm0fnpp307mgby2aar92yzya0937kxi7bcpdfjcvada9"))))
226 (build-system cmake-build-system)
227 (arguments
228 `(#:configure-flags
229 '("-DBUILD_CONFIG=mysql_release"
230 "-DWITH_SSL=system"
231 "-DWITH_ZLIB=system"
232 "-DDEFAULT_CHARSET=utf8"
233 "-DDEFAULT_COLLATION=utf8_general_ci"
234 "-DMYSQL_DATADIR=/var/lib/mysql"
235 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
236 "-DINSTALL_INFODIR=share/mysql/docs"
237 "-DINSTALL_MANDIR=share/man"
238 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
239 "-DINSTALL_SCRIPTDIR=bin"
240 "-DINSTALL_INCLUDEDIR=include/mysql"
241 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
242 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
243 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
244 "-DINSTALL_DOCDIR=share/mysql/docs"
245 "-DINSTALL_SHAREDIR=share/mysql"
246 ;; Get rid of test data.
247 "-DINSTALL_MYSQLTESTDIR="
248 "-DINSTALL_SQLBENCHDIR=")
249 #:phases (modify-phases %standard-phases
250 (add-after
251 'unpack 'patch-boost-version
252 (lambda _
253 ;; Mysql wants boost-1.59.0 specifically
254 (substitute* "cmake/boost.cmake"
255 (("59")
256 ,(match (string-split (package-version boost) #\.)
257 ((_ minor . _) minor))))))
258 (add-after
259 'install 'remove-extra-binaries
260 (lambda* (#:key outputs #:allow-other-keys)
261 (let ((out (assoc-ref outputs "out")))
262 ;; Remove the 3 *_embedded files, which weigh in at
263 ;; 14 MiB each.
264 (for-each delete-file
265 (find-files (string-append out "/bin")
266 "_embedded$"))
267 #t))))))
268 (native-inputs
269 `(("bison" ,bison)
270 ("perl" ,perl)))
271 (inputs
272 `(("boost" ,boost)
273 ("libaio" ,libaio)
274 ("ncurses" ,ncurses)
275 ("openssl" ,openssl)
276 ("zlib" ,zlib)))
277 (home-page "http://www.mysql.com/")
278 (synopsis "Fast, easy to use, and popular database")
279 (description
280 "MySQL is a fast, reliable, and easy to use relational database
281 management system that supports the standardized Structured Query
282 Language.")
283 (license gpl2)))
284
285 (define-public mariadb
286 (package
287 (name "mariadb")
288 (version "10.1.19")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append "https://downloads.mariadb.org/f/"
292 name "-" version "/source/"
293 name "-" version ".tar.gz"))
294 (sha256
295 (base32
296 "108s4mimdbmgmmn5pcr9a405j70cyny9adzv49s75lg22krp74sv"))))
297 (build-system cmake-build-system)
298 (arguments
299 '(#:configure-flags
300 '("-DBUILD_CONFIG=mysql_release"
301 "-DDEFAULT_CHARSET=utf8"
302 "-DDEFAULT_COLLATION=utf8_general_ci"
303 "-DMYSQL_DATADIR=/var/lib/mysql"
304 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
305 "-DINSTALL_INFODIR=share/mysql/docs"
306 "-DINSTALL_MANDIR=share/man"
307 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
308 "-DINSTALL_SCRIPTDIR=bin"
309 "-DINSTALL_INCLUDEDIR=include/mysql"
310 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
311 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
312 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
313 "-DINSTALL_DOCDIR=share/mysql/docs"
314 "-DINSTALL_SHAREDIR=share/mysql")
315 #:phases
316 (modify-phases %standard-phases
317 (add-before
318 'configure 'pre-configure
319 (lambda _
320 (setenv "CONFIG_SHELL" (which "sh"))
321 #t))
322 (add-after
323 'install 'post-install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let* ((out (assoc-ref outputs "out"))
326 (test (assoc-ref outputs "test")))
327 (substitute* (string-append out "/bin/mysql_install_db")
328 (("basedir=\"\"")
329 (string-append "basedir=\"" out "\"")))
330 ;; Remove unneeded files for testing.
331 (with-directory-excursion out
332 (for-each delete-file-recursively
333 '("data" "mysql-test" "sql-bench"
334 "share/man/man1/mysql-test-run.pl.1")))))))))
335 (native-inputs
336 `(("bison" ,bison)
337 ("perl" ,perl)))
338 (inputs
339 `(("jemalloc" ,jemalloc)
340 ("libaio" ,libaio)
341 ("libxml2" ,libxml2)
342 ("ncurses" ,ncurses)
343 ("openssl" ,openssl)
344 ("pcre" ,pcre)
345 ("zlib" ,zlib)))
346 (home-page "https://mariadb.org/")
347 (synopsis "SQL database server")
348 (description
349 "MariaDB is a multi-user and multi-threaded SQL database server, designed
350 as a drop-in replacement of MySQL.")
351 (license gpl2)))
352
353 (define-public postgresql
354 (package
355 (name "postgresql")
356 (version "9.5.5")
357 (source (origin
358 (method url-fetch)
359 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
360 version "/postgresql-" version ".tar.bz2"))
361 (sha256
362 (base32
363 "157kf6mdazmxfmd11f0akya2xcz6sfgprn7yqc26dpklps855ih2"))))
364 (build-system gnu-build-system)
365 (arguments
366 `(#:phases
367 (modify-phases %standard-phases
368 (add-before 'configure 'patch-/bin/sh
369 (lambda _
370 ;; Refer to the actual shell.
371 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
372 "src/bin/psql/command.c")
373 (("/bin/sh") (which "sh")))
374 #t)))))
375 (inputs
376 `(("readline" ,readline)
377 ("zlib" ,zlib)))
378 (home-page "https://www.postgresql.org/")
379 (synopsis "Powerful object-relational database system")
380 (description
381 "PostgreSQL is a powerful object-relational database system. It is fully
382 ACID compliant, has full support for foreign keys, joins, views, triggers, and
383 stored procedures (in multiple languages). It includes most SQL:2008 data
384 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
385 TIMESTAMP. It also supports storage of binary large objects, including
386 pictures, sounds, or video.")
387 (license (x11-style "file://COPYRIGHT"))))
388
389 (define-public recutils
390 (package
391 (name "recutils")
392 (version "1.7")
393 (source (origin
394 (method url-fetch)
395 (uri (string-append "mirror://gnu/recutils/recutils-"
396 version ".tar.gz"))
397 (sha256
398 (base32
399 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
400 (build-system gnu-build-system)
401
402 ;; Running tests in parallel leads to test failures and crashes in
403 ;; torture/utils.
404 (arguments '(#:parallel-tests? #f
405 #:configure-flags
406 (list (string-append "--with-bash-headers="
407 (assoc-ref %build-inputs "bash:include")
408 "/include/bash"))))
409
410 (native-inputs `(("emacs" ,emacs-minimal)
411 ("bc" ,bc)
412 ("bash:include" ,bash "include")
413 ("libuuid" ,util-linux)))
414
415 ;; TODO: Add more optional inputs.
416 (inputs `(("curl" ,curl)
417 ("libgcrypt" ,libgcrypt)
418 ("check" ,check)))
419 (synopsis "Manipulate plain text files as databases")
420 (description
421 "GNU Recutils is a set of tools and libraries for creating and
422 manipulating text-based, human-editable databases. Despite being text-based,
423 databases created with Recutils carry all of the expected features such as
424 unique fields, primary keys, time stamps and more. Many different field
425 types are supported, as is encryption.")
426 (license gpl3+)
427 (home-page "http://www.gnu.org/software/recutils/")))
428
429 (define-public sparql-query
430 (package
431 (name "sparql-query")
432 (version "1.1")
433 (source (origin
434 (method url-fetch)
435 (uri (string-append "https://github.com/tialaramex/"
436 name "/archive/" version ".tar.gz"))
437 (sha256
438 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
439 (file-name (string-append name "-" version ".tar.gz"))))
440 (build-system gnu-build-system)
441 (inputs
442 `(("readline" ,readline)
443 ("ncurses" ,ncurses)
444 ("glib" ,glib)
445 ("libxml2" ,libxml2)
446 ("curl" ,curl)))
447 (native-inputs
448 `(("pkg-config" ,pkg-config)))
449 (arguments
450 `(#:make-flags '("CC=gcc")
451 #:phases
452 (modify-phases %standard-phases
453 (delete 'configure)
454 ;; The Makefile uses git to obtain versioning information. This phase
455 ;; substitutes the git invocation with the package version.
456 (add-after 'unpack 'remove-git-dependency
457 (lambda _
458 (substitute* "Makefile"
459 (("^gitrev :=.*$")
460 (string-append "gitrev = \"v" ,version "\"")))))
461 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
462 ;; This replacement does the same thing, except for using $PREFIX/bin
463 ;; instead.
464 (replace 'install
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let* ((out (assoc-ref outputs "out"))
467 (bin (string-append out "/bin")))
468 (install-file "sparql-query" bin)
469 (system* "ln" "--symbolic"
470 (string-append bin "/sparql-query")
471 (string-append bin "/sparql-update")))))
472 (replace 'check
473 (lambda* (#:key make-flags #:allow-other-keys)
474 (and
475 (zero? (apply system* "make" `(,@make-flags "scan-test")))
476 (zero? (system "./scan-test"))))))))
477 (home-page "https://github.com/tialaramex/sparql-query/")
478 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
479 (description "Sparql-query is a command-line tool for accessing SPARQL
480 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
481 tools for interrogating SQL databases. For example, you can enter a query over
482 several lines, using a semi-colon at the end of a line to indicate the end of
483 your query. It also supports readline so that you can more easily recall and
484 edit previous queries, even across sessions. It can be used non-interactively,
485 for example from a shell script.")
486 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
487 ;; others (like sparql-query.c) contain a GPLv2+ license header.
488 (license (list gpl3+))))
489
490 (define-public sqlite
491 (package
492 (name "sqlite")
493 (version "3.12.2")
494 (source (origin
495 (method url-fetch)
496 ;; TODO: Download from sqlite.org once this bug :
497 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
498 ;; has been fixed.
499 (uri (let ((numeric-version
500 (match (string-split version #\.)
501 ((first-digit other-digits ...)
502 (string-append first-digit
503 (string-pad-right
504 (string-concatenate
505 (map (cut string-pad <> 2 #\0)
506 other-digits))
507 6 #\0))))))
508 (list
509 (string-append
510 "https://fossies.org/linux/misc/sqlite-autoconf-"
511 numeric-version ".tar.gz")
512 (string-append
513 "http://distfiles.gentoo.org/distfiles/"
514 "/sqlite-autoconf-" numeric-version ".tar.gz"))
515
516 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
517 ;; below, returning 200 and showing an advertising page.
518 ;; (string-append
519 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
520 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
521 ))
522 (sha256
523 (base32
524 "1fwss0i2lixv39b27gkqiibdd2syym90wh3qbiaxnfgxk867f07x"))))
525 (build-system gnu-build-system)
526 (inputs `(("readline" ,readline)))
527 (arguments
528 `(#:configure-flags
529 ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to
530 ;; CFLAGS. GNU Icecat will refuse to use the system SQLite unless these
531 ;; options are enabled.
532 '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY")))
533 (home-page "http://www.sqlite.org/")
534 (synopsis "The SQLite database management system")
535 (description
536 "SQLite is a software library that implements a self-contained, serverless,
537 zero-configuration, transactional SQL database engine. SQLite is the most
538 widely deployed SQL database engine in the world. The source code for SQLite
539 is in the public domain.")
540 (license public-domain)))
541
542 (define-public tdb
543 (package
544 (name "tdb")
545 (version "1.3.11")
546 (source (origin
547 (method url-fetch)
548 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
549 version ".tar.gz"))
550 (sha256
551 (base32
552 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
553 (build-system gnu-build-system)
554 (arguments
555 '(#:phases
556 (modify-phases %standard-phases
557 (replace 'configure
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let ((out (assoc-ref outputs "out")))
560 ;; The 'configure' script is a wrapper for Waf and
561 ;; doesn't recognize things like '--enable-fast-install'.
562 (zero? (system* "./configure"
563 (string-append "--prefix=" out)))))))))
564 (native-inputs
565 `(;; TODO: Build the documentation.
566 ;; ("docbook-xsl" ,docbook-xsl)
567 ;; ("libxml2" ,libxml2)
568 ;; ("libxslt" ,libxslt)
569 ("python" ,python-2))) ;for the Waf build system
570 (home-page "https://tdb.samba.org/")
571 (synopsis "Trivial database")
572 (description
573 "TDB is a Trivial Database. In concept, it is very much like GDBM,
574 and BSD's DB except that it allows multiple simultaneous writers and uses
575 locking internally to keep writers from trampling on each other. TDB is also
576 extremely small.")
577 (license lgpl3+)))
578
579 (define-public perl-dbi
580 (package
581 (name "perl-dbi")
582 (version "1.636")
583 (source (origin
584 (method url-fetch)
585 (uri (string-append
586 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
587 version ".tar.gz"))
588 (sha256
589 (base32
590 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
591 (build-system perl-build-system)
592 (synopsis "Database independent interface for Perl")
593 (description "This package provides an database interface for Perl.")
594 (home-page "http://search.cpan.org/dist/DBI")
595 (license (package-license perl))))
596
597 (define-public perl-dbix-class
598 (package
599 (name "perl-dbix-class")
600 (version "0.082810")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
605 "DBIx-Class-" version ".tar.gz"))
606 (sha256
607 (base32
608 "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
609 (build-system perl-build-system)
610 (native-inputs
611 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
612 ("perl-file-temp" ,perl-file-temp)
613 ("perl-package-stash" ,perl-package-stash)
614 ("perl-test-deep" ,perl-test-deep)
615 ("perl-test-exception" ,perl-test-exception)
616 ("perl-test-warn" ,perl-test-warn)))
617 (propagated-inputs
618 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
619 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
620 ("perl-class-inspector" ,perl-class-inspector)
621 ("perl-config-any" ,perl-config-any)
622 ("perl-context-preserve" ,perl-context-preserve)
623 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
624 ("perl-data-page" ,perl-data-page)
625 ("perl-dbi" ,perl-dbi)
626 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
627 ("perl-hash-merge" ,perl-hash-merge)
628 ("perl-module-find" ,perl-module-find)
629 ("perl-moo" ,perl-moo)
630 ("perl-mro-compat" ,perl-mro-compat)
631 ("perl-namespace-clean" ,perl-namespace-clean)
632 ("perl-path-class" ,perl-path-class)
633 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
634 ("perl-scope-guard" ,perl-scope-guard)
635 ("perl-sql-abstract" ,perl-sql-abstract)
636 ("perl-sub-name" ,perl-sub-name)
637 ("perl-text-balanced" ,perl-text-balanced)
638 ("perl-try-tiny" ,perl-try-tiny)))
639 (home-page "http://search.cpan.org/dist/DBIx-Class")
640 (synopsis "Extensible and flexible object <-> relational mapper")
641 (description "An SQL to OO mapper with an object API inspired by
642 Class::DBI (with a compatibility layer as a springboard for porting) and a
643 resultset API that allows abstract encapsulation of database operations. It
644 aims to make representing queries in your code as perl-ish as possible while
645 still providing access to as many of the capabilities of the database as
646 possible, including retrieving related records from multiple tables in a
647 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
648 \"ORDER BY\" and \"HAVING\" support.")
649 (license (package-license perl))))
650
651 (define-public perl-dbix-class-cursor-cached
652 (package
653 (name "perl-dbix-class-cursor-cached")
654 (version "1.001002")
655 (source
656 (origin
657 (method url-fetch)
658 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
659 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
660 (sha256
661 (base32
662 "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
663 (build-system perl-build-system)
664 (native-inputs
665 `(("perl-cache-cache" ,perl-cache-cache)
666 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
667 (propagated-inputs
668 `(("perl-carp-clan" ,perl-carp-clan)
669 ("perl-dbix-class" ,perl-dbix-class)))
670 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
671 (synopsis "Cursor with built-in caching support")
672 (description "DBIx::Class::Cursor::Cached provides a cursor class with
673 built-in caching support.")
674 (license (package-license perl))))
675
676 (define-public perl-dbix-class-introspectablem2m
677 (package
678 (name "perl-dbix-class-introspectablem2m")
679 (version "0.001001")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
684 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
685 (sha256
686 (base32
687 "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
688 (build-system perl-build-system)
689 (propagated-inputs
690 `(("perl-dbix-class" ,perl-dbix-class)))
691 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
692 (synopsis "Introspect many-to-many relationships")
693 (description "Because the many-to-many relationships are not real
694 relationships, they can not be introspected with DBIx::Class. Many-to-many
695 relationships are actually just a collection of convenience methods installed
696 to bridge two relationships. This DBIx::Class component can be used to store
697 all relevant information about these non-relationships so they can later be
698 introspected and examined.")
699 (license (package-license perl))))
700
701 (define-public perl-dbix-class-schema-loader
702 (package
703 (name "perl-dbix-class-schema-loader")
704 (version "0.07042")
705 (source
706 (origin
707 (method url-fetch)
708 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
709 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
710 (sha256
711 (base32
712 "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
713 (build-system perl-build-system)
714 (native-inputs
715 `(("perl-config-any" ,perl-config-any)
716 ("perl-config-general" ,perl-config-general)
717 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
718 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
719 ("perl-moose" ,perl-moose)
720 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
721 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
722 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
723 ("perl-test-deep" ,perl-test-deep)
724 ("perl-test-differences" ,perl-test-differences)
725 ("perl-test-exception" ,perl-test-exception)
726 ("perl-test-pod" ,perl-test-pod)
727 ("perl-test-warn" ,perl-test-warn)))
728 (propagated-inputs
729 `(("perl-class-unload" ,perl-class-unload)
730 ("perl-class-inspector" ,perl-class-inspector)
731 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
732 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
733 ("perl-carp-clan" ,perl-carp-clan)
734 ("perl-data-dump" ,perl-data-dump)
735 ("perl-dbix-class" ,perl-dbix-class)
736 ("perl-hash-merge" ,perl-hash-merge)
737 ("perl-list-moreutils" ,perl-list-moreutils)
738 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
739 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
740 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
741 ("perl-namespace-clean" ,perl-namespace-clean)
742 ("perl-mro-compat" ,perl-mro-compat)
743 ("perl-scope-guard" ,perl-scope-guard)
744 ("perl-string-camelcase" ,perl-string-camelcase)
745 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
746 ("perl-sub-name" ,perl-sub-name)
747 ("perl-try-tiny" ,perl-try-tiny)))
748 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
749 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
750 (synopsis "Create a DBIx::Class::Schema based on a database")
751 (description "DBIx::Class::Schema::Loader automates the definition of a
752 DBIx::Class::Schema by scanning database table definitions and setting up the
753 columns, primary keys, unique constraints and relationships.")
754 (license (package-license perl))))
755
756 (define-public perl-dbd-pg
757 (package
758 (name "perl-dbd-pg")
759 (version "3.5.1")
760 (source
761 (origin
762 (method url-fetch)
763 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
764 "DBD-Pg-" version ".tar.gz"))
765 (sha256
766 (base32
767 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
768 (build-system perl-build-system)
769 (native-inputs
770 `(("perl-dbi" ,perl-dbi)))
771 (propagated-inputs
772 `(("perl-dbi" ,perl-dbi)
773 ("postgresql" ,postgresql)))
774 (home-page "http://search.cpan.org/dist/DBD-Pg")
775 (synopsis "DBI PostgreSQL interface")
776 (description "This package provides a PostgreSQL driver for the Perl5
777 @dfn{Database Interface} (DBI).")
778 (license (package-license perl))))
779
780 (define-public perl-dbd-mysql
781 (package
782 (name "perl-dbd-mysql")
783 (version "4.037")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
788 "DBD-mysql-" version ".tar.gz"))
789 (sha256
790 (base32
791 "1z1wxnzhxfr9awjqb1d8pz9hf50shbk9ip2jmsmgdlwfyb78lmyz"))))
792 (build-system perl-build-system)
793 ;; Tests require running MySQL server
794 (arguments `(#:tests? #f))
795 (propagated-inputs
796 `(("perl-dbi" ,perl-dbi)
797 ("mysql" ,mysql)))
798 (home-page "http://search.cpan.org/dist/DBD-mysql")
799 (synopsis "DBI MySQL interface")
800 (description "This package provides a MySQL driver for the Perl5
801 @dfn{Database Interface} (DBI).")
802 (license (package-license perl))))
803
804 (define-public perl-dbd-sqlite
805 (package
806 (name "perl-dbd-sqlite")
807 (version "1.42")
808 (source (origin
809 (method url-fetch)
810 (uri (string-append
811 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
812 version ".tar.gz"))
813 (sha256
814 (base32
815 "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
816 (build-system perl-build-system)
817 (inputs `(("sqlite" ,sqlite)))
818 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
819 (synopsis "SQlite interface for Perl")
820 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
821 the entire thing in the distribution. So in order to get a fast transaction
822 capable RDBMS working for your Perl project you simply have to install this
823 module, and nothing else.")
824 (license (package-license perl))
825 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
826
827 (define-public perl-sql-abstract
828 (package
829 (name "perl-sql-abstract")
830 (version "1.81")
831 (source
832 (origin
833 (method url-fetch)
834 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
835 "SQL-Abstract-" version ".tar.gz"))
836 (sha256
837 (base32
838 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
839 (build-system perl-build-system)
840 (native-inputs
841 `(("perl-test-deep" ,perl-test-deep)
842 ("perl-test-exception" ,perl-test-exception)
843 ("perl-test-warn" ,perl-test-warn)))
844 (propagated-inputs
845 `(("perl-hash-merge" ,perl-hash-merge)
846 ("perl-moo" ,perl-moo)
847 ("perl-mro-compat" ,perl-mro-compat)
848 ("perl-text-balanced" ,perl-text-balanced)))
849 (home-page "http://search.cpan.org/dist/SQL-Abstract")
850 (synopsis "Generate SQL from Perl data structures")
851 (description "This module was inspired by the excellent DBIx::Abstract.
852 While based on the concepts used by DBIx::Abstract, the concepts used have
853 been modified to make the SQL easier to generate from Perl data structures.
854 The underlying idea is for this module to do what you mean, based on the data
855 structures you provide it, so that you don't have to modify your code every
856 time your data changes.")
857 (license (package-license perl))))
858
859 (define-public perl-sql-splitstatement
860 (package
861 (name "perl-sql-splitstatement")
862 (version "1.00020")
863 (source
864 (origin
865 (method url-fetch)
866 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
867 "SQL-SplitStatement-" version ".tar.gz"))
868 (sha256
869 (base32
870 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
871 (build-system perl-build-system)
872 (native-inputs
873 `(("perl-test-exception" ,perl-test-exception)))
874 (propagated-inputs
875 `(("perl-class-accessor" ,perl-class-accessor)
876 ("perl-list-moreutils" ,perl-list-moreutils)
877 ("perl-regexp-common" ,perl-regexp-common)
878 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
879 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
880 (synopsis "Split SQL code into atomic statements")
881 (description "This module tries to split any SQL code, even including
882 non-standard extensions, into the atomic statements it is composed of.")
883 (license (package-license perl))))
884
885 (define-public perl-sql-tokenizer
886 (package
887 (name "perl-sql-tokenizer")
888 (version "0.24")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
893 "SQL-Tokenizer-" version ".tar.gz"))
894 (sha256
895 (base32
896 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
897 (build-system perl-build-system)
898 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
899 (synopsis "SQL tokenizer")
900 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
901 claim to be a parser or query verifier. It just creates sane tokens from a
902 valid SQL query.")
903 (license (package-license perl))))
904
905 (define-public unixodbc
906 (package
907 (name "unixodbc")
908 (version "2.3.4")
909 (source (origin
910 (method url-fetch)
911 (uri
912 (string-append
913 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
914 version ".tar.gz"))
915 (sha256
916 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
917 (build-system gnu-build-system)
918 (synopsis "Data source abstraction library")
919 (description "Unixodbc is a library providing an API with which to access
920 data sources. Data sources include SQL Servers and any software with an ODBC
921 Driver.")
922 (license lgpl2.1+)
923 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
924 (home-page "http://www.unixodbc.org")))
925
926 (define-public unqlite
927 (package
928 (name "unqlite")
929 (version "1.1.6")
930 (source (origin
931 (method url-fetch)
932 ;; Contains bug fixes against the official release, and has an
933 ;; autotooled build system.
934 (uri (string-append "https://github.com/aidin36/tocc/releases/"
935 "download/v1.0.0/"
936 "unqlite-unofficial-" version ".tar.gz"))
937 (sha256
938 (base32
939 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
940 (build-system gnu-build-system)
941 (arguments `(#:tests? #f)) ;No check target
942 (home-page "http://www.unqlite.org")
943 (synopsis "In-memory key/value and document store")
944 (description
945 "UnQLite is an in-process software library which implements a
946 self-contained, serverless, zero-configuration, transactional NoSQL
947 database engine. UnQLite is a document store database similar to
948 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
949 similar to BerkeleyDB, LevelDB, etc.")
950 (license bsd-2)))
951
952 (define-public redis
953 (package
954 (name "redis")
955 (version "3.2.4")
956 (source (origin
957 (method url-fetch)
958 (uri (string-append "http://download.redis.io/releases/redis-"
959 version".tar.gz"))
960 (sha256
961 (base32
962 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
963 (build-system gnu-build-system)
964 (arguments
965 '(#:tests? #f ; tests related to master/slave and replication fail
966 #:phases (modify-phases %standard-phases
967 (delete 'configure))
968 #:make-flags `("CC=gcc"
969 "MALLOC=libc"
970 "LDFLAGS=-ldl"
971 ,(string-append "PREFIX="
972 (assoc-ref %outputs "out")))))
973 (synopsis "Key-value cache and store")
974 (description "Redis is an advanced key-value cache and store. Redis
975 supports many data structures including strings, hashes, lists, sets, sorted
976 sets, bitmaps and hyperloglogs.")
977 (home-page "http://redis.io/")
978 (license bsd-3)))
979
980 (define-public kyotocabinet
981 (package
982 (name "kyotocabinet")
983 (version "1.2.76")
984 (source (origin
985 (method url-fetch)
986 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
987 name "-" version ".tar.gz"))
988 (sha256
989 (base32
990 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
991 (build-system gnu-build-system)
992 (arguments
993 `(#:configure-flags
994 (list
995 (string-append "LDFLAGS=-Wl,-rpath="
996 (assoc-ref %outputs "out") "/lib"))))
997 (inputs `(("zlib" ,zlib)))
998 (home-page "http://fallabs.com/kyotocabinet/")
999 (synopsis
1000 "Kyoto Cabinet is a modern implementation of the DBM database")
1001 (description
1002 "Kyoto Cabinet is a standalone file-based database that supports Hash
1003 and B+ Tree data storage models. It is a fast key-value lightweight
1004 database and supports many programming languages. It is a NoSQL database.")
1005 (license gpl3+)))
1006
1007 (define-public wiredtiger
1008 (package
1009 (name "wiredtiger")
1010 (version "2.8.0")
1011 (source (origin
1012 (method url-fetch)
1013 (uri (string-append
1014 "http://source.wiredtiger.com/releases/wiredtiger-"
1015 version ".tar.bz2"))
1016 (sha256
1017 (base32
1018 "1qh7y5paisdxq19jgg81ld7i32lz920n5k30hdpxnr8ll9c4hgjr"))))
1019 (build-system gnu-build-system)
1020 (arguments
1021 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1022 #:phases
1023 (modify-phases %standard-phases
1024 (add-before 'check 'disable-test/fops
1025 (lambda _
1026 ;; XXX: timed out after 3600 seconds of silence
1027 (substitute* "Makefile"
1028 (("test/fops") ""))
1029 #t)))))
1030 (inputs
1031 `(("lz4" ,lz4)
1032 ("zlib" ,zlib)))
1033 (home-page "http://source.wiredtiger.com/")
1034 (synopsis "NoSQL data engine")
1035 (description
1036 "WiredTiger is an extensible platform for data management. It supports
1037 row-oriented storage (where all columns of a row are stored together),
1038 column-oriented storage (where columns are stored in groups, allowing for
1039 more efficient access and storage of column subsets) and log-structured merge
1040 trees (LSM), for sustained throughput under random insert workloads.")
1041 (license gpl3) ; or GPL-2
1042 ;; configure.ac: WiredTiger requires a 64-bit build.
1043 (supported-systems '("x86_64-linux" "mips64el-linux"))))
1044
1045 (define-public perl-db-file
1046 (package
1047 (name "perl-db-file")
1048 (version "1.838")
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (string-append
1053 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1054 version
1055 ".tar.gz"))
1056 (sha256
1057 (base32
1058 "0yp5d5zr8dk9g6xdh7ygi5bq63q7nxvhd58dk2i3ki4nb7yv2yh9"))))
1059 (build-system perl-build-system)
1060 (inputs `(("bdb" ,bdb)))
1061 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1062 (arguments
1063 `(#:phases (modify-phases %standard-phases
1064 (add-before
1065 'configure 'modify-config.in
1066 (lambda* (#:key inputs #:allow-other-keys)
1067 (substitute* "config.in"
1068 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1069 #t)))))
1070 (home-page "http://search.cpan.org/dist/DB_File")
1071 (synopsis
1072 "Perl5 access to Berkeley DB version 1.x")
1073 (description
1074 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1075 (license (package-license perl))))
1076
1077 (define-public lmdb
1078 (package
1079 (name "lmdb")
1080 (version "0.9.18")
1081 (source (origin
1082 (method url-fetch)
1083 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1084 "LMDB_" version ".tar.gz"))
1085 (sha256
1086 (base32
1087 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1088 (build-system gnu-build-system)
1089 (arguments
1090 `(#:test-target "test"
1091 #:phases
1092 (modify-phases %standard-phases
1093 (replace 'configure
1094 (lambda* (#:key outputs #:allow-other-keys)
1095 (chdir (string-append
1096 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1097 (substitute* "Makefile"
1098 (("/usr/local") (assoc-ref outputs "out")))
1099 #t)))))
1100 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1101 (synopsis "Lightning memory-mapped database library")
1102 (description "Lightning memory-mapped database library.")
1103 (license license:openldap2.8)))
1104
1105 (define-public libpqxx
1106 (package
1107 (name "libpqxx")
1108 (version "4.0.1")
1109 (source (origin
1110 (method url-fetch)
1111 (uri (string-append
1112 "http://pqxx.org/download/software/libpqxx/"
1113 name "-" version ".tar.gz"))
1114 (sha256
1115 (base32
1116 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1117 (build-system gnu-build-system)
1118 (native-inputs
1119 `(("python" ,python-2)))
1120 (inputs `(("postgresql" ,postgresql)))
1121 (arguments
1122 `(#:tests? #f)) ; # FAIL: 1
1123 (synopsis "C++ connector for PostgreSQL")
1124 (description
1125 "Libpqxx is a C++ library to enable user programs to communicate with the
1126 PostgreSQL database back-end. The database back-end can be local or it may be
1127 on another machine, accessed via TCP/IP.")
1128 (home-page "http://pqxx.org/")
1129 (license license:bsd-3)))
1130
1131 (define-public python-peewee
1132 (package
1133 (name "python-peewee")
1134 (version "2.8.3")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "peewee" version))
1139 (sha256
1140 (base32
1141 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1142 (build-system python-build-system)
1143 (arguments
1144 `(#:tests? #f)) ; Fails to import test data
1145 (native-inputs
1146 `(("python-cython" ,python-cython)))
1147 (home-page "https://github.com/coleifer/peewee/")
1148 (synopsis "Small object-relational mapping utility")
1149 (description
1150 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1151 handles converting between pythonic values and those used by databases, so you
1152 can use Python types in your code without having to worry. It has built-in
1153 support for sqlite, mysql and postgresql. If you already have a database, you
1154 can autogenerate peewee models using @code{pwiz}, a model generator.")
1155 (license license:expat)))
1156
1157 (define-public python2-peewee
1158 (package-with-python2 python-peewee))
1159
1160 (define-public sqlcipher
1161 (package
1162 (name "sqlcipher")
1163 (version "3.3.1")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (string-append "https://github.com/sqlcipher/" name
1168 "/archive/v" version ".tar.gz"))
1169 (sha256
1170 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1171 (file-name (string-append name "-" version ".tar.gz"))))
1172 (build-system gnu-build-system)
1173 (inputs
1174 `(("libcrypto" ,openssl)
1175 ("libtcl8.6" ,tcl))) ; required for running the tests
1176 (native-inputs
1177 `(("tcl" ,tcl)))
1178 (arguments
1179 '(#:configure-flags
1180 '("--enable-tempstore=yes"
1181 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1182 "LDFLAGS=-lcrypto -ltcl8.6"
1183 "--disable-tcl")
1184 ;; tests cannot be run from the Makefile
1185 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1186 #:test-target "testfixture"
1187 #:phases
1188 (modify-phases %standard-phases
1189 (add-before 'check 'build-test-runner
1190 (assoc-ref %standard-phases 'check))
1191 (replace 'check
1192 (lambda _
1193 (zero?
1194 (system* "./testfixture" "test/crypto.test")))))))
1195 (home-page "https://www.zetetic.net/sqlcipher/")
1196 (synopsis
1197 "Library providing transparent encryption of SQLite database files")
1198 (description "SQLCipher is an implementation of SQLite, extended to
1199 provide transparent 256-bit AES encryption of database files. Pages are
1200 encrypted before being written to disk and are decrypted when read back. It’s
1201 well suited for protecting embedded application databases and for mobile
1202 development.")
1203 ;; The source files
1204 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1205 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1206 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1207 ;; source files are in the public domain.
1208 (license (list license:public-domain license:bsd-3))))