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, 2016 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016, 2017 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>
18 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
19 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
20 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
21 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages databases)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages avahi)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages crypto)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages cyrus-sasl)
52 #:use-module (gnu packages emacs)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages time)
57 #:use-module (gnu packages jemalloc)
58 #:use-module (gnu packages language)
59 #:use-module (gnu packages libevent)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages man)
62 #:use-module (gnu packages ncurses)
63 #:use-module (gnu packages parallel)
64 #:use-module (gnu packages pcre)
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages rdf)
70 #:use-module (gnu packages readline)
71 #:use-module (gnu packages tcl)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages xml)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix packages)
76 #:use-module (guix download)
77 #:use-module (guix build-system gnu)
78 #:use-module (guix build-system perl)
79 #:use-module (guix build-system python)
80 #:use-module (guix build-system cmake)
81 #:use-module (guix utils)
82 #:use-module (srfi srfi-26)
83 #:use-module (ice-9 match))
91 (uri (string-append "https://github.com/garlik/4store/archive/v"
93 (file-name (string-append name "-" version ".tar.gz"))
95 (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50"))
96 (patches (list (search-patch "4store-fix-buildsystem.patch")))))
97 (build-system gnu-build-system)
101 ("autoconf" ,autoconf)
102 ("automake" ,automake)
103 ("gettext" ,gettext-minimal)
105 ("pcre" ,pcre "bin") ;for 'pcre-config'
106 ("pkg-config" ,pkg-config)))
112 ("readline" ,readline)
114 ("cyrus-sasl" ,cyrus-sasl)
116 ("util-linux" ,util-linux)))
119 (modify-phases %standard-phases
120 (add-after 'unpack 'generate-configure
122 (zero? (system* "sh" "autogen.sh")))))))
123 ;; http://www.4store.org has been down for a while now.
124 (home-page "https://github.com/garlik/4store")
125 (synopsis "Clustered RDF storage and query engine")
126 (description "4store is a RDF/SPARQL store written in C, supporting
127 either single machines or networked clusters.")
128 (license license:gpl3+)))
136 (uri (string-append "mirror://gnu/gdbm/gdbm-"
140 "0lx201q20dvc70f8a3c9s7s18z15inlxvbffph97ngvrgnyjq9cx"))))
141 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
142 (build-system gnu-build-system)
143 (home-page "http://www.gnu.org.ua/software/gdbm")
145 "Hash library of database functions compatible with traditional dbm")
147 "GDBM is a library for manipulating hashed databases. It is used to
148 store key/value pairs in a file in a manner similar to the Unix dbm library
149 and provides interfaces to the traditional file format.")
150 (license license:gpl3+)))
158 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
162 "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
163 (build-system gnu-build-system)
164 (outputs '("out" ; programs, libraries, headers
165 "doc")) ; 94 MiB of HTML docs
167 '(#:tests? #f ; no check target available
168 #:disallowed-references ("doc")
170 (modify-phases %standard-phases
172 (lambda* (#:key outputs #:allow-other-keys)
173 (let ((out (assoc-ref outputs "out"))
174 (doc (assoc-ref outputs "doc")))
175 ;; '--docdir' is not honored, so we need to patch.
176 (substitute* "dist/Makefile.in"
177 (("docdir[[:blank:]]*=.*")
178 (string-append "docdir = " doc "/share/doc/bdb")))
181 (system* "./dist/configure"
182 (string-append "--prefix=" out)
183 (string-append "CONFIG_SHELL=" (which "bash"))
184 (string-append "SHELL=" (which "bash"))
186 ;; Remove 7 MiB of .a files.
189 ;; The compatibility mode is needed by some packages,
193 ;; The following flag is needed so that the inclusion
194 ;; of db_cxx.h into C++ files works; it leads to
195 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
196 "--enable-cxx"))))))))
197 (synopsis "Berkeley database")
199 "Berkeley DB is an embeddable database allowing developers the choice of
200 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
201 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
202 ;; files are covered by the 3-clause BSD license.
203 (license (list license:agpl3+ license:bsd-3))
205 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
207 (define-public bdb-5.3
208 (package (inherit bdb)
211 (license (license:non-copyleft "file://LICENSE"
212 "See LICENSE in the distribution."))
215 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
219 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
221 `(#:tests? #f ; no check target available
222 #:disallowed-references ("doc")
224 (modify-phases %standard-phases
226 (lambda* (#:key outputs #:allow-other-keys)
227 (let ((out (assoc-ref outputs "out"))
228 (doc (assoc-ref outputs "doc")))
229 ;; '--docdir' is not honored, so we need to patch.
230 (substitute* "dist/Makefile.in"
231 (("docdir[[:blank:]]*=.*")
232 (string-append "docdir = " doc "/share/doc/bdb")))
235 (system* "./dist/configure"
236 (string-append "--prefix=" out)
237 (string-append "CONFIG_SHELL=" (which "bash"))
238 (string-append "SHELL=" (which "bash"))
240 ;; Bdb doesn't recognize aarch64 as an architecture.
241 ,@(if (string=? "aarch64-linux" (%current-system))
242 '("--build=aarch64-unknown-linux-gnu")
245 ;; Remove 7 MiB of .a files.
248 ;; The compatibility mode is needed by some packages,
252 ;; The following flag is needed so that the inclusion
253 ;; of db_cxx.h into C++ files works; it leads to
254 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
255 "--enable-cxx"))))))))))
257 (define-public leveldb
263 (uri (string-append "https://github.com/google/leveldb"
264 "/archive/v" version ".tar.gz"))
265 (file-name (string-append name "-" version ".tar.gz"))
268 "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm"))))
269 (build-system gnu-build-system)
271 '(#:make-flags (list "CC=gcc")
273 (modify-phases %standard-phases
276 ;; There is no install target, so we do it here.
277 (lambda* (#:key outputs #:allow-other-keys)
278 (let* ((out (assoc-ref outputs "out"))
279 (lib (string-append out "/lib"))
280 (include (string-append out "/include")))
281 (for-each (lambda (file)
282 (install-file file lib))
283 (find-files "out-shared" "^libleveldb\\.so.*$"))
284 (copy-recursively "include" include)
287 `(("snappy" ,snappy)))
288 (home-page "http://leveldb.org/")
289 (synopsis "Fast key-value storage library")
291 "LevelDB is a fast key-value storage library that provides an ordered
292 mapping from string keys to string values.")
293 (license license:bsd-3)))
295 (define-public memcached
303 "https://memcached.org/files/memcached-" version ".tar.gz"))
305 (base32 "0chwc0g7wfvcad36z8pf2jbgygdnm9nm1l6pwjsn3d2b089gh0f0"))))
306 (build-system gnu-build-system)
308 `(("libevent" ,libevent)
309 ("cyrus-sasl" ,cyrus-sasl)))
310 (home-page "https://memcached.org/")
311 (synopsis "In memory caching service")
312 (description "Memcached is a in memory key value store. It has a small
313 and generic API, and was originally intended for use with dynamic web
315 (license license:bsd-3)))
323 (uri (list (string-append
324 "http://dev.mysql.com/get/Downloads/MySQL-"
325 (version-major+minor version) "/"
326 name "-" version ".tar.gz")
328 "http://downloads.mysql.com/archives/get/file/"
329 name "-" version ".tar.gz")))
332 "1c8y54yk756179nx4dgg79dijmjdq5n8l057cnqsg70pjdpyfl9y"))))
333 (build-system cmake-build-system)
336 '("-DBUILD_CONFIG=mysql_release"
339 "-DDEFAULT_CHARSET=utf8"
340 "-DDEFAULT_COLLATION=utf8_general_ci"
341 "-DMYSQL_DATADIR=/var/lib/mysql"
342 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
343 "-DINSTALL_INFODIR=share/mysql/docs"
344 "-DINSTALL_MANDIR=share/man"
345 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
346 "-DINSTALL_SCRIPTDIR=bin"
347 "-DINSTALL_INCLUDEDIR=include/mysql"
348 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
349 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
350 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
351 "-DINSTALL_DOCDIR=share/mysql/docs"
352 "-DINSTALL_SHAREDIR=share/mysql"
353 ;; Get rid of test data.
354 "-DINSTALL_MYSQLTESTDIR="
355 "-DINSTALL_SQLBENCHDIR=")
356 #:phases (modify-phases %standard-phases
358 'unpack 'patch-boost-version
360 ;; Mysql wants boost-1.59.0 specifically
361 (substitute* "cmake/boost.cmake"
363 ,(match (string-split (package-version boost) #\.)
364 ((_ minor . _) minor))))))
366 'install 'remove-extra-binaries
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let ((out (assoc-ref outputs "out")))
369 ;; Remove the 3 *_embedded files, which weigh in at
371 (for-each delete-file
372 (find-files (string-append out "/bin")
384 (home-page "http://www.mysql.com/")
385 (synopsis "Fast, easy to use, and popular database")
387 "MySQL is a fast, reliable, and easy to use relational database
388 management system that supports the standardized Structured Query
390 (license license:gpl2)))
392 (define-public mariadb
398 (uri (string-append "https://downloads.mariadb.org/f/"
399 name "-" version "/source/"
400 name "-" version ".tar.gz"))
403 "0ggpdcal0if9y6h9hp1yv2q65cbkjfl4p8rqk68a5pk7k75v325s"))))
404 (build-system cmake-build-system)
407 '("-DBUILD_CONFIG=mysql_release"
408 ;; Linking with libarchive fails, like this:
410 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
411 ;; relocation R_X86_64_32 against `.bss' can not be used when
412 ;; making a shared object; recompile with -fPIC
414 ;; For now, disable the features that that use libarchive (xtrabackup).
415 "-DWITH_LIBARCHIVE=OFF"
417 "-DDEFAULT_CHARSET=utf8"
418 "-DDEFAULT_COLLATION=utf8_general_ci"
419 "-DMYSQL_DATADIR=/var/lib/mysql"
420 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
421 "-DINSTALL_INFODIR=share/mysql/docs"
422 "-DINSTALL_MANDIR=share/man"
423 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
424 "-DINSTALL_SCRIPTDIR=bin"
425 "-DINSTALL_INCLUDEDIR=include/mysql"
426 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
427 "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
428 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
429 "-DINSTALL_DOCDIR=share/mysql/docs"
430 "-DINSTALL_SHAREDIR=share/mysql")
432 (modify-phases %standard-phases
434 'configure 'pre-configure
436 (setenv "CONFIG_SHELL" (which "sh"))
439 'install 'post-install
440 (lambda* (#:key outputs #:allow-other-keys)
441 (let* ((out (assoc-ref outputs "out"))
442 (test (assoc-ref outputs "test")))
443 (substitute* (string-append out "/bin/mysql_install_db")
445 (string-append "basedir=\"" out "\"")))
446 ;; Remove unneeded files for testing.
447 (with-directory-excursion out
448 (for-each delete-file-recursively
449 '("data" "mysql-test" "sql-bench"
450 "share/man/man1/mysql-test-run.pl.1")))))))))
455 `(("jemalloc" ,jemalloc)
462 (home-page "https://mariadb.org/")
463 (synopsis "SQL database server")
465 "MariaDB is a multi-user and multi-threaded SQL database server, designed
466 as a drop-in replacement of MySQL.")
467 (license license:gpl2)))
469 (define-public postgresql
475 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
476 version "/postgresql-" version ".tar.bz2"))
479 "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6"))))
480 (build-system gnu-build-system)
482 `(#:configure-flags '("--with-uuid=e2fs")
484 (modify-phases %standard-phases
485 (add-before 'configure 'patch-/bin/sh
487 ;; Refer to the actual shell.
488 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
489 "src/bin/psql/command.c")
490 (("/bin/sh") (which "sh")))
492 (add-after 'build 'build-contrib
494 (zero? (system* "make" "-C" "contrib"))))
495 (add-after 'install 'install-contrib
497 (zero? (system* "make" "-C" "contrib" "install")))))))
499 `(("readline" ,readline)
500 ("libuuid" ,util-linux)
502 (home-page "https://www.postgresql.org/")
503 (synopsis "Powerful object-relational database system")
505 "PostgreSQL is a powerful object-relational database system. It is fully
506 ACID compliant, has full support for foreign keys, joins, views, triggers, and
507 stored procedures (in multiple languages). It includes most SQL:2008 data
508 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
509 TIMESTAMP. It also supports storage of binary large objects, including
510 pictures, sounds, or video.")
511 (license (license:x11-style "file://COPYRIGHT"))))
520 (uri (string-append "http://fallabs.com/" name "/"
521 name "-" version ".tar.gz"))
524 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
525 (build-system gnu-build-system)
527 `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
528 (assoc-ref %outputs "out")
530 (home-page "http://fallabs.com/qdbm")
531 (synopsis "Key-value database")
532 (description "QDBM is a library of routines for managing a
533 database. The database is a simple data file containing key-value
534 pairs. Every key and value is serial bytes with variable length.
535 Binary data as well as character strings can be used as a key or a
536 value. There is no concept of data tables or data types. Records are
537 organized in a hash table or B+ tree.")
538 (license license:lgpl2.1+)))
540 (define-public recutils
546 (uri (string-append "mirror://gnu/recutils/recutils-"
550 "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93"))))
551 (build-system gnu-build-system)
553 ;; Running tests in parallel leads to test failures and crashes in
555 (arguments '(#:parallel-tests? #f
557 (list (string-append "--with-bash-headers="
558 (assoc-ref %build-inputs "bash:include")
561 #:phases (modify-phases %standard-phases
562 (add-before 'build 'set-bash4.4-header-location
564 (substitute* "bash/Makefile.in"
565 ;; Adjust the header search path for Bash
566 ;; 4.4 in accordance with 'bash.pc'.
567 (("AM_CPPFLAGS = (.*)$" _ rest)
568 (string-append "AM_CPPFLAGS = "
569 "-I$(BASH_HEADERS)/include "
572 ;; Install to PREFIX/lib/bash to match Bash
573 ;; 4.4's search path.
575 "libdir = @libdir@/bash\n"))
578 (native-inputs `(("emacs" ,emacs-minimal)
580 ("bash:include" ,bash "include")
581 ("libuuid" ,util-linux)))
583 ;; TODO: Add more optional inputs.
584 (inputs `(("curl" ,curl)
585 ("libgcrypt" ,libgcrypt)
587 (synopsis "Manipulate plain text files as databases")
589 "GNU Recutils is a set of tools and libraries for creating and
590 manipulating text-based, human-editable databases. Despite being text-based,
591 databases created with Recutils carry all of the expected features such as
592 unique fields, primary keys, time stamps and more. Many different field
593 types are supported, as is encryption.")
594 (license license:gpl3+)
595 (home-page "https://www.gnu.org/software/recutils/")))
597 (define-public rocksdb
603 (uri (string-append "https://github.com/facebook/rocksdb"
604 "/archive/v" version ".tar.gz"))
605 (file-name (string-append name "-" version ".tar.gz"))
608 "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb"))
609 (modules '((guix build utils)))
612 ;; TODO: unbundle gtest.
613 (delete-file "build_tools/gnu_parallel")
615 (build-system gnu-build-system)
617 `(#:make-flags (list "CC=gcc"
618 (string-append "INSTALL_PATH="
619 (assoc-ref %outputs "out")))
620 ;; Many tests fail on 32-bit platforms. There are multiple reports about
621 ;; this upstream, but it's not going to be supported any time soon.
622 #:tests? (let ((system ,(or (%current-target-system)
624 (or (string-prefix? "x86_64-linux" system)
625 (string-prefix? "aarch64-linux" system)))
627 (modify-phases %standard-phases
628 (add-after 'unpack 'patch-Makefile
630 (substitute* "Makefile"
631 (("build_tools/gnu_parallel") "parallel")
632 ;; Don't depend on the static library when installing.
633 (("install: install-static")
634 "install: install-shared")
635 (("#!/bin/sh") (string-append "#!" (which "sh"))))
638 ;; The default target is only needed for tests and built on demand.
640 (add-before 'check 'disable-optimizations
642 ;; Prevent the build from passing '-march=native' to the compiler.
643 (setenv "PORTABLE" "1")
645 (add-before 'check 'disable-failing-tests
647 (substitute* "Makefile"
648 ;; This test fails with GCC-5 and is unmaintained.
649 ;; https://github.com/facebook/rocksdb/issues/2148
650 (("^[[:blank:]]+spatial_db_test[[:blank:]]+\\\\") "\\")
651 ;; These tests reliably fail due to "Too many open files".
652 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
653 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
655 (add-after 'check 'build-release-libraries
656 ;; The default build target is a debug build for tests. The
657 ;; install target depends on "shared_lib" and "static_lib"
658 ;; targets for release builds so we build them here for clarity.
659 ;; TODO: Add debug output.
660 (lambda* (#:key (make-flags '()) #:allow-other-keys)
661 (zero? (apply system* "make" "shared_lib" make-flags)))))))
663 `(("parallel" ,parallel)
671 ("jemalloc" ,jemalloc)
675 (home-page "http://rocksdb.org/")
676 (synopsis "Persistent key-value store for fast storage")
678 "RocksDB is a library that forms the core building block for a fast
679 key-value server, especially suited for storing data on flash drives. It
680 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
681 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
682 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
683 compactions, making it specially suitable for storing multiple terabytes of
684 data in a single database. RocksDB is partially based on @code{LevelDB}.")
685 ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0.
686 (license (list license:bsd-3 license:asl2.0))))
688 (define-public sparql-query
690 (name "sparql-query")
694 (uri (string-append "https://github.com/tialaramex/"
695 name "/archive/" version ".tar.gz"))
697 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
698 (file-name (string-append name "-" version ".tar.gz"))))
699 (build-system gnu-build-system)
701 `(("readline" ,readline)
707 `(("pkg-config" ,pkg-config)))
709 `(#:make-flags '("CC=gcc")
711 (modify-phases %standard-phases
713 ;; The Makefile uses git to obtain versioning information. This phase
714 ;; substitutes the git invocation with the package version.
715 (add-after 'unpack 'remove-git-dependency
717 (substitute* "Makefile"
719 (string-append "gitrev = \"v" ,version "\"")))))
720 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
721 ;; This replacement does the same thing, except for using $PREFIX/bin
724 (lambda* (#:key outputs #:allow-other-keys)
725 (let* ((out (assoc-ref outputs "out"))
726 (bin (string-append out "/bin")))
727 (install-file "sparql-query" bin)
728 (system* "ln" "--symbolic"
729 (string-append bin "/sparql-query")
730 (string-append bin "/sparql-update")))))
732 (lambda* (#:key make-flags #:allow-other-keys)
734 (zero? (apply system* "make" `(,@make-flags "scan-test")))
735 (zero? (system "./scan-test"))))))))
736 (home-page "https://github.com/tialaramex/sparql-query/")
737 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
738 (description "Sparql-query is a command-line tool for accessing SPARQL
739 endpoints over HTTP. It has been intentionally designed to 'feel' similar to
740 tools for interrogating SQL databases. For example, you can enter a query over
741 several lines, using a semi-colon at the end of a line to indicate the end of
742 your query. It also supports readline so that you can more easily recall and
743 edit previous queries, even across sessions. It can be used non-interactively,
744 for example from a shell script.")
745 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
746 ;; others (like sparql-query.c) contain a GPLv2+ license header.
747 (license (list license:gpl3+))))
749 (define-public sqlite
755 (uri (let ((numeric-version
756 (match (string-split version #\.)
757 ((first-digit other-digits ...)
758 (string-append first-digit
761 (map (cut string-pad <> 2 #\0)
764 (string-append "https://sqlite.org/2017/sqlite-autoconf-"
765 numeric-version ".tar.gz")))
768 "00b3l2qglpl1inx21fckiwxnfq5xf6441flc79rqg7zdvh1rq4h6"))))
769 (build-system gnu-build-system)
770 (inputs `(("readline" ,readline)))
773 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
774 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
775 ;; to use the system SQLite unless these options are enabled.
776 (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
777 "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
778 "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
779 (home-page "https://www.sqlite.org/")
780 (synopsis "The SQLite database management system")
782 "SQLite is a software library that implements a self-contained, serverless,
783 zero-configuration, transactional SQL database engine. SQLite is the most
784 widely deployed SQL database engine in the world. The source code for SQLite
785 is in the public domain.")
786 (license license:public-domain)))
794 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
798 "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl"))))
799 (build-system gnu-build-system)
802 (modify-phases %standard-phases
804 (lambda* (#:key outputs #:allow-other-keys)
805 (let ((out (assoc-ref outputs "out")))
806 ;; The 'configure' script is a wrapper for Waf and
807 ;; doesn't recognize things like '--enable-fast-install'.
808 (zero? (system* "./configure"
809 (string-append "--prefix=" out)))))))))
811 `(;; TODO: Build the documentation.
812 ;; ("docbook-xsl" ,docbook-xsl)
813 ;; ("libxml2" ,libxml2)
814 ;; ("libxslt" ,libxslt)
815 ("python" ,python-2))) ;for the Waf build system
816 (home-page "https://tdb.samba.org/")
817 (synopsis "Trivial database")
819 "TDB is a Trivial Database. In concept, it is very much like GDBM,
820 and BSD's DB except that it allows multiple simultaneous writers and uses
821 locking internally to keep writers from trampling on each other. TDB is also
823 (license license:lgpl3+)))
825 (define-public perl-dbi
832 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
836 "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg"))))
837 (build-system perl-build-system)
838 (synopsis "Database independent interface for Perl")
839 (description "This package provides an database interface for Perl.")
840 (home-page "http://search.cpan.org/dist/DBI")
841 (license license:perl-license)))
843 (define-public perl-dbix-class
845 (name "perl-dbix-class")
850 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
851 "DBIx-Class-" version ".tar.gz"))
854 "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
855 (build-system perl-build-system)
857 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
858 ("perl-file-temp" ,perl-file-temp)
859 ("perl-module-install" ,perl-module-install)
860 ("perl-package-stash" ,perl-package-stash)
861 ("perl-test-deep" ,perl-test-deep)
862 ("perl-test-exception" ,perl-test-exception)
863 ("perl-test-warn" ,perl-test-warn)))
865 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
866 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
867 ("perl-class-inspector" ,perl-class-inspector)
868 ("perl-config-any" ,perl-config-any)
869 ("perl-context-preserve" ,perl-context-preserve)
870 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
871 ("perl-data-page" ,perl-data-page)
872 ("perl-dbi" ,perl-dbi)
873 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
874 ("perl-hash-merge" ,perl-hash-merge)
875 ("perl-module-find" ,perl-module-find)
876 ("perl-moo" ,perl-moo)
877 ("perl-mro-compat" ,perl-mro-compat)
878 ("perl-namespace-clean" ,perl-namespace-clean)
879 ("perl-path-class" ,perl-path-class)
880 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
881 ("perl-scope-guard" ,perl-scope-guard)
882 ("perl-sql-abstract" ,perl-sql-abstract)
883 ("perl-sub-name" ,perl-sub-name)
884 ("perl-text-balanced" ,perl-text-balanced)
885 ("perl-try-tiny" ,perl-try-tiny)))
886 (home-page "http://search.cpan.org/dist/DBIx-Class")
887 (synopsis "Extensible and flexible object <-> relational mapper")
888 (description "An SQL to OO mapper with an object API inspired by
889 Class::DBI (with a compatibility layer as a springboard for porting) and a
890 resultset API that allows abstract encapsulation of database operations. It
891 aims to make representing queries in your code as perl-ish as possible while
892 still providing access to as many of the capabilities of the database as
893 possible, including retrieving related records from multiple tables in a
894 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
895 \"ORDER BY\" and \"HAVING\" support.")
896 (license license:perl-license)))
898 (define-public perl-dbix-class-cursor-cached
900 (name "perl-dbix-class-cursor-cached")
905 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
906 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
909 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
910 (build-system perl-build-system)
912 `(("perl-cache-cache" ,perl-cache-cache)
913 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
914 ("perl-module-install" ,perl-module-install)))
916 `(("perl-carp-clan" ,perl-carp-clan)
917 ("perl-dbix-class" ,perl-dbix-class)))
918 (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached")
919 (synopsis "Cursor with built-in caching support")
920 (description "DBIx::Class::Cursor::Cached provides a cursor class with
921 built-in caching support.")
922 (license license:perl-license)))
924 (define-public perl-dbix-class-introspectablem2m
926 (name "perl-dbix-class-introspectablem2m")
931 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
932 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
935 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
936 (build-system perl-build-system)
938 `(("perl-module-install" ,perl-module-install)))
940 `(("perl-dbix-class" ,perl-dbix-class)))
941 (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
942 (synopsis "Introspect many-to-many relationships")
943 (description "Because the many-to-many relationships are not real
944 relationships, they can not be introspected with DBIx::Class. Many-to-many
945 relationships are actually just a collection of convenience methods installed
946 to bridge two relationships. This DBIx::Class component can be used to store
947 all relevant information about these non-relationships so they can later be
948 introspected and examined.")
949 (license license:perl-license)))
951 (define-public perl-dbix-class-schema-loader
953 (name "perl-dbix-class-schema-loader")
958 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
959 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
962 "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3"))))
963 (build-system perl-build-system)
965 `(("perl-config-any" ,perl-config-any)
966 ("perl-config-general" ,perl-config-general)
967 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
968 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
969 ("perl-module-install" ,perl-module-install)
970 ("perl-moose" ,perl-moose)
971 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
972 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
973 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
974 ("perl-test-deep" ,perl-test-deep)
975 ("perl-test-differences" ,perl-test-differences)
976 ("perl-test-exception" ,perl-test-exception)
977 ("perl-test-pod" ,perl-test-pod)
978 ("perl-test-warn" ,perl-test-warn)))
980 `(("perl-class-unload" ,perl-class-unload)
981 ("perl-class-inspector" ,perl-class-inspector)
982 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
983 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
984 ("perl-carp-clan" ,perl-carp-clan)
985 ("perl-data-dump" ,perl-data-dump)
986 ("perl-dbix-class" ,perl-dbix-class)
987 ("perl-hash-merge" ,perl-hash-merge)
988 ("perl-list-moreutils" ,perl-list-moreutils)
989 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
990 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
991 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
992 ("perl-namespace-clean" ,perl-namespace-clean)
993 ("perl-mro-compat" ,perl-mro-compat)
994 ("perl-scope-guard" ,perl-scope-guard)
995 ("perl-string-camelcase" ,perl-string-camelcase)
996 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
997 ("perl-sub-name" ,perl-sub-name)
998 ("perl-try-tiny" ,perl-try-tiny)))
999 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1000 (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader")
1001 (synopsis "Create a DBIx::Class::Schema based on a database")
1002 (description "DBIx::Class::Schema::Loader automates the definition of a
1003 DBIx::Class::Schema by scanning database table definitions and setting up the
1004 columns, primary keys, unique constraints and relationships.")
1005 (license license:perl-license)))
1007 (define-public perl-dbd-pg
1009 (name "perl-dbd-pg")
1014 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1015 "DBD-Pg-" version ".tar.gz"))
1018 "03m9w1cd0yyrbqwkwcl92j1cpmasmm69f3hwvcrlfsi5fnwsk63y"))))
1019 (build-system perl-build-system)
1021 `(("perl-dbi" ,perl-dbi)))
1023 `(("perl-dbi" ,perl-dbi)
1024 ("postgresql" ,postgresql)))
1025 (home-page "http://search.cpan.org/dist/DBD-Pg")
1026 (synopsis "DBI PostgreSQL interface")
1027 (description "This package provides a PostgreSQL driver for the Perl5
1028 @dfn{Database Interface} (DBI).")
1029 (license license:perl-license)))
1031 (define-public perl-dbd-mysql
1033 (name "perl-dbd-mysql")
1038 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1039 "DBD-mysql-" version ".tar.gz"))
1042 "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2"))
1043 (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch"))))
1044 (build-system perl-build-system)
1045 ;; Tests require running MySQL server
1046 (arguments `(#:tests? #f))
1048 `(("perl-dbi" ,perl-dbi)
1050 (home-page "http://search.cpan.org/dist/DBD-mysql")
1051 (synopsis "DBI MySQL interface")
1052 (description "This package provides a MySQL driver for the Perl5
1053 @dfn{Database Interface} (DBI).")
1054 (license license:perl-license)))
1056 (define-public perl-dbd-sqlite
1058 (name "perl-dbd-sqlite")
1063 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1067 "0sbj9lx9syzpknvjv8cz9jndg32qz775vy2prgq305npv3dsca9r"))))
1068 (build-system perl-build-system)
1069 (inputs `(("sqlite" ,sqlite)))
1070 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1071 (synopsis "SQlite interface for Perl")
1072 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1073 the entire thing in the distribution. So in order to get a fast transaction
1074 capable RDBMS working for your Perl project you simply have to install this
1075 module, and nothing else.")
1076 (license license:perl-license)
1077 (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
1079 (define-public perl-sql-abstract
1081 (name "perl-sql-abstract")
1086 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1087 "SQL-Abstract-" version ".tar.gz"))
1090 "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
1091 (build-system perl-build-system)
1093 `(("perl-module-install" ,perl-module-install)
1094 ("perl-test-deep" ,perl-test-deep)
1095 ("perl-test-exception" ,perl-test-exception)
1096 ("perl-test-warn" ,perl-test-warn)))
1098 `(("perl-hash-merge" ,perl-hash-merge)
1099 ("perl-moo" ,perl-moo)
1100 ("perl-mro-compat" ,perl-mro-compat)
1101 ("perl-text-balanced" ,perl-text-balanced)))
1102 (home-page "http://search.cpan.org/dist/SQL-Abstract")
1103 (synopsis "Generate SQL from Perl data structures")
1104 (description "This module was inspired by the excellent DBIx::Abstract.
1105 While based on the concepts used by DBIx::Abstract, the concepts used have
1106 been modified to make the SQL easier to generate from Perl data structures.
1107 The underlying idea is for this module to do what you mean, based on the data
1108 structures you provide it, so that you don't have to modify your code every
1109 time your data changes.")
1110 (license license:perl-license)))
1112 (define-public perl-sql-splitstatement
1114 (name "perl-sql-splitstatement")
1119 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1120 "SQL-SplitStatement-" version ".tar.gz"))
1123 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1124 (build-system perl-build-system)
1126 `(("perl-test-exception" ,perl-test-exception)))
1128 `(("perl-class-accessor" ,perl-class-accessor)
1129 ("perl-list-moreutils" ,perl-list-moreutils)
1130 ("perl-regexp-common" ,perl-regexp-common)
1131 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1132 (home-page "http://search.cpan.org/dist/SQL-SplitStatement")
1133 (synopsis "Split SQL code into atomic statements")
1134 (description "This module tries to split any SQL code, even including
1135 non-standard extensions, into the atomic statements it is composed of.")
1136 (license license:perl-license)))
1138 (define-public perl-sql-tokenizer
1140 (name "perl-sql-tokenizer")
1145 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1146 "SQL-Tokenizer-" version ".tar.gz"))
1149 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1150 (build-system perl-build-system)
1151 (home-page "http://search.cpan.org/dist/SQL-Tokenizer")
1152 (synopsis "SQL tokenizer")
1153 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1154 claim to be a parser or query verifier. It just creates sane tokens from a
1156 (license license:perl-license)))
1158 (define-public unixodbc
1166 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1169 (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
1170 (build-system gnu-build-system)
1171 (synopsis "Data source abstraction library")
1172 (description "Unixodbc is a library providing an API with which to access
1173 data sources. Data sources include SQL Servers and any software with an ODBC
1175 (license license:lgpl2.1+)
1176 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1177 (home-page "http://www.unixodbc.org")))
1179 (define-public unqlite
1185 ;; Contains bug fixes against the official release, and has an
1186 ;; autotooled build system.
1187 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1189 "unqlite-unofficial-" version ".tar.gz"))
1192 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1193 (build-system gnu-build-system)
1194 (arguments `(#:tests? #f)) ;No check target
1195 (home-page "http://www.unqlite.org")
1196 (synopsis "In-memory key/value and document store")
1198 "UnQLite is an in-process software library which implements a
1199 self-contained, serverless, zero-configuration, transactional NoSQL
1200 database engine. UnQLite is a document store database similar to
1201 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1202 similar to BerkeleyDB, LevelDB, etc.")
1203 (license license:bsd-2)))
1205 (define-public redis
1211 (uri (string-append "http://download.redis.io/releases/redis-"
1215 "14bm8lkhylc93r4dgl7kkzzpw2xq7gr6w6h80n3jazqnx5mcsj90"))))
1216 (build-system gnu-build-system)
1218 '(#:tests? #f ; tests related to master/slave and replication fail
1219 #:phases (modify-phases %standard-phases
1220 (delete 'configure))
1221 #:make-flags `("CC=gcc"
1224 ,(string-append "PREFIX="
1225 (assoc-ref %outputs "out")))))
1226 (synopsis "Key-value cache and store")
1227 (description "Redis is an advanced key-value cache and store. Redis
1228 supports many data structures including strings, hashes, lists, sets, sorted
1229 sets, bitmaps and hyperloglogs.")
1230 (home-page "http://redis.io/")
1231 (license license:bsd-3)))
1233 (define-public kyotocabinet
1235 (name "kyotocabinet")
1239 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1240 name "-" version ".tar.gz"))
1243 "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"))))
1244 (build-system gnu-build-system)
1248 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1249 (string-append "LDFLAGS=-Wl,-rpath="
1250 (assoc-ref %outputs "out") "/lib"))))
1251 (inputs `(("zlib" ,zlib)))
1252 (home-page "http://fallabs.com/kyotocabinet/")
1254 "Kyoto Cabinet is a modern implementation of the DBM database")
1256 "Kyoto Cabinet is a standalone file-based database that supports Hash
1257 and B+ Tree data storage models. It is a fast key-value lightweight
1258 database and supports many programming languages. It is a NoSQL database.")
1259 (license license:gpl3+)))
1261 (define-public tokyocabinet
1263 (name "tokyocabinet")
1268 (uri (string-append "http://fallabs.com/tokyocabinet/"
1269 name "-" version ".tar.gz"))
1272 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1273 (build-system gnu-build-system)
1276 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1277 (string-append "LDFLAGS=-Wl,-rpath="
1278 (assoc-ref %outputs "out") "/lib"))))
1281 (home-page "http://fallabs.com/tokyocabinet/")
1282 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1284 "Tokyo Cabinet is a library of routines for managing a database.
1285 The database is a simple data file containing records, each is a pair of a
1286 key and a value. Every key and value is serial bytes with variable length.
1287 Both binary data and character string can be used as a key and a value.
1288 There is neither concept of data tables nor data types. Records are
1289 organized in hash table, B+ tree, or fixed-length array.")
1290 (license license:lgpl2.1+)))
1292 (define-public wiredtiger
1299 "http://source.wiredtiger.com/releases/wiredtiger-"
1300 version ".tar.bz2"))
1303 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1304 (build-system gnu-build-system)
1306 '(#:configure-flags '("--enable-lz4" "--enable-zlib")
1308 (modify-phases %standard-phases
1309 (add-before 'check 'disable-test/fops
1311 ;; XXX: timed out after 3600 seconds of silence
1312 (substitute* "Makefile"
1318 (home-page "http://source.wiredtiger.com/")
1319 (synopsis "NoSQL data engine")
1321 "WiredTiger is an extensible platform for data management. It supports
1322 row-oriented storage (where all columns of a row are stored together),
1323 column-oriented storage (where columns are stored in groups, allowing for
1324 more efficient access and storage of column subsets) and log-structured merge
1325 trees (LSM), for sustained throughput under random insert workloads.")
1326 (license license:gpl3) ; or GPL-2
1327 ;; configure.ac: WiredTiger requires a 64-bit build.
1328 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1330 (define-public perl-db-file
1332 (name "perl-db-file")
1338 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
1343 "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp"))))
1344 (build-system perl-build-system)
1345 (inputs `(("bdb" ,bdb)))
1346 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
1348 `(#:phases (modify-phases %standard-phases
1350 'configure 'modify-config.in
1351 (lambda* (#:key inputs #:allow-other-keys)
1352 (substitute* "config.in"
1353 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
1355 (home-page "http://search.cpan.org/dist/DB_File")
1357 "Perl5 access to Berkeley DB version 1.x")
1359 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
1360 (license license:perl-license)))
1368 (uri (string-append "https://github.com/LMDB/lmdb/archive/"
1369 "LMDB_" version ".tar.gz"))
1372 "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
1373 (build-system gnu-build-system)
1375 `(#:test-target "test"
1377 (modify-phases %standard-phases
1379 (lambda* (#:key outputs #:allow-other-keys)
1380 (chdir (string-append
1381 (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb"))
1382 (substitute* "Makefile"
1383 (("/usr/local") (assoc-ref outputs "out")))
1385 (home-page "https://symas.com/products/lightning-memory-mapped-database")
1386 (synopsis "Lightning Memory-Mapped Database library")
1388 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
1389 transactional database. Unlike more complex relational databases, LMDB handles
1390 only key-value pairs (stored as arbitrary byte arrays) and relies on the
1391 underlying operating system for caching and locking, keeping the code small and
1393 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
1394 disk-based databases with high read performance that scales linearly over
1395 multiple cores. The size of each database is limited only by the size of the
1396 virtual address space — not physical RAM.")
1397 (license license:openldap2.8)))
1399 (define-public libpqxx
1406 "http://pqxx.org/download/software/libpqxx/"
1407 name "-" version ".tar.gz"))
1410 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
1411 (build-system gnu-build-system)
1413 `(("python" ,python-2)))
1414 (inputs `(("postgresql" ,postgresql)))
1416 `(#:tests? #f ; # FAIL: 1
1418 (modify-phases %standard-phases
1419 (add-before 'configure 'fix-sed-command
1421 ;; Newer sed versions error out if double brackets are not used.
1422 (substitute* "configure"
1423 (("\\[:space:\\]") "[[:space:]]"))
1425 (synopsis "C++ connector for PostgreSQL")
1427 "Libpqxx is a C++ library to enable user programs to communicate with the
1428 PostgreSQL database back-end. The database back-end can be local or it may be
1429 on another machine, accessed via TCP/IP.")
1430 (home-page "http://pqxx.org/")
1431 (license license:bsd-3)))
1433 (define-public python-peewee
1435 (name "python-peewee")
1440 (uri (pypi-uri "peewee" version))
1443 "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
1444 (build-system python-build-system)
1446 `(#:tests? #f)) ; Fails to import test data
1448 `(("python-cython" ,python-cython)))
1449 (home-page "https://github.com/coleifer/peewee/")
1450 (synopsis "Small object-relational mapping utility")
1452 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
1453 handles converting between pythonic values and those used by databases, so you
1454 can use Python types in your code without having to worry. It has built-in
1455 support for sqlite, mysql and postgresql. If you already have a database, you
1456 can autogenerate peewee models using @code{pwiz}, a model generator.")
1457 (license license:expat)))
1459 (define-public python2-peewee
1460 (package-with-python2 python-peewee))
1462 (define-public sqlcipher
1469 (uri (string-append "https://github.com/sqlcipher/" name
1470 "/archive/v" version ".tar.gz"))
1472 (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff"))
1473 (file-name (string-append name "-" version ".tar.gz"))))
1474 (build-system gnu-build-system)
1476 `(("libcrypto" ,openssl)
1477 ("libtcl8.6" ,tcl))) ; required for running the tests
1482 '("--enable-tempstore=yes"
1483 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
1484 "LDFLAGS=-lcrypto -ltcl8.6"
1486 ;; tests cannot be run from the Makefile
1487 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
1488 #:test-target "testfixture"
1490 (modify-phases %standard-phases
1491 (add-before 'check 'build-test-runner
1492 (assoc-ref %standard-phases 'check))
1496 (system* "./testfixture" "test/crypto.test")))))))
1497 (home-page "https://www.zetetic.net/sqlcipher/")
1499 "Library providing transparent encryption of SQLite database files")
1500 (description "SQLCipher is an implementation of SQLite, extended to
1501 provide transparent 256-bit AES encryption of database files. Pages are
1502 encrypted before being written to disk and are decrypted when read back. It’s
1503 well suited for protecting embedded application databases and for mobile
1506 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
1507 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
1508 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
1509 ;; source files are in the public domain.
1510 (license (list license:public-domain license:bsd-3))))
1512 (define-public python-pyodbc-c
1514 (name "python-pyodbc-c")
1519 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
1520 "archive.tar.gz?ref=v" version))
1523 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
1524 (file-name (string-append name "-" version ".tar.gz"))))
1525 (build-system python-build-system)
1527 `(("unixodbc" ,unixodbc)))
1529 `(;; No unit tests exist.
1531 (home-page "https://github.com/mkleehammer/pyodbc")
1532 (synopsis "Python ODBC Library")
1533 (description "@code{python-pyodbc-c} provides a Python DB-API driver
1535 (license (license:x11-style "file://LICENSE.TXT"))))
1537 (define-public python2-pyodbc-c
1538 (package-with-python2 python-pyodbc-c))
1540 (define-public mdbtools
1547 (uri (string-append "https://github.com/brianb/mdbtools/archive/"
1551 "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
1552 (file-name (string-append name "-" version ".tar.gz"))))
1553 (build-system gnu-build-system)
1557 `(("autoconf" ,autoconf)
1558 ("automake" ,automake)
1559 ("libtool" ,libtool)
1560 ("pkg-config" ,pkg-config)
1561 ("txt2man" ,txt2man)
1565 (modify-phases %standard-phases
1566 (add-after 'unpack 'autoreconf
1568 (zero? (system* "autoreconf" "-vfi")))))))
1569 (home-page "http://mdbtools.sourceforge.net/")
1570 (synopsis "Read Microsoft Access databases")
1571 (description "MDB Tools is a set of tools and applications to read the
1572 proprietary MDB file format used in Microsoft's Access database package. This
1573 includes programs to export schema and data from Microsoft's Access database
1574 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
1575 etc., and an SQL engine for performing simple SQL queries.")
1576 (license (list license:lgpl2.0
1579 (define-public python-lmdb
1581 (name "python-lmdb")
1585 (uri (pypi-uri "lmdb" version))
1588 "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx"))
1589 (modules '((guix build utils)))
1591 ;; Delete bundled lmdb source files.
1592 '(for-each delete-file (list "lib/lmdb.h"
1596 (build-system python-build-system)
1601 (modify-phases %standard-phases
1602 (add-before 'build 'use-system-lmdb
1603 (lambda* (#:key inputs #:allow-other-keys)
1604 (let ((lmdb (assoc-ref inputs "lmdb")))
1605 (setenv "LMDB_FORCE_SYSTEM" "set")
1606 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
1607 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
1609 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
1611 (home-page "https://github.com/dw/py-lmdb")
1612 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
1614 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
1615 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
1617 (list license:openldap2.8
1618 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
1619 ;; but not actually needed on platforms currently supported by Guix.
1622 (define-public python2-lmdb
1623 (package-with-python2 python-lmdb))
1625 (define-public python-orator
1627 (name "python-orator")
1631 (uri (pypi-uri "orator" version))
1634 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
1635 (build-system python-build-system)
1638 (modify-phases %standard-phases
1639 (add-after 'unpack 'loosen-dependencies
1640 ;; Tests are not actually run since they are not included with the
1641 ;; distributed package, but dependencies are checked.
1643 (substitute* "setup.py"
1645 (("flexmock==0.9.7") "flexmock")
1646 ;; The pytest-mock package is out of date, so we remove minimum
1647 ;; version requirement.
1648 (("pytest-mock.*'") "pytest-mock'"))
1651 `(("python-pytest-mock" ,python-pytest-mock)
1652 ("python-pytest" ,python-pytest-3.0)
1653 ("python-flexmock" ,python-flexmock)))
1655 `(("python-backpack" ,python-backpack)
1656 ("python-blinker" ,python-blinker)
1657 ("python-cleo" ,python-cleo)
1658 ("python-faker" ,python-faker)
1659 ("python-inflection" ,python-inflection)
1660 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
1661 ("python-pendulum" ,python-pendulum)
1662 ("python-pyaml" ,python-pyaml)
1663 ("python-pygments" ,python-pygments)
1664 ("python-simplejson" ,python-simplejson)
1665 ("python-six" ,python-six)
1666 ("python-wrapt" ,python-wrapt)))
1667 (home-page "https://orator-orm.com/")
1668 (synopsis "ActiveRecord ORM for Python")
1670 "Orator provides a simple ActiveRecord-like Object Relational Mapping
1671 implementation for Python.")
1672 (license license:expat)
1673 (properties `((python2-variant . ,(delay python2-orator))))))
1675 (define-public python2-orator
1676 (package-with-python2 (strip-python2-variant python-orator)))