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