Commit | Line | Data |
---|---|---|
5f96f303 | 1 | ;;; GNU Guix --- Functional package management for GNU |
ff1f39e3 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
b86c013c | 3 | ;;; Copyright © 2012, 2014, 2015 Andreas Enge <andreas@enge.fr> |
5f96f303 | 4 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> |
218a2106 | 5 | ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org> |
8047d13d | 6 | ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> |
e61fd0f0 | 7 | ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> |
77631745 | 8 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
b747a9db | 9 | ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> |
9a9d6d78 | 10 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
bdc11dc4 | 11 | ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net> |
4c6aa73b | 12 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
0e1b262e | 13 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
fe71eee0 | 14 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
62ea44fc | 15 | ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> |
b9f771a7 | 16 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
259a94e9 | 17 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> |
d39a84e8 | 18 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
fda852ff | 19 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
f30ff28b | 20 | ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> |
5f96f303 LC |
21 | ;;; |
22 | ;;; This file is part of GNU Guix. | |
23 | ;;; | |
24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
25 | ;;; under the terms of the GNU General Public License as published by | |
26 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
27 | ;;; your option) any later version. | |
28 | ;;; | |
29 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
32 | ;;; GNU General Public License for more details. | |
33 | ;;; | |
34 | ;;; You should have received a copy of the GNU General Public License | |
35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
36 | ||
37 | (define-module (gnu packages databases) | |
38 | #:use-module (gnu packages) | |
06a035db | 39 | #:use-module (gnu packages algebra) |
4c6aa73b RJ |
40 | #:use-module (gnu packages autotools) |
41 | #:use-module (gnu packages avahi) | |
77e52190 | 42 | #:use-module (gnu packages base) |
b747a9db | 43 | #:use-module (gnu packages bash) |
06a035db | 44 | #:use-module (gnu packages bison) |
23bbd7dd | 45 | #:use-module (gnu packages boost) |
06a035db MB |
46 | #:use-module (gnu packages check) |
47 | #:use-module (gnu packages compression) | |
62ea44fc | 48 | #:use-module (gnu packages crypto) |
06a035db MB |
49 | #:use-module (gnu packages curl) |
50 | #:use-module (gnu packages cyrus-sasl) | |
51 | #:use-module (gnu packages emacs) | |
4c6aa73b RJ |
52 | #:use-module (gnu packages gettext) |
53 | #:use-module (gnu packages glib) | |
06a035db MB |
54 | #:use-module (gnu packages gnupg) |
55 | #:use-module (gnu packages jemalloc) | |
708155df | 56 | #:use-module (gnu packages language) |
686144e9 | 57 | #:use-module (gnu packages libevent) |
5f96f303 | 58 | #:use-module (gnu packages linux) |
d39a84e8 | 59 | #:use-module (gnu packages man) |
5f96f303 | 60 | #:use-module (gnu packages ncurses) |
d3c6ad0a | 61 | #:use-module (gnu packages parallel) |
77631745 | 62 | #:use-module (gnu packages pcre) |
06a035db | 63 | #:use-module (gnu packages perl) |
4c6aa73b | 64 | #:use-module (gnu packages pkg-config) |
d3c6ad0a | 65 | #:use-module (gnu packages popt) |
06a035db | 66 | #:use-module (gnu packages python) |
4c6aa73b | 67 | #:use-module (gnu packages rdf) |
06a035db MB |
68 | #:use-module (gnu packages readline) |
69 | #:use-module (gnu packages tcl) | |
70 | #:use-module (gnu packages tls) | |
77631745 | 71 | #:use-module (gnu packages xml) |
0e1b262e | 72 | #:use-module ((guix licenses) #:prefix license:) |
5f96f303 LC |
73 | #:use-module (guix packages) |
74 | #:use-module (guix download) | |
75 | #:use-module (guix build-system gnu) | |
274da61d | 76 | #:use-module (guix build-system perl) |
4d98bfaf | 77 | #:use-module (guix build-system python) |
77631745 | 78 | #:use-module (guix build-system cmake) |
329d13b8 | 79 | #:use-module (guix utils) |
5f96f303 LC |
80 | #:use-module (srfi srfi-26) |
81 | #:use-module (ice-9 match)) | |
82 | ||
4c6aa73b RJ |
83 | (define-public 4store |
84 | (package | |
85 | (name "4store") | |
86 | (version "1.1.6") | |
87 | (source (origin | |
88 | (method url-fetch) | |
89 | (uri (string-append "https://github.com/garlik/4store/archive/v" | |
90 | version ".tar.gz")) | |
91 | (file-name (string-append name "-" version ".tar.gz")) | |
92 | (sha256 | |
93 | (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50")) | |
94 | (patches (list (search-patch "4store-fix-buildsystem.patch"))))) | |
95 | (build-system gnu-build-system) | |
96 | (native-inputs | |
97 | `(("perl" ,perl) | |
98 | ("python" ,python-2) | |
99 | ("autoconf" ,autoconf) | |
100 | ("automake" ,automake) | |
b94a6ca0 | 101 | ("gettext" ,gettext-minimal) |
4c6aa73b | 102 | ("libtool" ,libtool) |
74c8b174 | 103 | ("pcre" ,pcre "bin") ;for 'pcre-config' |
4c6aa73b RJ |
104 | ("pkg-config" ,pkg-config))) |
105 | (inputs | |
106 | `(("glib" ,glib) | |
107 | ("rasqal" ,rasqal) | |
108 | ("libxml2" ,libxml2) | |
109 | ("raptor2" ,raptor2) | |
110 | ("readline" ,readline) | |
111 | ("avahi" ,avahi) | |
4c6aa73b RJ |
112 | ("cyrus-sasl" ,cyrus-sasl) |
113 | ("openssl" ,openssl) | |
114 | ("util-linux" ,util-linux))) | |
115 | (arguments | |
116 | `(#:phases | |
117 | (modify-phases %standard-phases | |
d10092b8 | 118 | (add-after 'unpack 'generate-configure |
4c6aa73b | 119 | (lambda _ |
d10092b8 | 120 | (zero? (system* "sh" "autogen.sh"))))))) |
4c6aa73b RJ |
121 | ;; http://www.4store.org has been down for a while now. |
122 | (home-page "https://github.com/garlik/4store") | |
123 | (synopsis "Clustered RDF storage and query engine") | |
124 | (description "4store is a RDF/SPARQL store written in C, supporting | |
125 | either single machines or networked clusters.") | |
ba8b9f8d | 126 | (license license:gpl3+))) |
4c6aa73b | 127 | |
b416aadf LC |
128 | (define-public gdbm |
129 | (package | |
130 | (name "gdbm") | |
821072e2 | 131 | (version "1.13") |
b416aadf LC |
132 | (source (origin |
133 | (method url-fetch) | |
134 | (uri (string-append "mirror://gnu/gdbm/gdbm-" | |
135 | version ".tar.gz")) | |
136 | (sha256 | |
137 | (base32 | |
821072e2 | 138 | "0lx201q20dvc70f8a3c9s7s18z15inlxvbffph97ngvrgnyjq9cx")))) |
b416aadf LC |
139 | (arguments `(#:configure-flags '("--enable-libgdbm-compat"))) |
140 | (build-system gnu-build-system) | |
6fd52309 | 141 | (home-page "http://www.gnu.org.ua/software/gdbm") |
b416aadf LC |
142 | (synopsis |
143 | "Hash library of database functions compatible with traditional dbm") | |
144 | (description | |
145 | "GDBM is a library for manipulating hashed databases. It is used to | |
146 | store key/value pairs in a file in a manner similar to the Unix dbm library | |
147 | and provides interfaces to the traditional file format.") | |
ba8b9f8d | 148 | (license license:gpl3+))) |
b416aadf | 149 | |
5f96f303 LC |
150 | (define-public bdb |
151 | (package | |
152 | (name "bdb") | |
18e681bf | 153 | (version "6.2.23") |
5f96f303 LC |
154 | (source (origin |
155 | (method url-fetch) | |
18e681bf EF |
156 | (uri (string-append "http://download.oracle.com/berkeley-db/db-" |
157 | version ".tar.gz")) | |
158 | (sha256 | |
159 | (base32 | |
160 | "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7")))) | |
5f96f303 LC |
161 | (build-system gnu-build-system) |
162 | (outputs '("out" ; programs, libraries, headers | |
163 | "doc")) ; 94 MiB of HTML docs | |
164 | (arguments | |
165 | '(#:tests? #f ; no check target available | |
ff1f39e3 | 166 | #:disallowed-references ("doc") |
5bef7749 AE |
167 | #:phases |
168 | (alist-replace | |
169 | 'configure | |
170 | (lambda* (#:key outputs #:allow-other-keys) | |
171 | (let ((out (assoc-ref outputs "out")) | |
172 | (doc (assoc-ref outputs "doc"))) | |
173 | ;; '--docdir' is not honored, so we need to patch. | |
174 | (substitute* "dist/Makefile.in" | |
175 | (("docdir[[:blank:]]*=.*") | |
176 | (string-append "docdir = " doc "/share/doc/bdb"))) | |
5f96f303 | 177 | |
5bef7749 AE |
178 | (zero? |
179 | (system* "./dist/configure" | |
180 | (string-append "--prefix=" out) | |
181 | (string-append "CONFIG_SHELL=" (which "bash")) | |
182 | (string-append "SHELL=" (which "bash")) | |
5f96f303 | 183 | |
0e50d521 LC |
184 | ;; Remove 7 MiB of .a files. |
185 | "--disable-static" | |
186 | ||
5bef7749 AE |
187 | ;; The compatibility mode is needed by some packages, |
188 | ;; notably iproute2. | |
b86c013c AE |
189 | "--enable-compat185" |
190 | ||
191 | ;; The following flag is needed so that the inclusion | |
192 | ;; of db_cxx.h into C++ files works; it leads to | |
193 | ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. | |
194 | "--enable-cxx")))) | |
5f96f303 | 195 | %standard-phases))) |
35b9e423 | 196 | (synopsis "Berkeley database") |
5f96f303 LC |
197 | (description |
198 | "Berkeley DB is an embeddable database allowing developers the choice of | |
199 | SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") | |
a24fda81 MB |
200 | ;; Starting with version 6, BDB is distributed under AGPL3. Many individual |
201 | ;; files are covered by the 3-clause BSD license. | |
ba8b9f8d | 202 | (license (list license:agpl3+ license:bsd-3)) |
5f96f303 LC |
203 | (home-page |
204 | "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html"))) | |
205 | ||
557fa39c EF |
206 | (define-public bdb-5.3 |
207 | (package (inherit bdb) | |
208 | (name "bdb") | |
209 | (version "5.3.28") | |
ba8b9f8d MB |
210 | (license (license:non-copyleft "file://LICENSE" |
211 | "See LICENSE in the distribution.")) | |
557fa39c EF |
212 | (source (origin |
213 | (method url-fetch) | |
214 | (uri (string-append "http://download.oracle.com/berkeley-db/db-" | |
215 | version ".tar.gz")) | |
216 | (sha256 | |
217 | (base32 | |
9a9d6d78 EF |
218 | "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0")))) |
219 | (arguments | |
220 | `(#:tests? #f ; no check target available | |
221 | #:disallowed-references ("doc") | |
222 | #:phases | |
223 | (alist-replace | |
224 | 'configure | |
225 | (lambda* (#:key outputs #:allow-other-keys) | |
226 | (let ((out (assoc-ref outputs "out")) | |
227 | (doc (assoc-ref outputs "doc"))) | |
228 | ;; '--docdir' is not honored, so we need to patch. | |
229 | (substitute* "dist/Makefile.in" | |
230 | (("docdir[[:blank:]]*=.*") | |
231 | (string-append "docdir = " doc "/share/doc/bdb"))) | |
232 | ||
233 | (zero? | |
234 | (system* "./dist/configure" | |
235 | (string-append "--prefix=" out) | |
236 | (string-append "CONFIG_SHELL=" (which "bash")) | |
237 | (string-append "SHELL=" (which "bash")) | |
238 | ||
239 | ;; Bdb doesn't recognize aarch64 as an architecture. | |
240 | ,@(if (string=? "aarch64-linux" (%current-system)) | |
241 | '("--build=aarch64-unknown-linux-gnu") | |
242 | '()) | |
243 | ||
244 | ;; Remove 7 MiB of .a files. | |
245 | "--disable-static" | |
246 | ||
247 | ;; The compatibility mode is needed by some packages, | |
248 | ;; notably iproute2. | |
249 | "--enable-compat185" | |
250 | ||
251 | ;; The following flag is needed so that the inclusion | |
252 | ;; of db_cxx.h into C++ files works; it leads to | |
253 | ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. | |
254 | "--enable-cxx")))) | |
255 | %standard-phases))))) | |
557fa39c | 256 | |
b9f771a7 MB |
257 | (define-public leveldb |
258 | (package | |
259 | (name "leveldb") | |
04c88363 | 260 | (version "1.20") |
b9f771a7 MB |
261 | (source (origin |
262 | (method url-fetch) | |
263 | (uri (string-append "https://github.com/google/leveldb" | |
264 | "/archive/v" version ".tar.gz")) | |
265 | (file-name (string-append name "-" version ".tar.gz")) | |
266 | (sha256 | |
267 | (base32 | |
04c88363 | 268 | "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm")))) |
b9f771a7 MB |
269 | (build-system gnu-build-system) |
270 | (arguments | |
271 | '(#:make-flags (list "CC=gcc") | |
272 | #:phases | |
273 | (modify-phases %standard-phases | |
274 | (delete 'configure) | |
275 | (replace 'install | |
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) | |
285 | #t)))))) | |
286 | (inputs | |
287 | `(("snappy" ,snappy))) | |
288 | (home-page "http://leveldb.org/") | |
289 | (synopsis "Fast key-value storage library") | |
290 | (description | |
291 | "LevelDB is a fast key-value storage library that provides an ordered | |
292 | mapping from string keys to string values.") | |
ba8b9f8d | 293 | (license license:bsd-3))) |
b9f771a7 | 294 | |
686144e9 CB |
295 | (define-public memcached |
296 | (package | |
297 | (name "memcached") | |
298 | (version "1.5.0") | |
299 | (source | |
300 | (origin | |
301 | (method url-fetch) | |
302 | (uri (string-append | |
303 | "https://memcached.org/files/memcached-" version ".tar.gz")) | |
304 | (sha256 | |
305 | (base32 "0chwc0g7wfvcad36z8pf2jbgygdnm9nm1l6pwjsn3d2b089gh0f0")))) | |
306 | (build-system gnu-build-system) | |
307 | (inputs | |
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 | |
314 | applications.") | |
315 | (license license:bsd-3))) | |
316 | ||
5f96f303 LC |
317 | (define-public mysql |
318 | (package | |
319 | (name "mysql") | |
6f226c07 | 320 | (version "5.7.19") |
5f96f303 LC |
321 | (source (origin |
322 | (method url-fetch) | |
23bbd7dd EF |
323 | (uri (list (string-append |
324 | "http://dev.mysql.com/get/Downloads/MySQL-" | |
325 | (version-major+minor version) "/" | |
326 | name "-" version ".tar.gz") | |
327 | (string-append | |
328 | "http://downloads.mysql.com/archives/get/file/" | |
329 | name "-" version ".tar.gz"))) | |
5f96f303 LC |
330 | (sha256 |
331 | (base32 | |
6f226c07 | 332 | "1c8y54yk756179nx4dgg79dijmjdq5n8l057cnqsg70pjdpyfl9y")))) |
329d13b8 SB |
333 | (build-system cmake-build-system) |
334 | (arguments | |
69419655 | 335 | `(#:configure-flags |
329d13b8 SB |
336 | '("-DBUILD_CONFIG=mysql_release" |
337 | "-DWITH_SSL=system" | |
338 | "-DWITH_ZLIB=system" | |
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=" | |
3f289db6 LC |
355 | "-DINSTALL_SQLBENCHDIR=") |
356 | #:phases (modify-phases %standard-phases | |
357 | (add-after | |
23bbd7dd EF |
358 | 'unpack 'patch-boost-version |
359 | (lambda _ | |
360 | ;; Mysql wants boost-1.59.0 specifically | |
361 | (substitute* "cmake/boost.cmake" | |
69419655 EB |
362 | (("59") |
363 | ,(match (string-split (package-version boost) #\.) | |
364 | ((_ minor . _) minor)))))) | |
6a52df50 LC |
365 | (add-after |
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 | |
370 | ;; 14 MiB each. | |
371 | (for-each delete-file | |
372 | (find-files (string-append out "/bin") | |
373 | "_embedded$")) | |
7d099cbe | 374 | #t)))))) |
329d13b8 SB |
375 | (native-inputs |
376 | `(("bison" ,bison) | |
377 | ("perl" ,perl))) | |
5f96f303 | 378 | (inputs |
23bbd7dd EF |
379 | `(("boost" ,boost) |
380 | ("libaio" ,libaio) | |
381 | ("ncurses" ,ncurses) | |
5f96f303 | 382 | ("openssl" ,openssl) |
23bbd7dd | 383 | ("zlib" ,zlib))) |
5f96f303 | 384 | (home-page "http://www.mysql.com/") |
9e771e3b | 385 | (synopsis "Fast, easy to use, and popular database") |
5f96f303 LC |
386 | (description |
387 | "MySQL is a fast, reliable, and easy to use relational database | |
388 | management system that supports the standardized Structured Query | |
389 | Language.") | |
ba8b9f8d | 390 | (license license:gpl2))) |
5f96f303 | 391 | |
77631745 SB |
392 | (define-public mariadb |
393 | (package | |
394 | (name "mariadb") | |
f30ff28b | 395 | (version "10.1.26") |
77631745 SB |
396 | (source (origin |
397 | (method url-fetch) | |
398 | (uri (string-append "https://downloads.mariadb.org/f/" | |
399 | name "-" version "/source/" | |
400 | name "-" version ".tar.gz")) | |
401 | (sha256 | |
402 | (base32 | |
f30ff28b | 403 | "0ggpdcal0if9y6h9hp1yv2q65cbkjfl4p8rqk68a5pk7k75v325s")))) |
77631745 SB |
404 | (build-system cmake-build-system) |
405 | (arguments | |
406 | '(#:configure-flags | |
407 | '("-DBUILD_CONFIG=mysql_release" | |
6cf8e576 LF |
408 | ;; Linking with libarchive fails, like this: |
409 | ||
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 | |
413 | ||
414 | ;; For now, disable the features that that use libarchive (xtrabackup). | |
415 | "-DWITH_LIBARCHIVE=OFF" | |
416 | ||
77631745 SB |
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") | |
431 | #:phases | |
432 | (modify-phases %standard-phases | |
433 | (add-before | |
434 | 'configure 'pre-configure | |
435 | (lambda _ | |
436 | (setenv "CONFIG_SHELL" (which "sh")) | |
77631745 SB |
437 | #t)) |
438 | (add-after | |
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") | |
444 | (("basedir=\"\"") | |
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"))))))))) | |
451 | (native-inputs | |
452 | `(("bison" ,bison) | |
453 | ("perl" ,perl))) | |
454 | (inputs | |
455 | `(("jemalloc" ,jemalloc) | |
456 | ("libaio" ,libaio) | |
457 | ("libxml2" ,libxml2) | |
458 | ("ncurses" ,ncurses) | |
459 | ("openssl" ,openssl) | |
460 | ("pcre" ,pcre) | |
461 | ("zlib" ,zlib))) | |
462 | (home-page "https://mariadb.org/") | |
463 | (synopsis "SQL database server") | |
464 | (description | |
465 | "MariaDB is a multi-user and multi-threaded SQL database server, designed | |
466 | as a drop-in replacement of MySQL.") | |
ba8b9f8d | 467 | (license license:gpl2))) |
77631745 | 468 | |
5f96f303 LC |
469 | (define-public postgresql |
470 | (package | |
471 | (name "postgresql") | |
ff54f194 | 472 | (version "9.6.5") |
5f96f303 LC |
473 | (source (origin |
474 | (method url-fetch) | |
dbeaf8f2 | 475 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
9020890b | 476 | version "/postgresql-" version ".tar.bz2")) |
5f96f303 LC |
477 | (sha256 |
478 | (base32 | |
ff54f194 | 479 | "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6")))) |
5f96f303 | 480 | (build-system gnu-build-system) |
dd213082 | 481 | (arguments |
b7aa3f5d DM |
482 | `(#:configure-flags '("--with-uuid=e2fs") |
483 | #:phases | |
dd213082 JD |
484 | (modify-phases %standard-phases |
485 | (add-before 'configure 'patch-/bin/sh | |
486 | (lambda _ | |
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"))) | |
b7aa3f5d DM |
491 | #t)) |
492 | (add-after 'build 'build-contrib | |
493 | (lambda _ | |
494 | (zero? (system* "make" "-C" "contrib")))) | |
495 | (add-after 'install 'install-contrib | |
496 | (lambda _ | |
497 | (zero? (system* "make" "-C" "contrib" "install"))))))) | |
5f96f303 LC |
498 | (inputs |
499 | `(("readline" ,readline) | |
b7aa3f5d | 500 | ("libuuid" ,util-linux) |
5f96f303 | 501 | ("zlib" ,zlib))) |
d887f420 | 502 | (home-page "https://www.postgresql.org/") |
5f96f303 LC |
503 | (synopsis "Powerful object-relational database system") |
504 | (description | |
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.") | |
ba8b9f8d | 511 | (license (license:x11-style "file://COPYRIGHT")))) |
5f96f303 | 512 | |
259a94e9 TD |
513 | (define-public qdbm |
514 | (package | |
515 | (name "qdbm") | |
516 | (version "1.8.78") | |
517 | (source | |
518 | (origin | |
519 | (method url-fetch) | |
520 | (uri (string-append "http://fallabs.com/" name "/" | |
521 | name "-" version ".tar.gz")) | |
522 | (sha256 | |
523 | (base32 | |
524 | "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml")))) | |
525 | (build-system gnu-build-system) | |
526 | (arguments | |
527 | `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
528 | (assoc-ref %outputs "out") | |
529 | "/lib")))) | |
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+))) | |
539 | ||
5f96f303 LC |
540 | (define-public recutils |
541 | (package | |
542 | (name "recutils") | |
543 | (version "1.7") | |
544 | (source (origin | |
545 | (method url-fetch) | |
546 | (uri (string-append "mirror://gnu/recutils/recutils-" | |
547 | version ".tar.gz")) | |
548 | (sha256 | |
549 | (base32 | |
550 | "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93")))) | |
551 | (build-system gnu-build-system) | |
552 | ||
553 | ;; Running tests in parallel leads to test failures and crashes in | |
554 | ;; torture/utils. | |
b747a9db LF |
555 | (arguments '(#:parallel-tests? #f |
556 | #:configure-flags | |
557 | (list (string-append "--with-bash-headers=" | |
558 | (assoc-ref %build-inputs "bash:include") | |
c21af659 LC |
559 | "/include/bash")) |
560 | ||
561 | #:phases (modify-phases %standard-phases | |
562 | (add-before 'build 'set-bash4.4-header-location | |
563 | (lambda _ | |
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 " | |
570 | rest)) | |
571 | ||
572 | ;; Install to PREFIX/lib/bash to match Bash | |
573 | ;; 4.4's search path. | |
574 | (("^libdir = .*$") | |
575 | "libdir = @libdir@/bash\n")) | |
576 | #t))))) | |
5f96f303 | 577 | |
b8fc3622 | 578 | (native-inputs `(("emacs" ,emacs-minimal) |
7ae7ca0e | 579 | ("bc" ,bc) |
b747a9db | 580 | ("bash:include" ,bash "include") |
b3546174 | 581 | ("libuuid" ,util-linux))) |
5f96f303 LC |
582 | |
583 | ;; TODO: Add more optional inputs. | |
5f96f303 LC |
584 | (inputs `(("curl" ,curl) |
585 | ("libgcrypt" ,libgcrypt) | |
586 | ("check" ,check))) | |
587 | (synopsis "Manipulate plain text files as databases") | |
588 | (description | |
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 | |
c5779c93 LC |
592 | unique fields, primary keys, time stamps and more. Many different field |
593 | types are supported, as is encryption.") | |
ba8b9f8d | 594 | (license license:gpl3+) |
6fd52309 | 595 | (home-page "https://www.gnu.org/software/recutils/"))) |
5f96f303 | 596 | |
d3c6ad0a MB |
597 | (define-public rocksdb |
598 | (package | |
599 | (name "rocksdb") | |
2e93ee5f | 600 | (version "5.2.1") |
d3c6ad0a MB |
601 | (source (origin |
602 | (method url-fetch) | |
603 | (uri (string-append "https://github.com/facebook/rocksdb" | |
604 | "/archive/v" version ".tar.gz")) | |
605 | (file-name (string-append name "-" version ".tar.gz")) | |
606 | (sha256 | |
607 | (base32 | |
2e93ee5f | 608 | "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb")) |
d3c6ad0a MB |
609 | (modules '((guix build utils))) |
610 | (snippet | |
611 | '(begin | |
612 | ;; TODO: unbundle gtest. | |
613 | (delete-file "build_tools/gnu_parallel") | |
614 | #t)))) | |
615 | (build-system gnu-build-system) | |
616 | (arguments | |
d7b344c5 | 617 | `(#:make-flags (list "CC=gcc" |
d3c6ad0a MB |
618 | (string-append "INSTALL_PATH=" |
619 | (assoc-ref %outputs "out"))) | |
d7b344c5 MB |
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) | |
623 | (%current-system)))) | |
624 | (or (string-prefix? "x86_64-linux" system) | |
625 | (string-prefix? "aarch64-linux" system))) | |
d3c6ad0a MB |
626 | #:phases |
627 | (modify-phases %standard-phases | |
628 | (add-after 'unpack 'patch-Makefile | |
629 | (lambda _ | |
630 | (substitute* "Makefile" | |
631 | (("build_tools/gnu_parallel") "parallel") | |
f91c677c MB |
632 | ;; Don't depend on the static library when installing. |
633 | (("install: install-static") | |
634 | "install: install-shared") | |
d3c6ad0a MB |
635 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
636 | #t)) | |
637 | (delete 'configure) | |
d7b344c5 MB |
638 | ;; The default target is only needed for tests and built on demand. |
639 | (delete 'build) | |
640 | (add-before 'check 'disable-optimizations | |
641 | (lambda _ | |
642 | ;; Prevent the build from passing '-march=native' to the compiler. | |
643 | (setenv "PORTABLE" "1") | |
644 | #t)) | |
d3c6ad0a MB |
645 | (add-before 'check 'disable-failing-tests |
646 | (lambda _ | |
647 | (substitute* "Makefile" | |
bf144793 MB |
648 | ;; This test fails with GCC-5 and is unmaintained. |
649 | ;; https://github.com/facebook/rocksdb/issues/2148 | |
650 | (("^[[:blank:]]+spatial_db_test[[:blank:]]+\\\\") "\\") | |
d3c6ad0a MB |
651 | ;; These tests reliably fail due to "Too many open files". |
652 | (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\") | |
653 | (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\")) | |
654 | #t)) | |
f91c677c MB |
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) | |
f91c677c | 661 | (zero? (apply system* "make" "shared_lib" make-flags))))))) |
d3c6ad0a MB |
662 | (native-inputs |
663 | `(("parallel" ,parallel) | |
664 | ("perl" ,perl) | |
665 | ("procps" ,procps) | |
77e52190 MB |
666 | ("python" ,python-2) |
667 | ("which" ,which))) | |
d3c6ad0a MB |
668 | (inputs |
669 | `(("bzip2" ,bzip2) | |
670 | ("gflags" ,gflags) | |
671 | ("jemalloc" ,jemalloc) | |
672 | ("lz4" ,lz4) | |
673 | ("snappy" ,snappy) | |
674 | ("zlib" ,zlib))) | |
675 | (home-page "http://rocksdb.org/") | |
676 | (synopsis "Persistent key-value store for fast storage") | |
677 | (description | |
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. | |
ba8b9f8d | 686 | (license (list license:bsd-3 license:asl2.0)))) |
d3c6ad0a | 687 | |
b92d02d9 RJ |
688 | (define-public sparql-query |
689 | (package | |
690 | (name "sparql-query") | |
691 | (version "1.1") | |
692 | (source (origin | |
693 | (method url-fetch) | |
694 | (uri (string-append "https://github.com/tialaramex/" | |
695 | name "/archive/" version ".tar.gz")) | |
696 | (sha256 | |
697 | (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w")) | |
698 | (file-name (string-append name "-" version ".tar.gz")))) | |
699 | (build-system gnu-build-system) | |
700 | (inputs | |
701 | `(("readline" ,readline) | |
702 | ("ncurses" ,ncurses) | |
703 | ("glib" ,glib) | |
704 | ("libxml2" ,libxml2) | |
705 | ("curl" ,curl))) | |
706 | (native-inputs | |
707 | `(("pkg-config" ,pkg-config))) | |
708 | (arguments | |
709 | `(#:make-flags '("CC=gcc") | |
710 | #:phases | |
711 | (modify-phases %standard-phases | |
712 | (delete 'configure) | |
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 | |
716 | (lambda _ | |
717 | (substitute* "Makefile" | |
718 | (("^gitrev :=.*$") | |
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 | |
722 | ;; instead. | |
723 | (replace 'install | |
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"))))) | |
731 | (replace 'check | |
732 | (lambda* (#:key make-flags #:allow-other-keys) | |
733 | (and | |
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. | |
ba8b9f8d | 747 | (license (list license:gpl3+)))) |
b92d02d9 | 748 | |
5f96f303 LC |
749 | (define-public sqlite |
750 | (package | |
751 | (name "sqlite") | |
70eea6ea | 752 | (version "3.19.3") |
5f96f303 LC |
753 | (source (origin |
754 | (method url-fetch) | |
5f96f303 LC |
755 | (uri (let ((numeric-version |
756 | (match (string-split version #\.) | |
757 | ((first-digit other-digits ...) | |
758 | (string-append first-digit | |
759 | (string-pad-right | |
760 | (string-concatenate | |
761 | (map (cut string-pad <> 2 #\0) | |
762 | other-digits)) | |
763 | 6 #\0)))))) | |
e58db46b | 764 | (string-append "https://sqlite.org/2017/sqlite-autoconf-" |
3ad8cb41 | 765 | numeric-version ".tar.gz"))) |
5f96f303 LC |
766 | (sha256 |
767 | (base32 | |
70eea6ea | 768 | "00b3l2qglpl1inx21fckiwxnfq5xf6441flc79rqg7zdvh1rq4h6")))) |
5f96f303 | 769 | (build-system gnu-build-system) |
8f1d22b7 | 770 | (inputs `(("readline" ,readline))) |
49689377 MW |
771 | (arguments |
772 | `(#:configure-flags | |
73dc727e DC |
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")))) | |
3ad8cb41 | 779 | (home-page "https://www.sqlite.org/") |
5f96f303 LC |
780 | (synopsis "The SQLite database management system") |
781 | (description | |
782 | "SQLite is a software library that implements a self-contained, serverless, | |
35b9e423 EB |
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.") | |
ba8b9f8d | 786 | (license license:public-domain))) |
db60b1d9 LC |
787 | |
788 | (define-public tdb | |
789 | (package | |
790 | (name "tdb") | |
fab46af8 | 791 | (version "1.3.15") |
db60b1d9 LC |
792 | (source (origin |
793 | (method url-fetch) | |
ca473fc2 | 794 | (uri (string-append "https://www.samba.org/ftp/tdb/tdb-" |
db60b1d9 LC |
795 | version ".tar.gz")) |
796 | (sha256 | |
797 | (base32 | |
fab46af8 | 798 | "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl")))) |
db60b1d9 LC |
799 | (build-system gnu-build-system) |
800 | (arguments | |
6ccb7814 EF |
801 | '(#:phases |
802 | (modify-phases %standard-phases | |
803 | (replace 'configure | |
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))))))))) | |
db60b1d9 LC |
810 | (native-inputs |
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 | |
1abd0904 | 816 | (home-page "https://tdb.samba.org/") |
35b9e423 | 817 | (synopsis "Trivial database") |
db60b1d9 LC |
818 | (description |
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 | |
822 | extremely small.") | |
ba8b9f8d | 823 | (license license:lgpl3+))) |
274da61d LC |
824 | |
825 | (define-public perl-dbi | |
826 | (package | |
827 | (name "perl-dbi") | |
6138dede | 828 | (version "1.636") |
274da61d LC |
829 | (source (origin |
830 | (method url-fetch) | |
831 | (uri (string-append | |
832 | "mirror://cpan/authors/id/T/TI/TIMB/DBI-" | |
833 | version ".tar.gz")) | |
834 | (sha256 | |
835 | (base32 | |
6138dede | 836 | "0v37vnr5p0bx396cj0lb5kb69jbryq2mspp602hbgd04gklxqzcg")))) |
274da61d LC |
837 | (build-system perl-build-system) |
838 | (synopsis "Database independent interface for Perl") | |
839 | (description "This package provides an database interface for Perl.") | |
6138dede | 840 | (home-page "http://search.cpan.org/dist/DBI") |
2f3108ad | 841 | (license license:perl-license))) |
274da61d | 842 | |
feae3395 EB |
843 | (define-public perl-dbix-class |
844 | (package | |
845 | (name "perl-dbix-class") | |
5d78d746 | 846 | (version "0.082840") |
feae3395 EB |
847 | (source |
848 | (origin | |
849 | (method url-fetch) | |
850 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
851 | "DBIx-Class-" version ".tar.gz")) | |
852 | (sha256 | |
853 | (base32 | |
5d78d746 | 854 | "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0")))) |
feae3395 EB |
855 | (build-system perl-build-system) |
856 | (native-inputs | |
857 | `(("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
858 | ("perl-file-temp" ,perl-file-temp) | |
2f837cf7 | 859 | ("perl-module-install" ,perl-module-install) |
feae3395 EB |
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))) | |
864 | (propagated-inputs | |
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.") | |
2f3108ad | 896 | (license license:perl-license))) |
e61fd0f0 | 897 | |
4e4039e5 EB |
898 | (define-public perl-dbix-class-cursor-cached |
899 | (package | |
900 | (name "perl-dbix-class-cursor-cached") | |
180cb81b | 901 | (version "1.001004") |
4e4039e5 EB |
902 | (source |
903 | (origin | |
904 | (method url-fetch) | |
905 | (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/" | |
906 | "DBIx-Class-Cursor-Cached-" version ".tar.gz")) | |
907 | (sha256 | |
908 | (base32 | |
180cb81b | 909 | "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p")))) |
4e4039e5 EB |
910 | (build-system perl-build-system) |
911 | (native-inputs | |
912 | `(("perl-cache-cache" ,perl-cache-cache) | |
2f837cf7 MB |
913 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) |
914 | ("perl-module-install" ,perl-module-install))) | |
4e4039e5 EB |
915 | (propagated-inputs |
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.") | |
2f3108ad | 922 | (license license:perl-license))) |
4e4039e5 | 923 | |
e61fd0f0 EB |
924 | (define-public perl-dbix-class-introspectablem2m |
925 | (package | |
926 | (name "perl-dbix-class-introspectablem2m") | |
7a462b80 | 927 | (version "0.001002") |
e61fd0f0 EB |
928 | (source |
929 | (origin | |
930 | (method url-fetch) | |
68a9d6df | 931 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" |
e61fd0f0 EB |
932 | "DBIx-Class-IntrospectableM2M-" version ".tar.gz")) |
933 | (sha256 | |
934 | (base32 | |
7a462b80 | 935 | "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6")))) |
e61fd0f0 | 936 | (build-system perl-build-system) |
2f837cf7 MB |
937 | (native-inputs |
938 | `(("perl-module-install" ,perl-module-install))) | |
e61fd0f0 EB |
939 | (propagated-inputs |
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.") | |
2f3108ad | 949 | (license license:perl-license))) |
708155df EB |
950 | |
951 | (define-public perl-dbix-class-schema-loader | |
952 | (package | |
953 | (name "perl-dbix-class-schema-loader") | |
ebd2dbbf | 954 | (version "0.07046") |
708155df EB |
955 | (source |
956 | (origin | |
957 | (method url-fetch) | |
958 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" | |
959 | "DBIx-Class-Schema-Loader-" version ".tar.gz")) | |
960 | (sha256 | |
961 | (base32 | |
ebd2dbbf | 962 | "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3")))) |
708155df EB |
963 | (build-system perl-build-system) |
964 | (native-inputs | |
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) | |
2f837cf7 | 969 | ("perl-module-install" ,perl-module-install) |
708155df EB |
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))) | |
979 | (propagated-inputs | |
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.") | |
2f3108ad | 1005 | (license license:perl-license))) |
274da61d | 1006 | |
186eb132 EB |
1007 | (define-public perl-dbd-pg |
1008 | (package | |
1009 | (name "perl-dbd-pg") | |
4d40c6aa | 1010 | (version "3.5.3") |
186eb132 EB |
1011 | (source |
1012 | (origin | |
1013 | (method url-fetch) | |
1014 | (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/" | |
1015 | "DBD-Pg-" version ".tar.gz")) | |
1016 | (sha256 | |
1017 | (base32 | |
4d40c6aa | 1018 | "03m9w1cd0yyrbqwkwcl92j1cpmasmm69f3hwvcrlfsi5fnwsk63y")))) |
186eb132 EB |
1019 | (build-system perl-build-system) |
1020 | (native-inputs | |
1021 | `(("perl-dbi" ,perl-dbi))) | |
1022 | (propagated-inputs | |
1023 | `(("perl-dbi" ,perl-dbi) | |
1024 | ("postgresql" ,postgresql))) | |
1025 | (home-page "http://search.cpan.org/dist/DBD-Pg") | |
1026 | (synopsis "DBI PostgreSQL interface") | |
f33e71fc LC |
1027 | (description "This package provides a PostgreSQL driver for the Perl5 |
1028 | @dfn{Database Interface} (DBI).") | |
2f3108ad | 1029 | (license license:perl-license))) |
186eb132 | 1030 | |
4b7857a4 RW |
1031 | (define-public perl-dbd-mysql |
1032 | (package | |
1033 | (name "perl-dbd-mysql") | |
0ca1e77c | 1034 | (version "4.043") |
4b7857a4 RW |
1035 | (source |
1036 | (origin | |
1037 | (method url-fetch) | |
7c635ed6 | 1038 | (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/" |
4b7857a4 RW |
1039 | "DBD-mysql-" version ".tar.gz")) |
1040 | (sha256 | |
1041 | (base32 | |
c7db7b86 KK |
1042 | "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2")) |
1043 | (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch")))) | |
4b7857a4 RW |
1044 | (build-system perl-build-system) |
1045 | ;; Tests require running MySQL server | |
1046 | (arguments `(#:tests? #f)) | |
1047 | (propagated-inputs | |
1048 | `(("perl-dbi" ,perl-dbi) | |
1049 | ("mysql" ,mysql))) | |
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).") | |
2f3108ad | 1054 | (license license:perl-license))) |
4b7857a4 | 1055 | |
274da61d LC |
1056 | (define-public perl-dbd-sqlite |
1057 | (package | |
1058 | (name "perl-dbd-sqlite") | |
2273b751 | 1059 | (version "1.54") |
274da61d LC |
1060 | (source (origin |
1061 | (method url-fetch) | |
1062 | (uri (string-append | |
1063 | "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-" | |
1064 | version ".tar.gz")) | |
1065 | (sha256 | |
1066 | (base32 | |
2273b751 | 1067 | "0sbj9lx9syzpknvjv8cz9jndg32qz775vy2prgq305npv3dsca9r")))) |
274da61d LC |
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.") | |
2f3108ad | 1076 | (license license:perl-license) |
274da61d | 1077 | (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm"))) |
14e84b2d | 1078 | |
dd90952e EB |
1079 | (define-public perl-sql-abstract |
1080 | (package | |
1081 | (name "perl-sql-abstract") | |
1082 | (version "1.81") | |
1083 | (source | |
1084 | (origin | |
1085 | (method url-fetch) | |
1086 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
1087 | "SQL-Abstract-" version ".tar.gz")) | |
1088 | (sha256 | |
1089 | (base32 | |
1090 | "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz")))) | |
1091 | (build-system perl-build-system) | |
1092 | (native-inputs | |
9dab5017 MB |
1093 | `(("perl-module-install" ,perl-module-install) |
1094 | ("perl-test-deep" ,perl-test-deep) | |
dd90952e EB |
1095 | ("perl-test-exception" ,perl-test-exception) |
1096 | ("perl-test-warn" ,perl-test-warn))) | |
1097 | (propagated-inputs | |
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 | |
e881752c | 1109 | time your data changes.") |
2f3108ad | 1110 | (license license:perl-license))) |
14e84b2d | 1111 | |
b4dcb026 EB |
1112 | (define-public perl-sql-splitstatement |
1113 | (package | |
1114 | (name "perl-sql-splitstatement") | |
1115 | (version "1.00020") | |
1116 | (source | |
1117 | (origin | |
1118 | (method url-fetch) | |
1119 | (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/" | |
1120 | "SQL-SplitStatement-" version ".tar.gz")) | |
1121 | (sha256 | |
1122 | (base32 | |
1123 | "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p")))) | |
1124 | (build-system perl-build-system) | |
1125 | (native-inputs | |
1126 | `(("perl-test-exception" ,perl-test-exception))) | |
1127 | (propagated-inputs | |
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.") | |
2f3108ad | 1136 | (license license:perl-license))) |
b4dcb026 | 1137 | |
718c89c1 EB |
1138 | (define-public perl-sql-tokenizer |
1139 | (package | |
1140 | (name "perl-sql-tokenizer") | |
1141 | (version "0.24") | |
1142 | (source | |
1143 | (origin | |
1144 | (method url-fetch) | |
1145 | (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/" | |
1146 | "SQL-Tokenizer-" version ".tar.gz")) | |
1147 | (sha256 | |
1148 | (base32 | |
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 | |
1155 | valid SQL query.") | |
2f3108ad | 1156 | (license license:perl-license))) |
718c89c1 | 1157 | |
14e84b2d JD |
1158 | (define-public unixodbc |
1159 | (package | |
1160 | (name "unixodbc") | |
3fef0a2f | 1161 | (version "2.3.4") |
14e84b2d JD |
1162 | (source (origin |
1163 | (method url-fetch) | |
e881752c | 1164 | (uri |
14e84b2d | 1165 | (string-append |
3fef0a2f EF |
1166 | "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" |
1167 | version ".tar.gz")) | |
14e84b2d | 1168 | (sha256 |
3fef0a2f | 1169 | (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f")))) |
14e84b2d JD |
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 | |
1174 | Driver.") | |
ba8b9f8d | 1175 | (license license:lgpl2.1+) |
14e84b2d JD |
1176 | ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" |
1177 | (home-page "http://www.unixodbc.org"))) | |
b4a9c924 EB |
1178 | |
1179 | (define-public unqlite | |
1180 | (package | |
1181 | (name "unqlite") | |
1182 | (version "1.1.6") | |
1183 | (source (origin | |
1184 | (method url-fetch) | |
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/" | |
1188 | "download/v1.0.0/" | |
1189 | "unqlite-unofficial-" version ".tar.gz")) | |
1190 | (sha256 | |
1191 | (base32 | |
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") | |
1197 | (description | |
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 | |
69b4ffcf | 1202 | similar to BerkeleyDB, LevelDB, etc.") |
ba8b9f8d | 1203 | (license license:bsd-2))) |
463f6766 DT |
1204 | |
1205 | (define-public redis | |
1206 | (package | |
1207 | (name "redis") | |
f112bd26 | 1208 | (version "4.0.1") |
463f6766 DT |
1209 | (source (origin |
1210 | (method url-fetch) | |
1211 | (uri (string-append "http://download.redis.io/releases/redis-" | |
1212 | version".tar.gz")) | |
1213 | (sha256 | |
1214 | (base32 | |
f112bd26 | 1215 | "14bm8lkhylc93r4dgl7kkzzpw2xq7gr6w6h80n3jazqnx5mcsj90")))) |
463f6766 DT |
1216 | (build-system gnu-build-system) |
1217 | (arguments | |
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" | |
1222 | "MALLOC=libc" | |
b25f060f | 1223 | "LDFLAGS=-ldl" |
463f6766 DT |
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/") | |
ba8b9f8d | 1231 | (license license:bsd-3))) |
a65e2a02 | 1232 | |
1233 | (define-public kyotocabinet | |
1234 | (package | |
1235 | (name "kyotocabinet") | |
1236 | (version "1.2.76") | |
1237 | (source (origin | |
1238 | (method url-fetch) | |
1239 | (uri (string-append "http://fallabs.com/kyotocabinet/pkg/" | |
1240 | name "-" version ".tar.gz")) | |
1241 | (sha256 | |
1242 | (base32 | |
1243 | "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1")))) | |
1244 | (build-system gnu-build-system) | |
1245 | (arguments | |
1246 | `(#:configure-flags | |
1247 | (list | |
9d59023e | 1248 | "--disable-opt" ;"-march=native". XXX this also turns off -O0. |
a65e2a02 | 1249 | (string-append "LDFLAGS=-Wl,-rpath=" |
1250 | (assoc-ref %outputs "out") "/lib")))) | |
1251 | (inputs `(("zlib" ,zlib))) | |
1252 | (home-page "http://fallabs.com/kyotocabinet/") | |
1253 | (synopsis | |
1254 | "Kyoto Cabinet is a modern implementation of the DBM database") | |
1255 | (description | |
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.") | |
ba8b9f8d | 1259 | (license license:gpl3+))) |
6242b314 | 1260 | |
bdc11dc4 | 1261 | (define-public tokyocabinet |
1262 | (package | |
1263 | (name "tokyocabinet") | |
1264 | (version "1.4.48") | |
1265 | (source | |
1266 | (origin | |
1267 | (method url-fetch) | |
1268 | (uri (string-append "http://fallabs.com/tokyocabinet/" | |
1269 | name "-" version ".tar.gz")) | |
1270 | (sha256 | |
1271 | (base32 | |
1272 | "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0")))) | |
1273 | (build-system gnu-build-system) | |
1274 | (arguments | |
1275 | `(#:configure-flags | |
1276 | (list "--enable-pthread" "--enable-off64" "--enable-fastest" | |
1277 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1278 | (assoc-ref %outputs "out") "/lib")))) | |
1279 | (inputs | |
1280 | `(("zlib" ,zlib))) | |
1281 | (home-page "http://fallabs.com/tokyocabinet/") | |
1282 | (synopsis "Tokyo Cabinet is a modern implementation of the DBM database") | |
1283 | (description | |
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+))) | |
1291 | ||
6242b314 SB |
1292 | (define-public wiredtiger |
1293 | (package | |
1294 | (name "wiredtiger") | |
81e95821 | 1295 | (version "2.9.1") |
6242b314 SB |
1296 | (source (origin |
1297 | (method url-fetch) | |
1298 | (uri (string-append | |
1299 | "http://source.wiredtiger.com/releases/wiredtiger-" | |
1300 | version ".tar.bz2")) | |
1301 | (sha256 | |
1302 | (base32 | |
81e95821 | 1303 | "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s")))) |
6242b314 SB |
1304 | (build-system gnu-build-system) |
1305 | (arguments | |
1306 | '(#:configure-flags '("--enable-lz4" "--enable-zlib") | |
1307 | #:phases | |
1308 | (modify-phases %standard-phases | |
1309 | (add-before 'check 'disable-test/fops | |
1310 | (lambda _ | |
1311 | ;; XXX: timed out after 3600 seconds of silence | |
1312 | (substitute* "Makefile" | |
1313 | (("test/fops") "")) | |
1314 | #t))))) | |
1315 | (inputs | |
1316 | `(("lz4" ,lz4) | |
1317 | ("zlib" ,zlib))) | |
1318 | (home-page "http://source.wiredtiger.com/") | |
1319 | (synopsis "NoSQL data engine") | |
1320 | (description | |
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.") | |
ba8b9f8d | 1326 | (license license:gpl3) ; or GPL-2 |
6242b314 | 1327 | ;; configure.ac: WiredTiger requires a 64-bit build. |
092b7b3e | 1328 | (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")))) |
90c2ee88 DM |
1329 | |
1330 | (define-public perl-db-file | |
1331 | (package | |
1332 | (name "perl-db-file") | |
dd0cfb37 | 1333 | (version "1.840") |
90c2ee88 DM |
1334 | (source |
1335 | (origin | |
1336 | (method url-fetch) | |
1337 | (uri (string-append | |
1338 | "mirror://cpan/authors/id/P/PM/PMQS/DB_File-" | |
1339 | version | |
1340 | ".tar.gz")) | |
1341 | (sha256 | |
1342 | (base32 | |
dd0cfb37 | 1343 | "1i5jz85z4hpx15lw6ix27pyvrf0ziyh4z33lii4d3wnhz83lg1mp")))) |
90c2ee88 DM |
1344 | (build-system perl-build-system) |
1345 | (inputs `(("bdb" ,bdb))) | |
1346 | (native-inputs `(("perl-test-pod" ,perl-test-pod))) | |
1347 | (arguments | |
1348 | `(#:phases (modify-phases %standard-phases | |
1349 | (add-before | |
1350 | 'configure 'modify-config.in | |
1351 | (lambda* (#:key inputs #:allow-other-keys) | |
1352 | (substitute* "config.in" | |
1353 | (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb"))) | |
1354 | #t))))) | |
1355 | (home-page "http://search.cpan.org/dist/DB_File") | |
1356 | (synopsis | |
1357 | "Perl5 access to Berkeley DB version 1.x") | |
1358 | (description | |
1359 | "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.") | |
2f3108ad | 1360 | (license license:perl-license))) |
0e1b262e DC |
1361 | |
1362 | (define-public lmdb | |
1363 | (package | |
1364 | (name "lmdb") | |
603fd6b9 | 1365 | (version "0.9.21") |
0e1b262e DC |
1366 | (source (origin |
1367 | (method url-fetch) | |
1368 | (uri (string-append "https://github.com/LMDB/lmdb/archive/" | |
1369 | "LMDB_" version ".tar.gz")) | |
1370 | (sha256 | |
1371 | (base32 | |
603fd6b9 | 1372 | "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi")))) |
0e1b262e DC |
1373 | (build-system gnu-build-system) |
1374 | (arguments | |
1375 | `(#:test-target "test" | |
1376 | #:phases | |
1377 | (modify-phases %standard-phases | |
1378 | (replace 'configure | |
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"))) | |
1384 | #t))))) | |
1385 | (home-page "https://symas.com/products/lightning-memory-mapped-database") | |
fda852ff TGR |
1386 | (synopsis "Lightning Memory-Mapped Database library") |
1387 | (description | |
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 | |
1392 | simple. | |
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.") | |
0e1b262e | 1397 | (license license:openldap2.8))) |
fe71eee0 JN |
1398 | |
1399 | (define-public libpqxx | |
1400 | (package | |
1401 | (name "libpqxx") | |
1402 | (version "4.0.1") | |
1403 | (source (origin | |
1404 | (method url-fetch) | |
1405 | (uri (string-append | |
1406 | "http://pqxx.org/download/software/libpqxx/" | |
1407 | name "-" version ".tar.gz")) | |
1408 | (sha256 | |
1409 | (base32 | |
1410 | "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09")))) | |
1411 | (build-system gnu-build-system) | |
1412 | (native-inputs | |
1413 | `(("python" ,python-2))) | |
1414 | (inputs `(("postgresql" ,postgresql))) | |
1415 | (arguments | |
5ac097e2 MB |
1416 | `(#:tests? #f ; # FAIL: 1 |
1417 | #:phases | |
1418 | (modify-phases %standard-phases | |
1419 | (add-before 'configure 'fix-sed-command | |
1420 | (lambda _ | |
1421 | ;; Newer sed versions error out if double brackets are not used. | |
1422 | (substitute* "configure" | |
1423 | (("\\[:space:\\]") "[[:space:]]")) | |
1424 | #t))))) | |
fe71eee0 JN |
1425 | (synopsis "C++ connector for PostgreSQL") |
1426 | (description | |
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))) | |
4d98bfaf EF |
1432 | |
1433 | (define-public python-peewee | |
1434 | (package | |
1435 | (name "python-peewee") | |
1436 | (version "2.8.3") | |
1437 | (source | |
1438 | (origin | |
1439 | (method url-fetch) | |
1440 | (uri (pypi-uri "peewee" version)) | |
1441 | (sha256 | |
1442 | (base32 | |
1443 | "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd")))) | |
1444 | (build-system python-build-system) | |
1445 | (arguments | |
1446 | `(#:tests? #f)) ; Fails to import test data | |
1447 | (native-inputs | |
1448 | `(("python-cython" ,python-cython))) | |
1449 | (home-page "https://github.com/coleifer/peewee/") | |
1450 | (synopsis "Small object-relational mapping utility") | |
1451 | (description | |
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))) | |
1458 | ||
1459 | (define-public python2-peewee | |
1460 | (package-with-python2 python-peewee)) | |
62ea44fc AP |
1461 | |
1462 | (define-public sqlcipher | |
1463 | (package | |
1464 | (name "sqlcipher") | |
1465 | (version "3.3.1") | |
1466 | (source | |
1467 | (origin | |
1468 | (method url-fetch) | |
1469 | (uri (string-append "https://github.com/sqlcipher/" name | |
1470 | "/archive/v" version ".tar.gz")) | |
1471 | (sha256 | |
1472 | (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff")) | |
1473 | (file-name (string-append name "-" version ".tar.gz")))) | |
1474 | (build-system gnu-build-system) | |
1475 | (inputs | |
1476 | `(("libcrypto" ,openssl) | |
1477 | ("libtcl8.6" ,tcl))) ; required for running the tests | |
1478 | (native-inputs | |
1479 | `(("tcl" ,tcl))) | |
1480 | (arguments | |
1481 | '(#:configure-flags | |
1482 | '("--enable-tempstore=yes" | |
1483 | "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3" | |
1484 | "LDFLAGS=-lcrypto -ltcl8.6" | |
1485 | "--disable-tcl") | |
1486 | ;; tests cannot be run from the Makefile | |
1487 | ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172> | |
1488 | #:test-target "testfixture" | |
1489 | #:phases | |
1490 | (modify-phases %standard-phases | |
1491 | (add-before 'check 'build-test-runner | |
1492 | (assoc-ref %standard-phases 'check)) | |
1493 | (replace 'check | |
1494 | (lambda _ | |
1495 | (zero? | |
1496 | (system* "./testfixture" "test/crypto.test"))))))) | |
1497 | (home-page "https://www.zetetic.net/sqlcipher/") | |
1498 | (synopsis | |
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 | |
1504 | development.") | |
1505 | ;; The source files | |
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)))) | |
98d403bb DM |
1511 | |
1512 | (define-public python-pyodbc-c | |
1513 | (package | |
1514 | (name "python-pyodbc-c") | |
c6b6a74e | 1515 | (version "3.1.4") |
98d403bb DM |
1516 | (source |
1517 | (origin | |
1518 | (method url-fetch) | |
1519 | (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/" | |
1520 | "archive.tar.gz?ref=v" version)) | |
1521 | (sha256 | |
1522 | (base32 | |
c6b6a74e | 1523 | "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9")) |
98d403bb DM |
1524 | (file-name (string-append name "-" version ".tar.gz")))) |
1525 | (build-system python-build-system) | |
1526 | (inputs | |
1527 | `(("unixodbc" ,unixodbc))) | |
1528 | (arguments | |
1529 | `(;; No unit tests exist. | |
1530 | #:tests? #f)) | |
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 | |
1534 | for ODBC.") | |
1535 | (license (license:x11-style "file://LICENSE.TXT")))) | |
1536 | ||
1537 | (define-public python2-pyodbc-c | |
1538 | (package-with-python2 python-pyodbc-c)) | |
d39a84e8 AI |
1539 | |
1540 | (define-public mdbtools | |
1541 | (package | |
1542 | (name "mdbtools") | |
1543 | (version "0.7.1") | |
1544 | (source | |
1545 | (origin | |
1546 | (method url-fetch) | |
1547 | (uri (string-append "https://github.com/brianb/mdbtools/archive/" | |
1548 | version ".tar.gz")) | |
1549 | (sha256 | |
1550 | (base32 | |
1551 | "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw")) | |
1552 | (file-name (string-append name "-" version ".tar.gz")))) | |
1553 | (build-system gnu-build-system) | |
1554 | (inputs | |
1555 | `(("glib" ,glib))) | |
1556 | (native-inputs | |
1557 | `(("autoconf" ,autoconf) | |
1558 | ("automake" ,automake) | |
1559 | ("libtool" ,libtool) | |
1560 | ("pkg-config" ,pkg-config) | |
1561 | ("txt2man" ,txt2man) | |
1562 | ("which" ,which))) | |
1563 | (arguments | |
1564 | `(#:phases | |
1565 | (modify-phases %standard-phases | |
d10092b8 | 1566 | (add-after 'unpack 'autoreconf |
d39a84e8 AI |
1567 | (lambda _ |
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 | |
1577 | license:gpl2+)))) | |
07041d95 TGR |
1578 | |
1579 | (define-public python-lmdb | |
1580 | (package | |
1581 | (name "python-lmdb") | |
1582 | (version "0.92") | |
1583 | (source (origin | |
1584 | (method url-fetch) | |
1585 | (uri (pypi-uri "lmdb" version)) | |
1586 | (sha256 | |
1587 | (base32 | |
1588 | "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx")) | |
1589 | (modules '((guix build utils))) | |
1590 | (snippet | |
1591 | ;; Delete bundled lmdb source files. | |
1592 | '(for-each delete-file (list "lib/lmdb.h" | |
1593 | "lib/mdb.c" | |
1594 | "lib/midl.c" | |
1595 | "lib/midl.h"))))) | |
1596 | (build-system python-build-system) | |
1597 | (inputs | |
1598 | `(("lmdb" ,lmdb))) | |
1599 | (arguments | |
1600 | `(#:phases | |
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")) | |
1608 | #t)))) | |
1609 | ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’. | |
1610 | #:tests? #f)) | |
1611 | (home-page "https://github.com/dw/py-lmdb") | |
1612 | (synopsis "Python binding for the ‘Lightning’ database (LMDB)") | |
1613 | (description | |
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.") | |
1616 | (license | |
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. | |
1620 | license:bsd-3)))) | |
1621 | ||
1622 | (define-public python2-lmdb | |
1623 | (package-with-python2 python-lmdb)) |