gnu: emacs-sly: Update to 20200228.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013, 2017 Cyril Roelandt <tipecaml@gmail.com>
5 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
11 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
15 ;;; Copyright © 2016, 2017, 2018 Roel Janssen <roel@gnu.org>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
18 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
19 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
22 ;;; Copyright © 2017, 2020 Thomas Danckaert <post@thomasdanckaert.be>
23 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
24 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
25 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
26 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
34 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
35 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
36 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
37 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
38 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
39 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
40 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
41 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
42 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
43 ;;;
44 ;;; This file is part of GNU Guix.
45 ;;;
46 ;;; GNU Guix is free software; you can redistribute it and/or modify it
47 ;;; under the terms of the GNU General Public License as published by
48 ;;; the Free Software Foundation; either version 3 of the License, or (at
49 ;;; your option) any later version.
50 ;;;
51 ;;; GNU Guix is distributed in the hope that it will be useful, but
52 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 ;;; GNU General Public License for more details.
55 ;;;
56 ;;; You should have received a copy of the GNU General Public License
57 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58
59 (define-module (gnu packages databases)
60 #:use-module (gnu packages)
61 #:use-module (gnu packages admin)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages avahi)
65 #:use-module (gnu packages base)
66 #:use-module (gnu packages bash)
67 #:use-module (gnu packages bison)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages cmake)
71 #:use-module (gnu packages compression)
72 #:use-module (gnu packages crypto)
73 #:use-module (gnu packages curl)
74 #:use-module (gnu packages cyrus-sasl)
75 #:use-module (gnu packages dbm)
76 #:use-module (gnu packages emacs)
77 #:use-module (gnu packages flex)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages gettext)
80 #:use-module (gnu packages glib)
81 #:use-module (gnu packages gnupg)
82 #:use-module (gnu packages guile)
83 #:use-module (gnu packages time)
84 #:use-module (gnu packages golang)
85 #:use-module (gnu packages jemalloc)
86 #:use-module (gnu packages language)
87 #:use-module (gnu packages libevent)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages man)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages onc-rpc)
92 #:use-module (gnu packages parallel)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages perl-check)
96 #:use-module (gnu packages perl-web)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages popt)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-crypto)
101 #:use-module (gnu packages python-web)
102 #:use-module (gnu packages python-science)
103 #:use-module (gnu packages python-xyz)
104 #:use-module (gnu packages rdf)
105 #:use-module (gnu packages readline)
106 #:use-module (gnu packages ruby)
107 #:use-module (gnu packages serialization)
108 #:use-module (gnu packages sphinx)
109 #:use-module (gnu packages sqlite)
110 #:use-module (gnu packages tcl)
111 #:use-module (gnu packages terminals)
112 #:use-module (gnu packages textutils)
113 #:use-module (gnu packages tls)
114 #:use-module (gnu packages valgrind)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages xml)
117 #:use-module ((guix licenses) #:prefix license:)
118 #:use-module (guix packages)
119 #:use-module (guix download)
120 #:use-module (guix bzr-download)
121 #:use-module (guix git-download)
122 #:use-module (guix build-system emacs)
123 #:use-module (guix build-system gnu)
124 #:use-module (guix build-system go)
125 #:use-module (guix build-system perl)
126 #:use-module (guix build-system python)
127 #:use-module (guix build-system ruby)
128 #:use-module (guix build-system cmake)
129 #:use-module (guix build-system scons)
130 #:use-module (guix build-system trivial)
131 #:use-module (guix utils)
132 #:use-module (srfi srfi-1)
133 #:use-module (srfi srfi-26)
134 #:use-module (ice-9 match))
135
136 (define-public 4store
137 (package
138 (name "4store")
139 (version "1.1.6")
140 (source (origin
141 (method git-fetch)
142 (uri (git-reference
143 (url "https://github.com/4store/4store.git")
144 (commit (string-append "v" version))))
145 (file-name (git-file-name name version))
146 (sha256
147 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
148 (patches (search-patches "4store-unset-preprocessor-directive.patch"
149 "4store-fix-buildsystem.patch"))))
150 (build-system gnu-build-system)
151 (native-inputs
152 `(("perl" ,perl)
153 ("python" ,python-2)
154 ("autoconf" ,autoconf)
155 ("automake" ,automake)
156 ("gettext" ,gettext-minimal)
157 ("libtool" ,libtool)
158 ("pcre" ,pcre "bin") ;for 'pcre-config'
159 ("pkg-config" ,pkg-config)))
160 (inputs
161 `(("glib" ,glib)
162 ("rasqal" ,rasqal)
163 ("libxml2" ,libxml2)
164 ("raptor2" ,raptor2)
165 ("readline" ,readline)
166 ("avahi" ,avahi)
167 ("cyrus-sasl" ,cyrus-sasl)
168 ("openssl" ,openssl)
169 ("util-linux" ,util-linux)))
170 ;; http://www.4store.org has been down for a while now.
171 (home-page "https://github.com/4store/4store")
172 (synopsis "Clustered RDF storage and query engine")
173 (description "4store is a RDF/SPARQL store written in C, supporting
174 either single machines or networked clusters.")
175 (license license:gpl3+)))
176
177 (define-public go-gopkg.in-mgo.v2
178 (package
179 (name "go-gopkg.in-mgo.v2")
180 (version "2016.08.01")
181 (source (origin
182 (method git-fetch)
183 (uri (git-reference
184 (url "https://github.com/go-mgo/mgo")
185 (commit (string-append "r" version))))
186 (file-name (git-file-name name version))
187 (sha256
188 (base32
189 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
190 (build-system go-build-system)
191 (arguments
192 `(#:import-path "gopkg.in/mgo.v2"
193 ;; TODO: The tests fail as MongoDB fails to start
194 ;; Error parsing command line: unrecognised option '--chunkSize'
195 #:tests? #f
196 #:phases
197 (modify-phases %standard-phases
198 (delete 'reset-gzip-timestamps)
199 (add-before 'check 'start-mongodb
200 (lambda* (#:key tests? #:allow-other-keys)
201 (when tests?
202 (with-directory-excursion "src/gopkg.in/mgo.v2"
203 (invoke "make" "startdb")))
204 #t))
205 (add-after 'check 'stop'mongodb
206 (lambda* (#:key tests? #:allow-other-keys)
207 (when tests?
208 (with-directory-excursion "src/gopkg.in/mgo.v2"
209 (invoke "make" "stopdb")))
210 #t)))))
211 (native-inputs
212 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
213 ("mongodb" ,mongodb)
214 ("daemontools" ,daemontools)))
215 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
216 (description
217 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
218 It implements a rich selection of features under a simple API following
219 standard Go idioms.")
220 (home-page "http://labix.org/mgo")
221 (license license:bsd-2)))
222
223 (define-public ephemeralpg
224 (package
225 (name "ephemeralpg")
226 (version "2.8")
227 (source
228 (origin
229 (method url-fetch)
230 (uri (string-append
231 "http://eradman.com/ephemeralpg/code/ephemeralpg-"
232 version ".tar.gz"))
233 (sha256
234 (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4"))))
235 (build-system gnu-build-system)
236 (arguments
237 '(#:make-flags (list "CC=gcc"
238 (string-append "PREFIX=" %output))
239 #:phases
240 (modify-phases %standard-phases
241 (delete 'configure)
242 (replace 'check
243 (lambda* (#:key inputs #:allow-other-keys)
244 ;; The intention for one test is to test without PostgreSQL on
245 ;; the $PATH, so replace the test $PATH with just the util-linux
246 ;; bin, which contains getopt. It will hopefully be possible to
247 ;; remove this for releases after 2.8.
248 (substitute* "test.rb"
249 (("/bin:/usr/bin")
250 (string-append (assoc-ref inputs "util-linux")
251 "/bin")))
252 ;; Set the LC_ALL=C as some tests use sort, and the locale
253 ;; affects the order. It will hopefully be possible to remove
254 ;; this for releases after 2.8.
255 (setenv "LC_ALL" "C")
256 (invoke "ruby" "test.rb")
257 #t))
258 (add-after 'install 'wrap
259 (lambda* (#:key inputs outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (wrap-program (string-append out "/bin/pg_tmp")
262 `("PATH" ":" prefix
263 (,(string-append (assoc-ref inputs "util-linux")
264 "/bin")
265 ,(string-append (assoc-ref inputs "postgresql")
266 "/bin")
267 ;; For getsocket
268 ,(string-append out "/bin")))))
269 #t)))))
270 (inputs
271 `(("postgresql" ,postgresql)
272 ("util-linux" ,util-linux)))
273 (native-inputs
274 `(("ruby" ,ruby)))
275 (home-page "http://eradman.com/ephemeralpg/")
276 (synopsis "Run temporary PostgreSQL databases")
277 (description
278 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
279 like running software test suites. Temporary databases created with
280 @code{pg_tmp} have a limited shared memory footprint and are automatically
281 garbage-collected after a configurable number of seconds (the default is
282 60).")
283 (license license:isc)))
284
285 (define-public es-dump-restore
286 (package
287 (name "es-dump-restore")
288 (version "2.1.0")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (rubygems-uri "es_dump_restore" version))
293 (sha256
294 (base32
295 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
296 (build-system ruby-build-system)
297 (arguments
298 '(#:tests? #f)) ;; No testsuite.
299 (propagated-inputs
300 `(("ruby-httpclient" ,ruby-httpclient)
301 ("ruby-multi-json" ,ruby-multi-json)
302 ("ruby-progress_bar" ,ruby-progress_bar)
303 ("ruby-rubyzip" ,ruby-rubyzip)
304 ("ruby-thor" ,ruby-thor)))
305 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
306 (description
307 "This package provides a utility for dumping the contents of an
308 ElasticSearch index to a compressed file and restoring the dumpfile back to an
309 ElasticSearch server")
310 (home-page "https://github.com/patientslikeme/es_dump_restore")
311 (license license:expat)))
312
313 (define-public leveldb
314 (package
315 (name "leveldb")
316 (version "1.22")
317 (source (origin
318 (method git-fetch)
319 (uri (git-reference
320 (url "https://github.com/google/leveldb")
321 (commit version)))
322 (file-name (git-file-name name version))
323 (sha256
324 (base32
325 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
326 (build-system cmake-build-system)
327 (arguments
328 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
329 (inputs
330 `(("snappy" ,snappy)))
331 (home-page "https://github.com/google/leveldb")
332 (synopsis "Fast key-value storage library")
333 (description
334 "LevelDB is a fast key-value storage library that provides an ordered
335 mapping from string keys to string values.")
336 (license license:bsd-3)))
337
338 (define-public memcached
339 (package
340 (name "memcached")
341 (version "1.5.20")
342 (source
343 (origin
344 (method url-fetch)
345 (uri (string-append
346 "https://memcached.org/files/memcached-" version ".tar.gz"))
347 (sha256
348 (base32 "1r511qr95q0ywdaql3pdjiwzkfqxhhfzb13ilvl7mznfm4iv1myg"))))
349 (build-system gnu-build-system)
350 (inputs
351 `(("libevent" ,libevent)
352 ("cyrus-sasl" ,cyrus-sasl)))
353 (home-page "https://memcached.org/")
354 (synopsis "In-memory caching service")
355 (description "Memcached is an in-memory key-value store. It has a small
356 and generic API, and was originally intended for use with dynamic web
357 applications.")
358 (license license:bsd-3)))
359
360 (define-public libmemcached
361 (package
362 (name "libmemcached")
363 (version "1.0.18")
364 ;; We build from the sources since we want to build the extra HTML
365 ;; documentation which is not included with the release.
366 (source (origin
367 (method bzr-fetch)
368 (uri (bzr-reference
369 (url "lp:libmemcached/1.0")
370 (revision (string-append "tag:" version))))
371 (file-name (string-append name "-" version "-checkout"))
372 (sha256
373 (base32
374 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
375 (patches
376 (search-patches "libmemcached-build-with-gcc7.patch"))))
377 (build-system gnu-build-system)
378 (native-inputs
379 `(("memcached" ,memcached)
380 ("libtool" ,libtool)
381 ("autoconf" ,autoconf)
382 ("automake" ,automake)
383 ("bison" ,bison)
384 ("flex" ,flex)
385 ("perl" ,perl)
386 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
387 (inputs
388 `(("libevent" ,libevent)
389 ("cyrus-sasl" ,cyrus-sasl)))
390 (outputs '("out" "doc"))
391 (arguments
392 '(#:phases
393 (modify-phases %standard-phases
394 (add-before 'bootstrap 'fix-configure.ac
395 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
396 ;; get the error ``configure: error: cannot find install-sh,
397 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
398 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
399 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
400 (lambda _
401 (delete-file "bootstrap.sh") ;not useful in the context of Guix
402 (substitute* "configure.ac"
403 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
404 (("(^AC_INIT.*)" anchor)
405 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
406 #t))
407 (add-before 'bootstrap 'disable-failing-tests
408 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
409 (lambda _
410 ;; Mark some heavily failing test suites as expected to fail.
411 (substitute* "Makefile.am"
412 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
413 (string-append xfail_tests " tests/testudp"
414 " tests/libmemcached-1.0/testapp"
415 " tests/libmemcached-1.0/testsocket")))
416 ;; Disable two tests of the unittest test suite.
417 (substitute* "libtest/unittest.cc"
418 ((".*echo_fubar_BINARY \\},.*") "")
419 ((".*application_doesnotexist_BINARY \\},.*") ""))
420 #t))
421 (add-after 'disable-dns-tests 'build-and-install-html-doc
422 (lambda* (#:key outputs #:allow-other-keys)
423 (let ((html (string-append (assoc-ref outputs "doc")
424 "/share/doc/libmemcached/html/")))
425 (invoke "make" "install-html")
426 ;; Cleanup useless files.
427 (for-each delete-file-recursively
428 (map (lambda (x) (string-append html x))
429 '("_sources" ".doctrees" ".buildinfo"))))
430 #t)))))
431 (home-page "https://libmemcached.org/")
432 (synopsis "C++ library for memcached")
433 (description "libMemcached is a library to use memcached in C/C++
434 applications. It comes with a complete reference guide and documentation of
435 the API, and provides features such as:
436 @itemize
437 @item Asynchronous and synchronous transport support
438 @item Consistent hashing and distribution
439 @item Tunable hashing algorithm to match keys
440 @item Access to large object support
441 @item Local replication
442 @end itemize")
443 (license license:bsd-3)))
444
445 (define-public python-pylibmc
446 (package
447 (name "python-pylibmc")
448 (version "1.6.1")
449 (source
450 (origin
451 (method url-fetch)
452 (uri (pypi-uri "pylibmc" version))
453 (sha256
454 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
455 (build-system python-build-system)
456 (arguments
457 '(#:phases
458 (modify-phases %standard-phases
459 (add-before 'check 'start-memcached-daemon
460 ;; The test suite requires a memcached server.
461 (lambda _
462 (invoke "memcached" "-d"))))))
463 (native-inputs
464 `(("memcached" ,memcached)
465 ("python-nose" ,python-nose)))
466 (inputs
467 `(("libmemcached" ,libmemcached)
468 ("zlib" ,zlib)
469 ("cyrus-sasl" ,cyrus-sasl)))
470 (home-page "http://sendapatch.se/projects/pylibmc/")
471 (synopsis "Python client for memcached")
472 (description
473 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
474 around TangentOrg’s libmemcached library, and can be used as a drop-in
475 replacement for the code@{python-memcached} library.")
476 (license license:bsd-3)))
477
478 (define-public python2-pylibmc
479 (package-with-python2 python-pylibmc))
480
481 (define-public mongodb
482 (package
483 (name "mongodb")
484 (version "3.4.10")
485 (source (origin
486 (method url-fetch)
487 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
488 version ".tar.gz"))
489 (file-name (string-append name "-" version ".tar.gz"))
490 (sha256
491 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
492 (modules '((guix build utils)))
493 (snippet
494 '(begin
495 (for-each (lambda (dir)
496 (delete-file-recursively
497 (string-append "src/third_party/" dir)))
498 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
499 "valgrind-3.11.0" "wiredtiger"
500 "yaml-cpp-0.5.3" "zlib-1.2.8"))
501 #t))
502 (patches
503 (list
504 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
505 (build-system scons-build-system)
506 (inputs
507 `(("openssl" ,openssl-1.0)
508 ("pcre" ,pcre)
509 ,@(match (%current-system)
510 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
511 `(("wiredtiger" ,wiredtiger)))
512 (_ `()))
513 ("yaml-cpp" ,yaml-cpp)
514 ("zlib" ,zlib)
515 ("snappy" ,snappy)))
516 (native-inputs
517 `(("valgrind" ,valgrind)
518 ("perl" ,perl)
519 ("python" ,python-2)
520 ("python2-pymongo" ,python2-pymongo)
521 ("python2-pyyaml" ,python2-pyyaml)
522 ("tzdata" ,tzdata)))
523 (arguments
524 `(#:scons ,scons-python2
525 #:phases
526 (let ((common-options
527 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
528 "--use-system-pcre"
529 ;; wiredtiger is 64-bit only
530 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
531 (%current-system)))
532 '("i686-linux" "armhf-linux"))
533 ``"--wiredtiger=off"
534 ``"--use-system-wiredtiger")
535 ;; TODO
536 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
537 ;; --use-system-boost
538 "--use-system-snappy"
539 "--use-system-zlib"
540 "--use-system-valgrind"
541 ;; "--use-system-stemmer" TODO: Missing relevant package
542 "--use-system-yaml"
543 "--disable-warnings-as-errors"
544 ,(format #f "--jobs=~a" (parallel-job-count))
545 "--ssl")))
546 (modify-phases %standard-phases
547 (add-after 'unpack 'patch
548 (lambda _
549 ;; Remove use of GNU extensions in parse_number_test.cpp, to
550 ;; allow compiling with GCC 7 or later
551 ;; https://jira.mongodb.org/browse/SERVER-28063
552 (substitute* "src/mongo/base/parse_number_test.cpp"
553 (("0xabcab\\.defdefP-10")
554 "687.16784283419838"))
555 #t))
556 (add-after 'unpack 'scons-propagate-environment
557 (lambda _
558 ;; Modify the SConstruct file to arrange for
559 ;; environment variables to be propagated.
560 (substitute* "SConstruct"
561 (("^env = Environment\\(")
562 "env = Environment(ENV=os.environ, "))
563 #t))
564 (add-after 'unpack 'create-version-file
565 (lambda _
566 (call-with-output-file "version.json"
567 (lambda (port)
568 (display ,(simple-format #f "{
569 \"version\": \"~A\"
570 }" version) port)))
571 #t))
572 (replace 'build
573 (lambda _
574 (apply invoke `("scons"
575 ,@common-options
576 "mongod" "mongo" "mongos"))))
577 (replace 'check
578 (lambda* (#:key tests? inputs #:allow-other-keys)
579 (setenv "TZDIR"
580 (string-append (assoc-ref inputs "tzdata")
581 "/share/zoneinfo"))
582 (when tests?
583 ;; Note that with the tests, especially the unittests, the
584 ;; build can take up to ~45GB of space, as many tests are
585 ;; individual executable files, with some being hundreds of
586 ;; megabytes in size.
587 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
588 (substitute* "build/unittests.txt"
589 ;; TODO: Don't run the async_stream_test, as it hangs
590 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
591 "")
592 ;; TODO: This test fails
593 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
594 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
595 ""))
596 (invoke "python" "buildscripts/resmoke.py"
597 "--suites=dbtest,unittests"
598 (format #f "--jobs=~a" (parallel-job-count))))
599 #t))
600 (replace 'install
601 (lambda* (#:key outputs #:allow-other-keys)
602 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
603 (install-file "mongod" bin)
604 (install-file "mongos" bin)
605 (install-file "mongo" bin))
606 #t))))))
607 (home-page "https://www.mongodb.org/")
608 (synopsis "High performance and high availability document database")
609 (description
610 "Mongo is a high-performance, high availability, schema-free
611 document-oriented database. A key goal of MongoDB is to bridge the gap
612 between key/value stores (which are fast and highly scalable) and traditional
613 RDBMS systems (which are deep in functionality).")
614 (license (list license:agpl3
615 ;; Some parts are licensed under the Apache License
616 license:asl2.0))))
617
618 ;; XXX When updating, check whether boost-for-mysql is still needed.
619 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
620 (define-public mysql
621 (package
622 (name "mysql")
623 (version "5.7.27")
624 (source (origin
625 (method url-fetch)
626 (uri (list (string-append
627 "https://dev.mysql.com/get/Downloads/MySQL-"
628 (version-major+minor version) "/"
629 name "-" version ".tar.gz")
630 (string-append
631 "https://downloads.mysql.com/archives/get/file/"
632 name "-" version ".tar.gz")))
633 (sha256
634 (base32
635 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
636 (build-system cmake-build-system)
637 (arguments
638 `(#:configure-flags
639 '("-DBUILD_CONFIG=mysql_release"
640 "-DWITH_SSL=system"
641 "-DWITH_ZLIB=system"
642 "-DDEFAULT_CHARSET=utf8"
643 "-DDEFAULT_COLLATION=utf8_general_ci"
644 "-DMYSQL_DATADIR=/var/lib/mysql"
645 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
646 "-DINSTALL_INFODIR=share/mysql/docs"
647 "-DINSTALL_MANDIR=share/man"
648 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
649 "-DINSTALL_SCRIPTDIR=bin"
650 "-DINSTALL_INCLUDEDIR=include/mysql"
651 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
652 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
653 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
654 "-DINSTALL_DOCDIR=share/mysql/docs"
655 "-DINSTALL_SHAREDIR=share/mysql"
656 ;; Get rid of test data.
657 "-DINSTALL_MYSQLTESTDIR="
658 "-DINSTALL_SQLBENCHDIR=")
659 #:phases (modify-phases %standard-phases
660 (add-after
661 'install 'remove-extra-binaries
662 (lambda* (#:key outputs #:allow-other-keys)
663 (let ((out (assoc-ref outputs "out")))
664 ;; Remove the 3 *_embedded files, which weigh in at
665 ;; 14 MiB each.
666 (for-each delete-file
667 (find-files (string-append out "/bin")
668 "_embedded$"))
669 #t))))))
670 (native-inputs
671 `(("bison" ,bison)
672 ("perl" ,perl)
673 ("pkg-config" ,pkg-config)))
674 (inputs
675 `(("boost" ,boost-for-mysql)
676 ("libaio" ,libaio)
677 ("libtirpc" ,libtirpc)
678 ("ncurses" ,ncurses)
679 ("openssl" ,openssl)
680 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
681 ("zlib" ,zlib)))
682 (home-page "https://www.mysql.com/")
683 (synopsis "Fast, easy to use, and popular database")
684 (description
685 "MySQL is a fast, reliable, and easy to use relational database
686 management system that supports the standardized Structured Query
687 Language.")
688 (license license:gpl2)))
689
690 (define-public mariadb
691 (package
692 (name "mariadb")
693 (version "10.1.43")
694 (source (origin
695 (method url-fetch)
696 (uri (string-append "https://downloads.mariadb.com/MariaDB"
697 "/mariadb-" version "/source/mariadb-"
698 version ".tar.gz"))
699 (sha256
700 (base32
701 "1pxyq37q4p7515by7k8hs3l3css68f3bm3akx99vw4m1rxwwbm63"))
702 (patches (search-patches "mariadb-client-test-32bit.patch"))
703 (modules '((guix build utils)))
704 (snippet
705 '(begin
706 ;; Delete bundled snappy and xz.
707 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
708 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
709 ;; This file checks that the bundled sources are present and
710 ;; declares build procedures for them.
711 (("^include\\(TokuThirdParty\\)") ""))
712 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
713 ;; Don't attempt to use the procedures we just removed.
714 ((" build_lzma build_snappy") ""))
715
716 ;; Preserve CMakeLists.txt for these.
717 (for-each (lambda (file)
718 (unless (string-suffix? "CMakeLists.txt" file)
719 (delete-file file)))
720 (append (find-files "extra/yassl")
721 (find-files "pcre") (find-files "zlib")))
722 #t))))
723 (build-system cmake-build-system)
724 (outputs '("out" "lib" "dev"))
725 (arguments
726 `(#:configure-flags
727 (list
728 "-DBUILD_CONFIG=mysql_release"
729 ;; Linking with libarchive fails, like this:
730
731 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
732 ;; relocation R_X86_64_32 against `.bss' can not be used when
733 ;; making a shared object; recompile with -fPIC
734
735 ;; For now, disable the features that that use libarchive (xtrabackup).
736 "-DWITH_LIBARCHIVE=OFF"
737
738 ;; Disable the TokuDB engine, because its test suite frequently fails,
739 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
740 "-DTOKUDB_OK=OFF"
741
742 ;; Ensure the system libraries are used.
743 "-DWITH_JEMALLOC=yes"
744 "-DWITH_PCRE=system"
745 "-DWITH_SSL=system"
746 "-DWITH_ZLIB=system"
747
748 "-DDEFAULT_CHARSET=utf8"
749 "-DDEFAULT_COLLATION=utf8_general_ci"
750 "-DMYSQL_DATADIR=/var/lib/mysql"
751 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
752 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
753 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
754 "/lib")
755 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
756 "/share/mysql/docs")
757 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
758 "/share/man")
759 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
760 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
761 "-DCMAKE_INSTALL_LIBDIR=lib"
762 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
763 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
764 "/include/mysql")
765 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
766 "/share/mysql/docs")
767 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
768 "/share/mysql/docs")
769 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
770 "/share/mysql/support-files")
771 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
772 "-DINSTALL_SHAREDIR=share")
773 #:phases
774 (modify-phases %standard-phases
775 (add-after 'unpack 'fix-pcre-detection
776 (lambda _
777 ;; The bundled PCRE in MariaDB has a patch that was upstreamed
778 ;; in version 8.34. Unfortunately the upstream patch behaves
779 ;; slightly differently and the build system fails to detect it.
780 ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
781 ;; XXX: Consider patching PCRE instead.
782 (substitute* "cmake/pcre.cmake"
783 ((" OR NOT PCRE_STACK_SIZE_OK") ""))
784 #t))
785 (add-after 'unpack 'adjust-tests
786 (lambda _
787 (let ((disabled-tests
788 '(;; These fail because root@hostname == root@localhost in
789 ;; the build environment, causing a user count mismatch.
790 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
791 "main.join_cache"
792 "main.explain_non_select"
793 "main.stat_tables_innodb"
794 "roles.acl_statistics"
795
796 ;; This file contains a time bomb which makes it fail after
797 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
798 "main.mysqldump"
799
800 ;; FIXME: This test fails on i686:
801 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
802 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
803 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
804 ;; (all three tables must exist and be identical)
805 ;; in a loop it produces the same error around 1/240 times.
806 ;; montywi on #maria suggested removing the real_end check in
807 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
808 ;; reach the ending quote occasionally. Disable it for now.
809 "main.myisampack"
810 ;; FIXME: This test fails on armhf-linux:
811 "mroonga/storage.index_read_multiple_double"))
812
813 ;; This file contains a list of known-flaky tests for this
814 ;; release. Append our own items.
815 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
816 (for-each (lambda (test)
817 (format unstable-tests "~a : ~a\n"
818 test "Disabled in Guix"))
819 disabled-tests)
820 (close-port unstable-tests)
821
822 ;; XXX: This test fails because it expects a latin1 charset and
823 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
824 (substitute* "mysql-test/r/gis_notembedded.result"
825 (("latin1_swedish_ci") "utf8_general_ci")
826 (("\tlatin1") "\tutf8"))
827
828 (substitute* "mysql-test/mysql-test-run.pl"
829 (("/bin/ls") (which "ls"))
830 (("/bin/sh") (which "sh")))
831 #t)))
832 (add-before 'configure 'disable-plugins
833 (lambda _
834 (let ((disable-plugin (lambda (name)
835 (call-with-output-file
836 (string-append "plugin/" name
837 "/CMakeLists.txt")
838 (lambda (port)
839 (format port "\n")))))
840 (disabled-plugins '(;; XXX: Causes a test failure.
841 "disks")))
842 (for-each disable-plugin disabled-plugins)
843 #t)))
844 (replace 'check
845 (lambda* (#:key (tests? #t) #:allow-other-keys)
846 (if tests?
847 (with-directory-excursion "mysql-test"
848 (invoke "./mtr" "--verbose"
849 "--retry=3"
850 "--testcase-timeout=40"
851 "--suite-timeout=600"
852 "--parallel" (number->string (parallel-job-count))
853 "--skip-test-list=unstable-tests"))
854 (format #t "test suite not run~%"))
855 #t))
856 (add-after
857 'install 'post-install
858 (lambda* (#:key inputs outputs #:allow-other-keys)
859 (let* ((out (assoc-ref outputs "out"))
860 (dev (assoc-ref outputs "dev"))
861 (lib (assoc-ref outputs "lib"))
862 (openssl (assoc-ref inputs "openssl")))
863 (substitute* (string-append out "/bin/mysql_install_db")
864 (("basedir=\"\"")
865 (string-append "basedir=\"" out "\"")))
866 ;; Remove unneeded files for testing.
867 (with-directory-excursion lib
868 (for-each delete-file-recursively
869 '("data" "mysql-test" "sql-bench"))
870 ;; And static libraries.
871 (for-each delete-file (find-files "lib" "\\.a$")))
872 (with-directory-excursion out
873 (delete-file "share/man/man1/mysql-test-run.pl.1")
874 ;; Delete huge and unnecessary executables.
875 (for-each delete-file (find-files "bin" "(test|embedded)")))
876 (mkdir-p (string-append dev "/share"))
877 (mkdir-p (string-append dev "/bin"))
878 (rename-file (string-append lib "/bin/mysqld")
879 (string-append out "/bin/mysqld"))
880 (rename-file (string-append lib "/share/pkgconfig")
881 (string-append dev "/share/pkgconfig"))
882 (rename-file (string-append out "/bin/mysql_config")
883 (string-append dev "/bin/mysql_config"))
884
885
886 (substitute* (string-append out "/bin/mysql_install_db")
887 (("\\$basedir/share/mysql")
888 (string-append lib "/share/mysql")))
889
890 ;; Embed an absolute reference to OpenSSL in mysql_config
891 ;; and the pkg-config file to avoid propagation.
892 (substitute* (list (string-append dev "/bin/mysql_config")
893 (string-append dev "/share/pkgconfig/mariadb.pc"))
894 (("-lssl -lcrypto" all)
895 (string-append "-L" openssl "/lib " all)))
896
897 #t))))))
898 (native-inputs
899 `(("bison" ,bison)
900 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
901 ,@(if (string-prefix? "armhf" (%current-system))
902 `(("gcc", gcc-5))
903 '())
904 ("perl" ,perl)))
905 (inputs
906 `(("jemalloc" ,jemalloc)
907 ("libaio" ,libaio)
908 ("libxml2" ,libxml2)
909 ("ncurses" ,ncurses)
910 ("openssl" ,openssl-1.0)
911 ("pam" ,linux-pam)
912 ("pcre" ,pcre)
913 ("xz" ,xz)
914 ("zlib" ,zlib)))
915 ;; The test suite is very resource intensive and can take more than three
916 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
917 (properties '((timeout . 64800))) ;18 hours
918 (home-page "https://mariadb.org/")
919 (synopsis "SQL database server")
920 (description
921 "MariaDB is a multi-user and multi-threaded SQL database server, designed
922 as a drop-in replacement of MySQL.")
923 (license license:gpl2)))
924
925 (define-public mariadb-connector-c
926 (package
927 (name "mariadb-connector-c")
928 (version "3.1.6")
929 (source (origin
930 (method url-fetch)
931 (uri (string-append
932 "https://downloads.mariadb.org/f/connector-c-"
933 version "/mariadb-connector-c-"
934 version "-src.tar.gz"))
935 (sha256
936 (base32
937 "083724f5daaqyzdcx508caz6fk2hs89jff85zg28ih43vxkvnrnj"))))
938 (inputs
939 `(("openssl" ,openssl)))
940 (build-system cmake-build-system)
941 (arguments
942 ;; No tests.
943 '(#:tests? #f))
944 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
945 (synopsis "Client library to connect to MySQL or MariaDB")
946 (description "The MariaDB Connector/C is used to connect applications
947 developed in C/C++ to MariaDB and MySQL databases.")
948 (license license:lgpl2.1+)))
949
950 ;; Don't forget to update the other postgresql packages when upgrading this one.
951 (define-public postgresql
952 (package
953 (name "postgresql")
954 (version "10.11")
955 (source (origin
956 (method url-fetch)
957 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
958 version "/postgresql-" version ".tar.bz2"))
959 (sha256
960 (base32
961 "02fcmvbh0mhplj3s2jd24s642ysx7bggnf0h8bs5amh7dgzi8p8d"))
962 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
963 (build-system gnu-build-system)
964 (arguments
965 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
966 #:phases
967 (modify-phases %standard-phases
968 (add-before 'configure 'patch-/bin/sh
969 (lambda _
970 ;; Refer to the actual shell.
971 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
972 "src/bin/psql/command.c")
973 (("/bin/sh") (which "sh")))
974 #t))
975 (add-after 'build 'build-contrib
976 (lambda _
977 (invoke "make" "-C" "contrib")))
978 (add-after 'install 'install-contrib
979 (lambda _
980 (invoke "make" "-C" "contrib" "install"))))))
981 (inputs
982 `(("readline" ,readline)
983 ("libuuid" ,util-linux)
984 ("openssl" ,openssl)
985 ("zlib" ,zlib)))
986 (home-page "https://www.postgresql.org/")
987 (synopsis "Powerful object-relational database system")
988 (description
989 "PostgreSQL is a powerful object-relational database system. It is fully
990 ACID compliant, has full support for foreign keys, joins, views, triggers, and
991 stored procedures (in multiple languages). It includes most SQL:2008 data
992 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
993 TIMESTAMP. It also supports storage of binary large objects, including
994 pictures, sounds, or video.")
995 (license (license:x11-style "file://COPYRIGHT"))))
996
997 (define-public postgresql-11
998 (package
999 (inherit postgresql)
1000 (name "postgresql")
1001 (version "11.6")
1002 (source (origin
1003 (method url-fetch)
1004 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1005 version "/postgresql-" version ".tar.bz2"))
1006 (sha256
1007 (base32
1008 "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
1009
1010 (define-public postgresql-9.6
1011 (package
1012 (inherit postgresql)
1013 (name "postgresql")
1014 (version "9.6.16")
1015 (source (origin
1016 (method url-fetch)
1017 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1018 version "/postgresql-" version ".tar.bz2"))
1019 (sha256
1020 (base32
1021 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
1022
1023 (define-public python-pymysql
1024 (package
1025 (name "python-pymysql")
1026 (version "0.9.3")
1027 (source
1028 (origin
1029 (method url-fetch)
1030 (uri (pypi-uri "PyMySQL" version))
1031 (sha256
1032 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1033 (build-system python-build-system)
1034 (native-inputs
1035 `(("python-unittest2" ,python-unittest2)))
1036 (inputs
1037 `(("python-cryptography" ,python-cryptography)))
1038 (arguments
1039 `(#:tests? #f)) ; tests expect a running MySQL
1040 (home-page "https://github.com/PyMySQL/PyMySQL/")
1041 (synopsis "Pure-Python MySQL driver")
1042 (description
1043 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1044 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1045 (license license:expat)))
1046
1047 (define-public python2-pymysql
1048 (package-with-python2 python-pymysql))
1049
1050 (define-public qdbm
1051 (package
1052 (name "qdbm")
1053 (version "1.8.78")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (string-append "http://fallabs.com/" name "/"
1058 name "-" version ".tar.gz"))
1059 (sha256
1060 (base32
1061 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1062 (build-system gnu-build-system)
1063 (arguments
1064 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1065 (assoc-ref %outputs "out")
1066 "/lib"))
1067 #:make-flags (list "CFLAGS=-fPIC")))
1068 (home-page "http://fallabs.com/qdbm")
1069 (synopsis "Key-value database")
1070 (description "QDBM is a library of routines for managing a
1071 database. The database is a simple data file containing key-value
1072 pairs. Every key and value is serial bytes with variable length.
1073 Binary data as well as character strings can be used as a key or a
1074 value. There is no concept of data tables or data types. Records are
1075 organized in a hash table or B+ tree.")
1076 (license license:lgpl2.1+)))
1077
1078 (define-public recutils
1079 (package
1080 (name "recutils")
1081 (version "1.8")
1082 (source (origin
1083 (method url-fetch)
1084 (uri (string-append "mirror://gnu/recutils/recutils-"
1085 version ".tar.gz"))
1086 (sha256
1087 (base32
1088 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1089 (build-system gnu-build-system)
1090
1091 (arguments '(#:configure-flags
1092 (list (string-append "--with-bash-headers="
1093 (assoc-ref %build-inputs "bash:include")
1094 "/include/bash"))))
1095
1096 (native-inputs `(("bc" ,bc)
1097 ("bash:include" ,bash "include")
1098 ("check" ,check)
1099 ("libuuid" ,util-linux)
1100 ("pkg-config" ,pkg-config)))
1101
1102 ;; TODO: Add more optional inputs.
1103 (inputs `(("curl" ,curl)
1104 ("libgcrypt" ,libgcrypt)))
1105 (synopsis "Manipulate plain text files as databases")
1106 (description
1107 "GNU Recutils is a set of tools and libraries for creating and
1108 manipulating text-based, human-editable databases. Despite being text-based,
1109 databases created with Recutils carry all of the expected features such as
1110 unique fields, primary keys, time stamps and more. Many different field
1111 types are supported, as is encryption.")
1112 (license license:gpl3+)
1113 (home-page "https://www.gnu.org/software/recutils/")))
1114
1115 (define-public emacs-recutils
1116 (package
1117 (inherit recutils)
1118 (name "emacs-recutils")
1119 (build-system emacs-build-system)
1120 (arguments
1121 '(#:phases
1122 (modify-phases %standard-phases
1123 (add-after 'unpack 'change-directory
1124 (lambda _
1125 (chdir "etc")
1126 #t)))))
1127 (native-inputs '())
1128 (inputs '())
1129 (synopsis "Emacs mode for working with recutils database files")
1130 (description "This package provides an Emacs major mode @code{rec-mode}
1131 for working with GNU Recutils text-based, human-editable databases. It
1132 supports editing, navigation, and querying of recutils database files
1133 including field and record folding.")))
1134
1135 (define-public rocksdb
1136 (package
1137 (name "rocksdb")
1138 (version "6.6.4")
1139 (source (origin
1140 (method git-fetch)
1141 (uri (git-reference
1142 (url "https://github.com/facebook/rocksdb")
1143 (commit (string-append "v" version))))
1144 (file-name (git-file-name name version))
1145 (sha256
1146 (base32
1147 "1h7y31b05w4vv4v509l368j9qlbv5assmdq9hp2788zipqbpywc0"))
1148 (modules '((guix build utils)))
1149 (snippet
1150 '(begin
1151 ;; TODO: unbundle gtest.
1152 (delete-file "build_tools/gnu_parallel")
1153 (substitute* "Makefile"
1154 (("build_tools/gnu_parallel") "parallel"))
1155 #t))))
1156 (build-system gnu-build-system)
1157 (arguments
1158 `(#:make-flags (list "CC=gcc" "V=1"
1159 ;; Ceph requires that RTTI is enabled.
1160 "USE_RTTI=1"
1161 (string-append "INSTALL_PATH="
1162 (assoc-ref %outputs "out"))
1163
1164 ;; Running the full test suite takes hours and require
1165 ;; a lot of disk space. Instead we only run a subset
1166 ;; (see .travis.yml and Makefile).
1167 "ROCKSDBTESTS_END=db_tailing_iter_test")
1168 #:test-target "check_some"
1169 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1170 ;; this upstream, but it's not going to be supported any time soon.
1171 #:tests? (let ((system ,(or (%current-target-system)
1172 (%current-system))))
1173 (or (string-prefix? "x86_64-linux" system)
1174 (string-prefix? "aarch64-linux" system)))
1175 #:phases
1176 (modify-phases %standard-phases
1177 (add-after 'unpack 'patch-Makefile
1178 (lambda _
1179 (substitute* "Makefile"
1180 ;; Don't depend on the static library when installing.
1181 (("install: install-static")
1182 "install: install-shared")
1183 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1184 #t))
1185 (delete 'configure)
1186 ;; The default target is only needed for tests and built on demand.
1187 (delete 'build)
1188 (add-before 'check 'disable-optimizations
1189 (lambda _
1190 ;; Prevent the build from passing '-march=native' to the compiler.
1191 (setenv "PORTABLE" "1")
1192 #t))
1193 (add-before 'check 'disable-failing-tests
1194 (lambda _
1195 (substitute* "Makefile"
1196 ;; These tests reliably fail due to "Too many open files".
1197 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1198 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1199 #t))
1200 (add-after 'check 'build
1201 ;; The default build target is a debug build for tests. The
1202 ;; install target depends on the "shared_lib" release target
1203 ;; so we build it here for clarity.
1204 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1205 (apply invoke "make" "shared_lib"
1206 `(,@(if parallel-build?
1207 `("-j" ,(number->string (parallel-job-count)))
1208 '())
1209 ,@make-flags)))))))
1210 (native-inputs
1211 `(("parallel" ,parallel)
1212 ("perl" ,perl)
1213 ("procps" ,procps)
1214 ("python" ,python-2)
1215 ("which" ,which)))
1216 (inputs
1217 `(("bzip2" ,bzip2)
1218 ("gflags" ,gflags)
1219 ("jemalloc" ,jemalloc)
1220 ("lz4" ,lz4)
1221 ("snappy" ,snappy)
1222 ("zlib" ,zlib)))
1223 (home-page "http://rocksdb.org/")
1224 (synopsis "Persistent key-value store for fast storage")
1225 (description
1226 "RocksDB is a library that forms the core building block for a fast
1227 key-value server, especially suited for storing data on flash drives. It
1228 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1229 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1230 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1231 compactions, making it specially suitable for storing multiple terabytes of
1232 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1233 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1234 ;; files carry the 3-clause BSD license.
1235 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1236
1237 (define-public sparql-query
1238 (package
1239 (name "sparql-query")
1240 (version "1.1")
1241 (source (origin
1242 (method url-fetch)
1243 (uri (string-append "https://github.com/tialaramex/"
1244 name "/archive/" version ".tar.gz"))
1245 (sha256
1246 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1247 (file-name (string-append name "-" version ".tar.gz"))))
1248 (build-system gnu-build-system)
1249 (inputs
1250 `(("readline" ,readline)
1251 ("ncurses" ,ncurses)
1252 ("glib" ,glib)
1253 ("libxml2" ,libxml2)
1254 ("curl" ,curl)))
1255 (native-inputs
1256 `(("pkg-config" ,pkg-config)))
1257 (arguments
1258 `(#:make-flags '("CC=gcc")
1259 #:phases
1260 (modify-phases %standard-phases
1261 (delete 'configure)
1262 ;; The Makefile uses git to obtain versioning information. This phase
1263 ;; substitutes the git invocation with the package version.
1264 (add-after 'unpack 'remove-git-dependency
1265 (lambda _
1266 (substitute* "Makefile"
1267 (("^gitrev :=.*$")
1268 (string-append "gitrev = \"v" ,version "\"")))
1269 #t))
1270 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1271 ;; This replacement does the same thing, except for using $PREFIX/bin
1272 ;; instead.
1273 (replace 'install
1274 (lambda* (#:key outputs #:allow-other-keys)
1275 (let* ((out (assoc-ref outputs "out"))
1276 (bin (string-append out "/bin")))
1277 (install-file "sparql-query" bin)
1278 (symlink (string-append bin "/sparql-query")
1279 (string-append bin "/sparql-update")))
1280 #t))
1281 (replace 'check
1282 (lambda* (#:key make-flags #:allow-other-keys)
1283 (apply invoke "make" `(,@make-flags "scan-test"))
1284 (invoke "./scan-test"))))))
1285 (home-page "https://github.com/tialaramex/sparql-query/")
1286 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1287 (description "Sparql-query is a command-line tool for accessing SPARQL
1288 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1289 tools for interrogating SQL databases. For example, you can enter a query over
1290 several lines, using a semi-colon at the end of a line to indicate the end of
1291 your query. It also supports readline so that you can more easily recall and
1292 edit previous queries, even across sessions. It can be used non-interactively,
1293 for example from a shell script.")
1294 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1295 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1296 (license (list license:gpl3+))))
1297
1298 (define-public sqitch
1299 (package
1300 (name "sqitch")
1301 (version "1.0.0")
1302 (source
1303 (origin
1304 (method url-fetch)
1305 (uri (string-append
1306 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1307 version ".tar.gz"))
1308 (sha256
1309 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1310 (build-system perl-build-system)
1311 (arguments
1312 '(#:phases
1313 (modify-phases %standard-phases
1314 (add-before 'check 'set-check-environment
1315 (lambda _
1316 (setenv "TZ" "UTC")
1317 (setenv "HOME" "/tmp")
1318 #t))
1319 (add-after 'install 'wrap-program
1320 (lambda* (#:key outputs #:allow-other-keys)
1321 (let* ((out (assoc-ref outputs "out"))
1322 (path (getenv "PERL5LIB")))
1323 (wrap-program (string-append out "/bin/sqitch")
1324 `("PERL5LIB" ":" prefix
1325 (,(string-append out "/lib/perl5/site_perl"
1326 ":"
1327 path)))))
1328 #t)))))
1329 (native-inputs
1330 `(("perl-capture-tiny" ,perl-capture-tiny)
1331 ("perl-io-pager" ,perl-io-pager)
1332 ("perl-module-build" ,perl-module-build)
1333 ("perl-module-runtime" ,perl-module-runtime)
1334 ("perl-path-class" ,perl-path-class)
1335 ("perl-test-deep" ,perl-test-deep)
1336 ("perl-test-dir" ,perl-test-dir)
1337 ("perl-test-exception" ,perl-test-exception)
1338 ("perl-test-file" ,perl-test-file)
1339 ("perl-test-file-contents" ,perl-test-file-contents)
1340 ("perl-test-mockmodule" ,perl-test-mockmodule)
1341 ("perl-test-nowarnings" ,perl-test-nowarnings)
1342 ("perl-test-warn" ,perl-test-warn)))
1343 (inputs
1344 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1345 ("perl-clone" ,perl-clone)
1346 ("perl-config-gitlike" ,perl-config-gitlike)
1347 ("perl-datetime" ,perl-datetime)
1348 ("perl-datetime-timezone" ,perl-datetime-timezone)
1349 ("perl-dbd-pg" ,perl-dbd-pg)
1350 ("perl-dbi" ,perl-dbi)
1351 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1352 ("perl-encode-locale" ,perl-encode-locale)
1353 ("perl-hash-merge" ,perl-hash-merge)
1354 ("perl-ipc-run3" ,perl-ipc-run3)
1355 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1356 ("perl-libintl-perl" ,perl-libintl-perl)
1357 ("perl-list-moreutils" ,perl-list-moreutils)
1358 ("perl-moo" ,perl-moo)
1359 ("perl-mysql-config" ,perl-mysql-config)
1360 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1361 ("perl-path-class" ,perl-path-class)
1362 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1363 ("perl-string-formatter" ,perl-string-formatter)
1364 ("perl-string-shellquote" ,perl-string-shellquote)
1365 ("perl-sub-exporter" ,perl-sub-exporter)
1366 ("perl-template-tiny" ,perl-template-tiny)
1367 ("perl-template-toolkit" ,perl-template-toolkit)
1368 ("perl-throwable" ,perl-throwable)
1369 ("perl-try-tiny" ,perl-try-tiny)
1370 ("perl-type-tiny" ,perl-type-tiny)
1371 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1372 ("perl-uri" ,perl-uri)
1373 ("perl-uri-db" ,perl-uri-db)))
1374 (home-page "https://sqitch.org/")
1375 (synopsis "Database change management tool")
1376 (description
1377 "Sqitch is a standalone change management system for database schemas,
1378 which uses SQL to describe changes.")
1379 (license license:x11)))
1380
1381 (define-public sqlcrush
1382 ;; Unfortunately, there is no proper upstream release and may never be.
1383 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1384 (revision "1"))
1385 (package
1386 (name "sqlcrush")
1387 (version (git-version "0.1.5" revision commit))
1388 (source (origin
1389 (method git-fetch)
1390 (uri (git-reference
1391 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1392 (commit commit)))
1393 (file-name (git-file-name name version))
1394 (sha256
1395 (base32
1396 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1397 (build-system python-build-system)
1398 (inputs
1399 `(("python-cryptography" ,python-cryptography)
1400 ("python-psycopg2" ,python-psycopg2)
1401 ("python-pymysql" ,python-pymysql)
1402 ("python-sqlalchemy" ,python-sqlalchemy)))
1403 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1404 (synopsis "Text console-based database viewer and editor")
1405 (description
1406 "SQLcrush lets you view and edit a database directly from the text
1407 console through an ncurses interface. You can explore each table's structure,
1408 browse and edit the contents, add and delete entries, all while tracking your
1409 changes.")
1410 (license license:gpl3+)))) ; no headers, see README.md
1411
1412 (define-public tdb
1413 (package
1414 (name "tdb")
1415 (version "1.4.3")
1416 (source (origin
1417 (method url-fetch)
1418 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1419 version ".tar.gz"))
1420 (sha256
1421 (base32
1422 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1423 (build-system gnu-build-system)
1424 (arguments
1425 '(#:phases
1426 (modify-phases %standard-phases
1427 (replace 'configure
1428 (lambda* (#:key outputs #:allow-other-keys)
1429 (let ((out (assoc-ref outputs "out")))
1430 ;; The 'configure' script is a wrapper for Waf and
1431 ;; doesn't recognize things like '--enable-fast-install'.
1432 (invoke "./configure"
1433 (string-append "--prefix=" out))))))))
1434 (native-inputs
1435 `(;; TODO: Build the documentation.
1436 ;; ("docbook-xsl" ,docbook-xsl)
1437 ;; ("libxml2" ,libxml2)
1438 ;; ("libxslt" ,libxslt)
1439 ("python" ,python) ;for the Waf build system
1440 ("which" ,which)))
1441 (home-page "https://tdb.samba.org/")
1442 (synopsis "Trivial database")
1443 (description
1444 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1445 and BSD's DB except that it allows multiple simultaneous writers and uses
1446 locking internally to keep writers from trampling on each other. TDB is also
1447 extremely small.")
1448 (license license:lgpl3+)))
1449
1450 (define-public perl-dbi
1451 (package
1452 (name "perl-dbi")
1453 (version "1.642")
1454 (source (origin
1455 (method url-fetch)
1456 (uri (string-append
1457 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1458 version ".tar.gz"))
1459 (sha256
1460 (base32
1461 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1462 (build-system perl-build-system)
1463 (synopsis "Database independent interface for Perl")
1464 (description "This package provides an database interface for Perl.")
1465 (home-page "https://metacpan.org/release/DBI")
1466 (license license:perl-license)))
1467
1468 (define-public perl-dbix-class
1469 (package
1470 (name "perl-dbix-class")
1471 (version "0.082841")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1476 "DBIx-Class-" version ".tar.gz"))
1477 (sha256
1478 (base32
1479 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1480 (build-system perl-build-system)
1481 (native-inputs
1482 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1483 ("perl-file-temp" ,perl-file-temp)
1484 ("perl-module-install" ,perl-module-install)
1485 ("perl-package-stash" ,perl-package-stash)
1486 ("perl-test-deep" ,perl-test-deep)
1487 ("perl-test-exception" ,perl-test-exception)
1488 ("perl-test-warn" ,perl-test-warn)))
1489 (propagated-inputs
1490 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1491 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1492 ("perl-class-inspector" ,perl-class-inspector)
1493 ("perl-config-any" ,perl-config-any)
1494 ("perl-context-preserve" ,perl-context-preserve)
1495 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1496 ("perl-data-page" ,perl-data-page)
1497 ("perl-dbi" ,perl-dbi)
1498 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1499 ("perl-hash-merge" ,perl-hash-merge)
1500 ("perl-module-find" ,perl-module-find)
1501 ("perl-moo" ,perl-moo)
1502 ("perl-mro-compat" ,perl-mro-compat)
1503 ("perl-namespace-clean" ,perl-namespace-clean)
1504 ("perl-path-class" ,perl-path-class)
1505 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1506 ("perl-scope-guard" ,perl-scope-guard)
1507 ("perl-sql-abstract" ,perl-sql-abstract)
1508 ("perl-sub-name" ,perl-sub-name)
1509 ("perl-text-balanced" ,perl-text-balanced)
1510 ("perl-try-tiny" ,perl-try-tiny)))
1511 (home-page "https://metacpan.org/release/DBIx-Class")
1512 (synopsis "Extensible and flexible object <-> relational mapper")
1513 (description "An SQL to OO mapper with an object API inspired by
1514 Class::DBI (with a compatibility layer as a springboard for porting) and a
1515 resultset API that allows abstract encapsulation of database operations. It
1516 aims to make representing queries in your code as perl-ish as possible while
1517 still providing access to as many of the capabilities of the database as
1518 possible, including retrieving related records from multiple tables in a
1519 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1520 \"ORDER BY\" and \"HAVING\" support.")
1521 (license license:perl-license)))
1522
1523 (define-public perl-dbix-class-cursor-cached
1524 (package
1525 (name "perl-dbix-class-cursor-cached")
1526 (version "1.001004")
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1531 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1532 (sha256
1533 (base32
1534 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1535 (build-system perl-build-system)
1536 (native-inputs
1537 `(("perl-cache-cache" ,perl-cache-cache)
1538 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1539 ("perl-module-install" ,perl-module-install)))
1540 (propagated-inputs
1541 `(("perl-carp-clan" ,perl-carp-clan)
1542 ("perl-dbix-class" ,perl-dbix-class)))
1543 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1544 (synopsis "Cursor with built-in caching support")
1545 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1546 built-in caching support.")
1547 (license license:perl-license)))
1548
1549 (define-public perl-dbix-class-introspectablem2m
1550 (package
1551 (name "perl-dbix-class-introspectablem2m")
1552 (version "0.001002")
1553 (source
1554 (origin
1555 (method url-fetch)
1556 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1557 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1558 (sha256
1559 (base32
1560 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1561 (build-system perl-build-system)
1562 (native-inputs
1563 `(("perl-module-install" ,perl-module-install)))
1564 (propagated-inputs
1565 `(("perl-dbix-class" ,perl-dbix-class)))
1566 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1567 (synopsis "Introspect many-to-many relationships")
1568 (description "Because the many-to-many relationships are not real
1569 relationships, they can not be introspected with DBIx::Class. Many-to-many
1570 relationships are actually just a collection of convenience methods installed
1571 to bridge two relationships. This DBIx::Class component can be used to store
1572 all relevant information about these non-relationships so they can later be
1573 introspected and examined.")
1574 (license license:perl-license)))
1575
1576 (define-public perl-dbix-class-schema-loader
1577 (package
1578 (name "perl-dbix-class-schema-loader")
1579 (version "0.07049")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1584 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1585 (sha256
1586 (base32
1587 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1588 (build-system perl-build-system)
1589 (native-inputs
1590 `(("perl-config-any" ,perl-config-any)
1591 ("perl-config-general" ,perl-config-general)
1592 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1593 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1594 ("perl-module-install" ,perl-module-install)
1595 ("perl-moose" ,perl-moose)
1596 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1597 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1598 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1599 ("perl-test-deep" ,perl-test-deep)
1600 ("perl-test-differences" ,perl-test-differences)
1601 ("perl-test-exception" ,perl-test-exception)
1602 ("perl-test-pod" ,perl-test-pod)
1603 ("perl-test-warn" ,perl-test-warn)))
1604 (propagated-inputs
1605 `(("perl-class-unload" ,perl-class-unload)
1606 ("perl-class-inspector" ,perl-class-inspector)
1607 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1608 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1609 ("perl-carp-clan" ,perl-carp-clan)
1610 ("perl-data-dump" ,perl-data-dump)
1611 ("perl-dbix-class" ,perl-dbix-class)
1612 ("perl-hash-merge" ,perl-hash-merge)
1613 ("perl-list-moreutils" ,perl-list-moreutils)
1614 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1615 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1616 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1617 ("perl-namespace-clean" ,perl-namespace-clean)
1618 ("perl-mro-compat" ,perl-mro-compat)
1619 ("perl-scope-guard" ,perl-scope-guard)
1620 ("perl-string-camelcase" ,perl-string-camelcase)
1621 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1622 ("perl-sub-name" ,perl-sub-name)
1623 ("perl-try-tiny" ,perl-try-tiny)))
1624 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1625 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1626 (synopsis "Create a DBIx::Class::Schema based on a database")
1627 (description "DBIx::Class::Schema::Loader automates the definition of a
1628 DBIx::Class::Schema by scanning database table definitions and setting up the
1629 columns, primary keys, unique constraints and relationships.")
1630 (license license:perl-license)))
1631
1632 (define-public perl-dbd-pg
1633 (package
1634 (name "perl-dbd-pg")
1635 (version "3.7.4")
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1640 "DBD-Pg-" version ".tar.gz"))
1641 (sha256
1642 (base32
1643 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1644 (build-system perl-build-system)
1645 (native-inputs
1646 `(("perl-dbi" ,perl-dbi)))
1647 (propagated-inputs
1648 `(("perl-dbi" ,perl-dbi)
1649 ("postgresql" ,postgresql)))
1650 (home-page "https://metacpan.org/release/DBD-Pg")
1651 (synopsis "DBI PostgreSQL interface")
1652 (description "This package provides a PostgreSQL driver for the Perl5
1653 @dfn{Database Interface} (DBI).")
1654 (license license:perl-license)))
1655
1656 (define-public perl-dbd-mysql
1657 (package
1658 (name "perl-dbd-mysql")
1659 (version "4.050")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1664 "DBD-mysql-" version ".tar.gz"))
1665 (sha256
1666 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1667 (build-system perl-build-system)
1668 (arguments
1669 `(#:phases
1670 (modify-phases %standard-phases
1671 (add-before 'configure 'skip-library-detection
1672 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1673 ;; are really only needed for the test suite; their absence does not
1674 ;; affect the build or the end result.
1675 (lambda _
1676 (substitute* "Makefile.PL"
1677 (("use Devel::CheckLib;" match)
1678 (string-append "# " match))
1679 (("assert_lib")
1680 "print"))
1681 #t)))
1682 ;; Tests require running MySQL server.
1683 #:tests? #f))
1684 (propagated-inputs
1685 `(("perl-dbi" ,perl-dbi)
1686 ("mysql" ,mariadb "lib")
1687 ("mysql-dev" ,mariadb "dev")))
1688 (home-page "https://metacpan.org/release/DBD-mysql")
1689 (synopsis "DBI MySQL interface")
1690 (description "This package provides a MySQL driver for the Perl5
1691 @dfn{Database Interface} (DBI).")
1692 (license license:perl-license)))
1693
1694 (define-public perl-dbd-sqlite
1695 (package
1696 (name "perl-dbd-sqlite")
1697 (version "1.62")
1698 (source (origin
1699 (method url-fetch)
1700 (uri (string-append
1701 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1702 version ".tar.gz"))
1703 (sha256
1704 (base32
1705 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1706 (build-system perl-build-system)
1707 (inputs `(("sqlite" ,sqlite)))
1708 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1709 (synopsis "SQlite interface for Perl")
1710 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1711 the entire thing in the distribution. So in order to get a fast transaction
1712 capable RDBMS working for your Perl project you simply have to install this
1713 module, and nothing else.")
1714 (license license:perl-license)
1715 (home-page "https://metacpan.org/release/DBD-SQLite")))
1716
1717 (define-public perl-mysql-config
1718 (package
1719 (name "perl-mysql-config")
1720 (version "1.04")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (string-append
1725 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1726 version
1727 ".tar.gz"))
1728 (sha256
1729 (base32
1730 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1731 (build-system perl-build-system)
1732 (home-page "https://metacpan.org/release/MySQL-Config")
1733 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1734 (description
1735 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1736 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1737 @code{Getopt::Long}.")
1738 (license license:perl-license)))
1739
1740 (define-public perl-sql-abstract
1741 (package
1742 (name "perl-sql-abstract")
1743 (version "1.86")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1748 "SQL-Abstract-" version ".tar.gz"))
1749 (sha256
1750 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1751 (build-system perl-build-system)
1752 (native-inputs
1753 `(("perl-module-install" ,perl-module-install)
1754 ("perl-test-deep" ,perl-test-deep)
1755 ("perl-test-exception" ,perl-test-exception)
1756 ("perl-test-warn" ,perl-test-warn)))
1757 (propagated-inputs
1758 `(("perl-hash-merge" ,perl-hash-merge)
1759 ("perl-moo" ,perl-moo)
1760 ("perl-mro-compat" ,perl-mro-compat)
1761 ("perl-text-balanced" ,perl-text-balanced)))
1762 (home-page "https://metacpan.org/release/SQL-Abstract")
1763 (synopsis "Generate SQL from Perl data structures")
1764 (description "This module was inspired by the excellent DBIx::Abstract.
1765 While based on the concepts used by DBIx::Abstract, the concepts used have
1766 been modified to make the SQL easier to generate from Perl data structures.
1767 The underlying idea is for this module to do what you mean, based on the data
1768 structures you provide it, so that you don't have to modify your code every
1769 time your data changes.")
1770 (license license:perl-license)))
1771
1772 (define-public perl-sql-splitstatement
1773 (package
1774 (name "perl-sql-splitstatement")
1775 (version "1.00020")
1776 (source
1777 (origin
1778 (method url-fetch)
1779 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1780 "SQL-SplitStatement-" version ".tar.gz"))
1781 (sha256
1782 (base32
1783 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1784 (build-system perl-build-system)
1785 (native-inputs
1786 `(("perl-test-exception" ,perl-test-exception)))
1787 (propagated-inputs
1788 `(("perl-class-accessor" ,perl-class-accessor)
1789 ("perl-list-moreutils" ,perl-list-moreutils)
1790 ("perl-regexp-common" ,perl-regexp-common)
1791 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1792 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1793 (synopsis "Split SQL code into atomic statements")
1794 (description "This module tries to split any SQL code, even including
1795 non-standard extensions, into the atomic statements it is composed of.")
1796 (license license:perl-license)))
1797
1798 (define-public perl-sql-tokenizer
1799 (package
1800 (name "perl-sql-tokenizer")
1801 (version "0.24")
1802 (source
1803 (origin
1804 (method url-fetch)
1805 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1806 "SQL-Tokenizer-" version ".tar.gz"))
1807 (sha256
1808 (base32
1809 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1810 (build-system perl-build-system)
1811 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1812 (synopsis "SQL tokenizer")
1813 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1814 claim to be a parser or query verifier. It just creates sane tokens from a
1815 valid SQL query.")
1816 (license license:perl-license)))
1817
1818 (define-public unixodbc
1819 (package
1820 (name "unixodbc")
1821 (version "2.3.7")
1822 (source (origin
1823 (method url-fetch)
1824 (uri
1825 (string-append
1826 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1827 version ".tar.gz"))
1828 (sha256
1829 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1830 (build-system gnu-build-system)
1831 (synopsis "Data source abstraction library")
1832 (description "Unixodbc is a library providing an API with which to access
1833 data sources. Data sources include SQL Servers and any software with an ODBC
1834 Driver.")
1835 (license license:lgpl2.1+)
1836 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1837 (home-page "http://www.unixodbc.org")))
1838
1839 (define-public unqlite
1840 (package
1841 (name "unqlite")
1842 (version "1.1.6")
1843 (source (origin
1844 (method url-fetch)
1845 ;; Contains bug fixes against the official release, and has an
1846 ;; autotooled build system.
1847 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1848 "download/v1.0.0/"
1849 "unqlite-unofficial-" version ".tar.gz"))
1850 (sha256
1851 (base32
1852 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1853 (build-system gnu-build-system)
1854 (arguments `(#:tests? #f)) ;No check target
1855 (home-page "http://www.unqlite.org")
1856 (synopsis "In-memory key/value and document store")
1857 (description
1858 "UnQLite is an in-process software library which implements a
1859 self-contained, serverless, zero-configuration, transactional NoSQL
1860 database engine. UnQLite is a document store database similar to
1861 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1862 similar to BerkeleyDB, LevelDB, etc.")
1863 (license license:bsd-2)))
1864
1865 (define-public redis
1866 (package
1867 (name "redis")
1868 (version "5.0.7")
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append "http://download.redis.io/releases/redis-"
1872 version".tar.gz"))
1873 (sha256
1874 (base32
1875 "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
1876 (build-system gnu-build-system)
1877 (arguments
1878 '(#:tests? #f ; tests related to master/slave and replication fail
1879 #:phases (modify-phases %standard-phases
1880 (delete 'configure))
1881 #:make-flags `("CC=gcc"
1882 "MALLOC=libc"
1883 "LDFLAGS=-ldl"
1884 ,(string-append "PREFIX="
1885 (assoc-ref %outputs "out")))))
1886 (synopsis "Key-value cache and store")
1887 (description "Redis is an advanced key-value cache and store. Redis
1888 supports many data structures including strings, hashes, lists, sets, sorted
1889 sets, bitmaps and hyperloglogs.")
1890 (home-page "http://redis.io/")
1891 (license license:bsd-3)))
1892
1893 (define-public kyotocabinet
1894 (package
1895 (name "kyotocabinet")
1896 (version "1.2.77")
1897 (source (origin
1898 (method url-fetch)
1899 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1900 name "-" version ".tar.gz"))
1901 (sha256
1902 (base32
1903 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1904 (build-system gnu-build-system)
1905 (arguments
1906 `(#:configure-flags
1907 (list
1908 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1909 (string-append "LDFLAGS=-Wl,-rpath="
1910 (assoc-ref %outputs "out") "/lib"))))
1911 (inputs `(("zlib" ,zlib)))
1912 (home-page "http://fallabs.com/kyotocabinet/")
1913 (synopsis
1914 "Kyoto Cabinet is a modern implementation of the DBM database")
1915 (description
1916 "Kyoto Cabinet is a standalone file-based database that supports Hash
1917 and B+ Tree data storage models. It is a fast key-value lightweight
1918 database and supports many programming languages. It is a NoSQL database.")
1919 (license license:gpl3+)))
1920
1921 (define-public tokyocabinet
1922 (package
1923 (name "tokyocabinet")
1924 (version "1.4.48")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (string-append "http://fallabs.com/tokyocabinet/"
1929 name "-" version ".tar.gz"))
1930 (sha256
1931 (base32
1932 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1933 (build-system gnu-build-system)
1934 (arguments
1935 `(#:configure-flags
1936 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1937 (string-append "LDFLAGS=-Wl,-rpath="
1938 (assoc-ref %outputs "out") "/lib"))))
1939 (inputs
1940 `(("zlib" ,zlib)))
1941 (home-page "http://fallabs.com/tokyocabinet/")
1942 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1943 (description
1944 "Tokyo Cabinet is a library of routines for managing a database.
1945 The database is a simple data file containing records, each is a pair of a
1946 key and a value. Every key and value is serial bytes with variable length.
1947 Both binary data and character string can be used as a key and a value.
1948 There is neither concept of data tables nor data types. Records are
1949 organized in hash table, B+ tree, or fixed-length array.")
1950 (license license:lgpl2.1+)))
1951
1952 (define-public wiredtiger
1953 (package
1954 (name "wiredtiger")
1955 (version "2.9.1")
1956 (source (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "http://source.wiredtiger.com/releases/wiredtiger-"
1960 version ".tar.bz2"))
1961 (sha256
1962 (base32
1963 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1964 (build-system gnu-build-system)
1965 (arguments
1966 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1967 #:phases
1968 (modify-phases %standard-phases
1969 (add-before 'check 'disable-test/fops
1970 (lambda _
1971 ;; XXX: timed out after 3600 seconds of silence
1972 (substitute* "Makefile"
1973 (("test/fops") ""))
1974 #t)))))
1975 (inputs
1976 `(("lz4" ,lz4)
1977 ("zlib" ,zlib)
1978 ("snappy" ,snappy)))
1979 (home-page "http://source.wiredtiger.com/")
1980 (synopsis "NoSQL data engine")
1981 (description
1982 "WiredTiger is an extensible platform for data management. It supports
1983 row-oriented storage (where all columns of a row are stored together),
1984 column-oriented storage (where columns are stored in groups, allowing for
1985 more efficient access and storage of column subsets) and log-structured merge
1986 trees (LSM), for sustained throughput under random insert workloads.")
1987 (license license:gpl3) ; or GPL-2
1988 ;; configure.ac: WiredTiger requires a 64-bit build.
1989 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1990
1991 (define-public wiredtiger-3
1992 (package
1993 (inherit wiredtiger)
1994 (name "wiredtiger")
1995 (version "3.1.0")
1996 (source (origin
1997 (method url-fetch)
1998 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
1999 version ".tar.bz2"))
2000 (sha256
2001 (base32
2002 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2003
2004 (define-public guile-wiredtiger
2005 (package
2006 (name "guile-wiredtiger")
2007 (version "0.7.0")
2008 (source (origin
2009 (method git-fetch)
2010 (uri (git-reference
2011 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2012 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2013 (file-name (string-append name "-" version "-checkout"))
2014 (sha256
2015 (base32
2016 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2017 (build-system gnu-build-system)
2018 (arguments
2019 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2020 #:configure-flags
2021 (list (string-append "--with-libwiredtiger-prefix="
2022 (assoc-ref %build-inputs "wiredtiger")))
2023 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2024 (native-inputs
2025 `(("autoconf" ,autoconf)
2026 ("automake" ,automake)
2027 ("pkg-config" ,pkg-config)))
2028 (inputs
2029 `(("wiredtiger" ,wiredtiger-3)
2030 ("guile" ,guile-2.2)))
2031 (propagated-inputs
2032 `(("guile-bytestructures" ,guile-bytestructures)))
2033 (synopsis "WiredTiger bindings for GNU Guile")
2034 (description
2035 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2036 database.")
2037 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2038 (license license:gpl3+)))
2039
2040 (define-public perl-db-file
2041 (package
2042 (name "perl-db-file")
2043 (version "1.852")
2044 (source
2045 (origin
2046 (method url-fetch)
2047 (uri (string-append
2048 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2049 version
2050 ".tar.gz"))
2051 (sha256
2052 (base32
2053 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
2054 (build-system perl-build-system)
2055 (inputs `(("bdb" ,bdb)))
2056 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2057 (arguments
2058 `(#:phases (modify-phases %standard-phases
2059 (add-before
2060 'configure 'modify-config.in
2061 (lambda* (#:key inputs #:allow-other-keys)
2062 (substitute* "config.in"
2063 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2064 #t)))))
2065 (home-page "https://metacpan.org/release/DB_File")
2066 (synopsis
2067 "Perl5 access to Berkeley DB version 1.x")
2068 (description
2069 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2070 (license license:perl-license)))
2071
2072 (define-public lmdb
2073 (package
2074 (name "lmdb")
2075 (version "0.9.24")
2076 (source
2077 (origin
2078 (method git-fetch)
2079 (uri (git-reference
2080 (url "https://github.com/LMDB/lmdb.git")
2081 (commit (string-append "LMDB_" version))))
2082 (file-name (git-file-name name version))
2083 (sha256
2084 (base32 "088q6m8fvr12w43s461h7cvpg5hj8csaqj6n9pci150dz7bk5lxm"))))
2085 (build-system gnu-build-system)
2086 (arguments
2087 `(#:test-target "test"
2088 #:phases
2089 (modify-phases %standard-phases
2090 (replace 'configure
2091 (lambda* (#:key outputs #:allow-other-keys)
2092 (chdir "libraries/liblmdb")
2093 (substitute* "Makefile"
2094 (("/usr/local") (assoc-ref outputs "out")))
2095 #t)))))
2096 (home-page "https://symas.com/products/lightning-memory-mapped-database")
2097 (synopsis "Lightning Memory-Mapped Database library")
2098 (description
2099 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2100 transactional database. Unlike more complex relational databases, LMDB handles
2101 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2102 underlying operating system for caching and locking, keeping the code small and
2103 simple.
2104 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2105 disk-based databases with high read performance that scales linearly over
2106 multiple cores. The size of each database is limited only by the size of the
2107 virtual address space — not physical RAM.")
2108 (license license:openldap2.8)))
2109
2110 (define-public lmdbxx
2111 (package
2112 (name "lmdbxx")
2113 (version "0.9.14.0")
2114 (source
2115 (origin
2116 (method git-fetch)
2117 (uri (git-reference
2118 (url "https://github.com/drycpp/lmdbxx.git")
2119 (commit version)))
2120 (file-name (git-file-name name version))
2121 (sha256
2122 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2123 (arguments
2124 `(#:make-flags
2125 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2126 #:phases
2127 (modify-phases %standard-phases
2128 (delete 'configure))))
2129 (build-system gnu-build-system)
2130 (inputs `(("lmdb" ,lmdb)))
2131 (home-page "http://lmdbxx.sourceforge.net")
2132 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2133 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2134 @code{LMDB} embedded database library, offering both an error-checked
2135 procedural interface and an object-oriented resource interface with RAII
2136 semantics.")
2137 (license license:unlicense)))
2138
2139 (define-public libpqxx
2140 (package
2141 (name "libpqxx")
2142 (version "4.0.1")
2143 (source (origin
2144 (method url-fetch)
2145 (uri (string-append
2146 "http://pqxx.org/download/software/libpqxx/"
2147 name "-" version ".tar.gz"))
2148 (sha256
2149 (base32
2150 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2151 (build-system gnu-build-system)
2152 (native-inputs
2153 `(("python" ,python-2)))
2154 (inputs `(("postgresql" ,postgresql)))
2155 (arguments
2156 `(#:tests? #f ; # FAIL: 1
2157 #:phases
2158 (modify-phases %standard-phases
2159 (add-before 'configure 'fix-sed-command
2160 (lambda _
2161 ;; Newer sed versions error out if double brackets are not used.
2162 (substitute* "configure"
2163 (("\\[:space:\\]") "[[:space:]]"))
2164 #t)))))
2165 (synopsis "C++ connector for PostgreSQL")
2166 (description
2167 "Libpqxx is a C++ library to enable user programs to communicate with the
2168 PostgreSQL database back-end. The database back-end can be local or it may be
2169 on another machine, accessed via TCP/IP.")
2170 (home-page "http://pqxx.org/")
2171 (license license:bsd-3)))
2172
2173 (define-public python-peewee
2174 (package
2175 (name "python-peewee")
2176 (version "2.10.2")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "peewee" version))
2181 (sha256
2182 (base32
2183 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2184 (build-system python-build-system)
2185 (arguments
2186 `(#:tests? #f)) ; Fails to import test data
2187 (native-inputs
2188 `(("python-cython" ,python-cython)))
2189 (home-page "https://github.com/coleifer/peewee/")
2190 (synopsis "Small object-relational mapping utility")
2191 (description
2192 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2193 handles converting between pythonic values and those used by databases, so you
2194 can use Python types in your code without having to worry. It has built-in
2195 support for sqlite, mysql and postgresql. If you already have a database, you
2196 can autogenerate peewee models using @code{pwiz}, a model generator.")
2197 (license license:expat)))
2198
2199 (define-public python2-peewee
2200 (package-with-python2 python-peewee))
2201
2202 (define-public sqlcipher
2203 (package
2204 (name "sqlcipher")
2205 (version "3.4.2")
2206 (source
2207 (origin
2208 (method url-fetch)
2209 (uri (string-append "https://github.com/sqlcipher/" name
2210 "/archive/v" version ".tar.gz"))
2211 (sha256
2212 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2213 (file-name (string-append name "-" version ".tar.gz"))))
2214 (build-system gnu-build-system)
2215 (inputs
2216 `(("libcrypto" ,openssl)
2217 ("libtcl8.6" ,tcl))) ; required for running the tests
2218 (native-inputs
2219 `(("tcl" ,tcl)))
2220 (arguments
2221 '(#:configure-flags
2222 '("--enable-tempstore=yes"
2223 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2224 "LDFLAGS=-lcrypto -ltcl8.6"
2225 "--disable-tcl")
2226 ;; tests cannot be run from the Makefile
2227 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2228 #:test-target "testfixture"
2229 #:phases
2230 (modify-phases %standard-phases
2231 (add-before 'check 'build-test-runner
2232 (assoc-ref %standard-phases 'check))
2233 (replace 'check
2234 (lambda _
2235 (invoke "./testfixture" "test/crypto.test"))))))
2236 (home-page "https://www.zetetic.net/sqlcipher/")
2237 (synopsis
2238 "Library providing transparent encryption of SQLite database files")
2239 (description "SQLCipher is an implementation of SQLite, extended to
2240 provide transparent 256-bit AES encryption of database files. Pages are
2241 encrypted before being written to disk and are decrypted when read back. It’s
2242 well suited for protecting embedded application databases and for mobile
2243 development.")
2244 ;; The source files
2245 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2246 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2247 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2248 ;; source files are in the public domain.
2249 (license (list license:public-domain license:bsd-3))))
2250
2251 (define-public python-pyodbc-c
2252 (package
2253 (name "python-pyodbc-c")
2254 (version "3.1.4")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2259 "archive.tar.gz?ref=v" version))
2260 (sha256
2261 (base32
2262 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2263 (file-name (string-append name "-" version ".tar.gz"))))
2264 (build-system python-build-system)
2265 (inputs
2266 `(("unixodbc" ,unixodbc)))
2267 (arguments
2268 `(;; No unit tests exist.
2269 #:tests? #f))
2270 (home-page "https://github.com/mkleehammer/pyodbc")
2271 (synopsis "Python ODBC Library")
2272 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2273 for ODBC.")
2274 (license (license:x11-style "file://LICENSE.TXT"))))
2275
2276 (define-public python2-pyodbc-c
2277 (package-with-python2 python-pyodbc-c))
2278
2279 (define-public python-pyodbc
2280 (package
2281 (name "python-pyodbc")
2282 (version "4.0.30")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (pypi-uri "pyodbc" version))
2287 (sha256
2288 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2289 (file-name (string-append name "-" version ".tar.gz"))))
2290 (build-system python-build-system)
2291 (inputs
2292 `(("unixodbc" ,unixodbc)))
2293 (arguments
2294 `(#:tests? #f)) ; no unit tests exist
2295 (home-page "https://github.com/mkleehammer/pyodbc")
2296 (synopsis "Python ODBC Library")
2297 (description "@code{python-pyodbc} provides a Python DB-API driver
2298 for ODBC.")
2299 (license (license:x11-style "file:///LICENSE.TXT"))))
2300
2301 (define-public python2-pyodbc
2302 (package-with-python2 python-pyodbc))
2303
2304 (define-public mdbtools
2305 (package
2306 (name "mdbtools")
2307 (version "0.7.1")
2308 (source
2309 (origin
2310 (method git-fetch)
2311 (uri (git-reference
2312 (url "https://github.com/brianb/mdbtools.git")
2313 (commit version)))
2314 (file-name (git-file-name name version))
2315 (sha256
2316 (base32
2317 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2318 (build-system gnu-build-system)
2319 (inputs
2320 `(("glib" ,glib)))
2321 (native-inputs
2322 `(("autoconf" ,autoconf)
2323 ("automake" ,automake)
2324 ("libtool" ,libtool)
2325 ("pkg-config" ,pkg-config)
2326 ("txt2man" ,txt2man)
2327 ("which" ,which)))
2328 (home-page "http://mdbtools.sourceforge.net/")
2329 (synopsis "Read Microsoft Access databases")
2330 (description "MDB Tools is a set of tools and applications to read the
2331 proprietary MDB file format used in Microsoft's Access database package. This
2332 includes programs to export schema and data from Microsoft's Access database
2333 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2334 etc., and an SQL engine for performing simple SQL queries.")
2335 (license (list license:lgpl2.0
2336 license:gpl2+))))
2337
2338 (define-public python-lmdb
2339 (package
2340 (name "python-lmdb")
2341 (version "0.95")
2342 (source (origin
2343 (method url-fetch)
2344 (uri (pypi-uri "lmdb" version))
2345 (sha256
2346 (base32
2347 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2348 (modules '((guix build utils)))
2349 (snippet
2350 ;; Delete bundled lmdb source files.
2351 '(begin
2352 (for-each delete-file (list "lib/lmdb.h"
2353 "lib/mdb.c"
2354 "lib/midl.c"
2355 "lib/midl.h"))
2356 #t))))
2357 (build-system python-build-system)
2358 (inputs
2359 `(("lmdb" ,lmdb)))
2360 (arguments
2361 `(#:phases
2362 (modify-phases %standard-phases
2363 (add-before 'build 'use-system-lmdb
2364 (lambda* (#:key inputs #:allow-other-keys)
2365 (let ((lmdb (assoc-ref inputs "lmdb")))
2366 (setenv "LMDB_FORCE_SYSTEM" "set")
2367 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2368 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2369 #t))))
2370 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2371 #:tests? #f))
2372 (home-page "https://github.com/dw/py-lmdb")
2373 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2374 (description
2375 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2376 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2377 (license
2378 (list license:openldap2.8
2379 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2380 ;; but not actually needed on platforms currently supported by Guix.
2381 license:bsd-3))))
2382
2383 (define-public python2-lmdb
2384 (package-with-python2 python-lmdb))
2385
2386 (define-public python-orator
2387 (package
2388 (name "python-orator")
2389 (version "0.9.7")
2390 (source (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "orator" version))
2393 (sha256
2394 (base32
2395 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2396 (build-system python-build-system)
2397 (arguments
2398 `(#:phases
2399 (modify-phases %standard-phases
2400 (add-after 'unpack 'loosen-dependencies
2401 ;; Tests are not actually run since they are not included with the
2402 ;; distributed package, but dependencies are checked.
2403 (lambda _
2404 (substitute* "setup.py"
2405 ((",<.*'") "'")
2406 (("flexmock==0.9.7") "flexmock")
2407 ;; The pytest-mock package is out of date, so we remove minimum
2408 ;; version requirement.
2409 (("pytest-mock.*'") "pytest-mock'"))
2410 #t)))))
2411 (native-inputs
2412 `(("python-pytest-mock" ,python-pytest-mock)
2413 ("python-pytest" ,python-pytest)
2414 ("python-flexmock" ,python-flexmock)))
2415 (propagated-inputs
2416 `(("python-backpack" ,python-backpack)
2417 ("python-blinker" ,python-blinker)
2418 ("python-cleo" ,python-cleo)
2419 ("python-faker" ,python-faker)
2420 ("python-inflection" ,python-inflection)
2421 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2422 ("python-pendulum" ,python-pendulum)
2423 ("python-pyaml" ,python-pyaml)
2424 ("python-pygments" ,python-pygments)
2425 ("python-simplejson" ,python-simplejson)
2426 ("python-six" ,python-six)
2427 ("python-wrapt" ,python-wrapt)))
2428 (home-page "https://orator-orm.com/")
2429 (synopsis "ActiveRecord ORM for Python")
2430 (description
2431 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2432 implementation for Python.")
2433 (license license:expat)
2434 (properties `((python2-variant . ,(delay python2-orator))))))
2435
2436 (define-public python2-orator
2437 (package-with-python2 (strip-python2-variant python-orator)))
2438
2439 (define-public virtuoso-ose
2440 (package
2441 (name "virtuoso-ose")
2442 (version "7.2.5")
2443 (source
2444 (origin
2445 (method url-fetch)
2446 (uri (string-append
2447 "https://github.com/openlink/virtuoso-opensource/releases/"
2448 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2449 (sha256
2450 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2451 (build-system gnu-build-system)
2452 (arguments
2453 `(#:tests? #f ; Tests require a network connection.
2454 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2455 ;; This indicates that the internal zlib code may still be used.
2456 #:configure-flags '("--without-internal-zlib"
2457 "--with-readline")))
2458 (inputs
2459 `(("openssl" ,openssl-1.0)
2460 ("net-tools" ,net-tools)
2461 ("readline" ,readline)
2462 ("zlib" ,zlib)))
2463 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2464 (synopsis "Multi-model database system")
2465 (description "Virtuoso is a scalable cross-platform server that combines
2466 relational, graph, and document data management with web application server
2467 and web services platform functionality.")
2468 ;; configure: error: ... can only be build on 64bit platforms
2469 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2470 (license license:gpl2)))
2471
2472 (define-public python-ccm
2473 (package
2474 (name "python-ccm")
2475 (version "2.1.6")
2476 (source
2477 (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "ccm" version))
2480 (sha256
2481 (base32
2482 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2483 (build-system python-build-system)
2484 (propagated-inputs
2485 `(("python-pyyaml" ,python-pyyaml)
2486 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2487 ;; functionality
2488 ("python-psutil" ,python-psutil)
2489 ("python-six" ,python-six)))
2490 (home-page "https://github.com/pcmanus/ccm")
2491 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2492 localhost")
2493 (description "Cassandra Cluster Manager is a development tool for testing
2494 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2495 on localhost.")
2496 (license license:asl2.0)))
2497
2498 (define-public python2-ccm
2499 (package-with-python2 python-ccm))
2500
2501 (define-public python2-pysqlite
2502 (package
2503 (name "python2-pysqlite")
2504 (version "2.8.3")
2505 (source
2506 (origin
2507 (method url-fetch)
2508 (uri (pypi-uri "pysqlite" version))
2509 (sha256
2510 (base32
2511 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2512 (build-system python-build-system)
2513 (inputs
2514 `(("sqlite" ,sqlite)))
2515 (arguments
2516 `(#:python ,python-2 ; incompatible with Python 3
2517 #:tests? #f)) ; no test target
2518 (home-page "https://github.com/ghaering/pysqlite")
2519 (synopsis "SQLite bindings for Python")
2520 (description
2521 "Pysqlite provides SQLite bindings for Python that comply to the
2522 Database API 2.0T.")
2523 (license license:zlib)))
2524
2525 (define-public python-sqlalchemy
2526 (package
2527 (name "python-sqlalchemy")
2528 (version "1.3.3")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "SQLAlchemy" version))
2533 (sha256
2534 (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici"))))
2535 (build-system python-build-system)
2536 (native-inputs
2537 `(("python-cython" ,python-cython) ; for C extensions
2538 ("python-pytest" ,python-pytest)
2539 ("python-mock" ,python-mock))) ; for tests
2540 (arguments
2541 `(#:phases
2542 (modify-phases %standard-phases
2543 (replace 'check
2544 (lambda _ (invoke "py.test"))))))
2545 (home-page "https://www.sqlalchemy.org")
2546 (synopsis "Database abstraction library")
2547 (description
2548 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2549 gives application developers the full power and flexibility of SQL. It
2550 provides a full suite of well known enterprise-level persistence patterns,
2551 designed for efficient and high-performing database access, adapted into a
2552 simple and Pythonic domain language.")
2553 (license license:x11)))
2554
2555 (define-public python2-sqlalchemy
2556 (package-with-python2 python-sqlalchemy))
2557
2558 (define-public python-sqlalchemy-utils
2559 (package
2560 (name "python-sqlalchemy-utils")
2561 (version "0.32.21")
2562 (source
2563 (origin
2564 (method url-fetch)
2565 (uri (pypi-uri "SQLAlchemy-Utils" version))
2566 (sha256
2567 (base32
2568 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2569 (build-system python-build-system)
2570 (arguments
2571 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2572 ;; #:phases
2573 ;; (modify-phases %standard-phases
2574 ;; (replace 'check
2575 ;; (lambda _
2576 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2577 (propagated-inputs
2578 `(("python-six" ,python-six)
2579 ("python-sqlalchemy" ,python-sqlalchemy)))
2580 (native-inputs
2581 `(("python-dateutil" ,python-dateutil)
2582 ("python-flexmock" ,python-flexmock)
2583 ("python-psycopg2" ,python-psycopg2)
2584 ("python-pytest" ,python-pytest)
2585 ("python-pytz" ,python-pytz)))
2586 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2587 (synopsis "Various utility functions for SQLAlchemy")
2588 (description
2589 "SQLAlchemy-utils provides various utility functions and custom data types
2590 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2591
2592 You might also want to install the following optional dependencies:
2593 @enumerate
2594 @item @code{python-passlib}
2595 @item @code{python-babel}
2596 @item @code{python-cryptography}
2597 @item @code{python-pytz}
2598 @item @code{python-psycopg2}
2599 @item @code{python-furl}
2600 @item @code{python-flask-babel}
2601 @end enumerate
2602 ")
2603 (license license:bsd-3)))
2604
2605 (define-public python2-sqlalchemy-utils
2606 (package-with-python2 python-sqlalchemy-utils))
2607
2608 (define-public python-alembic
2609 (package
2610 (name "python-alembic")
2611 (version "1.0.11")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (pypi-uri "alembic" version))
2616 (sha256
2617 (base32
2618 "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd"))))
2619 (build-system python-build-system)
2620 (native-inputs
2621 `(("python-mock" ,python-mock)
2622 ("python-pytest-cov" ,python-pytest-cov)))
2623 (propagated-inputs
2624 `(("python-dateutil" ,python-dateutil)
2625 ("python-sqlalchemy" ,python-sqlalchemy)
2626 ("python-mako" ,python-mako)
2627 ("python-editor" ,python-editor)))
2628 (home-page "https://bitbucket.org/zzzeek/alembic")
2629 (synopsis "Database migration tool for SQLAlchemy")
2630 (description
2631 "Alembic is a lightweight database migration tool for usage with the
2632 SQLAlchemy Database Toolkit for Python.")
2633 (license license:expat)))
2634
2635 (define-public python2-alembic
2636 (package-with-python2 python-alembic))
2637
2638 (define-public python-pickleshare
2639 (package
2640 (name "python-pickleshare")
2641 (version "0.7.5")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "pickleshare" version))
2646 (sha256
2647 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2648 (build-system python-build-system)
2649 (arguments
2650 `(#:phases (modify-phases %standard-phases
2651 (replace 'check
2652 (lambda _
2653 (invoke "pytest"))))))
2654 (native-inputs
2655 `(("python-pytest" ,python-pytest)))
2656 (home-page "https://github.com/vivainio/pickleshare")
2657 (synopsis "Tiny key value database with concurrency support")
2658 (description
2659 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2660 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2661 shelve, many processes can access the database simultaneously. Changing a
2662 value in database is immediately visible to other processes accessing the same
2663 database. Concurrency is possible because the values are stored in separate
2664 files. Hence the “database” is a directory where all files are governed by
2665 PickleShare.")
2666 (properties `((python2-variant . ,(delay python2-pickleshare))))
2667 (license license:expat)))
2668
2669 (define-public python2-pickleshare
2670 (let ((pickleshare (package-with-python2
2671 (strip-python2-variant python-pickleshare))))
2672 (package (inherit pickleshare)
2673 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2674 ,@(package-propagated-inputs pickleshare))))))
2675
2676 (define-public python-apsw
2677 (package
2678 (name "python-apsw")
2679 (version "3.28.0-r1")
2680 (source
2681 (origin
2682 (method url-fetch)
2683 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2684 "/download/" version "/apsw-" version ".zip"))
2685 (sha256
2686 (base32
2687 "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly"))))
2688 (build-system python-build-system)
2689 (native-inputs
2690 `(("unzip" ,unzip)))
2691 (inputs
2692 `(("sqlite" ,sqlite)))
2693 (arguments
2694 `(#:phases
2695 (modify-phases %standard-phases
2696 (replace 'build
2697 (lambda _
2698 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2699 #t))
2700 (add-after 'build 'build-test-helper
2701 (lambda _
2702 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2703 "-I." "-Isqlite3" "src/testextension.c")
2704 #t))
2705 (replace 'check
2706 (lambda* (#:key inputs outputs #:allow-other-keys)
2707 (add-installed-pythonpath inputs outputs)
2708 (invoke "python" "setup.py" "test")
2709 #t)))))
2710 (home-page "https://github.com/rogerbinns/apsw/")
2711 (synopsis "Another Python SQLite Wrapper")
2712 (description "APSW is a Python wrapper for the SQLite
2713 embedded relational database engine. In contrast to other wrappers such as
2714 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2715 translate the complete SQLite API into Python.")
2716 (license license:zlib)))
2717
2718 (define-public python2-apsw
2719 (package-with-python2 python-apsw))
2720
2721 (define-public python2-neo4j-driver
2722 (package
2723 (name "python2-neo4j-driver")
2724 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2725 (version "1.4.0")
2726 (source (origin
2727 (method url-fetch)
2728 (uri (pypi-uri "neo4j-driver" version))
2729 (sha256
2730 (base32
2731 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2732 (build-system python-build-system)
2733 (arguments
2734 `(#:python ,python-2))
2735 (home-page "https://neo4j.com/developer/python/")
2736 (synopsis "Neo4j driver code written in Python")
2737 (description "This package provides the Neo4j Python driver that connects
2738 to the database using Neo4j's binary protocol. It aims to be minimal, while
2739 being idiomatic to Python.")
2740 (license license:asl2.0)))
2741
2742 (define-public python2-py2neo
2743 (package
2744 (name "python2-py2neo")
2745 (version "3.1.2")
2746 (source (origin
2747 (method url-fetch)
2748 (uri (pypi-uri "py2neo" version))
2749 (sha256
2750 (base32
2751 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2752 (build-system python-build-system)
2753 (arguments
2754 `(#:python ,python-2))
2755 (home-page "https://py2neo.org")
2756 (synopsis "Library and toolkit for working with Neo4j in Python")
2757 (description "This package provides a client library and toolkit for
2758 working with Neo4j from within Python applications and from the command
2759 line. The core library has no external dependencies and has been carefully
2760 designed to be easy and intuitive to use.")
2761 (license license:asl2.0)))
2762
2763 (define-public python-psycopg2
2764 (package
2765 (name "python-psycopg2")
2766 (version "2.7.7")
2767 (source
2768 (origin
2769 (method url-fetch)
2770 (uri (pypi-uri "psycopg2" version))
2771 (sha256
2772 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2773 (build-system python-build-system)
2774 (arguments
2775 ;; Tests would require a postgresql database "psycopg2_test"
2776 ;; and a running postgresql database management service.
2777 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2778 (inputs
2779 `(("postgresql" ,postgresql))) ; libpq
2780 (home-page "http://initd.org/psycopg/")
2781 (synopsis "Python PostgreSQL adapter")
2782 (description
2783 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2784 2.0.")
2785 (license license:lgpl3+)))
2786
2787 (define-public python2-psycopg2
2788 (package-with-python2 python-psycopg2))
2789
2790 (define-public python-sadisplay
2791 (package
2792 (name "python-sadisplay")
2793 (version "0.4.8")
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (pypi-uri "sadisplay" version))
2798 (sha256
2799 (base32
2800 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2801 (build-system python-build-system)
2802 (propagated-inputs
2803 `(("python-sqlalchemy" ,python-sqlalchemy)))
2804 (native-inputs
2805 ;; For tests.
2806 `(("python-nose" ,python-nose)))
2807 (home-page "https://bitbucket.org/estin/sadisplay")
2808 (synopsis "SQLAlchemy schema displayer")
2809 (description "This package provides a program to build Entity
2810 Relationship diagrams from a SQLAlchemy model (or directly from the
2811 database).")
2812 (license license:bsd-3)))
2813
2814 (define-public python2-sadisplay
2815 (package-with-python2 python-sadisplay))
2816
2817 (define-public python-mysqlclient
2818 (package
2819 (name "python-mysqlclient")
2820 (version "1.3.13")
2821 (source
2822 (origin
2823 (method url-fetch)
2824 (uri (pypi-uri "mysqlclient" version))
2825 (sha256
2826 (base32
2827 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2828 (build-system python-build-system)
2829 (native-inputs
2830 `(("nose" ,python-nose)
2831 ("mock" ,python-mock)
2832 ("py.test" ,python-pytest)))
2833 (inputs
2834 `(("mysql" ,mariadb "lib")
2835 ("mysql-dev" ,mariadb "dev")
2836 ("libz" ,zlib)
2837 ("openssl" ,openssl)))
2838 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2839 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2840 (description "MySQLdb is an interface to the popular MySQL database server
2841 for Python. The design goals are:
2842 @enumerate
2843 @item Compliance with Python database API version 2.0 [PEP-0249],
2844 @item Thread-safety,
2845 @item Thread-friendliness (threads will not block each other).
2846 @end enumerate")
2847 (license license:gpl2)))
2848
2849 (define-public python2-mysqlclient
2850 (package-with-python2 python-mysqlclient))
2851
2852 (define-public python-hiredis
2853 (package
2854 (name "python-hiredis")
2855 (version "0.2.0")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "hiredis" version))
2860 (sha256
2861 (base32
2862 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2863 (build-system python-build-system)
2864 (arguments
2865 ;; no tests
2866 `(#:tests? #f))
2867 (home-page "https://github.com/redis/hiredis-py")
2868 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2869 (description "Python-hiredis is a python extension that wraps protocol
2870 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2871 (license license:bsd-3)))
2872
2873 (define-public python2-hiredis
2874 (package-with-python2 python-hiredis))
2875
2876 (define-public python-fakeredis
2877 (package
2878 (name "python-fakeredis")
2879 (version "0.8.2")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "fakeredis" version))
2884 (sha256
2885 (base32
2886 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2887 (build-system python-build-system)
2888 (arguments
2889 ;; no tests
2890 `(#:tests? #f))
2891 (home-page "https://github.com/jamesls/fakeredis")
2892 (synopsis "Fake implementation of redis API for testing purposes")
2893 (description
2894 "Fakeredis is a pure-Python implementation of the redis-py Python client
2895 that simulates talking to a redis server. It was created for a single purpose:
2896 to write unit tests.
2897
2898 Setting up redis is not hard, but one often wants to write unit tests that don't
2899 talk to an external server such as redis. This module can be used as a
2900 reasonable substitute.")
2901 (license license:bsd-3)))
2902
2903 (define-public python2-fakeredis
2904 (package-with-python2 python-fakeredis))
2905
2906 (define-public python-redis
2907 (package
2908 (name "python-redis")
2909 (version "3.3.8")
2910 (source
2911 (origin
2912 (method url-fetch)
2913 (uri (pypi-uri "redis" version))
2914 (sha256
2915 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
2916 (build-system python-build-system)
2917 ;; Tests require a running Redis server.
2918 (arguments '(#:tests? #f))
2919 ;; As long as we are not running test, we do not need this input :-)
2920 ;;(native-inputs
2921 ;; `(("python-pytest" ,python-pytest)))
2922 (home-page "https://github.com/andymccurdy/redis-py")
2923 (synopsis "Redis Python client")
2924 (description
2925 "This package provides a Python interface to the Redis key-value store.")
2926 (license license:expat)))
2927
2928 (define-public python2-redis
2929 (package-with-python2 python-redis))
2930
2931 (define-public python-rq
2932 (package
2933 (name "python-rq")
2934 (version "0.13.0")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (pypi-uri "rq" version))
2939 (sha256
2940 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2941 (build-system python-build-system)
2942 (propagated-inputs
2943 `(("python-click" ,python-click)
2944 ("python-redis" ,python-redis)))
2945 (home-page "https://python-rq.org/")
2946 (synopsis "Simple job queues for Python")
2947 (description
2948 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2949 processing them in the background with workers. It is backed by Redis and it
2950 is designed to have a low barrier to entry.")
2951 (license license:bsd-2)))
2952
2953 (define-public python2-rq
2954 (package-with-python2 python-rq))
2955
2956 (define-public python-trollius-redis
2957 (package
2958 (name "python-trollius-redis")
2959 (version "0.1.4")
2960 (source
2961 (origin
2962 (method url-fetch)
2963 (uri (pypi-uri "trollius_redis" version))
2964 (sha256
2965 (base32
2966 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2967 (build-system python-build-system)
2968 ;; TODO: Tests require packaging 'hiredis'.
2969 (arguments '(#:tests? #f))
2970 (home-page "https://github.com/benjolitz/trollius-redis")
2971 (synopsis "Port of asyncio-redis to trollius")
2972 (description "@code{trollius-redis} is a Redis client for Python
2973 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2974 Redis protocol.")
2975 (license license:bsd-2)))
2976
2977 (define-public python2-trollius-redis
2978 (package-with-python2 python-trollius-redis))
2979
2980 (define-public python-sqlparse
2981 (package
2982 (name "python-sqlparse")
2983 (version "0.2.4")
2984 (source (origin
2985 (method url-fetch)
2986 (uri (pypi-uri "sqlparse" version))
2987 (sha256
2988 (base32
2989 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2990 (build-system python-build-system)
2991 (arguments
2992 `(#:phases
2993 (modify-phases %standard-phases
2994 (replace 'check
2995 (lambda _ (invoke "py.test"))))))
2996 (native-inputs
2997 `(("python-pytest" ,python-pytest)))
2998 (home-page "https://github.com/andialbrecht/sqlparse")
2999 (synopsis "Non-validating SQL parser")
3000 (description "Sqlparse is a non-validating SQL parser for Python. It
3001 provides support for parsing, splitting and formatting SQL statements.")
3002 (license license:bsd-3)))
3003
3004 (define-public python2-sqlparse
3005 (package-with-python2 python-sqlparse))
3006
3007 (define-public python-sql
3008 (package
3009 (name "python-sql")
3010 (version "1.0.0")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "python-sql" version))
3015 (sha256
3016 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3017 (build-system python-build-system)
3018 (home-page "https://python-sql.tryton.org/")
3019 (synopsis "Library to write SQL queries in a pythonic way")
3020 (description "@code{python-sql} is a library to write SQL queries, that
3021 transforms idiomatic python function calls to well-formed SQL queries.")
3022 (license license:bsd-3)))
3023
3024 (define-public python2-sql
3025 (package-with-python2 python-sql))
3026
3027 (define-public mongo-tools
3028 (package
3029 (name "mongo-tools")
3030 (version "3.4.0")
3031 (source
3032 (origin (method git-fetch)
3033 (uri (git-reference
3034 (url "https://github.com/mongodb/mongo-tools")
3035 (commit (string-append "r" version))))
3036 (file-name (git-file-name name version))
3037 (sha256
3038 (base32
3039 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3040 (build-system go-build-system)
3041 (arguments
3042 `(#:import-path "github.com/mongodb/mongo-tools"
3043 #:modules ((srfi srfi-1)
3044 (guix build go-build-system)
3045 (guix build utils))
3046 #:install-source? #f
3047 #:phases
3048 (let ((all-tools
3049 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3050 "mongoimport" "mongooplog" "mongorestore"
3051 "mongostat" "mongotop")))
3052 (modify-phases %standard-phases
3053 (add-after 'unpack 'delete-bundled-source-code
3054 (lambda _
3055 (delete-file-recursively
3056 "src/github.com/mongodb/mongo-tools/vendor")
3057 #t))
3058 (add-after 'delete-bundled-source-code 'patch-source
3059 (lambda _
3060 ;; Remove a redundant argument that causes compilation to fail.
3061 (substitute*
3062 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3063 (("skipping restore of system.profile collection\", db)")
3064 "skipping restore of system.profile collection\")"))
3065 #t))
3066 (replace 'build
3067 (lambda _
3068 (for-each (lambda (tool)
3069 (let ((command
3070 `("go" "build"
3071 ;; This is where the tests expect to find the
3072 ;; executables
3073 "-o" ,(string-append
3074 "src/github.com/mongodb/mongo-tools/bin/"
3075 tool)
3076 "-v"
3077 "-tags=\"ssl sasl\""
3078 "-ldflags"
3079 "-extldflags=-Wl,-z,now,-z,relro"
3080 ,(string-append
3081 "src/github.com/mongodb/mongo-tools/"
3082 tool "/main/" tool ".go"))))
3083 (simple-format #t "build: running ~A\n"
3084 (string-join command))
3085 (apply invoke command)))
3086 all-tools)
3087 #t))
3088 (replace 'check
3089 (lambda _
3090 (with-directory-excursion "src"
3091 (for-each (lambda (tool)
3092 (invoke
3093 "go" "test" "-v"
3094 (string-append "github.com/mongodb/mongo-tools/"
3095 tool)))
3096 all-tools))
3097 #t))
3098 (replace 'install
3099 (lambda* (#:key outputs #:allow-other-keys)
3100 (for-each (lambda (tool)
3101 (install-file
3102 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3103 tool)
3104 (string-append (assoc-ref outputs "out")
3105 "/bin")))
3106 all-tools)
3107 #t))))))
3108 (native-inputs
3109 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3110 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3111 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3112 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3113 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3114 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3115 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3116 (home-page "https://github.com/mongodb/mongo-tools")
3117 (synopsis "Various tools for interacting with MongoDB and BSON")
3118 (description
3119 "This package includes a collection of tools related to MongoDB.
3120 @table @code
3121 @item bsondump
3122 Display BSON files in a human-readable format
3123 @item mongoimport
3124 Convert data from JSON, TSV or CSV and insert them into a collection
3125 @item mongoexport
3126 Write an existing collection to CSV or JSON format
3127 @item mongodump/mongorestore
3128 Dump MongoDB backups to disk in the BSON format
3129 @item mongorestore
3130 Read MongoDB backups in the BSON format, and restore them to a live database
3131 @item mongostat
3132 Monitor live MongoDB servers, replica sets, or sharded clusters
3133 @item mongofiles
3134 Read, write, delete, or update files in GridFS
3135 @item mongooplog
3136 Replay oplog entries between MongoDB servers
3137 @item mongotop
3138 Monitor read/write activity on a mongo server
3139 @end table")
3140 (license license:asl2.0)))
3141
3142 (define-public apache-arrow
3143 (package
3144 (name "apache-arrow")
3145 (version "0.10.0")
3146 (source
3147 (origin
3148 (method git-fetch)
3149 (uri (git-reference
3150 (url "https://github.com/apache/arrow")
3151 (commit (string-append "apache-arrow-" version))))
3152 (file-name (git-file-name name version))
3153 (sha256
3154 (base32
3155 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3156 (build-system cmake-build-system)
3157 (arguments
3158 `(#:tests? #f
3159 #:phases
3160 (modify-phases %standard-phases
3161 (add-before 'configure 'enter-source-directory
3162 (lambda _ (chdir "cpp") #t))
3163 (add-after 'unpack 'set-env
3164 (lambda _
3165 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3166 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3167 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3168 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
3169 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3170 #t)))
3171 #:build-type "Release"
3172 #:configure-flags
3173 (list "-DARROW_PYTHON=ON"
3174
3175 ;; Install to PREFIX/lib (the default is
3176 ;; PREFIX/lib64).
3177 (string-append "-DCMAKE_INSTALL_LIBDIR="
3178 (assoc-ref %outputs "out")
3179 "/lib")
3180
3181 ;; XXX These Guix package offer static
3182 ;; libraries that are not position independent,
3183 ;; and ld fails to link them into the arrow .so
3184 "-DARROW_WITH_SNAPPY=OFF"
3185 "-DARROW_WITH_ZLIB=OFF"
3186 "-DARROW_WITH_ZSTD=OFF"
3187 "-DARROW_WITH_LZ4=OFF"
3188
3189 ;; Building the tests forces on all the
3190 ;; optional features and the use of static
3191 ;; libraries.
3192 "-DARROW_BUILD_TESTS=OFF"
3193 "-DARROW_BUILD_STATIC=OFF")))
3194 (inputs
3195 `(("boost" ,boost)
3196 ("rapidjson" ,rapidjson)
3197 ("brotli" ,google-brotli)
3198 ("flatbuffers" ,flatbuffers)
3199 ("jemalloc" ,jemalloc)
3200 ("python-3" ,python)
3201 ("python-numpy" ,python-numpy)))
3202 (home-page "https://arrow.apache.org/")
3203 (synopsis "Columnar in-memory analytics")
3204 (description "Apache Arrow is a columnar in-memory analytics layer
3205 designed to accelerate big data. It houses a set of canonical in-memory
3206 representations of flat and hierarchical data along with multiple
3207 language-bindings for structure manipulation. It also provides IPC and common
3208 algorithm implementations.")
3209 (license license:asl2.0)))
3210
3211 (define-public python-pyarrow
3212 (package
3213 (name "python-pyarrow")
3214 (version "0.10.0")
3215 (source
3216 (origin
3217 (method git-fetch)
3218 (uri (git-reference
3219 (url "https://github.com/apache/arrow")
3220 (commit (string-append "apache-arrow-" version))))
3221 (file-name (git-file-name name version))
3222 (sha256
3223 (base32
3224 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3225 (build-system python-build-system)
3226 (arguments
3227 '(#:tests? #f ; XXX There are no tests in the "python" directory
3228 #:phases
3229 (modify-phases %standard-phases
3230 (delete 'build) ; XXX the build is performed again during the install phase
3231 (add-after 'unpack 'enter-source-directory
3232 (lambda _ (chdir "python") #t))
3233 (add-after 'unpack 'set-env
3234 (lambda _
3235 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3236 #t)))))
3237 (propagated-inputs
3238 `(("apache-arrow" ,apache-arrow)
3239 ("python-numpy" ,python-numpy)
3240 ("python-pandas" ,python-pandas)
3241 ("python-six" ,python-six)))
3242 (native-inputs
3243 `(("cmake" ,cmake-minimal)
3244 ("python-cython" ,python-cython)
3245 ("python-pytest" ,python-pytest)
3246 ("python-pytest-runner" ,python-pytest-runner)
3247 ("python-setuptools-scm" ,python-setuptools-scm)))
3248 (home-page "https://arrow.apache.org/docs/python/")
3249 (synopsis "Python bindings for Apache Arrow")
3250 (description "This library provides a Pythonic API wrapper for the reference
3251 Arrow C++ implementation, along with tools for interoperability with pandas,
3252 NumPy, and other traditional Python scientific computing packages.")
3253 (license license:asl2.0)))
3254
3255 (define-public python2-pyarrow
3256 (package-with-python2 python-pyarrow))
3257
3258 (define-public python-crate
3259 (package
3260 (name "python-crate")
3261 (version "0.23.2")
3262 (source (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "crate" version))
3265 (sha256
3266 (base32
3267 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3268 (build-system python-build-system)
3269 (propagated-inputs
3270 `(("python-urllib3" ,python-urllib3)))
3271 (home-page "https://github.com/crate/crate-python")
3272 (synopsis "CrateDB Python client")
3273 (description
3274 "This package provides a Python client library for CrateDB.
3275 It implements the Python DB API 2.0 specification and includes support for
3276 SQLAlchemy.")
3277 (license license:asl2.0)))
3278
3279 (define-public libdbi
3280 (package
3281 (name "libdbi")
3282 (version "0.9.0")
3283 (source (origin
3284 (method url-fetch)
3285 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3286 version "/libdbi-" version ".tar.gz"))
3287 (sha256
3288 (base32
3289 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3290 (build-system gnu-build-system)
3291 (synopsis "Database independent abstraction layer in C")
3292 (description
3293 "This library implements a database independent abstraction layer in C,
3294 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3295 programmers can leverage the power of multiple databases and multiple
3296 simultaneous database connections by using this framework.")
3297 (home-page "http://libdbi.sourceforge.net/")
3298 (license license:lgpl2.1+)))
3299
3300 (define-public libdbi-drivers
3301 (package
3302 (name "libdbi-drivers")
3303 (version "0.9.0")
3304 (source (origin
3305 (method url-fetch)
3306 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3307 "libdbi-drivers/libdbi-drivers-" version
3308 "/libdbi-drivers-" version ".tar.gz"))
3309 (sha256
3310 (base32
3311 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3312 (build-system gnu-build-system)
3313 (native-inputs
3314 `(;; For tests.
3315 ("inetutils" ,inetutils)
3316 ("glibc-locales" ,glibc-locales)
3317 ("mariadb" ,mariadb)))
3318 (inputs
3319 `(("libdbi" ,libdbi)
3320 ("mariadb:dev" ,mariadb "dev")
3321 ("mariadb:lib" ,mariadb "lib")
3322 ("postgresql" ,postgresql)
3323 ("sqlite" ,sqlite)))
3324 (arguments
3325 `(#:configure-flags
3326 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3327 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3328 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3329 (postgresql (assoc-ref %build-inputs "postgresql"))
3330 (sqlite (assoc-ref %build-inputs "sqlite")))
3331 (list "--disable-docs"
3332 (string-append "--with-dbi-incdir=" libdbi "/include")
3333 (string-append "--with-dbi-libdir=" libdbi "/lib")
3334 "--with-mysql"
3335 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3336 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3337 "--with-pgsql"
3338 (string-append "--with-pgsql-incdir=" postgresql "/include")
3339 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3340 "--with-sqlite3"
3341 (string-append "--with-sqlite-incdir=" sqlite "/include")
3342 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3343 #:phases
3344 (modify-phases %standard-phases
3345 (add-after 'unpack 'fix-tests
3346 (lambda* (#:key inputs #:allow-other-keys)
3347 (substitute* "tests/test_mysql.sh"
3348 (("^MYMYSQLD=.*")
3349 (string-append "MYMYSQLD="
3350 (assoc-ref inputs "mariadb")
3351 "/bin/mysqld")))
3352 #t))
3353 (add-after 'install 'remove-empty-directories
3354 (lambda* (#:key outputs #:allow-other-keys)
3355 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3356 (delete-file-recursively var))
3357 #t)))))
3358 (synopsis "Database drivers for the libdbi framework")
3359 (description
3360 "The @code{libdbi-drivers} library provides the database specific drivers
3361 for the @code{libdbi} framework.
3362
3363 The drivers officially supported by @code{libdbi} are:
3364 @itemize
3365 @item MySQL,
3366 @item PostgreSQL,
3367 @item SQLite.
3368 @end itemize")
3369 (home-page "http://libdbi-drivers.sourceforge.net/")
3370 (license license:lgpl2.1+)))
3371
3372 (define-public soci
3373 (package
3374 (name "soci")
3375 (version "4.0.0")
3376 (source (origin
3377 (method git-fetch)
3378 (uri (git-reference
3379 (url "https://github.com/SOCI/soci/")
3380 (commit version)))
3381 (file-name (git-file-name name version))
3382 (sha256
3383 (base32
3384 "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb"))))
3385 (build-system cmake-build-system)
3386 (inputs
3387 `(("postgresql" ,postgresql)
3388 ("sqlite" ,sqlite)
3389 ("odbc" ,unixodbc)
3390 ("boost" ,boost)
3391 ("mysql" ,mysql)))
3392 (arguments
3393 `(#:tests? #f ; Tests may require running database management systems.
3394 #:phases
3395 (modify-phases %standard-phases
3396 (add-after 'unpack 'fix-lib-path
3397 (lambda _
3398 (substitute* "CMakeLists.txt"
3399 (("set\\(SOCI_LIBDIR \"lib64\"\\)") "")))))))
3400 (synopsis "C++ Database Access Library")
3401 (description
3402 "SOCI is an abstraction layer for several database backends, including
3403 PostreSQL, SQLite, ODBC and MySQL.")
3404 (home-page "http://soci.sourceforge.net/")
3405 (license license:boost1.0)))