Commit | Line | Data |
---|---|---|
5f96f303 | 1 | ;;; GNU Guix --- Functional package management for GNU |
2d32d153 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
9a9f1003 | 3 | ;;; Copyright © 2012, 2014 Andreas Enge <andreas@enge.fr> |
5f96f303 LC |
4 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> |
5 | ;;; Copyright © 2014 David Thompson <davet@gnu.org> | |
798e0045 | 6 | ;;; Copyright © 2014, 2015 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> |
5f96f303 LC |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
25 | (define-module (gnu packages databases) | |
26 | #:use-module (gnu packages) | |
27 | #:use-module (gnu packages perl) | |
708155df | 28 | #:use-module (gnu packages language) |
5f96f303 | 29 | #:use-module (gnu packages linux) |
cc2b77df | 30 | #:use-module (gnu packages tls) |
5f96f303 LC |
31 | #:use-module (gnu packages compression) |
32 | #:use-module (gnu packages ncurses) | |
33 | #:use-module (gnu packages readline) | |
34 | #:use-module (gnu packages emacs) | |
35 | #:use-module (gnu packages check) | |
36 | #:use-module (gnu packages algebra) | |
37 | #:use-module (gnu packages curl) | |
38 | #:use-module (gnu packages gnupg) | |
db60b1d9 | 39 | #:use-module (gnu packages python) |
77631745 SB |
40 | #:use-module (gnu packages pcre) |
41 | #:use-module (gnu packages xml) | |
42 | #:use-module (gnu packages bison) | |
43 | #:use-module (gnu packages jemalloc) | |
5f96f303 | 44 | #:use-module ((guix licenses) |
166191b3 | 45 | #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft |
b4a9c924 | 46 | bsd-2 public-domain)) |
5f96f303 LC |
47 | #:use-module (guix packages) |
48 | #:use-module (guix download) | |
49 | #:use-module (guix build-system gnu) | |
274da61d | 50 | #:use-module (guix build-system perl) |
77631745 | 51 | #:use-module (guix build-system cmake) |
329d13b8 | 52 | #:use-module (guix utils) |
5f96f303 LC |
53 | #:use-module (srfi srfi-26) |
54 | #:use-module (ice-9 match)) | |
55 | ||
56 | (define-public bdb | |
57 | (package | |
58 | (name "bdb") | |
59 | (version "5.3.21") | |
60 | (source (origin | |
61 | (method url-fetch) | |
62 | (uri (string-append "http://download.oracle.com/berkeley-db/db-" version | |
63 | ".tar.gz")) | |
64 | (sha256 (base32 | |
65 | "1f2g2612lf8djbwbwhxsvmffmf9d7693kh2l20195pqp0f9jmnfx")))) | |
66 | (build-system gnu-build-system) | |
67 | (outputs '("out" ; programs, libraries, headers | |
68 | "doc")) ; 94 MiB of HTML docs | |
69 | (arguments | |
70 | '(#:tests? #f ; no check target available | |
71 | #:phases | |
72 | (alist-replace | |
73 | 'configure | |
74 | (lambda* (#:key outputs #:allow-other-keys) | |
75 | (let ((out (assoc-ref outputs "out")) | |
76 | (doc (assoc-ref outputs "doc"))) | |
77 | ;; '--docdir' is not honored, so we need to patch. | |
78 | (substitute* "dist/Makefile.in" | |
79 | (("docdir[[:blank:]]*=.*") | |
80 | (string-append "docdir = " doc "/share/doc/bdb"))) | |
81 | ||
82 | (zero? | |
83 | (system* "./dist/configure" | |
84 | (string-append "--prefix=" out) | |
85 | (string-append "CONFIG_SHELL=" (which "bash")) | |
86 | (string-append "SHELL=" (which "bash")) | |
87 | ||
88 | ;; The compatibility mode is needed by some packages, | |
89 | ;; notably iproute2. | |
90 | "--enable-compat185")))) | |
91 | %standard-phases))) | |
35b9e423 | 92 | (synopsis "Berkeley database") |
5f96f303 LC |
93 | (description |
94 | "Berkeley DB is an embeddable database allowing developers the choice of | |
95 | SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") | |
166191b3 LC |
96 | (license (non-copyleft "file://LICENSE" |
97 | "See LICENSE in the distribution.")) | |
5f96f303 LC |
98 | (home-page |
99 | "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html"))) | |
100 | ||
101 | (define-public mysql | |
102 | (package | |
103 | (name "mysql") | |
329d13b8 | 104 | (version "5.6.25") |
5f96f303 LC |
105 | (source (origin |
106 | (method url-fetch) | |
107 | (uri (string-append | |
329d13b8 SB |
108 | "http://dev.mysql.com/get/Downloads/MySQL-" |
109 | (version-major+minor version) "/" | |
110 | name "-" version ".tar.gz")) | |
5f96f303 LC |
111 | (sha256 |
112 | (base32 | |
329d13b8 SB |
113 | "1gbz5i1z3nswpq3q8f477vrx7g15j8n41pyb94k0jfnkhc5rq1qm")))) |
114 | (build-system cmake-build-system) | |
115 | (arguments | |
116 | '(#:configure-flags | |
117 | '("-DBUILD_CONFIG=mysql_release" | |
118 | "-DWITH_SSL=system" | |
119 | "-DWITH_ZLIB=system" | |
120 | "-DDEFAULT_CHARSET=utf8" | |
121 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
122 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
123 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
124 | "-DINSTALL_INFODIR=share/mysql/docs" | |
125 | "-DINSTALL_MANDIR=share/man" | |
126 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" | |
127 | "-DINSTALL_SCRIPTDIR=bin" | |
128 | "-DINSTALL_INCLUDEDIR=include/mysql" | |
129 | "-DINSTALL_DOCREADMEDIR=share/mysql/docs" | |
130 | "-DINSTALL_SUPPORTFILESDIR=share/mysql" | |
131 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" | |
132 | "-DINSTALL_DOCDIR=share/mysql/docs" | |
133 | "-DINSTALL_SHAREDIR=share/mysql" | |
134 | ;; Get rid of test data. | |
135 | "-DINSTALL_MYSQLTESTDIR=" | |
3f289db6 LC |
136 | "-DINSTALL_SQLBENCHDIR=") |
137 | #:phases (modify-phases %standard-phases | |
138 | (add-after | |
139 | 'install 'strip-extra-references | |
140 | (lambda* (#:key outputs #:allow-other-keys) | |
141 | ;; Strip references to GCC and other build-time | |
142 | ;; dependencies. | |
143 | (let ((out (assoc-ref outputs "out"))) | |
144 | (for-each remove-store-references | |
145 | (list (string-append out "/bin/mysqlbug") | |
146 | (string-append | |
147 | out "/share/mysql/docs/INFO_BIN"))) | |
6a52df50 LC |
148 | #t))) |
149 | (add-after | |
150 | 'install 'remove-extra-binaries | |
151 | (lambda* (#:key outputs #:allow-other-keys) | |
152 | (let ((out (assoc-ref outputs "out"))) | |
153 | ;; Remove the 3 *_embedded files, which weigh in at | |
154 | ;; 14 MiB each. | |
155 | (for-each delete-file | |
156 | (find-files (string-append out "/bin") | |
157 | "_embedded$")) | |
3f289db6 | 158 | #t)))))) |
329d13b8 SB |
159 | (native-inputs |
160 | `(("bison" ,bison) | |
161 | ("perl" ,perl))) | |
5f96f303 | 162 | (inputs |
329d13b8 | 163 | `(("libaio" ,libaio) |
5f96f303 | 164 | ("openssl" ,openssl) |
5f96f303 LC |
165 | ("zlib" ,zlib) |
166 | ("ncurses" ,ncurses))) | |
5f96f303 | 167 | (home-page "http://www.mysql.com/") |
9e771e3b | 168 | (synopsis "Fast, easy to use, and popular database") |
5f96f303 LC |
169 | (description |
170 | "MySQL is a fast, reliable, and easy to use relational database | |
171 | management system that supports the standardized Structured Query | |
172 | Language.") | |
173 | (license gpl2))) | |
174 | ||
77631745 SB |
175 | (define-public mariadb |
176 | (package | |
177 | (name "mariadb") | |
85bafc31 | 178 | (version "10.0.18") |
77631745 SB |
179 | (source (origin |
180 | (method url-fetch) | |
181 | (uri (string-append "https://downloads.mariadb.org/f/" | |
182 | name "-" version "/source/" | |
183 | name "-" version ".tar.gz")) | |
184 | (sha256 | |
185 | (base32 | |
85bafc31 | 186 | "1xcs391cm0vnl9bvx1470v8z4d77zqv16n6iaqi12jm0ma8fwvv8")))) |
77631745 SB |
187 | (build-system cmake-build-system) |
188 | (arguments | |
189 | '(#:configure-flags | |
190 | '("-DBUILD_CONFIG=mysql_release" | |
191 | "-DDEFAULT_CHARSET=utf8" | |
192 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
193 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
194 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
195 | "-DINSTALL_INFODIR=share/mysql/docs" | |
196 | "-DINSTALL_MANDIR=share/man" | |
197 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" | |
198 | "-DINSTALL_SCRIPTDIR=bin" | |
199 | "-DINSTALL_INCLUDEDIR=include/mysql" | |
200 | "-DINSTALL_DOCREADMEDIR=share/mysql/docs" | |
201 | "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files" | |
202 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" | |
203 | "-DINSTALL_DOCDIR=share/mysql/docs" | |
204 | "-DINSTALL_SHAREDIR=share/mysql") | |
205 | #:phases | |
206 | (modify-phases %standard-phases | |
207 | (add-before | |
208 | 'configure 'pre-configure | |
209 | (lambda _ | |
210 | (setenv "CONFIG_SHELL" (which "sh")) | |
77631745 SB |
211 | #t)) |
212 | (add-after | |
213 | 'install 'post-install | |
214 | (lambda* (#:key outputs #:allow-other-keys) | |
215 | (let* ((out (assoc-ref outputs "out")) | |
216 | (test (assoc-ref outputs "test"))) | |
217 | (substitute* (string-append out "/bin/mysql_install_db") | |
218 | (("basedir=\"\"") | |
219 | (string-append "basedir=\"" out "\""))) | |
220 | ;; Remove unneeded files for testing. | |
221 | (with-directory-excursion out | |
222 | (for-each delete-file-recursively | |
223 | '("data" "mysql-test" "sql-bench" | |
224 | "share/man/man1/mysql-test-run.pl.1"))))))))) | |
225 | (native-inputs | |
226 | `(("bison" ,bison) | |
227 | ("perl" ,perl))) | |
228 | (inputs | |
229 | `(("jemalloc" ,jemalloc) | |
230 | ("libaio" ,libaio) | |
231 | ("libxml2" ,libxml2) | |
232 | ("ncurses" ,ncurses) | |
233 | ("openssl" ,openssl) | |
234 | ("pcre" ,pcre) | |
235 | ("zlib" ,zlib))) | |
236 | (home-page "https://mariadb.org/") | |
237 | (synopsis "SQL database server") | |
238 | (description | |
239 | "MariaDB is a multi-user and multi-threaded SQL database server, designed | |
240 | as a drop-in replacement of MySQL.") | |
241 | (license gpl2))) | |
242 | ||
5f96f303 LC |
243 | (define-public postgresql |
244 | (package | |
245 | (name "postgresql") | |
8605321d | 246 | (version "9.3.7") |
5f96f303 LC |
247 | (source (origin |
248 | (method url-fetch) | |
249 | (uri (string-append "http://ftp.postgresql.org/pub/source/v" | |
9020890b | 250 | version "/postgresql-" version ".tar.bz2")) |
5f96f303 LC |
251 | (sha256 |
252 | (base32 | |
8605321d | 253 | "0ggz0i91znv053zx9qas7pjf93s5by3dk84z1jxbjkg8yyrnlx4b")))) |
5f96f303 LC |
254 | (build-system gnu-build-system) |
255 | (inputs | |
256 | `(("readline" ,readline) | |
257 | ("zlib" ,zlib))) | |
258 | (home-page "http://www.postgresql.org/") | |
259 | (synopsis "Powerful object-relational database system") | |
260 | (description | |
261 | "PostgreSQL is a powerful object-relational database system. It is fully | |
262 | ACID compliant, has full support for foreign keys, joins, views, triggers, and | |
263 | stored procedures (in multiple languages). It includes most SQL:2008 data | |
264 | types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and | |
265 | TIMESTAMP. It also supports storage of binary large objects, including | |
266 | pictures, sounds, or video.") | |
267 | (license (x11-style "file://COPYRIGHT")))) | |
268 | ||
269 | (define-public recutils | |
270 | (package | |
271 | (name "recutils") | |
272 | (version "1.7") | |
273 | (source (origin | |
274 | (method url-fetch) | |
275 | (uri (string-append "mirror://gnu/recutils/recutils-" | |
276 | version ".tar.gz")) | |
277 | (sha256 | |
278 | (base32 | |
279 | "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93")))) | |
280 | (build-system gnu-build-system) | |
281 | ||
282 | ;; Running tests in parallel leads to test failures and crashes in | |
283 | ;; torture/utils. | |
284 | (arguments '(#:parallel-tests? #f)) | |
285 | ||
2d32d153 | 286 | (native-inputs `(("emacs" ,emacs-no-x) |
5f96f303 LC |
287 | ("bc" ,bc))) |
288 | ||
289 | ;; TODO: Add more optional inputs. | |
290 | ;; FIXME: Our Bash doesn't have development headers (need for the 'readrec' | |
291 | ;; built-in command), but it's not clear how to get them installed. | |
292 | ;; See <https://lists.gnu.org/archive/html/bug-bash/2014-03/msg00125.html>. | |
293 | (inputs `(("curl" ,curl) | |
294 | ("libgcrypt" ,libgcrypt) | |
295 | ("check" ,check))) | |
296 | (synopsis "Manipulate plain text files as databases") | |
297 | (description | |
298 | "GNU Recutils is a set of tools and libraries for creating and | |
299 | manipulating text-based, human-editable databases. Despite being text-based, | |
300 | databases created with Recutils carry all of the expected features such as | |
c5779c93 LC |
301 | unique fields, primary keys, time stamps and more. Many different field |
302 | types are supported, as is encryption.") | |
5f96f303 LC |
303 | (license gpl3+) |
304 | (home-page "http://www.gnu.org/software/recutils/"))) | |
305 | ||
306 | (define-public sqlite | |
307 | (package | |
308 | (name "sqlite") | |
4c10c6cb | 309 | (version "3.8.10.2") |
5f96f303 LC |
310 | (source (origin |
311 | (method url-fetch) | |
312 | ;; TODO: Download from sqlite.org once this bug : | |
313 | ;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html | |
314 | ;; has been fixed. | |
315 | (uri (let ((numeric-version | |
316 | (match (string-split version #\.) | |
317 | ((first-digit other-digits ...) | |
318 | (string-append first-digit | |
319 | (string-pad-right | |
320 | (string-concatenate | |
321 | (map (cut string-pad <> 2 #\0) | |
322 | other-digits)) | |
323 | 6 #\0)))))) | |
324 | (string-append | |
325 | "mirror://sourceforge/sqlite.mirror/SQLite%20" version | |
326 | "/sqlite-autoconf-" numeric-version ".tar.gz"))) | |
327 | (sha256 | |
328 | (base32 | |
4c10c6cb | 329 | "09nnaqx50gl1vmfvdipirizr61q3s0ywlql50f9kr1bx9rdfb0l3")))) |
5f96f303 | 330 | (build-system gnu-build-system) |
8f1d22b7 | 331 | (inputs `(("readline" ,readline))) |
49689377 MW |
332 | (arguments |
333 | `(#:configure-flags | |
334 | ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to | |
335 | ;; CFLAGS. GNU Icecat will refuse to use the system SQLite unless these | |
336 | ;; options are enabled. | |
337 | '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY"))) | |
5f96f303 LC |
338 | (home-page "http://www.sqlite.org/") |
339 | (synopsis "The SQLite database management system") | |
340 | (description | |
341 | "SQLite is a software library that implements a self-contained, serverless, | |
35b9e423 EB |
342 | zero-configuration, transactional SQL database engine. SQLite is the most |
343 | widely deployed SQL database engine in the world. The source code for SQLite | |
344 | is in the public domain.") | |
5f96f303 | 345 | (license public-domain))) |
db60b1d9 LC |
346 | |
347 | (define-public tdb | |
348 | (package | |
349 | (name "tdb") | |
350 | (version "1.3.0") | |
351 | (source (origin | |
352 | (method url-fetch) | |
353 | (uri (string-append "http://samba.org/ftp/tdb/tdb-" | |
354 | version ".tar.gz")) | |
355 | (sha256 | |
356 | (base32 | |
357 | "085sd2kii72fr0c4pdc7c7m0xk34nc66wnjp21c83dss826y9gh4")))) | |
358 | (build-system gnu-build-system) | |
359 | (arguments | |
360 | '(#:phases (alist-replace | |
361 | 'configure | |
362 | (lambda* (#:key outputs #:allow-other-keys) | |
363 | (let ((out (assoc-ref outputs "out"))) | |
364 | ;; The 'configure' script is a wrapper for Waf and | |
365 | ;; doesn't recognize things like '--enable-fast-install'. | |
366 | (zero? (system* "./configure" | |
367 | (string-append "--prefix=" out))))) | |
368 | %standard-phases))) | |
369 | (native-inputs | |
370 | `(;; TODO: Build the documentation. | |
371 | ;; ("docbook-xsl" ,docbook-xsl) | |
372 | ;; ("libxml2" ,libxml2) | |
373 | ;; ("libxslt" ,libxslt) | |
374 | ("python" ,python-2))) ;for the Waf build system | |
375 | (home-page "http://tdb.samba.org/") | |
35b9e423 | 376 | (synopsis "Trivial database") |
db60b1d9 LC |
377 | (description |
378 | "TDB is a Trivial Database. In concept, it is very much like GDBM, | |
379 | and BSD's DB except that it allows multiple simultaneous writers and uses | |
380 | locking internally to keep writers from trampling on each other. TDB is also | |
381 | extremely small.") | |
382 | (license lgpl3+))) | |
274da61d LC |
383 | |
384 | (define-public perl-dbi | |
385 | (package | |
386 | (name "perl-dbi") | |
387 | (version "1.631") | |
388 | (source (origin | |
389 | (method url-fetch) | |
390 | (uri (string-append | |
391 | "mirror://cpan/authors/id/T/TI/TIMB/DBI-" | |
392 | version ".tar.gz")) | |
393 | (sha256 | |
394 | (base32 | |
395 | "04fmrnchhwi7jx4niaiv93vmi343hdm3xj04w9zr2m9hhqh782np")))) | |
396 | (build-system perl-build-system) | |
397 | (synopsis "Database independent interface for Perl") | |
398 | (description "This package provides an database interface for Perl.") | |
399 | (home-page "http://search.cpan.org/~timb/DBI-1.631/DBI.pm") | |
400 | (license (package-license perl)))) | |
401 | ||
feae3395 EB |
402 | (define-public perl-dbix-class |
403 | (package | |
404 | (name "perl-dbix-class") | |
405 | (version "0.082810") | |
406 | (source | |
407 | (origin | |
408 | (method url-fetch) | |
409 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
410 | "DBIx-Class-" version ".tar.gz")) | |
411 | (sha256 | |
412 | (base32 | |
413 | "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04")))) | |
414 | (build-system perl-build-system) | |
415 | (native-inputs | |
416 | `(("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
417 | ("perl-file-temp" ,perl-file-temp) | |
418 | ("perl-package-stash" ,perl-package-stash) | |
419 | ("perl-test-deep" ,perl-test-deep) | |
420 | ("perl-test-exception" ,perl-test-exception) | |
421 | ("perl-test-warn" ,perl-test-warn))) | |
422 | (propagated-inputs | |
423 | `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
424 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
425 | ("perl-class-inspector" ,perl-class-inspector) | |
426 | ("perl-config-any" ,perl-config-any) | |
427 | ("perl-context-preserve" ,perl-context-preserve) | |
428 | ("perl-data-dumper-concise" ,perl-data-dumper-concise) | |
429 | ("perl-data-page" ,perl-data-page) | |
430 | ("perl-dbi" ,perl-dbi) | |
431 | ("perl-devel-globaldestruction" ,perl-devel-globaldestruction) | |
432 | ("perl-hash-merge" ,perl-hash-merge) | |
433 | ("perl-module-find" ,perl-module-find) | |
434 | ("perl-moo" ,perl-moo) | |
435 | ("perl-mro-compat" ,perl-mro-compat) | |
436 | ("perl-namespace-clean" ,perl-namespace-clean) | |
437 | ("perl-path-class" ,perl-path-class) | |
438 | ("perl-scalar-list-utils" ,perl-scalar-list-utils) | |
439 | ("perl-scope-guard" ,perl-scope-guard) | |
440 | ("perl-sql-abstract" ,perl-sql-abstract) | |
441 | ("perl-sub-name" ,perl-sub-name) | |
442 | ("perl-text-balanced" ,perl-text-balanced) | |
443 | ("perl-try-tiny" ,perl-try-tiny))) | |
444 | (home-page "http://search.cpan.org/dist/DBIx-Class") | |
445 | (synopsis "Extensible and flexible object <-> relational mapper") | |
446 | (description "An SQL to OO mapper with an object API inspired by | |
447 | Class::DBI (with a compatibility layer as a springboard for porting) and a | |
448 | resultset API that allows abstract encapsulation of database operations. It | |
449 | aims to make representing queries in your code as perl-ish as possible while | |
450 | still providing access to as many of the capabilities of the database as | |
451 | possible, including retrieving related records from multiple tables in a | |
452 | single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\", | |
453 | \"ORDER BY\" and \"HAVING\" support.") | |
e61fd0f0 EB |
454 | (license (package-license perl)))) |
455 | ||
4e4039e5 EB |
456 | (define-public perl-dbix-class-cursor-cached |
457 | (package | |
458 | (name "perl-dbix-class-cursor-cached") | |
459 | (version "1.001002") | |
460 | (source | |
461 | (origin | |
462 | (method url-fetch) | |
463 | (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/" | |
464 | "DBIx-Class-Cursor-Cached-" version ".tar.gz")) | |
465 | (sha256 | |
466 | (base32 | |
467 | "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0")))) | |
468 | (build-system perl-build-system) | |
469 | (native-inputs | |
470 | `(("perl-cache-cache" ,perl-cache-cache) | |
471 | ("perl-dbd-sqlite" ,perl-dbd-sqlite))) | |
472 | (propagated-inputs | |
473 | `(("perl-carp-clan" ,perl-carp-clan) | |
474 | ("perl-dbix-class" ,perl-dbix-class))) | |
475 | (home-page "http://search.cpan.org/dist/DBIx-Class-Cursor-Cached") | |
476 | (synopsis "Cursor with built-in caching support") | |
477 | (description "DBIx::Class::Cursor::Cached provides a cursor class with | |
478 | built-in caching support.") | |
479 | (license (package-license perl)))) | |
480 | ||
e61fd0f0 EB |
481 | (define-public perl-dbix-class-introspectablem2m |
482 | (package | |
483 | (name "perl-dbix-class-introspectablem2m") | |
484 | (version "0.001001") | |
485 | (source | |
486 | (origin | |
487 | (method url-fetch) | |
488 | (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/" | |
489 | "DBIx-Class-IntrospectableM2M-" version ".tar.gz")) | |
490 | (sha256 | |
491 | (base32 | |
492 | "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm")))) | |
493 | (build-system perl-build-system) | |
494 | (propagated-inputs | |
495 | `(("perl-dbix-class" ,perl-dbix-class))) | |
496 | (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M") | |
497 | (synopsis "Introspect many-to-many relationships") | |
498 | (description "Because the many-to-many relationships are not real | |
499 | relationships, they can not be introspected with DBIx::Class. Many-to-many | |
500 | relationships are actually just a collection of convenience methods installed | |
501 | to bridge two relationships. This DBIx::Class component can be used to store | |
502 | all relevant information about these non-relationships so they can later be | |
503 | introspected and examined.") | |
708155df EB |
504 | (license (package-license perl)))) |
505 | ||
506 | (define-public perl-dbix-class-schema-loader | |
507 | (package | |
508 | (name "perl-dbix-class-schema-loader") | |
509 | (version "0.07042") | |
510 | (source | |
511 | (origin | |
512 | (method url-fetch) | |
513 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" | |
514 | "DBIx-Class-Schema-Loader-" version ".tar.gz")) | |
515 | (sha256 | |
516 | (base32 | |
517 | "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf")))) | |
518 | (build-system perl-build-system) | |
519 | (native-inputs | |
520 | `(("perl-config-any" ,perl-config-any) | |
521 | ("perl-config-general" ,perl-config-general) | |
522 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
523 | ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m) | |
524 | ("perl-moose" ,perl-moose) | |
525 | ("perl-moosex-markasmethods" ,perl-moosex-markasmethods) | |
526 | ("perl-moosex-nonmoose" ,perl-moosex-nonmoose) | |
527 | ("perl-namespace-autoclean" ,perl-namespace-autoclean) | |
528 | ("perl-test-deep" ,perl-test-deep) | |
529 | ("perl-test-differences" ,perl-test-differences) | |
530 | ("perl-test-exception" ,perl-test-exception) | |
531 | ("perl-test-pod" ,perl-test-pod) | |
532 | ("perl-test-warn" ,perl-test-warn))) | |
533 | (propagated-inputs | |
534 | `(("perl-class-unload" ,perl-class-unload) | |
535 | ("perl-class-inspector" ,perl-class-inspector) | |
536 | ("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
537 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
538 | ("perl-carp-clan" ,perl-carp-clan) | |
539 | ("perl-data-dump" ,perl-data-dump) | |
540 | ("perl-dbix-class" ,perl-dbix-class) | |
541 | ("perl-hash-merge" ,perl-hash-merge) | |
542 | ("perl-list-moreutils" ,perl-list-moreutils) | |
543 | ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase) | |
544 | ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number) | |
545 | ("perl-lingua-en-tagger" ,perl-lingua-en-tagger) | |
546 | ("perl-namespace-clean" ,perl-namespace-clean) | |
547 | ("perl-mro-compat" ,perl-mro-compat) | |
548 | ("perl-scope-guard" ,perl-scope-guard) | |
549 | ("perl-string-camelcase" ,perl-string-camelcase) | |
550 | ("perl-string-toidentifier-en" ,perl-string-toidentifier-en) | |
551 | ("perl-sub-name" ,perl-sub-name) | |
552 | ("perl-try-tiny" ,perl-try-tiny))) | |
553 | (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails | |
554 | (home-page "http://search.cpan.org/dist/DBIx-Class-Schema-Loader") | |
555 | (synopsis "Create a DBIx::Class::Schema based on a database") | |
556 | (description "DBIx::Class::Schema::Loader automates the definition of a | |
557 | DBIx::Class::Schema by scanning database table definitions and setting up the | |
558 | columns, primary keys, unique constraints and relationships.") | |
274da61d LC |
559 | (license (package-license perl)))) |
560 | ||
186eb132 EB |
561 | (define-public perl-dbd-pg |
562 | (package | |
563 | (name "perl-dbd-pg") | |
564 | (version "3.5.1") | |
565 | (source | |
566 | (origin | |
567 | (method url-fetch) | |
568 | (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/" | |
569 | "DBD-Pg-" version ".tar.gz")) | |
570 | (sha256 | |
571 | (base32 | |
572 | "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx")))) | |
573 | (build-system perl-build-system) | |
574 | (native-inputs | |
575 | `(("perl-dbi" ,perl-dbi))) | |
576 | (propagated-inputs | |
577 | `(("perl-dbi" ,perl-dbi) | |
578 | ("postgresql" ,postgresql))) | |
579 | (home-page "http://search.cpan.org/dist/DBD-Pg") | |
580 | (synopsis "DBI PostgreSQL interface") | |
581 | (description "") | |
582 | (license (package-license perl)))) | |
583 | ||
274da61d LC |
584 | (define-public perl-dbd-sqlite |
585 | (package | |
586 | (name "perl-dbd-sqlite") | |
587 | (version "1.42") | |
588 | (source (origin | |
589 | (method url-fetch) | |
590 | (uri (string-append | |
591 | "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-" | |
592 | version ".tar.gz")) | |
593 | (sha256 | |
594 | (base32 | |
595 | "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb")))) | |
596 | (build-system perl-build-system) | |
597 | (inputs `(("sqlite" ,sqlite))) | |
598 | (propagated-inputs `(("perl-dbi" ,perl-dbi))) | |
599 | (synopsis "SQlite interface for Perl") | |
600 | (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes | |
601 | the entire thing in the distribution. So in order to get a fast transaction | |
602 | capable RDBMS working for your Perl project you simply have to install this | |
603 | module, and nothing else.") | |
604 | (license (package-license perl)) | |
605 | (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm"))) | |
14e84b2d | 606 | |
dd90952e EB |
607 | (define-public perl-sql-abstract |
608 | (package | |
609 | (name "perl-sql-abstract") | |
610 | (version "1.81") | |
611 | (source | |
612 | (origin | |
613 | (method url-fetch) | |
614 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
615 | "SQL-Abstract-" version ".tar.gz")) | |
616 | (sha256 | |
617 | (base32 | |
618 | "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz")))) | |
619 | (build-system perl-build-system) | |
620 | (native-inputs | |
621 | `(("perl-test-deep" ,perl-test-deep) | |
622 | ("perl-test-exception" ,perl-test-exception) | |
623 | ("perl-test-warn" ,perl-test-warn))) | |
624 | (propagated-inputs | |
625 | `(("perl-hash-merge" ,perl-hash-merge) | |
626 | ("perl-moo" ,perl-moo) | |
627 | ("perl-mro-compat" ,perl-mro-compat) | |
628 | ("perl-text-balanced" ,perl-text-balanced))) | |
629 | (home-page "http://search.cpan.org/dist/SQL-Abstract") | |
630 | (synopsis "Generate SQL from Perl data structures") | |
631 | (description "This module was inspired by the excellent DBIx::Abstract. | |
632 | While based on the concepts used by DBIx::Abstract, the concepts used have | |
633 | been modified to make the SQL easier to generate from Perl data structures. | |
634 | The underlying idea is for this module to do what you mean, based on the data | |
635 | structures you provide it, so that you don't have to modify your code every | |
636 | time your data changes") | |
637 | (license (package-license perl)))) | |
14e84b2d | 638 | |
b4dcb026 EB |
639 | (define-public perl-sql-splitstatement |
640 | (package | |
641 | (name "perl-sql-splitstatement") | |
642 | (version "1.00020") | |
643 | (source | |
644 | (origin | |
645 | (method url-fetch) | |
646 | (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/" | |
647 | "SQL-SplitStatement-" version ".tar.gz")) | |
648 | (sha256 | |
649 | (base32 | |
650 | "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p")))) | |
651 | (build-system perl-build-system) | |
652 | (native-inputs | |
653 | `(("perl-test-exception" ,perl-test-exception))) | |
654 | (propagated-inputs | |
655 | `(("perl-class-accessor" ,perl-class-accessor) | |
656 | ("perl-list-moreutils" ,perl-list-moreutils) | |
657 | ("perl-regexp-common" ,perl-regexp-common) | |
658 | ("perl-sql-tokenizer" ,perl-sql-tokenizer))) | |
659 | (home-page "http://search.cpan.org/dist/SQL-SplitStatement") | |
660 | (synopsis "Split SQL code into atomic statements") | |
661 | (description "This module tries to split any SQL code, even including | |
662 | non-standard extensions, into the atomic statements it is composed of.") | |
663 | (license (package-license perl)))) | |
664 | ||
718c89c1 EB |
665 | (define-public perl-sql-tokenizer |
666 | (package | |
667 | (name "perl-sql-tokenizer") | |
668 | (version "0.24") | |
669 | (source | |
670 | (origin | |
671 | (method url-fetch) | |
672 | (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/" | |
673 | "SQL-Tokenizer-" version ".tar.gz")) | |
674 | (sha256 | |
675 | (base32 | |
676 | "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s")))) | |
677 | (build-system perl-build-system) | |
678 | (home-page "http://search.cpan.org/dist/SQL-Tokenizer") | |
679 | (synopsis "SQL tokenizer") | |
680 | (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not | |
681 | claim to be a parser or query verifier. It just creates sane tokens from a | |
682 | valid SQL query.") | |
683 | (license (package-license perl)))) | |
684 | ||
14e84b2d JD |
685 | (define-public unixodbc |
686 | (package | |
687 | (name "unixodbc") | |
688 | (version "2.3.2") | |
689 | (source (origin | |
690 | (method url-fetch) | |
691 | (uri | |
692 | (string-append | |
693 | "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" version ".tar.gz")) | |
694 | (sha256 | |
695 | (base32 "16jw5fq7wgfky6ak1h2j2pqx99jivsdl4q8aq6immpr55xs5jd4w")))) | |
696 | (build-system gnu-build-system) | |
697 | (synopsis "Data source abstraction library") | |
698 | (description "Unixodbc is a library providing an API with which to access | |
699 | data sources. Data sources include SQL Servers and any software with an ODBC | |
700 | Driver.") | |
701 | (license lgpl2.1+) | |
702 | ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" | |
703 | (home-page "http://www.unixodbc.org"))) | |
b4a9c924 EB |
704 | |
705 | (define-public unqlite | |
706 | (package | |
707 | (name "unqlite") | |
708 | (version "1.1.6") | |
709 | (source (origin | |
710 | (method url-fetch) | |
711 | ;; Contains bug fixes against the official release, and has an | |
712 | ;; autotooled build system. | |
713 | (uri (string-append "https://github.com/aidin36/tocc/releases/" | |
714 | "download/v1.0.0/" | |
715 | "unqlite-unofficial-" version ".tar.gz")) | |
716 | (sha256 | |
717 | (base32 | |
718 | "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s")))) | |
719 | (build-system gnu-build-system) | |
720 | (arguments `(#:tests? #f)) ;No check target | |
721 | (home-page "http://www.unqlite.org") | |
722 | (synopsis "In-memory key/value and document store") | |
723 | (description | |
724 | "UnQLite is an in-process software library which implements a | |
725 | self-contained, serverless, zero-configuration, transactional NoSQL | |
726 | database engine. UnQLite is a document store database similar to | |
727 | MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store | |
728 | similar to BerkelyDB, LevelDB, etc.") | |
729 | (license bsd-2))) |