gnu: python-sqlalchemy: Update to 1.3.15.
[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.44")
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 "0fah6d50hldq0farxwr8mj3jnniwdz0d1wsha07nx37fc79h7wi1"))
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"
794 "main.stat_tables_innodb"
795 "roles.acl_statistics"
796
797 ;; This file contains a time bomb which makes it fail after
798 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
799 "main.mysqldump"
800
801 ;; FIXME: This test fails on i686:
802 ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
803 ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
804 ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
805 ;; (all three tables must exist and be identical)
806 ;; in a loop it produces the same error around 1/240 times.
807 ;; montywi on #maria suggested removing the real_end check in
808 ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
809 ;; reach the ending quote occasionally. Disable it for now.
810 "main.myisampack"
811 ;; FIXME: This test fails on armhf-linux:
812 "mroonga/storage.index_read_multiple_double"))
813
814 ;; This file contains a list of known-flaky tests for this
815 ;; release. Append our own items.
816 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
817 (for-each (lambda (test)
818 (format unstable-tests "~a : ~a\n"
819 test "Disabled in Guix"))
820 disabled-tests)
821 (close-port unstable-tests)
822
823 ;; XXX: This test fails because it expects a latin1 charset and
824 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
825 (substitute* "mysql-test/r/gis_notembedded.result"
826 (("latin1_swedish_ci") "utf8_general_ci")
827 (("\tlatin1") "\tutf8"))
828
829 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
830 (("/bin/bash")
831 (which "bash")))
832
833 (substitute* "mysql-test/mysql-test-run.pl"
834 (("/bin/ls") (which "ls"))
835 (("/bin/sh") (which "sh")))
836 #t)))
837 (add-before 'configure 'disable-plugins
838 (lambda _
839 (let ((disable-plugin (lambda (name)
840 (call-with-output-file
841 (string-append "plugin/" name
842 "/CMakeLists.txt")
843 (lambda (port)
844 (format port "\n")))))
845 (disabled-plugins '(;; XXX: Causes a test failure.
846 "disks")))
847 (for-each disable-plugin disabled-plugins)
848 #t)))
849 (replace 'check
850 (lambda* (#:key (tests? #t) #:allow-other-keys)
851 (if tests?
852 (with-directory-excursion "mysql-test"
853 (invoke "./mtr" "--verbose"
854 "--retry=3"
855 "--testcase-timeout=40"
856 "--suite-timeout=600"
857 "--parallel" (number->string (parallel-job-count))
858 "--skip-test-list=unstable-tests"))
859 (format #t "test suite not run~%"))
860 #t))
861 (add-after
862 'install 'post-install
863 (lambda* (#:key inputs outputs #:allow-other-keys)
864 (let* ((out (assoc-ref outputs "out"))
865 (dev (assoc-ref outputs "dev"))
866 (lib (assoc-ref outputs "lib"))
867 (openssl (assoc-ref inputs "openssl")))
868 (substitute* (string-append out "/bin/mysql_install_db")
869 (("basedir=\"\"")
870 (string-append "basedir=\"" out "\"")))
871 ;; Remove unneeded files for testing.
872 (with-directory-excursion lib
873 (for-each delete-file-recursively
874 '("data" "mysql-test" "sql-bench"))
875 ;; And static libraries.
876 (for-each delete-file (find-files "lib" "\\.a$")))
877 (with-directory-excursion out
878 (delete-file "share/man/man1/mysql-test-run.pl.1")
879 ;; Delete huge and unnecessary executables.
880 (for-each delete-file (find-files "bin" "(test|embedded)")))
881 (mkdir-p (string-append dev "/share"))
882 (mkdir-p (string-append dev "/bin"))
883 (rename-file (string-append lib "/bin/mysqld")
884 (string-append out "/bin/mysqld"))
885 (rename-file (string-append lib "/share/pkgconfig")
886 (string-append dev "/share/pkgconfig"))
887 (rename-file (string-append out "/bin/mysql_config")
888 (string-append dev "/bin/mysql_config"))
889
890
891 (substitute* (string-append out "/bin/mysql_install_db")
892 (("\\$basedir/share/mysql")
893 (string-append lib "/share/mysql")))
894
895 ;; Embed an absolute reference to OpenSSL in mysql_config
896 ;; and the pkg-config file to avoid propagation.
897 (substitute* (list (string-append dev "/bin/mysql_config")
898 (string-append dev "/share/pkgconfig/mariadb.pc"))
899 (("-lssl -lcrypto" all)
900 (string-append "-L" openssl "/lib " all)))
901
902 #t))))))
903 (native-inputs
904 `(("bison" ,bison)
905 ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
906 ,@(if (string-prefix? "armhf" (%current-system))
907 `(("gcc", gcc-5))
908 '())
909 ("perl" ,perl)))
910 (inputs
911 `(("jemalloc" ,jemalloc)
912 ("libaio" ,libaio)
913 ("libxml2" ,libxml2)
914 ("ncurses" ,ncurses)
915 ("openssl" ,openssl-1.0)
916 ("pam" ,linux-pam)
917 ("pcre" ,pcre)
918 ("xz" ,xz)
919 ("zlib" ,zlib)))
920 ;; The test suite is very resource intensive and can take more than three
921 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
922 (properties '((timeout . 64800))) ;18 hours
923 (home-page "https://mariadb.org/")
924 (synopsis "SQL database server")
925 (description
926 "MariaDB is a multi-user and multi-threaded SQL database server, designed
927 as a drop-in replacement of MySQL.")
928 (license license:gpl2)))
929
930 (define-public mariadb-connector-c
931 (package
932 (name "mariadb-connector-c")
933 (version "3.1.6")
934 (source (origin
935 (method url-fetch)
936 (uri (string-append
937 "https://downloads.mariadb.org/f/connector-c-"
938 version "/mariadb-connector-c-"
939 version "-src.tar.gz"))
940 (sha256
941 (base32
942 "083724f5daaqyzdcx508caz6fk2hs89jff85zg28ih43vxkvnrnj"))))
943 (inputs
944 `(("openssl" ,openssl)))
945 (build-system cmake-build-system)
946 (arguments
947 ;; No tests.
948 '(#:tests? #f))
949 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
950 (synopsis "Client library to connect to MySQL or MariaDB")
951 (description "The MariaDB Connector/C is used to connect applications
952 developed in C/C++ to MariaDB and MySQL databases.")
953 (license license:lgpl2.1+)))
954
955 ;; Don't forget to update the other postgresql packages when upgrading this one.
956 (define-public postgresql
957 (package
958 (name "postgresql")
959 (version "10.12")
960 (source (origin
961 (method url-fetch)
962 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
963 version "/postgresql-" version ".tar.bz2"))
964 (sha256
965 (base32
966 "1rsab4zf4rx7pvvhlwhb04kb95aiad9cwazc4ksbvg2gij47z3rq"))
967 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
968 (build-system gnu-build-system)
969 (arguments
970 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
971 #:phases
972 (modify-phases %standard-phases
973 (add-before 'configure 'patch-/bin/sh
974 (lambda _
975 ;; Refer to the actual shell.
976 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
977 "src/bin/psql/command.c")
978 (("/bin/sh") (which "sh")))
979 #t))
980 (add-after 'build 'build-contrib
981 (lambda _
982 (invoke "make" "-C" "contrib")))
983 (add-after 'install 'install-contrib
984 (lambda _
985 (invoke "make" "-C" "contrib" "install"))))))
986 (inputs
987 `(("readline" ,readline)
988 ("libuuid" ,util-linux)
989 ("openssl" ,openssl)
990 ("zlib" ,zlib)))
991 (home-page "https://www.postgresql.org/")
992 (synopsis "Powerful object-relational database system")
993 (description
994 "PostgreSQL is a powerful object-relational database system. It is fully
995 ACID compliant, has full support for foreign keys, joins, views, triggers, and
996 stored procedures (in multiple languages). It includes most SQL:2008 data
997 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
998 TIMESTAMP. It also supports storage of binary large objects, including
999 pictures, sounds, or video.")
1000 (license (license:x11-style "file://COPYRIGHT"))))
1001
1002 (define-public postgresql-11
1003 (package
1004 (inherit postgresql)
1005 (name "postgresql")
1006 (version "11.6")
1007 (source (origin
1008 (method url-fetch)
1009 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1010 version "/postgresql-" version ".tar.bz2"))
1011 (sha256
1012 (base32
1013 "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
1014
1015 (define-public postgresql-9.6
1016 (package
1017 (inherit postgresql)
1018 (name "postgresql")
1019 (version "9.6.16")
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1023 version "/postgresql-" version ".tar.bz2"))
1024 (sha256
1025 (base32
1026 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
1027
1028 (define-public python-pymysql
1029 (package
1030 (name "python-pymysql")
1031 (version "0.9.3")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (pypi-uri "PyMySQL" version))
1036 (sha256
1037 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1038 (build-system python-build-system)
1039 (native-inputs
1040 `(("python-unittest2" ,python-unittest2)))
1041 (inputs
1042 `(("python-cryptography" ,python-cryptography)))
1043 (arguments
1044 `(#:tests? #f)) ; tests expect a running MySQL
1045 (home-page "https://github.com/PyMySQL/PyMySQL/")
1046 (synopsis "Pure-Python MySQL driver")
1047 (description
1048 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1049 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1050 (license license:expat)))
1051
1052 (define-public python2-pymysql
1053 (package-with-python2 python-pymysql))
1054
1055 (define-public qdbm
1056 (package
1057 (name "qdbm")
1058 (version "1.8.78")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (string-append "http://fallabs.com/" name "/"
1063 name "-" version ".tar.gz"))
1064 (sha256
1065 (base32
1066 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1067 (build-system gnu-build-system)
1068 (arguments
1069 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1070 (assoc-ref %outputs "out")
1071 "/lib"))
1072 #:make-flags (list "CFLAGS=-fPIC")))
1073 (home-page "http://fallabs.com/qdbm")
1074 (synopsis "Key-value database")
1075 (description "QDBM is a library of routines for managing a
1076 database. The database is a simple data file containing key-value
1077 pairs. Every key and value is serial bytes with variable length.
1078 Binary data as well as character strings can be used as a key or a
1079 value. There is no concept of data tables or data types. Records are
1080 organized in a hash table or B+ tree.")
1081 (license license:lgpl2.1+)))
1082
1083 (define-public recutils
1084 (package
1085 (name "recutils")
1086 (version "1.8")
1087 (source (origin
1088 (method url-fetch)
1089 (uri (string-append "mirror://gnu/recutils/recutils-"
1090 version ".tar.gz"))
1091 (sha256
1092 (base32
1093 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1094 (build-system gnu-build-system)
1095
1096 (arguments '(#:configure-flags
1097 (list (string-append "--with-bash-headers="
1098 (assoc-ref %build-inputs "bash:include")
1099 "/include/bash"))))
1100
1101 (native-inputs `(("bc" ,bc)
1102 ("bash:include" ,bash "include")
1103 ("check" ,check)
1104 ("libuuid" ,util-linux)
1105 ("pkg-config" ,pkg-config)))
1106
1107 ;; TODO: Add more optional inputs.
1108 (inputs `(("curl" ,curl)
1109 ("libgcrypt" ,libgcrypt)))
1110 (synopsis "Manipulate plain text files as databases")
1111 (description
1112 "GNU Recutils is a set of tools and libraries for creating and
1113 manipulating text-based, human-editable databases. Despite being text-based,
1114 databases created with Recutils carry all of the expected features such as
1115 unique fields, primary keys, time stamps and more. Many different field
1116 types are supported, as is encryption.")
1117 (license license:gpl3+)
1118 (home-page "https://www.gnu.org/software/recutils/")))
1119
1120 (define-public emacs-recutils
1121 (package
1122 (inherit recutils)
1123 (name "emacs-recutils")
1124 (build-system emacs-build-system)
1125 (arguments
1126 '(#:phases
1127 (modify-phases %standard-phases
1128 (add-after 'unpack 'change-directory
1129 (lambda _
1130 (chdir "etc")
1131 #t)))))
1132 (native-inputs '())
1133 (inputs '())
1134 (synopsis "Emacs mode for working with recutils database files")
1135 (description "This package provides an Emacs major mode @code{rec-mode}
1136 for working with GNU Recutils text-based, human-editable databases. It
1137 supports editing, navigation, and querying of recutils database files
1138 including field and record folding.")))
1139
1140 (define-public rocksdb
1141 (package
1142 (name "rocksdb")
1143 (version "6.6.4")
1144 (source (origin
1145 (method git-fetch)
1146 (uri (git-reference
1147 (url "https://github.com/facebook/rocksdb")
1148 (commit (string-append "v" version))))
1149 (file-name (git-file-name name version))
1150 (sha256
1151 (base32
1152 "1h7y31b05w4vv4v509l368j9qlbv5assmdq9hp2788zipqbpywc0"))
1153 (modules '((guix build utils)))
1154 (snippet
1155 '(begin
1156 ;; TODO: unbundle gtest.
1157 (delete-file "build_tools/gnu_parallel")
1158 (substitute* "Makefile"
1159 (("build_tools/gnu_parallel") "parallel"))
1160 #t))))
1161 (build-system gnu-build-system)
1162 (arguments
1163 `(#:make-flags (list "CC=gcc" "V=1"
1164 ;; Ceph requires that RTTI is enabled.
1165 "USE_RTTI=1"
1166 (string-append "INSTALL_PATH="
1167 (assoc-ref %outputs "out"))
1168
1169 ;; Running the full test suite takes hours and require
1170 ;; a lot of disk space. Instead we only run a subset
1171 ;; (see .travis.yml and Makefile).
1172 "ROCKSDBTESTS_END=db_tailing_iter_test")
1173 #:test-target "check_some"
1174 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1175 ;; this upstream, but it's not going to be supported any time soon.
1176 #:tests? (let ((system ,(or (%current-target-system)
1177 (%current-system))))
1178 (or (string-prefix? "x86_64-linux" system)
1179 (string-prefix? "aarch64-linux" system)))
1180 #:phases
1181 (modify-phases %standard-phases
1182 (add-after 'unpack 'patch-Makefile
1183 (lambda _
1184 (substitute* "Makefile"
1185 ;; Don't depend on the static library when installing.
1186 (("install: install-static")
1187 "install: install-shared")
1188 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1189 #t))
1190 (delete 'configure)
1191 ;; The default target is only needed for tests and built on demand.
1192 (delete 'build)
1193 (add-before 'check 'disable-optimizations
1194 (lambda _
1195 ;; Prevent the build from passing '-march=native' to the compiler.
1196 (setenv "PORTABLE" "1")
1197 #t))
1198 (add-before 'check 'disable-failing-tests
1199 (lambda _
1200 (substitute* "Makefile"
1201 ;; These tests reliably fail due to "Too many open files".
1202 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1203 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1204 #t))
1205 (add-after 'check 'build
1206 ;; The default build target is a debug build for tests. The
1207 ;; install target depends on the "shared_lib" release target
1208 ;; so we build it here for clarity.
1209 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1210 (apply invoke "make" "shared_lib"
1211 `(,@(if parallel-build?
1212 `("-j" ,(number->string (parallel-job-count)))
1213 '())
1214 ,@make-flags)))))))
1215 (native-inputs
1216 `(("parallel" ,parallel)
1217 ("perl" ,perl)
1218 ("procps" ,procps)
1219 ("python" ,python-2)
1220 ("which" ,which)))
1221 (inputs
1222 `(("bzip2" ,bzip2)
1223 ("gflags" ,gflags)
1224 ("jemalloc" ,jemalloc)
1225 ("lz4" ,lz4)
1226 ("snappy" ,snappy)
1227 ("zlib" ,zlib)))
1228 (home-page "https://rocksdb.org/")
1229 (synopsis "Persistent key-value store for fast storage")
1230 (description
1231 "RocksDB is a library that forms the core building block for a fast
1232 key-value server, especially suited for storing data on flash drives. It
1233 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1234 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1235 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1236 compactions, making it specially suitable for storing multiple terabytes of
1237 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1238 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1239 ;; files carry the 3-clause BSD license.
1240 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1241
1242 (define-public sparql-query
1243 (package
1244 (name "sparql-query")
1245 (version "1.1")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (string-append "https://github.com/tialaramex/"
1249 name "/archive/" version ".tar.gz"))
1250 (sha256
1251 (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
1252 (file-name (string-append name "-" version ".tar.gz"))))
1253 (build-system gnu-build-system)
1254 (inputs
1255 `(("readline" ,readline)
1256 ("ncurses" ,ncurses)
1257 ("glib" ,glib)
1258 ("libxml2" ,libxml2)
1259 ("curl" ,curl)))
1260 (native-inputs
1261 `(("pkg-config" ,pkg-config)))
1262 (arguments
1263 `(#:make-flags '("CC=gcc")
1264 #:phases
1265 (modify-phases %standard-phases
1266 (delete 'configure)
1267 ;; The Makefile uses git to obtain versioning information. This phase
1268 ;; substitutes the git invocation with the package version.
1269 (add-after 'unpack 'remove-git-dependency
1270 (lambda _
1271 (substitute* "Makefile"
1272 (("^gitrev :=.*$")
1273 (string-append "gitrev = \"v" ,version "\"")))
1274 #t))
1275 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1276 ;; This replacement does the same thing, except for using $PREFIX/bin
1277 ;; instead.
1278 (replace 'install
1279 (lambda* (#:key outputs #:allow-other-keys)
1280 (let* ((out (assoc-ref outputs "out"))
1281 (bin (string-append out "/bin")))
1282 (install-file "sparql-query" bin)
1283 (symlink (string-append bin "/sparql-query")
1284 (string-append bin "/sparql-update")))
1285 #t))
1286 (replace 'check
1287 (lambda* (#:key make-flags #:allow-other-keys)
1288 (apply invoke "make" `(,@make-flags "scan-test"))
1289 (invoke "./scan-test"))))))
1290 (home-page "https://github.com/tialaramex/sparql-query/")
1291 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1292 (description "Sparql-query is a command-line tool for accessing SPARQL
1293 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1294 tools for interrogating SQL databases. For example, you can enter a query over
1295 several lines, using a semi-colon at the end of a line to indicate the end of
1296 your query. It also supports readline so that you can more easily recall and
1297 edit previous queries, even across sessions. It can be used non-interactively,
1298 for example from a shell script.")
1299 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1300 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1301 (license (list license:gpl3+))))
1302
1303 (define-public sqitch
1304 (package
1305 (name "sqitch")
1306 (version "1.0.0")
1307 (source
1308 (origin
1309 (method url-fetch)
1310 (uri (string-append
1311 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32 "0p4wraqiscvwmmsvfqfy65blgsilwpvd9zj4d2zvm2xdx70ncr7l"))))
1315 (build-system perl-build-system)
1316 (arguments
1317 '(#:phases
1318 (modify-phases %standard-phases
1319 (add-before 'check 'set-check-environment
1320 (lambda _
1321 (setenv "TZ" "UTC")
1322 (setenv "HOME" "/tmp")
1323 #t))
1324 (add-after 'install 'wrap-program
1325 (lambda* (#:key outputs #:allow-other-keys)
1326 (let* ((out (assoc-ref outputs "out"))
1327 (path (getenv "PERL5LIB")))
1328 (wrap-program (string-append out "/bin/sqitch")
1329 `("PERL5LIB" ":" prefix
1330 (,(string-append out "/lib/perl5/site_perl"
1331 ":"
1332 path)))))
1333 #t)))))
1334 (native-inputs
1335 `(("perl-capture-tiny" ,perl-capture-tiny)
1336 ("perl-io-pager" ,perl-io-pager)
1337 ("perl-module-build" ,perl-module-build)
1338 ("perl-module-runtime" ,perl-module-runtime)
1339 ("perl-path-class" ,perl-path-class)
1340 ("perl-test-deep" ,perl-test-deep)
1341 ("perl-test-dir" ,perl-test-dir)
1342 ("perl-test-exception" ,perl-test-exception)
1343 ("perl-test-file" ,perl-test-file)
1344 ("perl-test-file-contents" ,perl-test-file-contents)
1345 ("perl-test-mockmodule" ,perl-test-mockmodule)
1346 ("perl-test-nowarnings" ,perl-test-nowarnings)
1347 ("perl-test-warn" ,perl-test-warn)))
1348 (inputs
1349 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1350 ("perl-clone" ,perl-clone)
1351 ("perl-config-gitlike" ,perl-config-gitlike)
1352 ("perl-datetime" ,perl-datetime)
1353 ("perl-datetime-timezone" ,perl-datetime-timezone)
1354 ("perl-dbd-pg" ,perl-dbd-pg)
1355 ("perl-dbi" ,perl-dbi)
1356 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1357 ("perl-encode-locale" ,perl-encode-locale)
1358 ("perl-hash-merge" ,perl-hash-merge)
1359 ("perl-ipc-run3" ,perl-ipc-run3)
1360 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1361 ("perl-libintl-perl" ,perl-libintl-perl)
1362 ("perl-list-moreutils" ,perl-list-moreutils)
1363 ("perl-moo" ,perl-moo)
1364 ("perl-mysql-config" ,perl-mysql-config)
1365 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1366 ("perl-path-class" ,perl-path-class)
1367 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1368 ("perl-string-formatter" ,perl-string-formatter)
1369 ("perl-string-shellquote" ,perl-string-shellquote)
1370 ("perl-sub-exporter" ,perl-sub-exporter)
1371 ("perl-template-tiny" ,perl-template-tiny)
1372 ("perl-template-toolkit" ,perl-template-toolkit)
1373 ("perl-throwable" ,perl-throwable)
1374 ("perl-try-tiny" ,perl-try-tiny)
1375 ("perl-type-tiny" ,perl-type-tiny)
1376 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1377 ("perl-uri" ,perl-uri)
1378 ("perl-uri-db" ,perl-uri-db)))
1379 (home-page "https://sqitch.org/")
1380 (synopsis "Database change management tool")
1381 (description
1382 "Sqitch is a standalone change management system for database schemas,
1383 which uses SQL to describe changes.")
1384 (license license:x11)))
1385
1386 (define-public sqlcrush
1387 ;; Unfortunately, there is no proper upstream release and may never be.
1388 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1389 (revision "1"))
1390 (package
1391 (name "sqlcrush")
1392 (version (git-version "0.1.5" revision commit))
1393 (source (origin
1394 (method git-fetch)
1395 (uri (git-reference
1396 (url "https://github.com/coffeeandscripts/sqlcrush.git")
1397 (commit commit)))
1398 (file-name (git-file-name name version))
1399 (sha256
1400 (base32
1401 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1402 (build-system python-build-system)
1403 (inputs
1404 `(("python-cryptography" ,python-cryptography)
1405 ("python-psycopg2" ,python-psycopg2)
1406 ("python-pymysql" ,python-pymysql)
1407 ("python-sqlalchemy" ,python-sqlalchemy)))
1408 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1409 (synopsis "Text console-based database viewer and editor")
1410 (description
1411 "SQLcrush lets you view and edit a database directly from the text
1412 console through an ncurses interface. You can explore each table's structure,
1413 browse and edit the contents, add and delete entries, all while tracking your
1414 changes.")
1415 (license license:gpl3+)))) ; no headers, see README.md
1416
1417 (define-public tdb
1418 (package
1419 (name "tdb")
1420 (version "1.4.3")
1421 (source (origin
1422 (method url-fetch)
1423 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1424 version ".tar.gz"))
1425 (sha256
1426 (base32
1427 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1428 (build-system gnu-build-system)
1429 (arguments
1430 '(#:phases
1431 (modify-phases %standard-phases
1432 (replace 'configure
1433 (lambda* (#:key outputs #:allow-other-keys)
1434 (let ((out (assoc-ref outputs "out")))
1435 ;; The 'configure' script is a wrapper for Waf and
1436 ;; doesn't recognize things like '--enable-fast-install'.
1437 (invoke "./configure"
1438 (string-append "--prefix=" out))))))))
1439 (native-inputs
1440 `(;; TODO: Build the documentation.
1441 ;; ("docbook-xsl" ,docbook-xsl)
1442 ;; ("libxml2" ,libxml2)
1443 ;; ("libxslt" ,libxslt)
1444 ("python" ,python) ;for the Waf build system
1445 ("which" ,which)))
1446 (home-page "https://tdb.samba.org/")
1447 (synopsis "Trivial database")
1448 (description
1449 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1450 and BSD's DB except that it allows multiple simultaneous writers and uses
1451 locking internally to keep writers from trampling on each other. TDB is also
1452 extremely small.")
1453 (license license:lgpl3+)))
1454
1455 (define-public perl-dbi
1456 (package
1457 (name "perl-dbi")
1458 (version "1.642")
1459 (source (origin
1460 (method url-fetch)
1461 (uri (string-append
1462 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1463 version ".tar.gz"))
1464 (sha256
1465 (base32
1466 "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z"))))
1467 (build-system perl-build-system)
1468 (synopsis "Database independent interface for Perl")
1469 (description "This package provides an database interface for Perl.")
1470 (home-page "https://metacpan.org/release/DBI")
1471 (license license:perl-license)))
1472
1473 (define-public perl-dbix-class
1474 (package
1475 (name "perl-dbix-class")
1476 (version "0.082841")
1477 (source
1478 (origin
1479 (method url-fetch)
1480 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1481 "DBIx-Class-" version ".tar.gz"))
1482 (sha256
1483 (base32
1484 "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp"))))
1485 (build-system perl-build-system)
1486 (native-inputs
1487 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1488 ("perl-file-temp" ,perl-file-temp)
1489 ("perl-module-install" ,perl-module-install)
1490 ("perl-package-stash" ,perl-package-stash)
1491 ("perl-test-deep" ,perl-test-deep)
1492 ("perl-test-exception" ,perl-test-exception)
1493 ("perl-test-warn" ,perl-test-warn)))
1494 (propagated-inputs
1495 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1496 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1497 ("perl-class-inspector" ,perl-class-inspector)
1498 ("perl-config-any" ,perl-config-any)
1499 ("perl-context-preserve" ,perl-context-preserve)
1500 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1501 ("perl-data-page" ,perl-data-page)
1502 ("perl-dbi" ,perl-dbi)
1503 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1504 ("perl-hash-merge" ,perl-hash-merge)
1505 ("perl-module-find" ,perl-module-find)
1506 ("perl-moo" ,perl-moo)
1507 ("perl-mro-compat" ,perl-mro-compat)
1508 ("perl-namespace-clean" ,perl-namespace-clean)
1509 ("perl-path-class" ,perl-path-class)
1510 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1511 ("perl-scope-guard" ,perl-scope-guard)
1512 ("perl-sql-abstract" ,perl-sql-abstract)
1513 ("perl-sub-name" ,perl-sub-name)
1514 ("perl-text-balanced" ,perl-text-balanced)
1515 ("perl-try-tiny" ,perl-try-tiny)))
1516 (home-page "https://metacpan.org/release/DBIx-Class")
1517 (synopsis "Extensible and flexible object <-> relational mapper")
1518 (description "An SQL to OO mapper with an object API inspired by
1519 Class::DBI (with a compatibility layer as a springboard for porting) and a
1520 resultset API that allows abstract encapsulation of database operations. It
1521 aims to make representing queries in your code as perl-ish as possible while
1522 still providing access to as many of the capabilities of the database as
1523 possible, including retrieving related records from multiple tables in a
1524 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1525 \"ORDER BY\" and \"HAVING\" support.")
1526 (license license:perl-license)))
1527
1528 (define-public perl-dbix-class-cursor-cached
1529 (package
1530 (name "perl-dbix-class-cursor-cached")
1531 (version "1.001004")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1536 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1537 (sha256
1538 (base32
1539 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1540 (build-system perl-build-system)
1541 (native-inputs
1542 `(("perl-cache-cache" ,perl-cache-cache)
1543 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1544 ("perl-module-install" ,perl-module-install)))
1545 (propagated-inputs
1546 `(("perl-carp-clan" ,perl-carp-clan)
1547 ("perl-dbix-class" ,perl-dbix-class)))
1548 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1549 (synopsis "Cursor with built-in caching support")
1550 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1551 built-in caching support.")
1552 (license license:perl-license)))
1553
1554 (define-public perl-dbix-class-introspectablem2m
1555 (package
1556 (name "perl-dbix-class-introspectablem2m")
1557 (version "0.001002")
1558 (source
1559 (origin
1560 (method url-fetch)
1561 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1562 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1563 (sha256
1564 (base32
1565 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1566 (build-system perl-build-system)
1567 (native-inputs
1568 `(("perl-module-install" ,perl-module-install)))
1569 (propagated-inputs
1570 `(("perl-dbix-class" ,perl-dbix-class)))
1571 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1572 (synopsis "Introspect many-to-many relationships")
1573 (description "Because the many-to-many relationships are not real
1574 relationships, they can not be introspected with DBIx::Class. Many-to-many
1575 relationships are actually just a collection of convenience methods installed
1576 to bridge two relationships. This DBIx::Class component can be used to store
1577 all relevant information about these non-relationships so they can later be
1578 introspected and examined.")
1579 (license license:perl-license)))
1580
1581 (define-public perl-dbix-class-schema-loader
1582 (package
1583 (name "perl-dbix-class-schema-loader")
1584 (version "0.07049")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1589 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1590 (sha256
1591 (base32
1592 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1593 (build-system perl-build-system)
1594 (native-inputs
1595 `(("perl-config-any" ,perl-config-any)
1596 ("perl-config-general" ,perl-config-general)
1597 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1598 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1599 ("perl-module-install" ,perl-module-install)
1600 ("perl-moose" ,perl-moose)
1601 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1602 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1603 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1604 ("perl-test-deep" ,perl-test-deep)
1605 ("perl-test-differences" ,perl-test-differences)
1606 ("perl-test-exception" ,perl-test-exception)
1607 ("perl-test-pod" ,perl-test-pod)
1608 ("perl-test-warn" ,perl-test-warn)))
1609 (propagated-inputs
1610 `(("perl-class-unload" ,perl-class-unload)
1611 ("perl-class-inspector" ,perl-class-inspector)
1612 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1613 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1614 ("perl-carp-clan" ,perl-carp-clan)
1615 ("perl-data-dump" ,perl-data-dump)
1616 ("perl-dbix-class" ,perl-dbix-class)
1617 ("perl-hash-merge" ,perl-hash-merge)
1618 ("perl-list-moreutils" ,perl-list-moreutils)
1619 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1620 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1621 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1622 ("perl-namespace-clean" ,perl-namespace-clean)
1623 ("perl-mro-compat" ,perl-mro-compat)
1624 ("perl-scope-guard" ,perl-scope-guard)
1625 ("perl-string-camelcase" ,perl-string-camelcase)
1626 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1627 ("perl-sub-name" ,perl-sub-name)
1628 ("perl-try-tiny" ,perl-try-tiny)))
1629 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1630 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1631 (synopsis "Create a DBIx::Class::Schema based on a database")
1632 (description "DBIx::Class::Schema::Loader automates the definition of a
1633 DBIx::Class::Schema by scanning database table definitions and setting up the
1634 columns, primary keys, unique constraints and relationships.")
1635 (license license:perl-license)))
1636
1637 (define-public perl-dbd-pg
1638 (package
1639 (name "perl-dbd-pg")
1640 (version "3.7.4")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1645 "DBD-Pg-" version ".tar.gz"))
1646 (sha256
1647 (base32
1648 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1649 (build-system perl-build-system)
1650 (native-inputs
1651 `(("perl-dbi" ,perl-dbi)))
1652 (propagated-inputs
1653 `(("perl-dbi" ,perl-dbi)
1654 ("postgresql" ,postgresql)))
1655 (home-page "https://metacpan.org/release/DBD-Pg")
1656 (synopsis "DBI PostgreSQL interface")
1657 (description "This package provides a PostgreSQL driver for the Perl5
1658 @dfn{Database Interface} (DBI).")
1659 (license license:perl-license)))
1660
1661 (define-public perl-dbd-mysql
1662 (package
1663 (name "perl-dbd-mysql")
1664 (version "4.050")
1665 (source
1666 (origin
1667 (method url-fetch)
1668 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1669 "DBD-mysql-" version ".tar.gz"))
1670 (sha256
1671 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1672 (build-system perl-build-system)
1673 (arguments
1674 `(#:phases
1675 (modify-phases %standard-phases
1676 (add-before 'configure 'skip-library-detection
1677 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1678 ;; are really only needed for the test suite; their absence does not
1679 ;; affect the build or the end result.
1680 (lambda _
1681 (substitute* "Makefile.PL"
1682 (("use Devel::CheckLib;" match)
1683 (string-append "# " match))
1684 (("assert_lib")
1685 "print"))
1686 #t)))
1687 ;; Tests require running MySQL server.
1688 #:tests? #f))
1689 (propagated-inputs
1690 `(("perl-dbi" ,perl-dbi)
1691 ("mysql" ,mariadb "lib")
1692 ("mysql-dev" ,mariadb "dev")))
1693 (home-page "https://metacpan.org/release/DBD-mysql")
1694 (synopsis "DBI MySQL interface")
1695 (description "This package provides a MySQL driver for the Perl5
1696 @dfn{Database Interface} (DBI).")
1697 (license license:perl-license)))
1698
1699 (define-public perl-dbd-sqlite
1700 (package
1701 (name "perl-dbd-sqlite")
1702 (version "1.62")
1703 (source (origin
1704 (method url-fetch)
1705 (uri (string-append
1706 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1707 version ".tar.gz"))
1708 (sha256
1709 (base32
1710 "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx"))))
1711 (build-system perl-build-system)
1712 (inputs `(("sqlite" ,sqlite)))
1713 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1714 (synopsis "SQlite interface for Perl")
1715 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1716 the entire thing in the distribution. So in order to get a fast transaction
1717 capable RDBMS working for your Perl project you simply have to install this
1718 module, and nothing else.")
1719 (license license:perl-license)
1720 (home-page "https://metacpan.org/release/DBD-SQLite")))
1721
1722 (define-public perl-mysql-config
1723 (package
1724 (name "perl-mysql-config")
1725 (version "1.04")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (string-append
1730 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1731 version
1732 ".tar.gz"))
1733 (sha256
1734 (base32
1735 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1736 (build-system perl-build-system)
1737 (home-page "https://metacpan.org/release/MySQL-Config")
1738 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1739 (description
1740 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1741 libmysqlclient. It will fill an aray with long options, ready to be parsed by
1742 @code{Getopt::Long}.")
1743 (license license:perl-license)))
1744
1745 (define-public perl-sql-abstract
1746 (package
1747 (name "perl-sql-abstract")
1748 (version "1.86")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1753 "SQL-Abstract-" version ".tar.gz"))
1754 (sha256
1755 (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7"))))
1756 (build-system perl-build-system)
1757 (native-inputs
1758 `(("perl-module-install" ,perl-module-install)
1759 ("perl-test-deep" ,perl-test-deep)
1760 ("perl-test-exception" ,perl-test-exception)
1761 ("perl-test-warn" ,perl-test-warn)))
1762 (propagated-inputs
1763 `(("perl-hash-merge" ,perl-hash-merge)
1764 ("perl-moo" ,perl-moo)
1765 ("perl-mro-compat" ,perl-mro-compat)
1766 ("perl-text-balanced" ,perl-text-balanced)))
1767 (home-page "https://metacpan.org/release/SQL-Abstract")
1768 (synopsis "Generate SQL from Perl data structures")
1769 (description "This module was inspired by the excellent DBIx::Abstract.
1770 While based on the concepts used by DBIx::Abstract, the concepts used have
1771 been modified to make the SQL easier to generate from Perl data structures.
1772 The underlying idea is for this module to do what you mean, based on the data
1773 structures you provide it, so that you don't have to modify your code every
1774 time your data changes.")
1775 (license license:perl-license)))
1776
1777 (define-public perl-sql-splitstatement
1778 (package
1779 (name "perl-sql-splitstatement")
1780 (version "1.00020")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1785 "SQL-SplitStatement-" version ".tar.gz"))
1786 (sha256
1787 (base32
1788 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1789 (build-system perl-build-system)
1790 (native-inputs
1791 `(("perl-test-exception" ,perl-test-exception)))
1792 (propagated-inputs
1793 `(("perl-class-accessor" ,perl-class-accessor)
1794 ("perl-list-moreutils" ,perl-list-moreutils)
1795 ("perl-regexp-common" ,perl-regexp-common)
1796 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
1797 (home-page "https://metacpan.org/release/SQL-SplitStatement")
1798 (synopsis "Split SQL code into atomic statements")
1799 (description "This module tries to split any SQL code, even including
1800 non-standard extensions, into the atomic statements it is composed of.")
1801 (license license:perl-license)))
1802
1803 (define-public perl-sql-tokenizer
1804 (package
1805 (name "perl-sql-tokenizer")
1806 (version "0.24")
1807 (source
1808 (origin
1809 (method url-fetch)
1810 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
1811 "SQL-Tokenizer-" version ".tar.gz"))
1812 (sha256
1813 (base32
1814 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
1815 (build-system perl-build-system)
1816 (home-page "https://metacpan.org/release/SQL-Tokenizer")
1817 (synopsis "SQL tokenizer")
1818 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
1819 claim to be a parser or query verifier. It just creates sane tokens from a
1820 valid SQL query.")
1821 (license license:perl-license)))
1822
1823 (define-public unixodbc
1824 (package
1825 (name "unixodbc")
1826 (version "2.3.7")
1827 (source (origin
1828 (method url-fetch)
1829 (uri
1830 (string-append
1831 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
1832 version ".tar.gz"))
1833 (sha256
1834 (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
1835 (build-system gnu-build-system)
1836 (synopsis "Data source abstraction library")
1837 (description "Unixodbc is a library providing an API with which to access
1838 data sources. Data sources include SQL Servers and any software with an ODBC
1839 Driver.")
1840 (license license:lgpl2.1+)
1841 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
1842 (home-page "http://www.unixodbc.org")))
1843
1844 (define-public unqlite
1845 (package
1846 (name "unqlite")
1847 (version "1.1.6")
1848 (source (origin
1849 (method url-fetch)
1850 ;; Contains bug fixes against the official release, and has an
1851 ;; autotooled build system.
1852 (uri (string-append "https://github.com/aidin36/tocc/releases/"
1853 "download/v1.0.0/"
1854 "unqlite-unofficial-" version ".tar.gz"))
1855 (sha256
1856 (base32
1857 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
1858 (build-system gnu-build-system)
1859 (arguments `(#:tests? #f)) ;No check target
1860 (home-page "https://www.unqlite.org")
1861 (synopsis "In-memory key/value and document store")
1862 (description
1863 "UnQLite is an in-process software library which implements a
1864 self-contained, serverless, zero-configuration, transactional NoSQL
1865 database engine. UnQLite is a document store database similar to
1866 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
1867 similar to BerkeleyDB, LevelDB, etc.")
1868 (license license:bsd-2)))
1869
1870 (define-public redis
1871 (package
1872 (name "redis")
1873 (version "5.0.7")
1874 (source (origin
1875 (method url-fetch)
1876 (uri (string-append "http://download.redis.io/releases/redis-"
1877 version".tar.gz"))
1878 (sha256
1879 (base32
1880 "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
1881 (build-system gnu-build-system)
1882 (arguments
1883 '(#:tests? #f ; tests related to master/slave and replication fail
1884 #:phases (modify-phases %standard-phases
1885 (delete 'configure))
1886 #:make-flags `("CC=gcc"
1887 "MALLOC=libc"
1888 "LDFLAGS=-ldl"
1889 ,(string-append "PREFIX="
1890 (assoc-ref %outputs "out")))))
1891 (synopsis "Key-value cache and store")
1892 (description "Redis is an advanced key-value cache and store. Redis
1893 supports many data structures including strings, hashes, lists, sets, sorted
1894 sets, bitmaps and hyperloglogs.")
1895 (home-page "http://redis.io/")
1896 (license license:bsd-3)))
1897
1898 (define-public kyotocabinet
1899 (package
1900 (name "kyotocabinet")
1901 (version "1.2.77")
1902 (source (origin
1903 (method url-fetch)
1904 (uri (string-append "http://fallabs.com/kyotocabinet/pkg/"
1905 name "-" version ".tar.gz"))
1906 (sha256
1907 (base32
1908 "1rlx4307adbzd842b4npq6cwlw8h010ingxaz3qz1ijc70lr72an"))))
1909 (build-system gnu-build-system)
1910 (arguments
1911 `(#:configure-flags
1912 (list
1913 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
1914 (string-append "LDFLAGS=-Wl,-rpath="
1915 (assoc-ref %outputs "out") "/lib"))))
1916 (inputs `(("zlib" ,zlib)))
1917 (home-page "http://fallabs.com/kyotocabinet/")
1918 (synopsis
1919 "Kyoto Cabinet is a modern implementation of the DBM database")
1920 (description
1921 "Kyoto Cabinet is a standalone file-based database that supports Hash
1922 and B+ Tree data storage models. It is a fast key-value lightweight
1923 database and supports many programming languages. It is a NoSQL database.")
1924 (license license:gpl3+)))
1925
1926 (define-public tokyocabinet
1927 (package
1928 (name "tokyocabinet")
1929 (version "1.4.48")
1930 (source
1931 (origin
1932 (method url-fetch)
1933 (uri (string-append "http://fallabs.com/tokyocabinet/"
1934 name "-" version ".tar.gz"))
1935 (sha256
1936 (base32
1937 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
1938 (build-system gnu-build-system)
1939 (arguments
1940 `(#:configure-flags
1941 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
1942 (string-append "LDFLAGS=-Wl,-rpath="
1943 (assoc-ref %outputs "out") "/lib"))))
1944 (inputs
1945 `(("zlib" ,zlib)))
1946 (home-page "http://fallabs.com/tokyocabinet/")
1947 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
1948 (description
1949 "Tokyo Cabinet is a library of routines for managing a database.
1950 The database is a simple data file containing records, each is a pair of a
1951 key and a value. Every key and value is serial bytes with variable length.
1952 Both binary data and character string can be used as a key and a value.
1953 There is neither concept of data tables nor data types. Records are
1954 organized in hash table, B+ tree, or fixed-length array.")
1955 (license license:lgpl2.1+)))
1956
1957 (define-public wiredtiger
1958 (package
1959 (name "wiredtiger")
1960 (version "2.9.1")
1961 (source (origin
1962 (method url-fetch)
1963 (uri (string-append
1964 "http://source.wiredtiger.com/releases/wiredtiger-"
1965 version ".tar.bz2"))
1966 (sha256
1967 (base32
1968 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
1969 (build-system gnu-build-system)
1970 (arguments
1971 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
1972 #:phases
1973 (modify-phases %standard-phases
1974 (add-before 'check 'disable-test/fops
1975 (lambda _
1976 ;; XXX: timed out after 3600 seconds of silence
1977 (substitute* "Makefile"
1978 (("test/fops") ""))
1979 #t)))))
1980 (inputs
1981 `(("lz4" ,lz4)
1982 ("zlib" ,zlib)
1983 ("snappy" ,snappy)))
1984 (home-page "http://source.wiredtiger.com/")
1985 (synopsis "NoSQL data engine")
1986 (description
1987 "WiredTiger is an extensible platform for data management. It supports
1988 row-oriented storage (where all columns of a row are stored together),
1989 column-oriented storage (where columns are stored in groups, allowing for
1990 more efficient access and storage of column subsets) and log-structured merge
1991 trees (LSM), for sustained throughput under random insert workloads.")
1992 (license license:gpl3) ; or GPL-2
1993 ;; configure.ac: WiredTiger requires a 64-bit build.
1994 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
1995
1996 (define-public wiredtiger-3
1997 (package
1998 (inherit wiredtiger)
1999 (name "wiredtiger")
2000 (version "3.1.0")
2001 (source (origin
2002 (method url-fetch)
2003 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2004 version ".tar.bz2"))
2005 (sha256
2006 (base32
2007 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2008
2009 (define-public guile-wiredtiger
2010 (package
2011 (name "guile-wiredtiger")
2012 (version "0.7.0")
2013 (source (origin
2014 (method git-fetch)
2015 (uri (git-reference
2016 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2017 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2018 (file-name (string-append name "-" version "-checkout"))
2019 (sha256
2020 (base32
2021 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2022 (build-system gnu-build-system)
2023 (arguments
2024 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2025 #:configure-flags
2026 (list (string-append "--with-libwiredtiger-prefix="
2027 (assoc-ref %build-inputs "wiredtiger")))
2028 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2029 (native-inputs
2030 `(("autoconf" ,autoconf)
2031 ("automake" ,automake)
2032 ("pkg-config" ,pkg-config)))
2033 (inputs
2034 `(("wiredtiger" ,wiredtiger-3)
2035 ("guile" ,guile-2.2)))
2036 (propagated-inputs
2037 `(("guile-bytestructures" ,guile-bytestructures)))
2038 (synopsis "WiredTiger bindings for GNU Guile")
2039 (description
2040 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2041 database.")
2042 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2043 (license license:gpl3+)))
2044
2045 (define-public perl-db-file
2046 (package
2047 (name "perl-db-file")
2048 (version "1.852")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (string-append
2053 "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2054 version
2055 ".tar.gz"))
2056 (sha256
2057 (base32
2058 "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs"))))
2059 (build-system perl-build-system)
2060 (inputs `(("bdb" ,bdb)))
2061 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2062 (arguments
2063 `(#:phases (modify-phases %standard-phases
2064 (add-before
2065 'configure 'modify-config.in
2066 (lambda* (#:key inputs #:allow-other-keys)
2067 (substitute* "config.in"
2068 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2069 #t)))))
2070 (home-page "https://metacpan.org/release/DB_File")
2071 (synopsis
2072 "Perl5 access to Berkeley DB version 1.x")
2073 (description
2074 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2075 (license license:perl-license)))
2076
2077 (define-public lmdb
2078 (package
2079 (name "lmdb")
2080 (version "0.9.24")
2081 (source
2082 (origin
2083 (method git-fetch)
2084 (uri (git-reference
2085 (url "https://github.com/LMDB/lmdb.git")
2086 (commit (string-append "LMDB_" version))))
2087 (file-name (git-file-name name version))
2088 (sha256
2089 (base32 "088q6m8fvr12w43s461h7cvpg5hj8csaqj6n9pci150dz7bk5lxm"))))
2090 (build-system gnu-build-system)
2091 (arguments
2092 `(#:test-target "test"
2093 #:phases
2094 (modify-phases %standard-phases
2095 (replace 'configure
2096 (lambda* (#:key outputs #:allow-other-keys)
2097 (chdir "libraries/liblmdb")
2098 (substitute* "Makefile"
2099 (("/usr/local") (assoc-ref outputs "out")))
2100 #t)))))
2101 (home-page "https://symas.com/products/lightning-memory-mapped-database")
2102 (synopsis "Lightning Memory-Mapped Database library")
2103 (description
2104 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2105 transactional database. Unlike more complex relational databases, LMDB handles
2106 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2107 underlying operating system for caching and locking, keeping the code small and
2108 simple.
2109 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2110 disk-based databases with high read performance that scales linearly over
2111 multiple cores. The size of each database is limited only by the size of the
2112 virtual address space — not physical RAM.")
2113 (license license:openldap2.8)))
2114
2115 (define-public lmdbxx
2116 (package
2117 (name "lmdbxx")
2118 (version "0.9.14.0")
2119 (source
2120 (origin
2121 (method git-fetch)
2122 (uri (git-reference
2123 (url "https://github.com/drycpp/lmdbxx.git")
2124 (commit version)))
2125 (file-name (git-file-name name version))
2126 (sha256
2127 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2128 (arguments
2129 `(#:make-flags
2130 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2131 #:phases
2132 (modify-phases %standard-phases
2133 (delete 'configure))))
2134 (build-system gnu-build-system)
2135 (inputs `(("lmdb" ,lmdb)))
2136 (home-page "http://lmdbxx.sourceforge.net")
2137 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2138 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2139 @code{LMDB} embedded database library, offering both an error-checked
2140 procedural interface and an object-oriented resource interface with RAII
2141 semantics.")
2142 (license license:unlicense)))
2143
2144 (define-public libpqxx
2145 (package
2146 (name "libpqxx")
2147 (version "4.0.1")
2148 (source (origin
2149 (method url-fetch)
2150 (uri (string-append
2151 "http://pqxx.org/download/software/libpqxx/"
2152 name "-" version ".tar.gz"))
2153 (sha256
2154 (base32
2155 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2156 (build-system gnu-build-system)
2157 (native-inputs
2158 `(("python" ,python-2)))
2159 (inputs `(("postgresql" ,postgresql)))
2160 (arguments
2161 `(#:tests? #f ; # FAIL: 1
2162 #:phases
2163 (modify-phases %standard-phases
2164 (add-before 'configure 'fix-sed-command
2165 (lambda _
2166 ;; Newer sed versions error out if double brackets are not used.
2167 (substitute* "configure"
2168 (("\\[:space:\\]") "[[:space:]]"))
2169 #t)))))
2170 (synopsis "C++ connector for PostgreSQL")
2171 (description
2172 "Libpqxx is a C++ library to enable user programs to communicate with the
2173 PostgreSQL database back-end. The database back-end can be local or it may be
2174 on another machine, accessed via TCP/IP.")
2175 (home-page "http://pqxx.org/")
2176 (license license:bsd-3)))
2177
2178 (define-public python-peewee
2179 (package
2180 (name "python-peewee")
2181 (version "2.10.2")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (pypi-uri "peewee" version))
2186 (sha256
2187 (base32
2188 "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
2189 (build-system python-build-system)
2190 (arguments
2191 `(#:tests? #f)) ; Fails to import test data
2192 (native-inputs
2193 `(("python-cython" ,python-cython)))
2194 (home-page "https://github.com/coleifer/peewee/")
2195 (synopsis "Small object-relational mapping utility")
2196 (description
2197 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2198 handles converting between pythonic values and those used by databases, so you
2199 can use Python types in your code without having to worry. It has built-in
2200 support for sqlite, mysql and postgresql. If you already have a database, you
2201 can autogenerate peewee models using @code{pwiz}, a model generator.")
2202 (license license:expat)))
2203
2204 (define-public python2-peewee
2205 (package-with-python2 python-peewee))
2206
2207 (define-public sqlcipher
2208 (package
2209 (name "sqlcipher")
2210 (version "3.4.2")
2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (string-append "https://github.com/sqlcipher/" name
2215 "/archive/v" version ".tar.gz"))
2216 (sha256
2217 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2218 (file-name (string-append name "-" version ".tar.gz"))))
2219 (build-system gnu-build-system)
2220 (inputs
2221 `(("libcrypto" ,openssl)
2222 ("libtcl8.6" ,tcl))) ; required for running the tests
2223 (native-inputs
2224 `(("tcl" ,tcl)))
2225 (arguments
2226 '(#:configure-flags
2227 '("--enable-tempstore=yes"
2228 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2229 "LDFLAGS=-lcrypto -ltcl8.6"
2230 "--disable-tcl")
2231 ;; tests cannot be run from the Makefile
2232 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2233 #:test-target "testfixture"
2234 #:phases
2235 (modify-phases %standard-phases
2236 (add-before 'check 'build-test-runner
2237 (assoc-ref %standard-phases 'check))
2238 (replace 'check
2239 (lambda _
2240 (invoke "./testfixture" "test/crypto.test"))))))
2241 (home-page "https://www.zetetic.net/sqlcipher/")
2242 (synopsis
2243 "Library providing transparent encryption of SQLite database files")
2244 (description "SQLCipher is an implementation of SQLite, extended to
2245 provide transparent 256-bit AES encryption of database files. Pages are
2246 encrypted before being written to disk and are decrypted when read back. It’s
2247 well suited for protecting embedded application databases and for mobile
2248 development.")
2249 ;; The source files
2250 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2251 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2252 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2253 ;; source files are in the public domain.
2254 (license (list license:public-domain license:bsd-3))))
2255
2256 (define-public python-pyodbc-c
2257 (package
2258 (name "python-pyodbc-c")
2259 (version "3.1.4")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2264 "archive.tar.gz?ref=v" version))
2265 (sha256
2266 (base32
2267 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2268 (file-name (string-append name "-" version ".tar.gz"))))
2269 (build-system python-build-system)
2270 (inputs
2271 `(("unixodbc" ,unixodbc)))
2272 (arguments
2273 `(;; No unit tests exist.
2274 #:tests? #f))
2275 (home-page "https://github.com/mkleehammer/pyodbc")
2276 (synopsis "Python ODBC Library")
2277 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2278 for ODBC.")
2279 (license (license:x11-style "file://LICENSE.TXT"))))
2280
2281 (define-public python2-pyodbc-c
2282 (package-with-python2 python-pyodbc-c))
2283
2284 (define-public python-pyodbc
2285 (package
2286 (name "python-pyodbc")
2287 (version "4.0.30")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "pyodbc" version))
2292 (sha256
2293 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2294 (file-name (string-append name "-" version ".tar.gz"))))
2295 (build-system python-build-system)
2296 (inputs
2297 `(("unixodbc" ,unixodbc)))
2298 (arguments
2299 `(#:tests? #f)) ; no unit tests exist
2300 (home-page "https://github.com/mkleehammer/pyodbc")
2301 (synopsis "Python ODBC Library")
2302 (description "@code{python-pyodbc} provides a Python DB-API driver
2303 for ODBC.")
2304 (license (license:x11-style "file:///LICENSE.TXT"))))
2305
2306 (define-public python2-pyodbc
2307 (package-with-python2 python-pyodbc))
2308
2309 (define-public mdbtools
2310 (package
2311 (name "mdbtools")
2312 (version "0.7.1")
2313 (source
2314 (origin
2315 (method git-fetch)
2316 (uri (git-reference
2317 (url "https://github.com/brianb/mdbtools.git")
2318 (commit version)))
2319 (file-name (git-file-name name version))
2320 (sha256
2321 (base32
2322 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2323 (build-system gnu-build-system)
2324 (inputs
2325 `(("glib" ,glib)))
2326 (native-inputs
2327 `(("autoconf" ,autoconf)
2328 ("automake" ,automake)
2329 ("libtool" ,libtool)
2330 ("pkg-config" ,pkg-config)
2331 ("txt2man" ,txt2man)
2332 ("which" ,which)))
2333 (home-page "http://mdbtools.sourceforge.net/")
2334 (synopsis "Read Microsoft Access databases")
2335 (description "MDB Tools is a set of tools and applications to read the
2336 proprietary MDB file format used in Microsoft's Access database package. This
2337 includes programs to export schema and data from Microsoft's Access database
2338 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2339 etc., and an SQL engine for performing simple SQL queries.")
2340 (license (list license:lgpl2.0
2341 license:gpl2+))))
2342
2343 (define-public python-lmdb
2344 (package
2345 (name "python-lmdb")
2346 (version "0.95")
2347 (source (origin
2348 (method url-fetch)
2349 (uri (pypi-uri "lmdb" version))
2350 (sha256
2351 (base32
2352 "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91"))
2353 (modules '((guix build utils)))
2354 (snippet
2355 ;; Delete bundled lmdb source files.
2356 '(begin
2357 (for-each delete-file (list "lib/lmdb.h"
2358 "lib/mdb.c"
2359 "lib/midl.c"
2360 "lib/midl.h"))
2361 #t))))
2362 (build-system python-build-system)
2363 (inputs
2364 `(("lmdb" ,lmdb)))
2365 (arguments
2366 `(#:phases
2367 (modify-phases %standard-phases
2368 (add-before 'build 'use-system-lmdb
2369 (lambda* (#:key inputs #:allow-other-keys)
2370 (let ((lmdb (assoc-ref inputs "lmdb")))
2371 (setenv "LMDB_FORCE_SYSTEM" "set")
2372 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2373 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2374 #t))))
2375 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2376 #:tests? #f))
2377 (home-page "https://github.com/dw/py-lmdb")
2378 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2379 (description
2380 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2381 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2382 (license
2383 (list license:openldap2.8
2384 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2385 ;; but not actually needed on platforms currently supported by Guix.
2386 license:bsd-3))))
2387
2388 (define-public python2-lmdb
2389 (package-with-python2 python-lmdb))
2390
2391 (define-public python-orator
2392 (package
2393 (name "python-orator")
2394 (version "0.9.7")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "orator" version))
2398 (sha256
2399 (base32
2400 "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
2401 (build-system python-build-system)
2402 (arguments
2403 `(#:phases
2404 (modify-phases %standard-phases
2405 (add-after 'unpack 'loosen-dependencies
2406 ;; Tests are not actually run since they are not included with the
2407 ;; distributed package, but dependencies are checked.
2408 (lambda _
2409 (substitute* "setup.py"
2410 ((",<.*'") "'")
2411 (("flexmock==0.9.7") "flexmock")
2412 ;; The pytest-mock package is out of date, so we remove minimum
2413 ;; version requirement.
2414 (("pytest-mock.*'") "pytest-mock'"))
2415 #t)))))
2416 (native-inputs
2417 `(("python-pytest-mock" ,python-pytest-mock)
2418 ("python-pytest" ,python-pytest)
2419 ("python-flexmock" ,python-flexmock)))
2420 (propagated-inputs
2421 `(("python-backpack" ,python-backpack)
2422 ("python-blinker" ,python-blinker)
2423 ("python-cleo" ,python-cleo)
2424 ("python-faker" ,python-faker)
2425 ("python-inflection" ,python-inflection)
2426 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2427 ("python-pendulum" ,python-pendulum)
2428 ("python-pyaml" ,python-pyaml)
2429 ("python-pygments" ,python-pygments)
2430 ("python-simplejson" ,python-simplejson)
2431 ("python-six" ,python-six)
2432 ("python-wrapt" ,python-wrapt)))
2433 (home-page "https://orator-orm.com/")
2434 (synopsis "ActiveRecord ORM for Python")
2435 (description
2436 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2437 implementation for Python.")
2438 (license license:expat)
2439 (properties `((python2-variant . ,(delay python2-orator))))))
2440
2441 (define-public python2-orator
2442 (package-with-python2 (strip-python2-variant python-orator)))
2443
2444 (define-public virtuoso-ose
2445 (package
2446 (name "virtuoso-ose")
2447 (version "7.2.5")
2448 (source
2449 (origin
2450 (method url-fetch)
2451 (uri (string-append
2452 "https://github.com/openlink/virtuoso-opensource/releases/"
2453 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2454 (sha256
2455 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2456 (build-system gnu-build-system)
2457 (arguments
2458 `(#:tests? #f ; Tests require a network connection.
2459 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2460 ;; This indicates that the internal zlib code may still be used.
2461 #:configure-flags '("--without-internal-zlib"
2462 "--with-readline")))
2463 (inputs
2464 `(("openssl" ,openssl-1.0)
2465 ("net-tools" ,net-tools)
2466 ("readline" ,readline)
2467 ("zlib" ,zlib)))
2468 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2469 (synopsis "Multi-model database system")
2470 (description "Virtuoso is a scalable cross-platform server that combines
2471 relational, graph, and document data management with web application server
2472 and web services platform functionality.")
2473 ;; configure: error: ... can only be build on 64bit platforms
2474 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2475 (license license:gpl2)))
2476
2477 (define-public python-ccm
2478 (package
2479 (name "python-ccm")
2480 (version "2.1.6")
2481 (source
2482 (origin
2483 (method url-fetch)
2484 (uri (pypi-uri "ccm" version))
2485 (sha256
2486 (base32
2487 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2488 (build-system python-build-system)
2489 (propagated-inputs
2490 `(("python-pyyaml" ,python-pyyaml)
2491 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2492 ;; functionality
2493 ("python-psutil" ,python-psutil)
2494 ("python-six" ,python-six)))
2495 (home-page "https://github.com/pcmanus/ccm")
2496 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2497 localhost")
2498 (description "Cassandra Cluster Manager is a development tool for testing
2499 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2500 on localhost.")
2501 (license license:asl2.0)))
2502
2503 (define-public python2-ccm
2504 (package-with-python2 python-ccm))
2505
2506 (define-public python2-pysqlite
2507 (package
2508 (name "python2-pysqlite")
2509 (version "2.8.3")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "pysqlite" version))
2514 (sha256
2515 (base32
2516 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2517 (build-system python-build-system)
2518 (inputs
2519 `(("sqlite" ,sqlite)))
2520 (arguments
2521 `(#:python ,python-2 ; incompatible with Python 3
2522 #:tests? #f)) ; no test target
2523 (home-page "https://github.com/ghaering/pysqlite")
2524 (synopsis "SQLite bindings for Python")
2525 (description
2526 "Pysqlite provides SQLite bindings for Python that comply to the
2527 Database API 2.0T.")
2528 (license license:zlib)))
2529
2530 (define-public python-sqlalchemy
2531 (package
2532 (name "python-sqlalchemy")
2533 (version "1.3.15")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "SQLAlchemy" version))
2538 (sha256
2539 (base32 "0iglkvymfp35zm5pxy5kzqvcv96kkas0chqdx7xpla86sspa9k64"))))
2540 (build-system python-build-system)
2541 (native-inputs
2542 `(("python-cython" ,python-cython) ; for C extensions
2543 ("python-pytest" ,python-pytest)
2544 ("python-mock" ,python-mock))) ; for tests
2545 (arguments
2546 `(#:phases
2547 (modify-phases %standard-phases
2548 (replace 'check
2549 (lambda _ (invoke "py.test"))))))
2550 (home-page "https://www.sqlalchemy.org")
2551 (synopsis "Database abstraction library")
2552 (description
2553 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2554 gives application developers the full power and flexibility of SQL. It
2555 provides a full suite of well known enterprise-level persistence patterns,
2556 designed for efficient and high-performing database access, adapted into a
2557 simple and Pythonic domain language.")
2558 (license license:x11)))
2559
2560 (define-public python2-sqlalchemy
2561 (package-with-python2 python-sqlalchemy))
2562
2563 (define-public python-sqlalchemy-utils
2564 (package
2565 (name "python-sqlalchemy-utils")
2566 (version "0.32.21")
2567 (source
2568 (origin
2569 (method url-fetch)
2570 (uri (pypi-uri "SQLAlchemy-Utils" version))
2571 (sha256
2572 (base32
2573 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2574 (build-system python-build-system)
2575 (arguments
2576 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2577 ;; #:phases
2578 ;; (modify-phases %standard-phases
2579 ;; (replace 'check
2580 ;; (lambda _
2581 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2582 (propagated-inputs
2583 `(("python-six" ,python-six)
2584 ("python-sqlalchemy" ,python-sqlalchemy)))
2585 (native-inputs
2586 `(("python-dateutil" ,python-dateutil)
2587 ("python-flexmock" ,python-flexmock)
2588 ("python-psycopg2" ,python-psycopg2)
2589 ("python-pytest" ,python-pytest)
2590 ("python-pytz" ,python-pytz)))
2591 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2592 (synopsis "Various utility functions for SQLAlchemy")
2593 (description
2594 "SQLAlchemy-utils provides various utility functions and custom data types
2595 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2596
2597 You might also want to install the following optional dependencies:
2598 @enumerate
2599 @item @code{python-passlib}
2600 @item @code{python-babel}
2601 @item @code{python-cryptography}
2602 @item @code{python-pytz}
2603 @item @code{python-psycopg2}
2604 @item @code{python-furl}
2605 @item @code{python-flask-babel}
2606 @end enumerate
2607 ")
2608 (license license:bsd-3)))
2609
2610 (define-public python2-sqlalchemy-utils
2611 (package-with-python2 python-sqlalchemy-utils))
2612
2613 (define-public python-alembic
2614 (package
2615 (name "python-alembic")
2616 (version "1.0.11")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "alembic" version))
2621 (sha256
2622 (base32
2623 "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd"))))
2624 (build-system python-build-system)
2625 (native-inputs
2626 `(("python-mock" ,python-mock)
2627 ("python-pytest-cov" ,python-pytest-cov)))
2628 (propagated-inputs
2629 `(("python-dateutil" ,python-dateutil)
2630 ("python-sqlalchemy" ,python-sqlalchemy)
2631 ("python-mako" ,python-mako)
2632 ("python-editor" ,python-editor)))
2633 (home-page "https://bitbucket.org/zzzeek/alembic")
2634 (synopsis "Database migration tool for SQLAlchemy")
2635 (description
2636 "Alembic is a lightweight database migration tool for usage with the
2637 SQLAlchemy Database Toolkit for Python.")
2638 (license license:expat)))
2639
2640 (define-public python2-alembic
2641 (package-with-python2 python-alembic))
2642
2643 (define-public python-pickleshare
2644 (package
2645 (name "python-pickleshare")
2646 (version "0.7.5")
2647 (source
2648 (origin
2649 (method url-fetch)
2650 (uri (pypi-uri "pickleshare" version))
2651 (sha256
2652 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2653 (build-system python-build-system)
2654 (arguments
2655 `(#:phases (modify-phases %standard-phases
2656 (replace 'check
2657 (lambda _
2658 (invoke "pytest"))))))
2659 (native-inputs
2660 `(("python-pytest" ,python-pytest)))
2661 (home-page "https://github.com/vivainio/pickleshare")
2662 (synopsis "Tiny key value database with concurrency support")
2663 (description
2664 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2665 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2666 shelve, many processes can access the database simultaneously. Changing a
2667 value in database is immediately visible to other processes accessing the same
2668 database. Concurrency is possible because the values are stored in separate
2669 files. Hence the “database” is a directory where all files are governed by
2670 PickleShare.")
2671 (properties `((python2-variant . ,(delay python2-pickleshare))))
2672 (license license:expat)))
2673
2674 (define-public python2-pickleshare
2675 (let ((pickleshare (package-with-python2
2676 (strip-python2-variant python-pickleshare))))
2677 (package (inherit pickleshare)
2678 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
2679 ,@(package-propagated-inputs pickleshare))))))
2680
2681 (define-public python-apsw
2682 (package
2683 (name "python-apsw")
2684 (version "3.28.0-r1")
2685 (source
2686 (origin
2687 (method url-fetch)
2688 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
2689 "/download/" version "/apsw-" version ".zip"))
2690 (sha256
2691 (base32
2692 "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly"))))
2693 (build-system python-build-system)
2694 (native-inputs
2695 `(("unzip" ,unzip)))
2696 (inputs
2697 `(("sqlite" ,sqlite)))
2698 (arguments
2699 `(#:phases
2700 (modify-phases %standard-phases
2701 (replace 'build
2702 (lambda _
2703 (invoke "python" "setup.py" "build" "--enable-all-extensions")
2704 #t))
2705 (add-after 'build 'build-test-helper
2706 (lambda _
2707 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
2708 "-I." "-Isqlite3" "src/testextension.c")
2709 #t))
2710 (replace 'check
2711 (lambda* (#:key inputs outputs #:allow-other-keys)
2712 (add-installed-pythonpath inputs outputs)
2713 (invoke "python" "setup.py" "test")
2714 #t)))))
2715 (home-page "https://github.com/rogerbinns/apsw/")
2716 (synopsis "Another Python SQLite Wrapper")
2717 (description "APSW is a Python wrapper for the SQLite
2718 embedded relational database engine. In contrast to other wrappers such as
2719 pysqlite it focuses on being a minimal layer over SQLite attempting just to
2720 translate the complete SQLite API into Python.")
2721 (license license:zlib)))
2722
2723 (define-public python2-apsw
2724 (package-with-python2 python-apsw))
2725
2726 (define-public python2-neo4j-driver
2727 (package
2728 (name "python2-neo4j-driver")
2729 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
2730 (version "1.4.0")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (pypi-uri "neo4j-driver" version))
2734 (sha256
2735 (base32
2736 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
2737 (build-system python-build-system)
2738 (arguments
2739 `(#:python ,python-2))
2740 (home-page "https://neo4j.com/developer/python/")
2741 (synopsis "Neo4j driver code written in Python")
2742 (description "This package provides the Neo4j Python driver that connects
2743 to the database using Neo4j's binary protocol. It aims to be minimal, while
2744 being idiomatic to Python.")
2745 (license license:asl2.0)))
2746
2747 (define-public python2-py2neo
2748 (package
2749 (name "python2-py2neo")
2750 (version "3.1.2")
2751 (source (origin
2752 (method url-fetch)
2753 (uri (pypi-uri "py2neo" version))
2754 (sha256
2755 (base32
2756 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
2757 (build-system python-build-system)
2758 (arguments
2759 `(#:python ,python-2))
2760 (home-page "https://py2neo.org")
2761 (synopsis "Library and toolkit for working with Neo4j in Python")
2762 (description "This package provides a client library and toolkit for
2763 working with Neo4j from within Python applications and from the command
2764 line. The core library has no external dependencies and has been carefully
2765 designed to be easy and intuitive to use.")
2766 (license license:asl2.0)))
2767
2768 (define-public python-psycopg2
2769 (package
2770 (name "python-psycopg2")
2771 (version "2.7.7")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (pypi-uri "psycopg2" version))
2776 (sha256
2777 (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl"))))
2778 (build-system python-build-system)
2779 (arguments
2780 ;; Tests would require a postgresql database "psycopg2_test"
2781 ;; and a running postgresql database management service.
2782 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
2783 (inputs
2784 `(("postgresql" ,postgresql))) ; libpq
2785 (home-page "http://initd.org/psycopg/")
2786 (synopsis "Python PostgreSQL adapter")
2787 (description
2788 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
2789 2.0.")
2790 (license license:lgpl3+)))
2791
2792 (define-public python2-psycopg2
2793 (package-with-python2 python-psycopg2))
2794
2795 (define-public python-sadisplay
2796 (package
2797 (name "python-sadisplay")
2798 (version "0.4.8")
2799 (source
2800 (origin
2801 (method url-fetch)
2802 (uri (pypi-uri "sadisplay" version))
2803 (sha256
2804 (base32
2805 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
2806 (build-system python-build-system)
2807 (propagated-inputs
2808 `(("python-sqlalchemy" ,python-sqlalchemy)))
2809 (native-inputs
2810 ;; For tests.
2811 `(("python-nose" ,python-nose)))
2812 (home-page "https://bitbucket.org/estin/sadisplay")
2813 (synopsis "SQLAlchemy schema displayer")
2814 (description "This package provides a program to build Entity
2815 Relationship diagrams from a SQLAlchemy model (or directly from the
2816 database).")
2817 (license license:bsd-3)))
2818
2819 (define-public python2-sadisplay
2820 (package-with-python2 python-sadisplay))
2821
2822 (define-public python-mysqlclient
2823 (package
2824 (name "python-mysqlclient")
2825 (version "1.3.13")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (pypi-uri "mysqlclient" version))
2830 (sha256
2831 (base32
2832 "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz"))))
2833 (build-system python-build-system)
2834 (native-inputs
2835 `(("nose" ,python-nose)
2836 ("mock" ,python-mock)
2837 ("py.test" ,python-pytest)))
2838 (inputs
2839 `(("mysql" ,mariadb "lib")
2840 ("mysql-dev" ,mariadb "dev")
2841 ("libz" ,zlib)
2842 ("openssl" ,openssl)))
2843 (home-page "https://github.com/PyMySQL/mysqlclient-python")
2844 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
2845 (description "MySQLdb is an interface to the popular MySQL database server
2846 for Python. The design goals are:
2847 @enumerate
2848 @item Compliance with Python database API version 2.0 [PEP-0249],
2849 @item Thread-safety,
2850 @item Thread-friendliness (threads will not block each other).
2851 @end enumerate")
2852 (license license:gpl2)))
2853
2854 (define-public python2-mysqlclient
2855 (package-with-python2 python-mysqlclient))
2856
2857 (define-public python-hiredis
2858 (package
2859 (name "python-hiredis")
2860 (version "0.2.0")
2861 (source
2862 (origin
2863 (method url-fetch)
2864 (uri (pypi-uri "hiredis" version))
2865 (sha256
2866 (base32
2867 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
2868 (build-system python-build-system)
2869 (arguments
2870 ;; no tests
2871 `(#:tests? #f))
2872 (home-page "https://github.com/redis/hiredis-py")
2873 (synopsis "Python extension that wraps protocol parsing code in hiredis")
2874 (description "Python-hiredis is a python extension that wraps protocol
2875 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
2876 (license license:bsd-3)))
2877
2878 (define-public python2-hiredis
2879 (package-with-python2 python-hiredis))
2880
2881 (define-public python-fakeredis
2882 (package
2883 (name "python-fakeredis")
2884 (version "0.8.2")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (pypi-uri "fakeredis" version))
2889 (sha256
2890 (base32
2891 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
2892 (build-system python-build-system)
2893 (arguments
2894 ;; no tests
2895 `(#:tests? #f))
2896 (home-page "https://github.com/jamesls/fakeredis")
2897 (synopsis "Fake implementation of redis API for testing purposes")
2898 (description
2899 "Fakeredis is a pure-Python implementation of the redis-py Python client
2900 that simulates talking to a redis server. It was created for a single purpose:
2901 to write unit tests.
2902
2903 Setting up redis is not hard, but one often wants to write unit tests that don't
2904 talk to an external server such as redis. This module can be used as a
2905 reasonable substitute.")
2906 (license license:bsd-3)))
2907
2908 (define-public python2-fakeredis
2909 (package-with-python2 python-fakeredis))
2910
2911 (define-public python-redis
2912 (package
2913 (name "python-redis")
2914 (version "3.3.8")
2915 (source
2916 (origin
2917 (method url-fetch)
2918 (uri (pypi-uri "redis" version))
2919 (sha256
2920 (base32 "0fyxzqax7lcwzwhvnz0i0q6v62hxyv1mv52ywx3bpff9a2vjz8lq"))))
2921 (build-system python-build-system)
2922 ;; Tests require a running Redis server.
2923 (arguments '(#:tests? #f))
2924 ;; As long as we are not running test, we do not need this input :-)
2925 ;;(native-inputs
2926 ;; `(("python-pytest" ,python-pytest)))
2927 (home-page "https://github.com/andymccurdy/redis-py")
2928 (synopsis "Redis Python client")
2929 (description
2930 "This package provides a Python interface to the Redis key-value store.")
2931 (license license:expat)))
2932
2933 (define-public python2-redis
2934 (package-with-python2 python-redis))
2935
2936 (define-public python-rq
2937 (package
2938 (name "python-rq")
2939 (version "0.13.0")
2940 (source
2941 (origin
2942 (method url-fetch)
2943 (uri (pypi-uri "rq" version))
2944 (sha256
2945 (base32 "0xvapd2bxnyq480i48bdkddzlqmv2axbsq85rlfy8k3al8zxxxrf"))))
2946 (build-system python-build-system)
2947 (propagated-inputs
2948 `(("python-click" ,python-click)
2949 ("python-redis" ,python-redis)))
2950 (home-page "https://python-rq.org/")
2951 (synopsis "Simple job queues for Python")
2952 (description
2953 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2954 processing them in the background with workers. It is backed by Redis and it
2955 is designed to have a low barrier to entry.")
2956 (license license:bsd-2)))
2957
2958 (define-public python2-rq
2959 (package-with-python2 python-rq))
2960
2961 (define-public python-trollius-redis
2962 (package
2963 (name "python-trollius-redis")
2964 (version "0.1.4")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "trollius_redis" version))
2969 (sha256
2970 (base32
2971 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
2972 (build-system python-build-system)
2973 ;; TODO: Tests require packaging 'hiredis'.
2974 (arguments '(#:tests? #f))
2975 (home-page "https://github.com/benjolitz/trollius-redis")
2976 (synopsis "Port of asyncio-redis to trollius")
2977 (description "@code{trollius-redis} is a Redis client for Python
2978 trollius. It is an asynchronous IO (PEP 3156) implementation of the
2979 Redis protocol.")
2980 (license license:bsd-2)))
2981
2982 (define-public python2-trollius-redis
2983 (package-with-python2 python-trollius-redis))
2984
2985 (define-public python-sqlparse
2986 (package
2987 (name "python-sqlparse")
2988 (version "0.2.4")
2989 (source (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "sqlparse" version))
2992 (sha256
2993 (base32
2994 "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
2995 (build-system python-build-system)
2996 (arguments
2997 `(#:phases
2998 (modify-phases %standard-phases
2999 (replace 'check
3000 (lambda _ (invoke "py.test"))))))
3001 (native-inputs
3002 `(("python-pytest" ,python-pytest)))
3003 (home-page "https://github.com/andialbrecht/sqlparse")
3004 (synopsis "Non-validating SQL parser")
3005 (description "Sqlparse is a non-validating SQL parser for Python. It
3006 provides support for parsing, splitting and formatting SQL statements.")
3007 (license license:bsd-3)))
3008
3009 (define-public python2-sqlparse
3010 (package-with-python2 python-sqlparse))
3011
3012 (define-public python-sql
3013 (package
3014 (name "python-sql")
3015 (version "1.0.0")
3016 (source
3017 (origin
3018 (method url-fetch)
3019 (uri (pypi-uri "python-sql" version))
3020 (sha256
3021 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3022 (build-system python-build-system)
3023 (home-page "https://python-sql.tryton.org/")
3024 (synopsis "Library to write SQL queries in a pythonic way")
3025 (description "@code{python-sql} is a library to write SQL queries, that
3026 transforms idiomatic python function calls to well-formed SQL queries.")
3027 (license license:bsd-3)))
3028
3029 (define-public python2-sql
3030 (package-with-python2 python-sql))
3031
3032 (define-public mongo-tools
3033 (package
3034 (name "mongo-tools")
3035 (version "3.4.0")
3036 (source
3037 (origin (method git-fetch)
3038 (uri (git-reference
3039 (url "https://github.com/mongodb/mongo-tools")
3040 (commit (string-append "r" version))))
3041 (file-name (git-file-name name version))
3042 (sha256
3043 (base32
3044 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3045 (build-system go-build-system)
3046 (arguments
3047 `(#:import-path "github.com/mongodb/mongo-tools"
3048 #:modules ((srfi srfi-1)
3049 (guix build go-build-system)
3050 (guix build utils))
3051 #:install-source? #f
3052 #:phases
3053 (let ((all-tools
3054 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3055 "mongoimport" "mongooplog" "mongorestore"
3056 "mongostat" "mongotop")))
3057 (modify-phases %standard-phases
3058 (add-after 'unpack 'delete-bundled-source-code
3059 (lambda _
3060 (delete-file-recursively
3061 "src/github.com/mongodb/mongo-tools/vendor")
3062 #t))
3063 (add-after 'delete-bundled-source-code 'patch-source
3064 (lambda _
3065 ;; Remove a redundant argument that causes compilation to fail.
3066 (substitute*
3067 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3068 (("skipping restore of system.profile collection\", db)")
3069 "skipping restore of system.profile collection\")"))
3070 #t))
3071 (replace 'build
3072 (lambda _
3073 (for-each (lambda (tool)
3074 (let ((command
3075 `("go" "build"
3076 ;; This is where the tests expect to find the
3077 ;; executables
3078 "-o" ,(string-append
3079 "src/github.com/mongodb/mongo-tools/bin/"
3080 tool)
3081 "-v"
3082 "-tags=\"ssl sasl\""
3083 "-ldflags"
3084 "-extldflags=-Wl,-z,now,-z,relro"
3085 ,(string-append
3086 "src/github.com/mongodb/mongo-tools/"
3087 tool "/main/" tool ".go"))))
3088 (simple-format #t "build: running ~A\n"
3089 (string-join command))
3090 (apply invoke command)))
3091 all-tools)
3092 #t))
3093 (replace 'check
3094 (lambda _
3095 (with-directory-excursion "src"
3096 (for-each (lambda (tool)
3097 (invoke
3098 "go" "test" "-v"
3099 (string-append "github.com/mongodb/mongo-tools/"
3100 tool)))
3101 all-tools))
3102 #t))
3103 (replace 'install
3104 (lambda* (#:key outputs #:allow-other-keys)
3105 (for-each (lambda (tool)
3106 (install-file
3107 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3108 tool)
3109 (string-append (assoc-ref outputs "out")
3110 "/bin")))
3111 all-tools)
3112 #t))))))
3113 (native-inputs
3114 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3115 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3116 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3117 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3118 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3119 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3120 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3121 (home-page "https://github.com/mongodb/mongo-tools")
3122 (synopsis "Various tools for interacting with MongoDB and BSON")
3123 (description
3124 "This package includes a collection of tools related to MongoDB.
3125 @table @code
3126 @item bsondump
3127 Display BSON files in a human-readable format
3128 @item mongoimport
3129 Convert data from JSON, TSV or CSV and insert them into a collection
3130 @item mongoexport
3131 Write an existing collection to CSV or JSON format
3132 @item mongodump/mongorestore
3133 Dump MongoDB backups to disk in the BSON format
3134 @item mongorestore
3135 Read MongoDB backups in the BSON format, and restore them to a live database
3136 @item mongostat
3137 Monitor live MongoDB servers, replica sets, or sharded clusters
3138 @item mongofiles
3139 Read, write, delete, or update files in GridFS
3140 @item mongooplog
3141 Replay oplog entries between MongoDB servers
3142 @item mongotop
3143 Monitor read/write activity on a mongo server
3144 @end table")
3145 (license license:asl2.0)))
3146
3147 (define-public apache-arrow
3148 (package
3149 (name "apache-arrow")
3150 (version "0.10.0")
3151 (source
3152 (origin
3153 (method git-fetch)
3154 (uri (git-reference
3155 (url "https://github.com/apache/arrow")
3156 (commit (string-append "apache-arrow-" version))))
3157 (file-name (git-file-name name version))
3158 (sha256
3159 (base32
3160 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3161 (build-system cmake-build-system)
3162 (arguments
3163 `(#:tests? #f
3164 #:phases
3165 (modify-phases %standard-phases
3166 (add-before 'configure 'enter-source-directory
3167 (lambda _ (chdir "cpp") #t))
3168 (add-after 'unpack 'set-env
3169 (lambda _
3170 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3171 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3172 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3173 (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc"))
3174 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3175 #t)))
3176 #:build-type "Release"
3177 #:configure-flags
3178 (list "-DARROW_PYTHON=ON"
3179
3180 ;; Install to PREFIX/lib (the default is
3181 ;; PREFIX/lib64).
3182 (string-append "-DCMAKE_INSTALL_LIBDIR="
3183 (assoc-ref %outputs "out")
3184 "/lib")
3185
3186 ;; XXX These Guix package offer static
3187 ;; libraries that are not position independent,
3188 ;; and ld fails to link them into the arrow .so
3189 "-DARROW_WITH_SNAPPY=OFF"
3190 "-DARROW_WITH_ZLIB=OFF"
3191 "-DARROW_WITH_ZSTD=OFF"
3192 "-DARROW_WITH_LZ4=OFF"
3193
3194 ;; Building the tests forces on all the
3195 ;; optional features and the use of static
3196 ;; libraries.
3197 "-DARROW_BUILD_TESTS=OFF"
3198 "-DARROW_BUILD_STATIC=OFF")))
3199 (inputs
3200 `(("boost" ,boost)
3201 ("rapidjson" ,rapidjson)
3202 ("brotli" ,google-brotli)
3203 ("flatbuffers" ,flatbuffers)
3204 ("jemalloc" ,jemalloc)
3205 ("python-3" ,python)
3206 ("python-numpy" ,python-numpy)))
3207 (home-page "https://arrow.apache.org/")
3208 (synopsis "Columnar in-memory analytics")
3209 (description "Apache Arrow is a columnar in-memory analytics layer
3210 designed to accelerate big data. It houses a set of canonical in-memory
3211 representations of flat and hierarchical data along with multiple
3212 language-bindings for structure manipulation. It also provides IPC and common
3213 algorithm implementations.")
3214 (license license:asl2.0)))
3215
3216 (define-public python-pyarrow
3217 (package
3218 (name "python-pyarrow")
3219 (version "0.10.0")
3220 (source
3221 (origin
3222 (method git-fetch)
3223 (uri (git-reference
3224 (url "https://github.com/apache/arrow")
3225 (commit (string-append "apache-arrow-" version))))
3226 (file-name (git-file-name name version))
3227 (sha256
3228 (base32
3229 "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs"))))
3230 (build-system python-build-system)
3231 (arguments
3232 '(#:tests? #f ; XXX There are no tests in the "python" directory
3233 #:phases
3234 (modify-phases %standard-phases
3235 (delete 'build) ; XXX the build is performed again during the install phase
3236 (add-after 'unpack 'enter-source-directory
3237 (lambda _ (chdir "python") #t))
3238 (add-after 'unpack 'set-env
3239 (lambda _
3240 (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow"))
3241 #t)))))
3242 (propagated-inputs
3243 `(("apache-arrow" ,apache-arrow)
3244 ("python-numpy" ,python-numpy)
3245 ("python-pandas" ,python-pandas)
3246 ("python-six" ,python-six)))
3247 (native-inputs
3248 `(("cmake" ,cmake-minimal)
3249 ("python-cython" ,python-cython)
3250 ("python-pytest" ,python-pytest)
3251 ("python-pytest-runner" ,python-pytest-runner)
3252 ("python-setuptools-scm" ,python-setuptools-scm)))
3253 (home-page "https://arrow.apache.org/docs/python/")
3254 (synopsis "Python bindings for Apache Arrow")
3255 (description "This library provides a Pythonic API wrapper for the reference
3256 Arrow C++ implementation, along with tools for interoperability with pandas,
3257 NumPy, and other traditional Python scientific computing packages.")
3258 (license license:asl2.0)))
3259
3260 (define-public python2-pyarrow
3261 (package-with-python2 python-pyarrow))
3262
3263 (define-public python-crate
3264 (package
3265 (name "python-crate")
3266 (version "0.23.2")
3267 (source (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "crate" version))
3270 (sha256
3271 (base32
3272 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3273 (build-system python-build-system)
3274 (propagated-inputs
3275 `(("python-urllib3" ,python-urllib3)))
3276 (home-page "https://github.com/crate/crate-python")
3277 (synopsis "CrateDB Python client")
3278 (description
3279 "This package provides a Python client library for CrateDB.
3280 It implements the Python DB API 2.0 specification and includes support for
3281 SQLAlchemy.")
3282 (license license:asl2.0)))
3283
3284 (define-public libdbi
3285 (package
3286 (name "libdbi")
3287 (version "0.9.0")
3288 (source (origin
3289 (method url-fetch)
3290 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3291 version "/libdbi-" version ".tar.gz"))
3292 (sha256
3293 (base32
3294 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3295 (build-system gnu-build-system)
3296 (synopsis "Database independent abstraction layer in C")
3297 (description
3298 "This library implements a database independent abstraction layer in C,
3299 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3300 programmers can leverage the power of multiple databases and multiple
3301 simultaneous database connections by using this framework.")
3302 (home-page "http://libdbi.sourceforge.net/")
3303 (license license:lgpl2.1+)))
3304
3305 (define-public libdbi-drivers
3306 (package
3307 (name "libdbi-drivers")
3308 (version "0.9.0")
3309 (source (origin
3310 (method url-fetch)
3311 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3312 "libdbi-drivers/libdbi-drivers-" version
3313 "/libdbi-drivers-" version ".tar.gz"))
3314 (sha256
3315 (base32
3316 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3317 (build-system gnu-build-system)
3318 (native-inputs
3319 `(;; For tests.
3320 ("inetutils" ,inetutils)
3321 ("glibc-locales" ,glibc-locales)
3322 ("mariadb" ,mariadb)))
3323 (inputs
3324 `(("libdbi" ,libdbi)
3325 ("mariadb:dev" ,mariadb "dev")
3326 ("mariadb:lib" ,mariadb "lib")
3327 ("postgresql" ,postgresql)
3328 ("sqlite" ,sqlite)))
3329 (arguments
3330 `(#:configure-flags
3331 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3332 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3333 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3334 (postgresql (assoc-ref %build-inputs "postgresql"))
3335 (sqlite (assoc-ref %build-inputs "sqlite")))
3336 (list "--disable-docs"
3337 (string-append "--with-dbi-incdir=" libdbi "/include")
3338 (string-append "--with-dbi-libdir=" libdbi "/lib")
3339 "--with-mysql"
3340 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3341 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3342 "--with-pgsql"
3343 (string-append "--with-pgsql-incdir=" postgresql "/include")
3344 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3345 "--with-sqlite3"
3346 (string-append "--with-sqlite-incdir=" sqlite "/include")
3347 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3348 #:phases
3349 (modify-phases %standard-phases
3350 (add-after 'unpack 'fix-tests
3351 (lambda* (#:key inputs #:allow-other-keys)
3352 (substitute* "tests/test_mysql.sh"
3353 (("^MYMYSQLD=.*")
3354 (string-append "MYMYSQLD="
3355 (assoc-ref inputs "mariadb")
3356 "/bin/mysqld")))
3357 #t))
3358 (add-after 'install 'remove-empty-directories
3359 (lambda* (#:key outputs #:allow-other-keys)
3360 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3361 (delete-file-recursively var))
3362 #t)))))
3363 (synopsis "Database drivers for the libdbi framework")
3364 (description
3365 "The @code{libdbi-drivers} library provides the database specific drivers
3366 for the @code{libdbi} framework.
3367
3368 The drivers officially supported by @code{libdbi} are:
3369 @itemize
3370 @item MySQL,
3371 @item PostgreSQL,
3372 @item SQLite.
3373 @end itemize")
3374 (home-page "http://libdbi-drivers.sourceforge.net/")
3375 (license license:lgpl2.1+)))
3376
3377 (define-public soci
3378 (package
3379 (name "soci")
3380 (version "4.0.0")
3381 (source (origin
3382 (method git-fetch)
3383 (uri (git-reference
3384 (url "https://github.com/SOCI/soci/")
3385 (commit version)))
3386 (file-name (git-file-name name version))
3387 (sha256
3388 (base32
3389 "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb"))))
3390 (build-system cmake-build-system)
3391 (inputs
3392 `(("postgresql" ,postgresql)
3393 ("sqlite" ,sqlite)
3394 ("odbc" ,unixodbc)
3395 ("boost" ,boost)
3396 ("mysql" ,mysql)))
3397 (arguments
3398 `(#:tests? #f ; Tests may require running database management systems.
3399 #:phases
3400 (modify-phases %standard-phases
3401 (add-after 'unpack 'fix-lib-path
3402 (lambda _
3403 (substitute* "CMakeLists.txt"
3404 (("set\\(SOCI_LIBDIR \"lib64\"\\)") "")))))))
3405 (synopsis "C++ Database Access Library")
3406 (description
3407 "SOCI is an abstraction layer for several database backends, including
3408 PostreSQL, SQLite, ODBC and MySQL.")
3409 (home-page "http://soci.sourceforge.net/")
3410 (license license:boost1.0)))