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