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, 2017 ng0 <contact.ng0@cryptolab.net>
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 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages databases)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages algebra)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages avahi)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages boost)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages cyrus-sasl)
48 #:use-module (gnu packages emacs)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages jemalloc)
53 #:use-module (gnu packages language)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages parallel)
57 #:use-module (gnu packages pcre)
58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages popt)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages rdf)
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages xml)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (guix packages)
69 #:use-module (guix download)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system perl)
72 #:use-module (guix build-system python)
73 #:use-module (guix build-system cmake)
74 #:use-module (guix utils)
75 #:use-module (srfi srfi-26)
76 #:use-module (ice-9 match))
84 (uri (string-append "https://github.com/garlik/4store/archive/v"
86 (file-name (string-append name "-" version ".tar.gz"))
88 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
89 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
90 (build-system gnu-build-system)
94 ("autoconf" ,autoconf)
95 ("automake" ,automake)
96 ("gettext" ,gettext-minimal)
98 ("pcre" ,pcre "bin") ;for 'pcre-config'
99 ("pkg-config" ,pkg-config)))
105 ("readline" ,readline)
107 ("cyrus-sasl" ,cyrus-sasl)
109 ("util-linux" ,util-linux)))
112 (modify-phases %standard-phases
113 (add-before 'configure 'generate-configure
115 (zero? (system* "./autogen.sh")))))))
116 ;; http://www.4store.org has been down for a while now.
117 (home-page "https://github.com/garlik/4store")
118 (synopsis "Clustered RDF storage and query engine")
119 (description "4store is a RDF/SPARQL store written in C, supporting
120 either single machines or networked clusters.")
121 (license license:gpl3+)))
129 (uri (string-append "mirror://gnu/gdbm/gdbm-"
133 "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
134 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
135 (build-system gnu-build-system)
136 (home-page "http://www.gnu.org/software/gdbm/")
138 "Hash library of database functions compatible with traditional dbm")
140 "GDBM is a library for manipulating hashed databases. It is used to
141 store key/value pairs in a file in a manner similar to the Unix dbm library
142 and provides interfaces to the traditional file format.")
143 (license license:gpl3+)))
151 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
155 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
156 (build-system gnu-build-system)
157 (outputs '("out" ; programs, libraries, headers
158 "doc")) ; 94 MiB of HTML docs
160 '(#:tests? #f ; no check target available
161 #:disallowed-references ("doc")
165 (lambda* (#:key outputs #:allow-other-keys)
166 (let ((out (assoc-ref outputs "out"))
167 (doc (assoc-ref outputs "doc")))
168 ;; '--docdir' is not honored, so we need to patch.
169 (substitute* "dist/Makefile.in"
170 (("docdir[[:blank:]]*=.*")
171 (string-append "docdir = " doc "/share/doc/bdb")))
174 (system* "./dist/configure"
175 (string-append "--prefix=" out)
176 (string-append "CONFIG_SHELL=" (which "bash"))
177 (string-append "SHELL=" (which "bash"))
179 ;; Remove 7 MiB of .a files.
182 ;; The compatibility mode is needed by some packages,
186 ;; The following flag is needed so that the inclusion
187 ;; of db_cxx.h into C++ files works; it leads to
188 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
191 (synopsis "Berkeley database")
193 "Berkeley DB is an embeddable database allowing developers the choice of
194 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
195 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
196 ;; files are covered by the 3-clause BSD license.
197 (license (list license:agpl3+ license:bsd-3))
199 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
201 (define-public bdb-5.3
202 (package (inherit bdb)
205 (license (license:non-copyleft "file://LICENSE"
206 "See LICENSE in the distribution."))
209 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
213 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
215 (define-public leveldb
221 (uri (string-append "https://github.com/google/leveldb"
222 "/archive/v" version ".tar.gz"))
223 (file-name (string-append name "-" version ".tar.gz"))
226 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
227 (build-system gnu-build-system)
229 '(#:make-flags (list "CC=gcc")
231 (modify-phases %standard-phases
234 ;; There is no install target, so we do it here.
235 (lambda* (#:key outputs #:allow-other-keys)
236 (let* ((out (assoc-ref outputs "out"))
237 (lib (string-append out "/lib"))
238 (include (string-append out "/include")))
239 (for-each (lambda (file)
240 (install-file file lib))
241 (find-files "out-shared" "^libleveldb\\.so.*$"))
242 (copy-recursively "include" include)
245 `(("snappy" ,snappy)))
246 (home-page "http://leveldb.org/")
247 (synopsis "Fast key-value storage library")
249 "LevelDB is a fast key-value storage library that provides an ordered
250 mapping from string keys to string values.")
251 (license license:bsd-3)))
259 (uri (list (string-append
260 "http://dev.mysql.com/get/Downloads/MySQL-"
261 (version-major+minor version) "/"
262 name "-" version ".tar.gz")
264 "http://downloads.mysql.com/archives/get/file/"
265 name "-" version ".tar.gz")))
268 "0lcn9cm36n14g22bcppq5vf4nxbrl3khvlsp9hsixqdfb3l27gyf"))))
269 (build-system cmake-build-system)
272 '("-DBUILD_CONFIG=mysql_release"
275 "-DDEFAULT_CHARSET=utf8"
276 "-DDEFAULT_COLLATION=utf8_general_ci"
277 "-DMYSQL_DATADIR=/var/lib/mysql"
278 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
279 "-DINSTALL_INFODIR=share/mysql/docs"
280 "-DINSTALL_MANDIR=share/man"
281 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
282 "-DINSTALL_SCRIPTDIR=bin"
283 "-DINSTALL_INCLUDEDIR=include/mysql"
284 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
285 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
286 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
287 "-DINSTALL_DOCDIR=share/mysql/docs"
288 "-DINSTALL_SHAREDIR=share/mysql"
289 ;; Get rid of test data.
290 "-DINSTALL_MYSQLTESTDIR="
291 "-DINSTALL_SQLBENCHDIR=")
292 #:phases (modify-phases %standard-phases
294 'unpack 'patch-boost-version
296 ;; Mysql wants boost-1.59.0 specifically
297 (substitute* "cmake/boost.cmake"
299 ,(match (string-split (package-version boost) #\.)
300 ((_ minor . _) minor))))))
302 'install 'remove-extra-binaries
303 (lambda* (#:key outputs #:allow-other-keys)
304 (let ((out (assoc-ref outputs "out")))
305 ;; Remove the 3 *_embedded files, which weigh in at
307 (for-each delete-file
308 (find-files (string-append out "/bin")
320 (home-page "http://www.mysql.com/")
321 (synopsis "Fast, easy to use, and popular database")
323 "MySQL is a fast, reliable, and easy to use relational database
324 management system that supports the standardized Structured Query
326 (license license:gpl2)))
328 (define-public mariadb
334 (uri (string-append "https://downloads.mariadb.org/f/"
335 name "-" version "/source/"
336 name "-" version ".tar.gz"))
339 "144lcm5awcf0k6a7saqfr4p2kg8r5wbdhdm4cmn2m8hyg1an70as"))))
340 (build-system cmake-build-system)
343 '("-DBUILD_CONFIG=mysql_release"
344 "-DDEFAULT_CHARSET=utf8"
345 "-DDEFAULT_COLLATION=utf8_general_ci"
346 "-DMYSQL_DATADIR=/var/lib/mysql"
347 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
348 "-DINSTALL_INFODIR=share/mysql/docs"
349 "-DINSTALL_MANDIR=share/man"
350 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
351 "-DINSTALL_SCRIPTDIR=bin"
352 "-DINSTALL_INCLUDEDIR=include/mysql"
353 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
354 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
355 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
356 "-DINSTALL_DOCDIR=share/mysql/docs"
357 "-DINSTALL_SHAREDIR=share/mysql")
359 (modify-phases %standard-phases
361 'configure 'pre-configure
363 (setenv "CONFIG_SHELL" (which "sh"))
366 'install 'post-install
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((out (assoc-ref outputs "out"))
369 (test (assoc-ref outputs "test")))
370 (substitute* (string-append out "/bin/mysql_install_db")
372 (string-append "basedir=\"" out "\"")))
373 ;; Remove unneeded files for testing.
374 (with-directory-excursion out
375 (for-each delete-file-recursively
376 '("data" "mysql-test" "sql-bench"
377 "share/man/man1/mysql-test-run.pl.1")))))))))
382 `(("jemalloc" ,jemalloc)
389 (home-page "https://mariadb.org/")
390 (synopsis "SQL database server")
392 "MariaDB is a multi-user and multi-threaded SQL database server, designed
393 as a drop-in replacement of MySQL.")
394 (license license:gpl2)))
396 (define-public postgresql
402 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
403 version "/postgresql-" version ".tar.bz2"))
406 "0bz1b9r249ffjfvldaiah2g78ccwq30ddh8hdvlq61z26inmz7mv"))))
407 (build-system gnu-build-system)
410 (modify-phases %standard-phases
411 (add-before 'configure 'patch-/bin/sh
413 ;; Refer to the actual shell.
414 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
415 "src/bin/psql/command.c")
416 (("/bin/sh") (which "sh")))
419 `(("readline" ,readline)
421 (home-page "https://www.postgresql.org/")
422 (synopsis "Powerful object-relational database system")
424 "PostgreSQL is a powerful object-relational database system. It is fully
425 ACID compliant, has full support for foreign keys, joins, views, triggers, and
426 stored procedures (in multiple languages). It includes most SQL:2008 data
427 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
428 TIMESTAMP. It also supports storage of binary large objects, including
429 pictures, sounds, or video.")
430 (license (license:x11-style "file://COPYRIGHT"))))
439 (uri (string-append "http://fallabs.com/" name "/"
440 name "-" version ".tar.gz"))
443 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
444 (build-system gnu-build-system)
446 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
447 (assoc-ref %outputs "out")
449 (home-page "http://fallabs.com/qdbm")
450 (synopsis "Key-value database")
451 (description "QDBM is a library of routines for managing a
452 database. The database is a simple data file containing key-value
453 pairs. Every key and value is serial bytes with variable length.
454 Binary data as well as character strings can be used as a key or a
455 value. There is no concept of data tables or data types. Records are
456 organized in a hash table or B+ tree.")
457 (license license:lgpl2.1+)))
459 (define-public recutils
465 (uri (string-append "mirror://gnu/recutils/recutils-"
469 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
470 (build-system gnu-build-system)
472 ;; Running tests in parallel leads to test failures and crashes in
474 (arguments '(#:parallel-tests? #f
476 (list (string-append "--with-bash-headers="
477 (assoc-ref %build-inputs "bash:include")
480 #:phases (modify-phases %standard-phases
481 (add-before 'build 'set-bash4.4-header-location
483 (substitute* "bash/Makefile.in"
484 ;; Adjust the header search path for Bash
485 ;; 4.4 in accordance with 'bash.pc'.
486 (("AM_CPPFLAGS = (.*)$" _ rest)
487 (string-append "AM_CPPFLAGS = "
488 "-I$(BASH_HEADERS)/include "
491 ;; Install to PREFIX/lib/bash to match Bash
492 ;; 4.4's search path.
494 "libdir = @libdir@/bash\n"))
497 (native-inputs `(("emacs" ,emacs-minimal)
499 ("bash:include" ,bash "include")
500 ("libuuid" ,util-linux)))
502 ;; TODO: Add more optional inputs.
503 (inputs `(("curl" ,curl)
504 ("libgcrypt" ,libgcrypt)
506 (synopsis "Manipulate plain text files as databases")
508 "GNU Recutils is a set of tools and libraries for creating and
509 manipulating text-based, human-editable databases. Despite being text-based,
510 databases created with Recutils carry all of the expected features such as
511 unique fields, primary keys, time stamps and more. Many different field
512 types are supported, as is encryption.")
513 (license license:gpl3+)
514 (home-page "http://www.gnu.org/software/recutils/")))
516 (define-public rocksdb
522 (uri (string-append "https://github.com/facebook/rocksdb"
523 "/archive/v" version ".tar.gz"))
524 (file-name (string-append name "-" version ".tar.gz"))
527 "0ddyj8lh5jk6vx675pdg4jhgs7c12ckw5j31rz85jlrds68ygrry"))
528 (modules '((guix build utils)))
531 ;; TODO: unbundle gtest.
532 (delete-file "build_tools/gnu_parallel")
534 (build-system gnu-build-system)
536 '(#:make-flags (list "CC=gcc"
537 ;; Make the resulting library position-independent so the
538 ;; static version can be included in shared objects.
539 "EXTRA_CXXFLAGS=-fPIC"
540 (string-append "INSTALL_PATH="
541 (assoc-ref %outputs "out")))
543 (modify-phases %standard-phases
544 (add-after 'unpack 'patch-Makefile
546 (substitute* "Makefile"
547 (("build_tools/gnu_parallel") "parallel")
548 (("#!/bin/sh") (string-append "#!" (which "sh"))))
551 (add-before 'check 'disable-failing-tests
553 (substitute* "Makefile"
554 ;; These tests reliably fail due to "Too many open files".
555 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
556 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
559 'check 'build-release-libraries
560 ;; The 'check' target depends on the default target which is compiled
561 ;; with debug symbols. The 'install' target depends on shared and
562 ;; static release targets so we build them here for clarity.
563 ;; TODO: Add debug output.
564 (lambda* (#:key (make-flags '()) #:allow-other-keys)
565 ;; Prevent the build from adding machine-specific optimizations.
566 ;; This does not work if passed as a make flag...
567 (setenv "PORTABLE" "1")
568 (and (zero? (apply system* "make" "static_lib" make-flags))
569 (zero? (apply system* "make" "shared_lib" make-flags)))))
570 (add-after 'install 'delete-static-library
571 (lambda* (#:key outputs #:allow-other-keys)
572 (let* ((out (assoc-ref outputs "out"))
573 (lib (string-append out "/lib")))
574 (for-each (lambda (file)
576 (find-files lib "\\.l?a$"))
579 `(("parallel" ,parallel)
587 ("jemalloc" ,jemalloc)
591 (home-page "http://rocksdb.org/")
592 (synopsis "Persistent key-value store for fast storage")
594 "RocksDB is a library that forms the core building block for a fast
595 key-value server, especially suited for storing data on flash drives. It
596 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
597 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
598 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
599 compactions, making it specially suitable for storing multiple terabytes of
600 data in a single database. RocksDB is partially based on @code{LevelDB}.")
601 ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0.
602 (license (list license:bsd-3 license:asl2.0))))
604 (define-public sparql-query
606 (name "sparql-query")
610 (uri (string-append "https://github.com/tialaramex/"
611 name "/archive/" version ".tar.gz"))
613 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
614 (file-name (string-append name "-" version ".tar.gz"))))
615 (build-system gnu-build-system)
617 `(("readline" ,readline)
623 `(("pkg-config" ,pkg-config)))
625 `(#:make-flags '("CC=gcc")
627 (modify-phases %standard-phases
629 ;; The Makefile uses git to obtain versioning information. This phase
630 ;; substitutes the git invocation with the package version.
631 (add-after 'unpack 'remove-git-dependency
633 (substitute* "Makefile"
635 (string-append "gitrev = \"v" ,version "\"")))))
636 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
637 ;; This replacement does the same thing, except for using $PREFIX/bin
640 (lambda* (#:key outputs #:allow-other-keys)
641 (let* ((out (assoc-ref outputs "out"))
642 (bin (string-append out "/bin")))
643 (install-file "sparql-query" bin)
644 (system* "ln" "--symbolic"
645 (string-append bin "/sparql-query")
646 (string-append bin "/sparql-update")))))
648 (lambda* (#:key make-flags #:allow-other-keys)
650 (zero? (apply system* "make" `(,@make-flags "scan-test")))
651 (zero? (system "./scan-test"))))))))
652 (home-page "https://github.com/tialaramex/sparql-query/")
653 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
654 (description "Sparql-query is a command-line tool for accessing SPARQL
655 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
656 tools for interrogating SQL databases. For example, you can enter a query over
657 several lines, using a semi-colon at the end of a line to indicate the end of
658 your query. It also supports readline so that you can more easily recall and
659 edit previous queries, even across sessions. It can be used non-interactively,
660 for example from a shell script.")
661 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
662 ;; others (like sparql-query.c) contain a GPLv2+ license header.
663 (license (list license:gpl3+))))
665 (define-public sqlite
671 ;; TODO: Download from sqlite.org once this bug :
672 ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
674 (uri (let ((numeric-version
675 (match (string-split version #\.)
676 ((first-digit other-digits ...)
677 (string-append first-digit
680 (map (cut string-pad <> 2 #\0)
685 "https://fossies.org/linux/misc/sqlite-autoconf-"
686 numeric-version ".tar.gz")
688 "http://distfiles.gentoo.org/distfiles/"
689 "/sqlite-autoconf-" numeric-version ".tar.gz"))
691 ;; XXX: As of 2015-09-08, SourceForge is squatting the URL
692 ;; below, returning 200 and showing an advertising page.
694 ;; "mirror://sourceforge/sqlite.mirror/SQLite%20" version
695 ;; "/sqlite-autoconf-" numeric-version ".tar.gz")
699 "19j73j44akqgc6m82wm98yvnmm3mfzmfqr8mp3n7n080d53q4wdw"))))
700 (build-system gnu-build-system)
701 (inputs `(("readline" ,readline)))
704 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
705 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
706 ;; to use the system SQLite unless these options are enabled.
707 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
708 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
709 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
710 (home-page "http://www.sqlite.org/")
711 (synopsis "The SQLite database management system")
713 "SQLite is a software library that implements a self-contained, serverless,
714 zero-configuration, transactional SQL database engine. SQLite is the most
715 widely deployed SQL database engine in the world. The source code for SQLite
716 is in the public domain.")
717 (license license:public-domain)))
719 (define-public sqlite-3.15.1
720 (package (inherit sqlite)
724 (uri (let ((numeric-version
725 (match (string-split version #\.)
726 ((first-digit other-digits ...)
727 (string-append first-digit
730 (map (cut string-pad <> 2 #\0)
733 (string-append "https://sqlite.org/2016/sqlite-autoconf-"
734 numeric-version ".tar.gz")))
737 "1ig2d9jzzixiifmgqsl6kjcvy17jwxby3s24gfnc5qvyd6vqkyjx"))))))
745 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
749 "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
750 (build-system gnu-build-system)
753 (modify-phases %standard-phases
755 (lambda* (#:key outputs #:allow-other-keys)
756 (let ((out (assoc-ref outputs "out")))
757 ;; The 'configure' script is a wrapper for Waf and
758 ;; doesn't recognize things like '--enable-fast-install'.
759 (zero? (system* "./configure"
760 (string-append "--prefix=" out)))))))))
762 `(;; TODO: Build the documentation.
763 ;; ("docbook-xsl" ,docbook-xsl)
764 ;; ("libxml2" ,libxml2)
765 ;; ("libxslt" ,libxslt)
766 ("python" ,python-2))) ;for the Waf build system
767 (home-page "https://tdb.samba.org/")
768 (synopsis "Trivial database")
770 "TDB is a Trivial Database. In concept, it is very much like GDBM,
771 and BSD's DB except that it allows multiple simultaneous writers and uses
772 locking internally to keep writers from trampling on each other. TDB is also
774 (license license:lgpl3+)))
776 (define-public perl-dbi
783 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
787 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
788 (build-system perl-build-system)
789 (synopsis "Database independent interface for Perl")
790 (description "This package provides an database interface for Perl.")
791 (home-page "http://search.cpan.org/dist/DBI")
792 (license (package-license perl))))
794 (define-public perl-dbix-class
796 (name "perl-dbix-class")
801 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
802 "DBIx-Class-" version ".tar.gz"))
805 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
806 (build-system perl-build-system)
808 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
809 ("perl-file-temp" ,perl-file-temp)
810 ("perl-package-stash" ,perl-package-stash)
811 ("perl-test-deep" ,perl-test-deep)
812 ("perl-test-exception" ,perl-test-exception)
813 ("perl-test-warn" ,perl-test-warn)))
815 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
816 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
817 ("perl-class-inspector" ,perl-class-inspector)
818 ("perl-config-any" ,perl-config-any)
819 ("perl-context-preserve" ,perl-context-preserve)
820 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
821 ("perl-data-page" ,perl-data-page)
822 ("perl-dbi" ,perl-dbi)
823 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
824 ("perl-hash-merge" ,perl-hash-merge)
825 ("perl-module-find" ,perl-module-find)
826 ("perl-moo" ,perl-moo)
827 ("perl-mro-compat" ,perl-mro-compat)
828 ("perl-namespace-clean" ,perl-namespace-clean)
829 ("perl-path-class" ,perl-path-class)
830 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
831 ("perl-scope-guard" ,perl-scope-guard)
832 ("perl-sql-abstract" ,perl-sql-abstract)
833 ("perl-sub-name" ,perl-sub-name)
834 ("perl-text-balanced" ,perl-text-balanced)
835 ("perl-try-tiny" ,perl-try-tiny)))
836 (home-page "http://search.cpan.org/dist/DBIx-Class")
837 (synopsis "Extensible and flexible object <-> relational mapper")
838 (description "An SQL to OO mapper with an object API inspired by
839 Class::DBI (with a compatibility layer as a springboard for porting) and a
840 resultset API that allows abstract encapsulation of database operations. It
841 aims to make representing queries in your code as perl-ish as possible while
842 still providing access to as many of the capabilities of the database as
843 possible, including retrieving related records from multiple tables in a
844 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
845 \"ORDER BY\" and \"HAVING\" support.")
846 (license (package-license perl))))
848 (define-public perl-dbix-class-cursor-cached
850 (name "perl-dbix-class-cursor-cached")
855 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
856 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
859 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
860 (build-system perl-build-system)
862 `(("perl-cache-cache" ,perl-cache-cache)
863 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
865 `(("perl-carp-clan" ,perl-carp-clan)
866 ("perl-dbix-class" ,perl-dbix-class)))
867 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
868 (synopsis "Cursor with built-in caching support")
869 (description "DBIx::Class::Cursor::Cached provides a cursor class with
870 built-in caching support.")
871 (license (package-license perl))))
873 (define-public perl-dbix-class-introspectablem2m
875 (name "perl-dbix-class-introspectablem2m")
880 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
881 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
884 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
885 (build-system perl-build-system)
887 `(("perl-dbix-class" ,perl-dbix-class)))
888 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
889 (synopsis "Introspect many-to-many relationships")
890 (description "Because the many-to-many relationships are not real
891 relationships, they can not be introspected with DBIx::Class. Many-to-many
892 relationships are actually just a collection of convenience methods installed
893 to bridge two relationships. This DBIx::Class component can be used to store
894 all relevant information about these non-relationships so they can later be
895 introspected and examined.")
896 (license (package-license perl))))
898 (define-public perl-dbix-class-schema-loader
900 (name "perl-dbix-class-schema-loader")
905 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
906 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
909 "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3"))))
910 (build-system perl-build-system)
912 `(("perl-config-any" ,perl-config-any)
913 ("perl-config-general" ,perl-config-general)
914 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
915 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
916 ("perl-moose" ,perl-moose)
917 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
918 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
919 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
920 ("perl-test-deep" ,perl-test-deep)
921 ("perl-test-differences" ,perl-test-differences)
922 ("perl-test-exception" ,perl-test-exception)
923 ("perl-test-pod" ,perl-test-pod)
924 ("perl-test-warn" ,perl-test-warn)))
926 `(("perl-class-unload" ,perl-class-unload)
927 ("perl-class-inspector" ,perl-class-inspector)
928 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
929 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
930 ("perl-carp-clan" ,perl-carp-clan)
931 ("perl-data-dump" ,perl-data-dump)
932 ("perl-dbix-class" ,perl-dbix-class)
933 ("perl-hash-merge" ,perl-hash-merge)
934 ("perl-list-moreutils" ,perl-list-moreutils)
935 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
936 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
937 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
938 ("perl-namespace-clean" ,perl-namespace-clean)
939 ("perl-mro-compat" ,perl-mro-compat)
940 ("perl-scope-guard" ,perl-scope-guard)
941 ("perl-string-camelcase" ,perl-string-camelcase)
942 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
943 ("perl-sub-name" ,perl-sub-name)
944 ("perl-try-tiny" ,perl-try-tiny)))
945 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
946 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
947 (synopsis "Create a DBIx::Class::Schema based on a database")
948 (description "DBIx::Class::Schema::Loader automates the definition of a
949 DBIx::Class::Schema by scanning database table definitions and setting up the
950 columns, primary keys, unique constraints and relationships.")
951 (license (package-license perl))))
953 (define-public perl-dbd-pg
960 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
961 "DBD-Pg-" version ".tar.gz"))
964 "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx"))))
965 (build-system perl-build-system)
967 `(("perl-dbi" ,perl-dbi)))
969 `(("perl-dbi" ,perl-dbi)
970 ("postgresql" ,postgresql)))
971 (home-page "http://search.cpan.org/dist/DBD-Pg")
972 (synopsis "DBI PostgreSQL interface")
973 (description "This package provides a PostgreSQL driver for the Perl5
974 @dfn{Database Interface} (DBI).")
975 (license (package-license perl))))
977 (define-public perl-dbd-mysql
979 (name "perl-dbd-mysql")
984 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
985 "DBD-mysql-" version ".tar.gz"))
988 "0h4h6zwzj8fwh9ljb8svnsa0a3ch4p10hp59kpdibdb4qh8xwxs7"))))
989 (build-system perl-build-system)
990 ;; Tests require running MySQL server
991 (arguments `(#:tests? #f))
993 `(("perl-dbi" ,perl-dbi)
995 (home-page "http://search.cpan.org/dist/DBD-mysql")
996 (synopsis "DBI MySQL interface")
997 (description "This package provides a MySQL driver for the Perl5
998 @dfn{Database Interface} (DBI).")
999 (license (package-license perl))))
1001 (define-public perl-dbd-sqlite
1003 (name "perl-dbd-sqlite")
1008 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1012 "0kimb2qr1rh07yylbbfybwcizpmy61ck667amypn4clmkfg0knm6"))))
1013 (build-system perl-build-system)
1014 (inputs `(("sqlite" ,sqlite)))
1015 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1016 (synopsis "SQlite interface for Perl")
1017 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1018 the entire thing in the distribution. So in order to get a fast transaction
1019 capable RDBMS working for your Perl project you simply have to install this
1020 module, and nothing else.")
1021 (license (package-license perl))
1022 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
1024 (define-public perl-sql-abstract
1026 (name "perl-sql-abstract")
1031 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1032 "SQL-Abstract-" version ".tar.gz"))
1035 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
1036 (build-system perl-build-system)
1038 `(("perl-test-deep" ,perl-test-deep)
1039 ("perl-test-exception" ,perl-test-exception)
1040 ("perl-test-warn" ,perl-test-warn)))
1042 `(("perl-hash-merge" ,perl-hash-merge)
1043 ("perl-moo" ,perl-moo)
1044 ("perl-mro-compat" ,perl-mro-compat)
1045 ("perl-text-balanced" ,perl-text-balanced)))
1046 (home-page "http://search.cpan.org/dist/SQL-Abstract")
1047 (synopsis "Generate SQL from Perl data structures")
1048 (description "This module was inspired by the excellent DBIx::Abstract.
1049 While based on the concepts used by DBIx::Abstract, the concepts used have
1050 been modified to make the SQL easier to generate from Perl data structures.
1051 The underlying idea is for this module to do what you mean, based on the data
1052 structures you provide it, so that you don't have to modify your code every
1053 time your data changes.")
1054 (license (package-license perl))))
1056 (define-public perl-sql-splitstatement
1058 (name "perl-sql-splitstatement")
1063 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1064 "SQL-SplitStatement-" version ".tar.gz"))
1067 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1068 (build-system perl-build-system)
1070 `(("perl-test-exception" ,perl-test-exception)))
1072 `(("perl-class-accessor" ,perl-class-accessor)
1073 ("perl-list-moreutils" ,perl-list-moreutils)
1074 ("perl-regexp-common" ,perl-regexp-common)
1075 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1076 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
1077 (synopsis "Split SQL code into atomic statements")
1078 (description "This module tries to split any SQL code, even including
1079 non-standard extensions, into the atomic statements it is composed of.")
1080 (license (package-license perl))))
1082 (define-public perl-sql-tokenizer
1084 (name "perl-sql-tokenizer")
1089 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1090 "SQL-Tokenizer-" version ".tar.gz"))
1093 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1094 (build-system perl-build-system)
1095 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
1096 (synopsis "SQL tokenizer")
1097 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1098 claim to be a parser or query verifier. It just creates sane tokens from a
1100 (license (package-license perl))))
1102 (define-public unixodbc
1110 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1113 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
1114 (build-system gnu-build-system)
1115 (synopsis "Data source abstraction library")
1116 (description "Unixodbc is a library providing an API with which to access
1117 data sources. Data sources include SQL Servers and any software with an ODBC
1119 (license license:lgpl2.1+)
1120 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1121 (home-page "http://www.unixodbc.org")))
1123 (define-public unqlite
1129 ;; Contains bug fixes against the official release, and has an
1130 ;; autotooled build system.
1131 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1133 "unqlite-unofficial-" version ".tar.gz"))
1136 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1137 (build-system gnu-build-system)
1138 (arguments `(#:tests? #f)) ;No check target
1139 (home-page "http://www.unqlite.org")
1140 (synopsis "In-memory key/value and document store")
1142 "UnQLite is an in-process software library which implements a
1143 self-contained, serverless, zero-configuration, transactional NoSQL
1144 database engine. UnQLite is a document store database similar to
1145 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1146 similar to BerkeleyDB, LevelDB, etc.")
1147 (license license:bsd-2)))
1149 (define-public redis
1155 (uri (string-append "http://download.redis.io/releases/redis-"
1159 "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
1160 (build-system gnu-build-system)
1162 '(#:tests? #f ; tests related to master/slave and replication fail
1163 #:phases (modify-phases %standard-phases
1164 (delete 'configure))
1165 #:make-flags `("CC=gcc"
1168 ,(string-append "PREFIX="
1169 (assoc-ref %outputs "out")))))
1170 (synopsis "Key-value cache and store")
1171 (description "Redis is an advanced key-value cache and store. Redis
1172 supports many data structures including strings, hashes, lists, sets, sorted
1173 sets, bitmaps and hyperloglogs.")
1174 (home-page "http://redis.io/")
1175 (license license:bsd-3)))
1177 (define-public kyotocabinet
1179 (name "kyotocabinet")
1183 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1184 name "-" version ".tar.gz"))
1187 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1188 (build-system gnu-build-system)
1192 (string-append "LDFLAGS=-Wl,-rpath="
1193 (assoc-ref %outputs "out") "/lib"))))
1194 (inputs `(("zlib" ,zlib)))
1195 (home-page "http://fallabs.com/kyotocabinet/")
1197 "Kyoto Cabinet is a modern implementation of the DBM database")
1199 "Kyoto Cabinet is a standalone file-based database that supports Hash
1200 and B+ Tree data storage models. It is a fast key-value lightweight
1201 database and supports many programming languages. It is a NoSQL database.")
1202 (license license:gpl3+)))
1204 (define-public tokyocabinet
1206 (name "tokyocabinet")
1211 (uri (string-append "http://fallabs.com/tokyocabinet/"
1212 name "-" version ".tar.gz"))
1215 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1216 (build-system gnu-build-system)
1219 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1220 (string-append "LDFLAGS=-Wl,-rpath="
1221 (assoc-ref %outputs "out") "/lib"))))
1224 (home-page "http://fallabs.com/tokyocabinet/")
1225 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1227 "Tokyo Cabinet is a library of routines for managing a database.
1228 The database is a simple data file containing records, each is a pair of a
1229 key and a value. Every key and value is serial bytes with variable length.
1230 Both binary data and character string can be used as a key and a value.
1231 There is neither concept of data tables nor data types. Records are
1232 organized in hash table, B+ tree, or fixed-length array.")
1233 (license license:lgpl2.1+)))
1235 (define-public wiredtiger
1242 "http://source.wiredtiger.com/releases/wiredtiger-"
1243 version ".tar.bz2"))
1246 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1247 (build-system gnu-build-system)
1249 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1251 (modify-phases %standard-phases
1252 (add-before 'check 'disable-test/fops
1254 ;; XXX: timed out after 3600 seconds of silence
1255 (substitute* "Makefile"
1261 (home-page "http://source.wiredtiger.com/")
1262 (synopsis "NoSQL data engine")
1264 "WiredTiger is an extensible platform for data management. It supports
1265 row-oriented storage (where all columns of a row are stored together),
1266 column-oriented storage (where columns are stored in groups, allowing for
1267 more efficient access and storage of column subsets) and log-structured merge
1268 trees (LSM), for sustained throughput under random insert workloads.")
1269 (license license:gpl3) ; or GPL-2
1270 ;; configure.ac: WiredTiger requires a 64-bit build.
1271 (supported-systems '("x86_64-linux" "mips64el-linux"))))
1273 (define-public perl-db-file
1275 (name "perl-db-file")
1281 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1286 "0yp5d5zr8dk9g6xdh7ygi5bq63q7nxvhd58dk2i3ki4nb7yv2yh9"))))
1287 (build-system perl-build-system)
1288 (inputs `(("bdb" ,bdb)))
1289 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1291 `(#:phases (modify-phases %standard-phases
1293 'configure 'modify-config.in
1294 (lambda* (#:key inputs #:allow-other-keys)
1295 (substitute* "config.in"
1296 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1298 (home-page "http://search.cpan.org/dist/DB_File")
1300 "Perl5 access to Berkeley DB version 1.x")
1302 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1303 (license (package-license perl))))
1311 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1312 "LMDB_" version ".tar.gz"))
1315 "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
1316 (build-system gnu-build-system)
1318 `(#:test-target "test"
1320 (modify-phases %standard-phases
1322 (lambda* (#:key outputs #:allow-other-keys)
1323 (chdir (string-append
1324 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1325 (substitute* "Makefile"
1326 (("/usr/local") (assoc-ref outputs "out")))
1328 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1329 (synopsis "Lightning memory-mapped database library")
1330 (description "Lightning memory-mapped database library.")
1331 (license license:openldap2.8)))
1333 (define-public libpqxx
1340 "http://pqxx.org/download/software/libpqxx/"
1341 name "-" version ".tar.gz"))
1344 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1345 (build-system gnu-build-system)
1347 `(("python" ,python-2)))
1348 (inputs `(("postgresql" ,postgresql)))
1350 `(#:tests? #f)) ; # FAIL: 1
1351 (synopsis "C++ connector for PostgreSQL")
1353 "Libpqxx is a C++ library to enable user programs to communicate with the
1354 PostgreSQL database back-end. The database back-end can be local or it may be
1355 on another machine, accessed via TCP/IP.")
1356 (home-page "http://pqxx.org/")
1357 (license license:bsd-3)))
1359 (define-public python-peewee
1361 (name "python-peewee")
1366 (uri (pypi-uri "peewee" version))
1369 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1370 (build-system python-build-system)
1372 `(#:tests? #f)) ; Fails to import test data
1374 `(("python-cython" ,python-cython)))
1375 (home-page "https://github.com/coleifer/peewee/")
1376 (synopsis "Small object-relational mapping utility")
1378 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1379 handles converting between pythonic values and those used by databases, so you
1380 can use Python types in your code without having to worry. It has built-in
1381 support for sqlite, mysql and postgresql. If you already have a database, you
1382 can autogenerate peewee models using @code{pwiz}, a model generator.")
1383 (license license:expat)))
1385 (define-public python2-peewee
1386 (package-with-python2 python-peewee))
1388 (define-public sqlcipher
1395 (uri (string-append "https://github.com/sqlcipher/" name
1396 "/archive/v" version ".tar.gz"))
1398 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1399 (file-name (string-append name "-" version ".tar.gz"))))
1400 (build-system gnu-build-system)
1402 `(("libcrypto" ,openssl)
1403 ("libtcl8.6" ,tcl))) ; required for running the tests
1408 '("--enable-tempstore=yes"
1409 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1410 "LDFLAGS=-lcrypto -ltcl8.6"
1412 ;; tests cannot be run from the Makefile
1413 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1414 #:test-target "testfixture"
1416 (modify-phases %standard-phases
1417 (add-before 'check 'build-test-runner
1418 (assoc-ref %standard-phases 'check))
1422 (system* "./testfixture" "test/crypto.test")))))))
1423 (home-page "https://www.zetetic.net/sqlcipher/")
1425 "Library providing transparent encryption of SQLite database files")
1426 (description "SQLCipher is an implementation of SQLite, extended to
1427 provide transparent 256-bit AES encryption of database files. Pages are
1428 encrypted before being written to disk and are decrypted when read back. It’s
1429 well suited for protecting embedded application databases and for mobile
1432 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1433 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1434 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1435 ;; source files are in the public domain.
1436 (license (list license:public-domain license:bsd-3))))
1438 (define-public python-pyodbc-c
1440 (name "python-pyodbc-c")
1445 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1446 "archive.tar.gz?ref=v" version))
1449 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1450 (file-name (string-append name "-" version ".tar.gz"))))
1451 (build-system python-build-system)
1453 `(("unixodbc" ,unixodbc)))
1455 `(;; No unit tests exist.
1457 (home-page "https://github.com/mkleehammer/pyodbc")
1458 (synopsis "Python ODBC Library")
1459 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1461 (license (license:x11-style "file://LICENSE.TXT"))))
1463 (define-public python2-pyodbc-c
1464 (package-with-python2 python-pyodbc-c))