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–2021 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, 2021 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 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
49 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
50 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
52 ;;; This file is part of GNU Guix.
54 ;;; GNU Guix is free software; you can redistribute it and/or modify it
55 ;;; under the terms of the GNU General Public License as published by
56 ;;; the Free Software Foundation; either version 3 of the License, or (at
57 ;;; your option) any later version.
59 ;;; GNU Guix is distributed in the hope that it will be useful, but
60 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
61 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62 ;;; GNU General Public License for more details.
64 ;;; You should have received a copy of the GNU General Public License
65 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
67 (define-module (gnu packages databases)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages admin)
70 #:use-module (gnu packages algebra)
71 #:use-module (gnu packages autotools)
72 #:use-module (gnu packages avahi)
73 #:use-module (gnu packages base)
74 #:use-module (gnu packages bash)
75 #:use-module (gnu packages bison)
76 #:use-module (gnu packages boost)
77 #:use-module (gnu packages check)
78 #:use-module (gnu packages cmake)
79 #:use-module (gnu packages compression)
80 #:use-module (gnu packages crypto)
81 #:use-module (gnu packages curl)
82 #:use-module (gnu packages cyrus-sasl)
83 #:use-module (gnu packages dbm)
84 #:use-module (gnu packages emacs)
85 #:use-module (gnu packages flex)
86 #:use-module (gnu packages gcc)
87 #:use-module (gnu packages gettext)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages gnupg)
90 #:use-module (gnu packages golang)
91 #:use-module (gnu packages guile)
92 #:use-module (gnu packages icu4c)
93 #:use-module (gnu packages jemalloc)
94 #:use-module (gnu packages language)
95 #:use-module (gnu packages libedit)
96 #:use-module (gnu packages libevent)
97 #:use-module (gnu packages linux)
98 #:use-module (gnu packages lisp)
99 #:use-module (gnu packages lisp-xyz)
100 #:use-module (gnu packages logging)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages maths)
103 #:use-module (gnu packages multiprecision)
104 #:use-module (gnu packages ncurses)
105 #:use-module (gnu packages onc-rpc)
106 #:use-module (gnu packages parallel)
107 #:use-module (gnu packages pcre)
108 #:use-module (gnu packages perl)
109 #:use-module (gnu packages perl-check)
110 #:use-module (gnu packages perl-web)
111 #:use-module (gnu packages pkg-config)
112 #:use-module (gnu packages popt)
113 #:use-module (gnu packages protobuf)
114 #:use-module (gnu packages python)
115 #:use-module (gnu packages python-crypto)
116 #:use-module (gnu packages python-science)
117 #:use-module (gnu packages python-web)
118 #:use-module (gnu packages python-xyz)
119 #:use-module (gnu packages rdf)
120 #:use-module (gnu packages readline)
121 #:use-module (gnu packages regex)
122 #:use-module (gnu packages rpc)
123 #:use-module (gnu packages ruby)
124 #:use-module (gnu packages serialization)
125 #:use-module (gnu packages sphinx)
126 #:use-module (gnu packages sqlite)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages terminals)
129 #:use-module (gnu packages textutils)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages valgrind)
133 #:use-module (gnu packages web)
134 #:use-module (gnu packages xml)
135 #:use-module ((guix licenses) #:prefix license:)
136 #:use-module (guix packages)
137 #:use-module (guix download)
138 #:use-module (guix bzr-download)
139 #:use-module (guix git-download)
140 #:use-module (guix hg-download)
141 #:use-module (guix build-system emacs)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system go)
144 #:use-module (guix build-system perl)
145 #:use-module (guix build-system python)
146 #:use-module (guix build-system ruby)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system scons)
149 #:use-module (guix build-system trivial)
150 #:use-module (guix utils)
151 #:use-module (srfi srfi-1)
152 #:use-module (srfi srfi-26)
153 #:use-module (ice-9 match))
155 (define-public 4store
162 (url "https://github.com/4store/4store")
163 (commit (string-append "v" version))))
164 (file-name (git-file-name name version))
166 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
167 (patches (search-patches "4store-unset-preprocessor-directive.patch"
168 "4store-fix-buildsystem.patch"))))
169 (build-system gnu-build-system)
173 ("autoconf" ,autoconf)
174 ("automake" ,automake)
175 ("gettext" ,gettext-minimal)
177 ("pcre" ,pcre "bin") ;for 'pcre-config'
178 ("pkg-config" ,pkg-config)))
184 ("readline" ,readline)
186 ("cyrus-sasl" ,cyrus-sasl)
188 ("util-linux" ,util-linux "lib")))
189 ;; http://www.4store.org has been down for a while now.
190 (home-page "https://github.com/4store/4store")
191 (synopsis "Clustered RDF storage and query engine")
192 (description "4store is a RDF/SPARQL store written in C, supporting
193 either single machines or networked clusters.")
194 (license license:gpl3+)))
196 (define-public go-gopkg.in-mgo.v2
198 (name "go-gopkg.in-mgo.v2")
199 (version "2016.08.01")
203 (url "https://github.com/go-mgo/mgo")
204 (commit (string-append "r" version))))
205 (file-name (git-file-name name version))
208 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
209 (build-system go-build-system)
211 `(#:import-path "gopkg.in/mgo.v2"
212 ;; TODO: The tests fail as MongoDB fails to start
213 ;; Error parsing command line: unrecognised option '--chunkSize'
216 (modify-phases %standard-phases
217 (delete 'reset-gzip-timestamps)
218 (add-before 'check 'start-mongodb
219 (lambda* (#:key tests? #:allow-other-keys)
221 (with-directory-excursion "src/gopkg.in/mgo.v2"
222 (invoke "make" "startdb")))
224 (add-after 'check 'stop'mongodb
225 (lambda* (#:key tests? #:allow-other-keys)
227 (with-directory-excursion "src/gopkg.in/mgo.v2"
228 (invoke "make" "stopdb")))
231 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
233 ("daemontools" ,daemontools)))
234 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
236 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
237 It implements a rich selection of features under a simple API following
238 standard Go idioms.")
239 (home-page "https://labix.org/mgo")
240 (license license:bsd-2)))
242 (define-public ephemeralpg
250 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
253 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
254 (build-system gnu-build-system)
256 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
257 (string-append "PREFIX=" %output))
259 (modify-phases %standard-phases
260 (delete 'configure) ; no configure script
261 (add-after 'install 'wrap
262 (lambda* (#:key inputs outputs #:allow-other-keys)
263 (let ((out (assoc-ref outputs "out")))
264 (wrap-program (string-append out "/bin/pg_tmp")
266 (,(string-append (assoc-ref inputs "util-linux")
268 ,(string-append (assoc-ref inputs "postgresql")
271 ,(string-append out "/bin")))))
273 #:test-target "test"))
275 `(("postgresql" ,postgresql)
276 ("util-linux" ,util-linux)))
281 (home-page "https://eradman.com/ephemeralpg/")
282 (synopsis "Run temporary PostgreSQL databases")
284 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
285 like running software test suites. Temporary databases created with
286 @code{pg_tmp} have a limited shared memory footprint and are automatically
287 garbage-collected after a configurable number of seconds (the default is
289 (license license:isc)))
291 (define-public es-dump-restore
293 (name "es-dump-restore")
298 (uri (rubygems-uri "es_dump_restore" version))
301 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
302 (build-system ruby-build-system)
304 '(#:tests? #f)) ;; No testsuite.
306 `(("ruby-httpclient" ,ruby-httpclient)
307 ("ruby-multi-json" ,ruby-multi-json)
308 ("ruby-progress_bar" ,ruby-progress_bar)
309 ("ruby-rubyzip" ,ruby-rubyzip)
310 ("ruby-thor" ,ruby-thor)))
311 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
313 "This package provides a utility for dumping the contents of an
314 ElasticSearch index to a compressed file and restoring the dumpfile back to an
315 ElasticSearch server")
316 (home-page "https://github.com/patientslikeme/es_dump_restore")
317 (license license:expat)))
319 (define-public firebird
324 (let ((revision "33374-0"))
327 (uri (string-append "https://github.com/FirebirdSQL/"
328 "firebird/releases/download/R"
329 (string-replace-substring version "." "_") "/"
330 "Firebird-" version "." revision ".tar.bz2"))
332 (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c"))
333 (modules '((guix build utils)))
337 delete-file-recursively
338 (list "extern/btyacc/test" ; TODO: package and remove entirely
343 "src/include/firebird/impl/boost"
346 "builds/install/arch-specific/solaris"
348 "src/msgs/templates.sql"
350 ;; Generated files missing sources.
351 "doc/Firebird-3-QuickStart.pdf"
352 (string-append "doc/Firebird-" ,version
354 "doc/README.SecureRemotePassword.html"))
356 (build-system gnu-build-system)
357 (outputs (list "debug" "out"))
360 (let ((out (assoc-ref %outputs "out")))
361 (list (string-append "--with-fbsbin=" out "/sbin")
362 (string-append "--with-fbdoc=" out "/share/doc/"
364 (string-append "--with-fbconf=" out "/lib/firebird")
365 (string-append "--with-fbintl=" out "/lib/firebird/intl")
366 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
367 (string-append "--with-fbmsg=" out "/lib/firebird")
368 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
369 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
370 "--with-fbglock=/run/firebird"
371 "--with-fblog=/var/log/firebird"
372 "--with-fbhelp=/var/lib/firebird/system"
373 "--with-fbsecure-db=/var/lib/firebird/secure"
375 "--without-fbsample-db"
376 "--with-system-editline"))
378 (list (string-append "CC=" ,(cc-for-target))
379 ;; The plugins/ can't find libfbclient otherwise.
380 (string-append "LDFLAGS=-Wl,-rpath="
381 (assoc-ref %outputs "out") "/lib"))
382 #:tests? #f ; no test suite
383 #:modules ((guix build gnu-build-system)
387 (modify-phases %standard-phases
388 (add-after 'unpack 'use-system-boost
390 (substitute* "src/include/firebird/Message.h"
391 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
392 "<boost/preprocessor/seq/for_each_i.hpp>")
393 (("FB_BOOST_") "BOOST_"))
395 (add-after 'unpack 'patch-installation
398 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
399 (("/bin/sh") (which "bash"))
400 ;; Remove shell script helpers from $PATH.
401 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
402 ;; Put files where Guix users expect them.
403 (("(License\\.txt.*)@FB_CONFDIR" match)
404 (string-append match "@FB_DOCDIR@"))
405 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
406 (string-append "@FB_DOCDIR@" match))
407 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
408 (string-append head "@FB_DOCDIR@" tail "\n")))
410 (list "builds/install/posix-common/changeServerMode.sh.in"
411 "builds/install/posix-common/install.sh.in")
412 ;; Skip phases that (could) cause problems in Guix.
413 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
415 ;; Skip phases that are merely pointless on Guix.
416 (("buildUninstallFile|installInitdScript|startFirebird") ":")
417 ;; Omit randomly generated password with bonus timestamp.
418 (("setDBAPassword") ":"))
420 ;; These promote proprietary workflows not relevant on Guix.
421 (for-each delete-file-recursively
422 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))
424 (add-after 'configure 'delete-init-scripts
426 (delete-file-recursively "gen/install/misc")
428 (add-before 'build 'set-build-environment-variables
430 ;; ‘isql’ needs to run & find libfbclient.so during the build.
431 ;; This doubles as a rudimentary test in lieu of a test suite.
432 (setenv "LD_LIBRARY_PATH"
433 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))
435 (add-before 'install 'keep-embedded-debug-symbols
437 ;; Let the gnu-build-system separate & deal with them later.
438 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
439 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
440 (substitute* "gen/Makefile.install"
441 (("readelf") "false"))
443 (add-after 'install 'prune-undesirable-files
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let ((out (assoc-ref outputs "out")))
446 (with-directory-excursion out
447 ;; Remove example binaries.
448 (for-each delete-file-recursively
449 (find-files "." "example"))
450 ;; Delete (now-)empty directories.
452 (list "include/firebird/impl"
453 "lib/firebird/plugins/udr"))
457 ("editline" ,editline)
459 ("libtommath" ,libtommath)
462 (home-page "https://www.firebirdsql.org")
463 (synopsis "Relational database with many ANSI SQL standard features")
465 "Firebird is an SQL @acronym{RDBMS, relational database management system}
466 with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
467 @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
468 triggers. Transactions provide full ACID-compliant referential integrity.
470 The database requires very little manual maintenance once set up, making it
471 ideal for small business or embedded use.
473 When installed as a traditional local or remote (network) database server,
474 Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
475 may be a better choice for such very large environments.
477 Firebird can also be embedded into stand-alone applications that don't want or
478 need a full client & server. Used in this manner, it offers richer SQL support
479 than SQLite as well as the option to seamlessly migrate to a client/server
482 `((lint-hidden-cve . ("CVE-2017-6369"))))
484 ;; See doc/license/README.license.usage.txt for rationale & details.
485 (list license:bsd-3 ; src/common/sha2/
486 license:bsd-4 ; src/common/enc.cpp
487 license:gpl2+ ; builds/posix/make.defaults
488 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
489 "InterBase Public License v1.0")
490 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
491 "Initial Developer's Public License v1.0")
492 license:lgpl2.1 ; exception for OSI-compatible licences
493 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
494 license:public-domain)))) ; including files without explicit licence
496 (define-public leveldb
503 (url "https://github.com/google/leveldb")
505 (file-name (git-file-name name version))
508 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
509 (build-system cmake-build-system)
511 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
513 `(("snappy" ,snappy)))
514 (home-page "https://github.com/google/leveldb")
515 (synopsis "Fast key-value storage library")
517 "LevelDB is a fast key-value storage library that provides an ordered
518 mapping from string keys to string values.")
519 (license license:bsd-3)))
521 (define-public memcached
529 "https://memcached.org/files/memcached-" version ".tar.gz"))
531 (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
532 (build-system gnu-build-system)
534 `(("libevent" ,libevent)
535 ("cyrus-sasl" ,cyrus-sasl)))
536 (home-page "https://memcached.org/")
537 (synopsis "In-memory caching service")
538 (description "Memcached is an in-memory key-value store. It has a small
539 and generic API, and was originally intended for use with dynamic web
541 (license license:bsd-3)))
543 (define-public libmemcached
545 (name "libmemcached")
547 ;; We build from the sources since we want to build the extra HTML
548 ;; documentation which is not included with the release.
552 (url "lp:libmemcached/1.0")
553 (revision (string-append "tag:" version))))
554 (file-name (string-append name "-" version "-checkout"))
557 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
559 (search-patches "libmemcached-build-with-gcc7.patch"))))
560 (build-system gnu-build-system)
562 `(("memcached" ,memcached)
564 ("autoconf" ,autoconf)
565 ("automake" ,automake)
569 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
571 `(("libevent" ,libevent)
572 ("cyrus-sasl" ,cyrus-sasl)))
573 (outputs '("out" "doc"))
576 (modify-phases %standard-phases
577 (add-before 'bootstrap 'fix-configure.ac
578 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
579 ;; get the error ``configure: error: cannot find install-sh,
580 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
581 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
582 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
584 (delete-file "bootstrap.sh") ;not useful in the context of Guix
585 (substitute* "configure.ac"
586 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
587 (("(^AC_INIT.*)" anchor)
588 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
590 (add-before 'bootstrap 'disable-failing-tests
591 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
593 ;; Mark some heavily failing test suites as expected to fail.
594 (substitute* "Makefile.am"
595 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
596 (string-append xfail_tests " tests/testudp"
597 " tests/libmemcached-1.0/testapp"
598 " tests/libmemcached-1.0/testsocket")))
599 ;; Disable two tests of the unittest test suite.
600 (substitute* "libtest/unittest.cc"
601 ((".*echo_fubar_BINARY \\},.*") "")
602 ((".*application_doesnotexist_BINARY \\},.*") ""))
604 (add-after 'disable-dns-tests 'build-and-install-html-doc
605 (lambda* (#:key outputs #:allow-other-keys)
606 (let ((html (string-append (assoc-ref outputs "doc")
607 "/share/doc/libmemcached/html/")))
608 (invoke "make" "install-html")
609 ;; Cleanup useless files.
610 (for-each delete-file-recursively
611 (map (lambda (x) (string-append html x))
612 '("_sources" ".doctrees" ".buildinfo"))))
614 (home-page "https://libmemcached.org/")
615 (synopsis "C++ library for memcached")
616 (description "libMemcached is a library to use memcached in C/C++
617 applications. It comes with a complete reference guide and documentation of
618 the API, and provides features such as:
620 @item Asynchronous and synchronous transport support
621 @item Consistent hashing and distribution
622 @item Tunable hashing algorithm to match keys
623 @item Access to large object support
624 @item Local replication
626 (license license:bsd-3)))
628 (define-public python-pylibmc
630 (name "python-pylibmc")
635 (uri (pypi-uri "pylibmc" version))
637 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
638 (build-system python-build-system)
641 (modify-phases %standard-phases
642 (add-before 'check 'start-memcached-daemon
643 ;; The test suite requires a memcached server.
645 (invoke "memcached" "-d"))))))
647 `(("memcached" ,memcached)
648 ("python-nose" ,python-nose)))
650 `(("libmemcached" ,libmemcached)
652 ("cyrus-sasl" ,cyrus-sasl)))
653 (home-page "http://sendapatch.se/projects/pylibmc/")
654 (synopsis "Python client for memcached")
656 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
657 around TangentOrg’s libmemcached library, and can be used as a drop-in
658 replacement for the code@{python-memcached} library.")
659 (license license:bsd-3)))
661 (define-public python2-pylibmc
662 (package-with-python2 python-pylibmc))
664 (define-public mongodb
670 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
672 (file-name (string-append name "-" version ".tar.gz"))
674 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
675 (modules '((guix build utils)))
678 (for-each (lambda (dir)
679 (delete-file-recursively
680 (string-append "src/third_party/" dir)))
681 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
682 "valgrind-3.11.0" "wiredtiger"
683 "yaml-cpp-0.5.3" "zlib-1.2.8"))
687 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
688 (build-system scons-build-system)
690 `(("openssl" ,openssl-1.0)
692 ,@(match (%current-system)
693 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
694 `(("wiredtiger" ,wiredtiger)))
696 ("yaml-cpp" ,yaml-cpp)
700 `(("valgrind" ,valgrind)
703 ("python2-pymongo" ,python2-pymongo)
704 ("python2-pyyaml" ,python2-pyyaml)
705 ("tzdata" ,tzdata-for-tests)))
707 `(#:scons ,scons-python2
709 (let ((common-options
710 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
712 ;; wiredtiger is 64-bit only
713 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
715 '("i686-linux" "armhf-linux"))
717 ``"--use-system-wiredtiger")
719 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
720 ;; --use-system-boost
721 "--use-system-snappy"
723 "--use-system-valgrind"
724 ;; "--use-system-stemmer" TODO: Missing relevant package
726 "--disable-warnings-as-errors"
727 ,(format #f "--jobs=~a" (parallel-job-count))
729 (modify-phases %standard-phases
730 (add-after 'unpack 'patch
732 ;; Remove use of GNU extensions in parse_number_test.cpp, to
733 ;; allow compiling with GCC 7 or later
734 ;; https://jira.mongodb.org/browse/SERVER-28063
735 (substitute* "src/mongo/base/parse_number_test.cpp"
736 (("0xabcab\\.defdefP-10")
737 "687.16784283419838"))
739 (add-after 'unpack 'scons-propagate-environment
741 ;; Modify the SConstruct file to arrange for
742 ;; environment variables to be propagated.
743 (substitute* "SConstruct"
744 (("^env = Environment\\(")
745 "env = Environment(ENV=os.environ, "))
747 (add-after 'unpack 'create-version-file
749 (call-with-output-file "version.json"
751 (display ,(simple-format #f "{
757 (apply invoke `("scons"
759 "mongod" "mongo" "mongos"))))
761 (lambda* (#:key tests? inputs #:allow-other-keys)
763 (string-append (assoc-ref inputs "tzdata")
766 ;; Note that with the tests, especially the unittests, the
767 ;; build can take up to ~45GB of space, as many tests are
768 ;; individual executable files, with some being hundreds of
769 ;; megabytes in size.
770 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
771 (substitute* "build/unittests.txt"
772 ;; TODO: Don't run the async_stream_test, as it hangs
773 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
775 ;; TODO: This test fails
776 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
777 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
779 (invoke "python" "buildscripts/resmoke.py"
780 "--suites=dbtest,unittests"
781 (format #f "--jobs=~a" (parallel-job-count))))
784 (lambda* (#:key outputs #:allow-other-keys)
785 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
786 (install-file "mongod" bin)
787 (install-file "mongos" bin)
788 (install-file "mongo" bin))
790 (home-page "https://www.mongodb.org/")
791 (synopsis "High performance and high availability document database")
793 "Mongo is a high-performance, high availability, schema-free
794 document-oriented database. A key goal of MongoDB is to bridge the gap
795 between key/value stores (which are fast and highly scalable) and traditional
796 RDBMS systems (which are deep in functionality).")
797 (license (list license:agpl3
798 ;; Some parts are licensed under the Apache License
808 (uri (pypi-uri "mycli" version))
810 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
811 (build-system python-build-system)
813 `(#:tests? #f)) ; tests expect a running MySQL
815 `(("python-cli-helpers" ,python-cli-helpers)
816 ("python-click" ,python-click)
817 ("python-configobj" ,python-configobj)
818 ("python-cryptography" ,python-cryptography)
819 ("python-prompt-toolkit" ,python-prompt-toolkit)
820 ("python-pygments" ,python-pygments)
821 ("python-pymysql" ,python-pymysql)
822 ("python-sqlparse" ,python-sqlparse)))
823 (home-page "http://mycli.net")
825 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
827 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
828 auto-completion and syntax highlighting.")
829 (license license:bsd-3)))
831 ;; XXX When updating, check whether boost-for-mysql is still needed.
832 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
839 (uri (list (string-append
840 "https://dev.mysql.com/get/Downloads/MySQL-"
841 (version-major+minor version) "/"
842 name "-" version ".tar.gz")
844 "https://downloads.mysql.com/archives/get/file/"
845 name "-" version ".tar.gz")))
848 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
849 (build-system cmake-build-system)
852 '("-DBUILD_CONFIG=mysql_release"
855 "-DDEFAULT_CHARSET=utf8"
856 "-DDEFAULT_COLLATION=utf8_general_ci"
857 "-DMYSQL_DATADIR=/var/lib/mysql"
858 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
859 "-DINSTALL_INFODIR=share/mysql/docs"
860 "-DINSTALL_MANDIR=share/man"
861 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
862 "-DINSTALL_SCRIPTDIR=bin"
863 "-DINSTALL_INCLUDEDIR=include/mysql"
864 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
865 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
866 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
867 "-DINSTALL_DOCDIR=share/mysql/docs"
868 "-DINSTALL_SHAREDIR=share/mysql"
869 ;; Get rid of test data.
870 "-DINSTALL_MYSQLTESTDIR="
871 "-DINSTALL_SQLBENCHDIR=")
872 #:phases (modify-phases %standard-phases
874 'install 'remove-extra-binaries
875 (lambda* (#:key outputs #:allow-other-keys)
876 (let ((out (assoc-ref outputs "out")))
877 ;; Remove the 3 *_embedded files, which weigh in at
879 (for-each delete-file
880 (find-files (string-append out "/bin")
886 ("pkg-config" ,pkg-config)))
888 `(("boost" ,boost-for-mysql)
890 ("libtirpc" ,libtirpc)
893 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
895 (home-page "https://www.mysql.com/")
896 (synopsis "Fast, easy to use, and popular database")
898 "MySQL is a fast, reliable, and easy to use relational database
899 management system that supports the standardized Structured Query
901 (license license:gpl2)))
903 (define-public mariadb
909 (uri (string-append "https://downloads.mariadb.com/MariaDB"
910 "/mariadb-" version "/source/mariadb-"
914 "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
915 (modules '((guix build utils)))
918 ;; Delete bundled snappy and xz.
919 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
920 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
921 ;; This file checks that the bundled sources are present and
922 ;; declares build procedures for them.
923 (("^include\\(TokuThirdParty\\)") ""))
924 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
925 ;; Don't attempt to use the procedures we just removed.
926 ((" build_lzma build_snappy") ""))
928 ;; Preserve CMakeLists.txt for these.
929 (for-each (lambda (file)
930 (unless (string-suffix? "CMakeLists.txt" file)
932 (append (find-files "extra/wolfssl")
933 (find-files "zlib")))
935 (build-system cmake-build-system)
936 (outputs '("out" "lib" "dev"))
940 "-DBUILD_CONFIG=mysql_release"
941 ;; Linking with libarchive fails, like this:
943 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
944 ;; relocation R_X86_64_32 against `.bss' can not be used when
945 ;; making a shared object; recompile with -fPIC
947 ;; For now, disable the features that that use libarchive (xtrabackup).
948 "-DWITH_LIBARCHIVE=OFF"
950 ;; Disable the TokuDB engine, because its test suite frequently fails,
951 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
954 ;; Ensure the system libraries are used.
955 "-DWITH_JEMALLOC=yes"
960 "-DDEFAULT_CHARSET=utf8"
961 "-DDEFAULT_COLLATION=utf8_general_ci"
962 "-DMYSQL_DATADIR=/var/lib/mysql"
963 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
965 ;; Do not install the benchmark suite.
966 "-DINSTALL_SQLBENCHDIR=false"
968 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
969 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
971 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
973 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
975 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
976 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
977 "-DCMAKE_INSTALL_LIBDIR=lib"
978 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
979 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
981 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
983 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
985 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
986 "/share/mysql/support-files")
987 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
988 "-DINSTALL_SHAREDIR=share")
990 (modify-phases %standard-phases
991 (add-after 'unpack 'adjust-output-references
993 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
994 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
995 ;; not work when the latter uses an absolute file name.
996 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
997 (("%s/@INSTALL_INCLUDEDIR@")
998 (string-append "@INSTALL_INCLUDEDIR@"))
999 ;; As of 10.5.8, the mariadb_config program tries to be
1000 ;; clever and computes the installation directory relative
1001 ;; to /proc/self/exe when running on Linux. Make it fall
1002 ;; back to the old behaviour.
1003 (("defined\\(__linux__\\)")
1005 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
1006 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
1007 "@INSTALL_INCLUDEDIR@"))
1008 (substitute* "support-files/mariadb.pc.in"
1009 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
1010 (string-append dir "dir=")))
1011 (substitute* "include/CMakeLists.txt"
1012 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
1013 "${INSTALL_INCLUDEDIR}"))
1014 (substitute* "cmake/mariadb_connector_c.cmake"
1015 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
1016 "${INSTALL_BINDIR}"))
1018 (add-after 'unpack 'adjust-tests
1020 (let ((disabled-tests
1021 '(;; These fail because root@hostname == root@localhost in
1022 ;; the build environment, causing a user count mismatch.
1023 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
1024 "funcs_1.is_columns_mysql"
1026 "main.explain_non_select"
1028 "main.stat_tables_innodb"
1029 "main.upgrade_MDEV-19650"
1030 "roles.acl_statistics"
1032 ;; FIXME: This test checks various table encodings and
1033 ;; fails because Guix defaults to UTF8 instead of the
1034 ;; upstream default latin1_swedish_ci. It's not easily
1035 ;; substitutable because several encodings are tested.
1038 ;; XXX: This test occasionally fails on i686-linux:
1039 ;; <https://jira.mariadb.org/browse/MDEV-24458>
1040 ,@(if (string-prefix? "i686" (%current-system))
1041 '("main.myisampack")
1044 ;; This file contains a time bomb which makes it fail after
1045 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
1048 ;; This file contains a list of known-flaky tests for this
1049 ;; release. Append our own items.
1050 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
1051 (for-each (lambda (test)
1052 (format unstable-tests "~a : ~a\n"
1053 test "Disabled in Guix"))
1055 (close-port unstable-tests)
1057 ;; XXX: These fail because they expect a latin1 charset and
1058 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
1059 (substitute* '("mysql-test/main/gis_notembedded.result"
1060 "mysql-test/main/system_mysql_db.result")
1061 (("latin1_swedish_ci") "utf8_general_ci")
1062 (("\tlatin1") "\tutf8"))
1064 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
1068 (substitute* "mysql-test/mysql-test-run.pl"
1069 (("/bin/ls") (which "ls"))
1070 (("/bin/sh") (which "sh")))
1072 (add-before 'configure 'disable-plugins
1074 (let ((disable-plugin (lambda (name)
1075 (call-with-output-file
1076 (string-append "plugin/" name
1079 (format port "\n")))))
1080 (disabled-plugins '(;; XXX: Causes a test failure.
1082 (for-each disable-plugin disabled-plugins)
1085 (lambda* (#:key (tests? #t) #:allow-other-keys)
1087 (with-directory-excursion "mysql-test"
1088 (invoke "./mtr" "--verbose"
1090 "--testcase-timeout=40"
1091 "--suite-timeout=600"
1092 "--parallel" (number->string (parallel-job-count))
1093 ;; Skip the replication tests: they are very I/O
1094 ;; intensive and frequently causes indeterministic
1095 ;; failures even on powerful hardware.
1097 "--skip-test-list=unstable-tests"))
1098 (format #t "test suite not run~%"))
1101 'install 'post-install
1102 (lambda* (#:key inputs outputs #:allow-other-keys)
1103 (let* ((out (assoc-ref outputs "out"))
1104 (dev (assoc-ref outputs "dev"))
1105 (lib (assoc-ref outputs "lib"))
1106 (openssl (assoc-ref inputs "openssl")))
1107 (substitute* (list (string-append out "/bin/mariadb-install-db")
1108 (string-append out "/bin/mysql_install_db"))
1110 (string-append "basedir=\"" out "\""))
1111 (("\\$basedir/share/mysql")
1112 (string-append lib "/share/mysql")))
1114 (with-directory-excursion lib
1116 (delete-file-recursively "mysql-test")
1117 ;; Remove static libraries.
1118 (for-each delete-file (find-files "lib" "\\.a$")))
1120 (with-directory-excursion out
1121 (delete-file "share/man/man1/mysql-test-run.pl.1")
1122 ;; Delete huge and unnecessary executables.
1123 (for-each delete-file (find-files "bin" "test$")))
1124 (mkdir-p (string-append dev "/share"))
1125 (mkdir-p (string-append dev "/bin"))
1126 (rename-file (string-append lib "/bin/mariadbd")
1127 (string-append out "/bin/mariadbd"))
1128 (rename-file (string-append lib "/bin/mysqld")
1129 (string-append out "/bin/mysqld"))
1130 (mkdir-p (string-append dev "/lib"))
1131 (rename-file (string-append lib "/lib/pkgconfig")
1132 (string-append dev "/lib/pkgconfig"))
1133 (rename-file (string-append lib "/bin/mariadb_config")
1134 (string-append dev "/bin/mariadb_config"))
1135 (rename-file (string-append out "/bin/mysql_config")
1136 (string-append dev "/bin/mysql_config"))
1138 ;; Embed an absolute reference to OpenSSL in mysql_config
1139 ;; and the pkg-config file to avoid propagation.
1140 ;; XXX: how to do this for mariadb_config.c.in?
1141 (substitute* (list (string-append dev "/bin/mysql_config")
1142 (string-append dev "/lib/pkgconfig/mariadb.pc"))
1143 (("-lssl -lcrypto" all)
1144 (string-append "-L" openssl "/lib " all)))
1151 `(("jemalloc" ,jemalloc)
1153 ("libxml2" ,libxml2)
1154 ("ncurses" ,ncurses)
1155 ("openssl" ,openssl)
1160 ;; The test suite is very resource intensive and can take more than three
1161 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
1162 (properties '((timeout . 64800))) ;18 hours
1163 (home-page "https://mariadb.org/")
1164 (synopsis "SQL database server")
1166 "MariaDB is a multi-user and multi-threaded SQL database server, designed
1167 as a drop-in replacement of MySQL.")
1168 (license license:gpl2)))
1170 (define-public mariadb-connector-c
1172 (name "mariadb-connector-c")
1178 "https://downloads.mariadb.org/f/connector-c-" version
1179 "/mariadb-connector-c-" version "-src.tar.gz"
1180 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
1181 (file-name (string-append name "-" version ".tar.gz"))
1183 (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
1185 `(("openssl" ,openssl)))
1186 (build-system cmake-build-system)
1188 '(#:tests? #f)) ; no tests
1189 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1190 (synopsis "Client library to connect to MySQL or MariaDB")
1191 (description "The MariaDB Connector/C is used to connect applications
1192 developed in C/C++ to MariaDB and MySQL databases.")
1193 (license license:lgpl2.1+)))
1195 ;; Don't forget to update the other postgresql packages when upgrading this one.
1196 (define-public postgresql-13
1199 (replacement postgresql-13.2)
1203 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1204 version "/postgresql-" version ".tar.bz2"))
1207 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
1208 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1209 (build-system gnu-build-system)
1211 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
1212 ;; PostgreSQL installs its own Makefile (should it?).
1213 ;; Prevent it from retaining needless references to
1214 ;; the build tools in order to save size.
1215 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1218 (modify-phases %standard-phases
1219 (add-before 'configure 'patch-/bin/sh
1221 ;; Refer to the actual shell.
1222 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1223 "src/bin/psql/command.c")
1224 (("/bin/sh") (which "sh")))
1226 (add-after 'build 'build-contrib
1228 (invoke "make" "-C" "contrib")))
1229 (add-after 'install 'install-contrib
1231 (invoke "make" "-C" "contrib" "install"))))))
1233 `(("readline" ,readline)
1234 ("libuuid" ,util-linux "lib")
1235 ("openssl" ,openssl)
1237 (home-page "https://www.postgresql.org/")
1238 (synopsis "Powerful object-relational database system")
1240 "PostgreSQL is a powerful object-relational database system. It is fully
1241 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1242 stored procedures (in multiple languages). It includes most SQL:2008 data
1243 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1244 TIMESTAMP. It also supports storage of binary large objects, including
1245 pictures, sounds, or video.")
1246 (license (license:x11-style "file://COPYRIGHT"))))
1248 (define-public postgresql-13.2
1250 (inherit postgresql-13)
1255 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1256 version "/postgresql-" version ".tar.bz2"))
1259 "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz"))
1260 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
1262 (define-public postgresql-11
1264 (inherit postgresql-13)
1268 (inherit (package-source postgresql-13))
1269 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1270 version "/postgresql-" version ".tar.bz2"))
1273 "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20"))))))
1275 (define-public postgresql-10
1277 (inherit postgresql-11)
1280 (inherit (package-source postgresql-11))
1281 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1282 version "/postgresql-" version ".tar.bz2"))
1285 "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53"))))))
1287 (define-public postgresql-9.6
1289 (inherit postgresql-10)
1292 (inherit (package-source postgresql-10))
1293 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1294 version "/postgresql-" version ".tar.bz2"))
1297 "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk"))))))
1299 (define-public postgresql postgresql-13)
1301 (define-public pgloader
1309 (url "https://github.com/dimitri/pgloader")
1310 (commit (string-append "v" version))))
1312 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1313 (file-name (git-file-name name version))))
1314 (build-system gnu-build-system)
1316 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1317 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1318 ;; does not require Quicklisp workarounds. There is no `install' target
1319 ;; configured in Makefile.
1321 #:strip-binaries? #f
1323 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1325 (modify-phases %standard-phases
1327 (add-after 'unpack 'set-home
1329 (setenv "HOME" "/tmp")
1331 (add-after 'unpack 'patch-Makefile
1333 (substitute* "Makefile"
1334 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1337 (lambda* (#:key outputs #:allow-other-keys)
1338 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1340 (install-file "build/bin/pgloader" bin))
1343 `(("buildapp" ,buildapp)
1346 `(("alexandria" ,sbcl-alexandria)
1347 ("cl-abnf" ,sbcl-cl-abnf)
1348 ("cl-base64" ,sbcl-cl-base64)
1349 ("cl-csv" ,sbcl-cl-csv)
1350 ("cl-fad" ,sbcl-cl-fad)
1351 ("cl-log" ,sbcl-cl-log)
1352 ("cl-markdown" ,sbcl-cl-markdown)
1353 ("cl-mustache" ,sbcl-cl-mustache)
1354 ("cl-ppcre" ,sbcl-cl-ppcre)
1355 ("cl-sqlite" ,sbcl-cl-sqlite)
1356 ("closer-mop" ,sbcl-closer-mop)
1357 ("command-line-arguments" ,sbcl-command-line-arguments)
1359 ("drakma" ,sbcl-drakma)
1360 ("esrap" ,sbcl-esrap)
1361 ("flexi-streams" ,sbcl-flexi-streams)
1363 ("local-time" ,sbcl-local-time)
1364 ("lparallel" ,sbcl-lparallel)
1365 ("metabang-bind" ,sbcl-metabang-bind)
1366 ("mssql" ,sbcl-mssql)
1367 ("postmodern" ,sbcl-postmodern)
1368 ("py-configparser" ,sbcl-py-configparser)
1369 ("qmynd" ,sbcl-qmynd)
1371 ("split-sequence" ,sbcl-split-sequence)
1372 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1373 ("usocket" ,sbcl-usocket)
1375 ("yason" ,sbcl-yason)
1377 (home-page "https://pgloader.io/")
1378 (synopsis "Tool to migrate data to PostgreSQL")
1380 "@code{pgloader} is a program that can load data or migrate databases from
1381 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1382 (license (license:x11-style "file://LICENSE"))))
1384 (define-public python-pymysql
1386 (name "python-pymysql")
1391 (uri (pypi-uri "PyMySQL" version))
1393 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1394 (build-system python-build-system)
1396 `(("python-unittest2" ,python-unittest2)))
1398 `(("python-cryptography" ,python-cryptography)))
1400 `(#:tests? #f)) ; tests expect a running MySQL
1401 (home-page "https://github.com/PyMySQL/PyMySQL/")
1402 (synopsis "Pure-Python MySQL driver")
1404 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1405 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1406 (license license:expat)))
1408 (define-public python2-pymysql
1409 (package-with-python2 python-pymysql))
1418 (uri (string-append "http://fallabs.com/" name "/"
1419 name "-" version ".tar.gz"))
1422 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1423 (build-system gnu-build-system)
1425 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1426 (assoc-ref %outputs "out")
1428 #:make-flags (list "CFLAGS=-fPIC")))
1429 (home-page "https://fallabs.com/qdbm/")
1430 (synopsis "Key-value database")
1431 (description "QDBM is a library of routines for managing a
1432 database. The database is a simple data file containing key-value
1433 pairs. Every key and value is serial bytes with variable length.
1434 Binary data as well as character strings can be used as a key or a
1435 value. There is no concept of data tables or data types. Records are
1436 organized in a hash table or B+ tree.")
1437 (license license:lgpl2.1+)))
1439 (define-public recutils
1445 (uri (string-append "mirror://gnu/recutils/recutils-"
1449 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1450 (build-system gnu-build-system)
1452 (arguments '(#:configure-flags
1453 (list (string-append "--with-bash-headers="
1454 (assoc-ref %build-inputs "bash:include")
1457 (native-inputs `(("bc" ,bc)
1458 ("bash:include" ,bash "include")
1459 ("check" ,check-0.14)
1460 ("pkg-config" ,pkg-config)))
1462 ;; TODO: Add more optional inputs.
1463 (inputs `(("curl" ,curl)
1464 ("libgcrypt" ,libgcrypt)
1465 ("libuuid" ,util-linux "lib")))
1466 (synopsis "Manipulate plain text files as databases")
1468 "GNU Recutils is a set of tools and libraries for creating and
1469 manipulating text-based, human-editable databases. Despite being text-based,
1470 databases created with Recutils carry all of the expected features such as
1471 unique fields, primary keys, time stamps and more. Many different field
1472 types are supported, as is encryption.")
1473 (license license:gpl3+)
1474 (home-page "https://www.gnu.org/software/recutils/")))
1476 (define-public emacs-recutils
1479 (name "emacs-recutils")
1480 (build-system emacs-build-system)
1483 (modify-phases %standard-phases
1484 (add-after 'unpack 'change-directory
1490 (synopsis "Emacs mode for working with recutils database files")
1491 (description "This package provides an Emacs major mode @code{rec-mode}
1492 for working with GNU Recutils text-based, human-editable databases. It
1493 supports editing, navigation, and querying of recutils database files
1494 including field and record folding.")))
1496 (define-public rocksdb
1503 (url "https://github.com/facebook/rocksdb")
1504 (commit (string-append "v" version))))
1505 (file-name (git-file-name name version))
1508 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1509 (modules '((guix build utils)))
1512 ;; TODO: unbundle gtest.
1513 (delete-file "build_tools/gnu_parallel")
1514 (substitute* "Makefile"
1515 (("build_tools/gnu_parallel") "parallel"))
1517 (build-system gnu-build-system)
1519 `(#:make-flags (list "CC=gcc" "V=1"
1520 ;; Ceph requires that RTTI is enabled.
1522 "date=1970-01-01" ; build reproducibly
1523 (string-append "INSTALL_PATH="
1524 (assoc-ref %outputs "out"))
1526 ;; Running the full test suite takes hours and require
1527 ;; a lot of disk space. Instead we only run a subset
1528 ;; (see .travis.yml and Makefile).
1529 "ROCKSDBTESTS_END=db_tailing_iter_test")
1530 #:test-target "check_some"
1531 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1532 ;; this upstream, but it's not going to be supported any time soon.
1533 #:tests? (let ((system ,(or (%current-target-system)
1534 (%current-system))))
1535 (or (string-prefix? "x86_64-linux" system)
1536 (string-prefix? "aarch64-linux" system)))
1538 (modify-phases %standard-phases
1539 (add-after 'unpack 'patch-Makefile
1541 (substitute* "Makefile"
1542 ;; Don't depend on the static library when installing.
1543 (("install: install-static")
1544 "install: install-shared")
1545 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1548 ;; The default target is only needed for tests and built on demand.
1550 (add-before 'check 'disable-optimizations
1552 ;; Prevent the build from passing '-march=native' to the compiler.
1553 (setenv "PORTABLE" "1")
1555 (add-before 'check 'disable-failing-tests
1557 (substitute* "Makefile"
1558 ;; These tests reliably fail due to "Too many open files".
1559 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1560 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1562 (add-after 'check 'build
1563 ;; The default build target is a debug build for tests. The
1564 ;; install target depends on the "shared_lib" release target
1565 ;; so we build it here for clarity.
1566 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1567 (apply invoke "make" "shared_lib"
1568 `(,@(if parallel-build?
1569 `("-j" ,(number->string (parallel-job-count)))
1573 `(("parallel" ,parallel)
1576 ("python" ,python-2)
1581 ("jemalloc" ,jemalloc)
1585 (home-page "https://rocksdb.org/")
1586 (synopsis "Persistent key-value store for fast storage")
1588 "RocksDB is a library that forms the core building block for a fast
1589 key-value server, especially suited for storing data on flash drives. It
1590 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1591 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1592 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1593 compactions, making it specially suitable for storing multiple terabytes of
1594 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1595 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1596 ;; files carry the 3-clause BSD license.
1597 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1599 (define-public sparql-query
1601 (name "sparql-query")
1606 (url "https://github.com/tialaramex/sparql-query")
1609 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1610 (file-name (git-file-name name version))))
1611 (build-system gnu-build-system)
1615 ("libxml2" ,libxml2)
1616 ("ncurses" ,ncurses)
1617 ("readline" ,readline)))
1619 `(("pkg-config" ,pkg-config)))
1621 `(#:make-flags '("CC=gcc")
1623 (modify-phases %standard-phases
1625 ;; The Makefile uses git to obtain versioning information. This phase
1626 ;; substitutes the git invocation with the package version.
1627 (add-after 'unpack 'remove-git-dependency
1629 (substitute* "Makefile"
1631 (string-append "gitrev = \"v" ,version "\"")))
1633 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1634 ;; This replacement does the same thing, except for using $PREFIX/bin
1637 (lambda* (#:key outputs #:allow-other-keys)
1638 (let* ((out (assoc-ref outputs "out"))
1639 (bin (string-append out "/bin")))
1640 (install-file "sparql-query" bin)
1641 (symlink (string-append bin "/sparql-query")
1642 (string-append bin "/sparql-update")))
1645 (lambda* (#:key make-flags #:allow-other-keys)
1646 (apply invoke "make" `(,@make-flags "scan-test"))
1647 (invoke "./scan-test"))))))
1648 (home-page "https://github.com/tialaramex/sparql-query/")
1649 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1650 (description "Sparql-query is a command-line tool for accessing SPARQL
1651 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1652 tools for interrogating SQL databases. For example, you can enter a query over
1653 several lines, using a semi-colon at the end of a line to indicate the end of
1654 your query. It also supports readline so that you can more easily recall and
1655 edit previous queries, even across sessions. It can be used non-interactively,
1656 for example from a shell script.")
1657 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1658 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1659 (license (list license:gpl3+))))
1661 (define-public sqitch
1669 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1672 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1673 (build-system perl-build-system)
1676 (modify-phases %standard-phases
1677 (add-before 'check 'set-check-environment
1680 (setenv "HOME" "/tmp")
1682 (add-after 'install 'wrap-program
1683 (lambda* (#:key outputs #:allow-other-keys)
1684 (let* ((out (assoc-ref outputs "out"))
1685 (path (getenv "PERL5LIB")))
1686 (wrap-program (string-append out "/bin/sqitch")
1687 `("PERL5LIB" ":" prefix
1688 (,(string-append out "/lib/perl5/site_perl"
1693 `(("perl-capture-tiny" ,perl-capture-tiny)
1694 ("perl-io-pager" ,perl-io-pager)
1695 ("perl-module-build" ,perl-module-build)
1696 ("perl-module-runtime" ,perl-module-runtime)
1697 ("perl-path-class" ,perl-path-class)
1698 ("perl-test-deep" ,perl-test-deep)
1699 ("perl-test-dir" ,perl-test-dir)
1700 ("perl-test-exception" ,perl-test-exception)
1701 ("perl-test-file" ,perl-test-file)
1702 ("perl-test-file-contents" ,perl-test-file-contents)
1703 ("perl-test-mockmodule" ,perl-test-mockmodule)
1704 ("perl-test-mockobject" ,perl-test-mockobject)
1705 ("perl-test-nowarnings" ,perl-test-nowarnings)
1706 ("perl-test-warn" ,perl-test-warn)))
1708 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1709 ("perl-clone" ,perl-clone)
1710 ("perl-config-gitlike" ,perl-config-gitlike)
1711 ("perl-datetime" ,perl-datetime)
1712 ("perl-datetime-timezone" ,perl-datetime-timezone)
1713 ("perl-dbd-mysql" ,perl-dbd-mysql)
1714 ("perl-dbd-pg" ,perl-dbd-pg)
1715 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1716 ("perl-dbi" ,perl-dbi)
1717 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1718 ("perl-encode-locale" ,perl-encode-locale)
1719 ("perl-hash-merge" ,perl-hash-merge)
1720 ("perl-ipc-run3" ,perl-ipc-run3)
1721 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1722 ("perl-libintl-perl" ,perl-libintl-perl)
1723 ("perl-list-moreutils" ,perl-list-moreutils)
1724 ("perl-moo" ,perl-moo)
1725 ("perl-mysql-config" ,perl-mysql-config)
1726 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1727 ("perl-path-class" ,perl-path-class)
1728 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1729 ("perl-string-formatter" ,perl-string-formatter)
1730 ("perl-string-shellquote" ,perl-string-shellquote)
1731 ("perl-sub-exporter" ,perl-sub-exporter)
1732 ("perl-template-tiny" ,perl-template-tiny)
1733 ("perl-template-toolkit" ,perl-template-toolkit)
1734 ("perl-throwable" ,perl-throwable)
1735 ("perl-try-tiny" ,perl-try-tiny)
1736 ("perl-type-tiny" ,perl-type-tiny)
1737 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1738 ("perl-uri" ,perl-uri)
1739 ("perl-uri-db" ,perl-uri-db)))
1740 (home-page "https://sqitch.org/")
1741 (synopsis "Database change management tool")
1743 "Sqitch is a standalone change management system for database schemas,
1744 which uses SQL to describe changes.")
1745 (license license:x11)))
1747 (define-public sqlcrush
1748 ;; Unfortunately, there is no proper upstream release and may never be.
1749 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1753 (version (git-version "0.1.5" revision commit))
1757 (url "https://github.com/coffeeandscripts/sqlcrush")
1759 (file-name (git-file-name name version))
1762 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1763 (build-system python-build-system)
1765 `(("python-cryptography" ,python-cryptography)
1766 ("python-psycopg2" ,python-psycopg2)
1767 ("python-pymysql" ,python-pymysql)
1768 ("python-sqlalchemy" ,python-sqlalchemy)))
1769 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1770 (synopsis "Text console-based database viewer and editor")
1772 "SQLcrush lets you view and edit a database directly from the text
1773 console through an ncurses interface. You can explore each table's structure,
1774 browse and edit the contents, add and delete entries, all while tracking your
1776 (license license:gpl3+)))) ; no headers, see README.md
1784 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1788 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1789 (build-system gnu-build-system)
1792 (modify-phases %standard-phases
1794 (lambda* (#:key outputs #:allow-other-keys)
1795 (let ((out (assoc-ref outputs "out")))
1796 ;; The 'configure' script is a wrapper for Waf and
1797 ;; doesn't recognize things like '--enable-fast-install'.
1798 (invoke "./configure"
1799 (string-append "--prefix=" out))))))))
1801 `(;; TODO: Build the documentation.
1802 ;; ("docbook-xsl" ,docbook-xsl)
1803 ;; ("libxml2" ,libxml2)
1804 ;; ("libxslt" ,libxslt)
1805 ("python" ,python) ;for the Waf build system
1807 (home-page "https://tdb.samba.org/")
1808 (synopsis "Trivial database")
1810 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1811 and BSD's DB except that it allows multiple simultaneous writers and uses
1812 locking internally to keep writers from trampling on each other. TDB is also
1814 (license license:lgpl3+)))
1816 (define-public perl-dbi
1823 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1827 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1828 (build-system perl-build-system)
1829 (synopsis "Database independent interface for Perl")
1830 (description "This package provides an database interface for Perl.")
1831 (home-page "https://metacpan.org/release/DBI")
1832 (license license:perl-license)))
1834 (define-public perl-dbix-class
1836 (name "perl-dbix-class")
1837 (version "0.082842")
1841 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1842 "DBIx-Class-" version ".tar.gz"))
1844 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1845 (build-system perl-build-system)
1847 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1848 ("perl-file-temp" ,perl-file-temp)
1849 ("perl-module-install" ,perl-module-install)
1850 ("perl-package-stash" ,perl-package-stash)
1851 ("perl-test-deep" ,perl-test-deep)
1852 ("perl-test-exception" ,perl-test-exception)
1853 ("perl-test-warn" ,perl-test-warn)))
1855 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1856 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1857 ("perl-class-inspector" ,perl-class-inspector)
1858 ("perl-config-any" ,perl-config-any)
1859 ("perl-context-preserve" ,perl-context-preserve)
1860 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1861 ("perl-data-page" ,perl-data-page)
1862 ("perl-dbi" ,perl-dbi)
1863 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1864 ("perl-hash-merge" ,perl-hash-merge)
1865 ("perl-module-find" ,perl-module-find)
1866 ("perl-moo" ,perl-moo)
1867 ("perl-mro-compat" ,perl-mro-compat)
1868 ("perl-namespace-clean" ,perl-namespace-clean)
1869 ("perl-path-class" ,perl-path-class)
1870 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1871 ("perl-scope-guard" ,perl-scope-guard)
1872 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1873 ("perl-sub-name" ,perl-sub-name)
1874 ("perl-text-balanced" ,perl-text-balanced)
1875 ("perl-try-tiny" ,perl-try-tiny)))
1876 (home-page "https://metacpan.org/release/DBIx-Class")
1877 (synopsis "Extensible and flexible object <-> relational mapper")
1878 (description "An SQL to OO mapper with an object API inspired by
1879 Class::DBI (with a compatibility layer as a springboard for porting) and a
1880 resultset API that allows abstract encapsulation of database operations. It
1881 aims to make representing queries in your code as perl-ish as possible while
1882 still providing access to as many of the capabilities of the database as
1883 possible, including retrieving related records from multiple tables in a
1884 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1885 \"ORDER BY\" and \"HAVING\" support.")
1886 (license license:perl-license)))
1888 (define-public perl-dbix-class-cursor-cached
1890 (name "perl-dbix-class-cursor-cached")
1891 (version "1.001004")
1895 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1896 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1899 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1900 (build-system perl-build-system)
1902 `(("perl-cache-cache" ,perl-cache-cache)
1903 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1904 ("perl-module-install" ,perl-module-install)))
1906 `(("perl-carp-clan" ,perl-carp-clan)
1907 ("perl-dbix-class" ,perl-dbix-class)))
1908 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1909 (synopsis "Cursor with built-in caching support")
1910 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1911 built-in caching support.")
1912 (license license:perl-license)))
1914 (define-public perl-dbix-class-introspectablem2m
1916 (name "perl-dbix-class-introspectablem2m")
1917 (version "0.001002")
1921 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1922 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1925 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1926 (build-system perl-build-system)
1928 `(("perl-module-install" ,perl-module-install)))
1930 `(("perl-dbix-class" ,perl-dbix-class)))
1931 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1932 (synopsis "Introspect many-to-many relationships")
1933 (description "Because the many-to-many relationships are not real
1934 relationships, they can not be introspected with DBIx::Class. Many-to-many
1935 relationships are actually just a collection of convenience methods installed
1936 to bridge two relationships. This DBIx::Class component can be used to store
1937 all relevant information about these non-relationships so they can later be
1938 introspected and examined.")
1939 (license license:perl-license)))
1941 (define-public perl-dbix-class-schema-loader
1943 (name "perl-dbix-class-schema-loader")
1948 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1949 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1952 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1953 (build-system perl-build-system)
1955 `(("perl-config-any" ,perl-config-any)
1956 ("perl-config-general" ,perl-config-general)
1957 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1958 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1959 ("perl-module-install" ,perl-module-install)
1960 ("perl-moose" ,perl-moose)
1961 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1962 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1963 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1964 ("perl-test-deep" ,perl-test-deep)
1965 ("perl-test-differences" ,perl-test-differences)
1966 ("perl-test-exception" ,perl-test-exception)
1967 ("perl-test-pod" ,perl-test-pod)
1968 ("perl-test-warn" ,perl-test-warn)))
1970 `(("perl-class-unload" ,perl-class-unload)
1971 ("perl-class-inspector" ,perl-class-inspector)
1972 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1973 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1974 ("perl-carp-clan" ,perl-carp-clan)
1975 ("perl-data-dump" ,perl-data-dump)
1976 ("perl-dbix-class" ,perl-dbix-class)
1977 ("perl-hash-merge" ,perl-hash-merge)
1978 ("perl-list-moreutils" ,perl-list-moreutils)
1979 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1980 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1981 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1982 ("perl-namespace-clean" ,perl-namespace-clean)
1983 ("perl-mro-compat" ,perl-mro-compat)
1984 ("perl-scope-guard" ,perl-scope-guard)
1985 ("perl-string-camelcase" ,perl-string-camelcase)
1986 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1987 ("perl-sub-name" ,perl-sub-name)
1988 ("perl-try-tiny" ,perl-try-tiny)))
1989 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1990 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1991 (synopsis "Create a DBIx::Class::Schema based on a database")
1992 (description "DBIx::Class::Schema::Loader automates the definition of a
1993 DBIx::Class::Schema by scanning database table definitions and setting up the
1994 columns, primary keys, unique constraints and relationships.")
1995 (license license:perl-license)))
1997 (define-public perl-dbd-pg
1999 (name "perl-dbd-pg")
2004 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
2005 "DBD-Pg-" version ".tar.gz"))
2008 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
2009 (build-system perl-build-system)
2011 `(("perl-dbi" ,perl-dbi)))
2013 `(("perl-dbi" ,perl-dbi)
2014 ("postgresql" ,postgresql)))
2015 (home-page "https://metacpan.org/release/DBD-Pg")
2016 (synopsis "DBI PostgreSQL interface")
2017 (description "This package provides a PostgreSQL driver for the Perl5
2018 @dfn{Database Interface} (DBI).")
2019 (license license:perl-license)))
2021 (define-public perl-dbd-mysql
2023 (name "perl-dbd-mysql")
2028 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
2029 "DBD-mysql-" version ".tar.gz"))
2031 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
2032 (build-system perl-build-system)
2035 (modify-phases %standard-phases
2036 (add-before 'configure 'skip-library-detection
2037 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
2038 ;; are really only needed for the test suite; their absence does not
2039 ;; affect the build or the end result.
2041 (substitute* "Makefile.PL"
2042 (("use Devel::CheckLib;" match)
2043 (string-append "# " match))
2047 ;; Tests require running MySQL server.
2050 `(("perl-dbi" ,perl-dbi)
2051 ("mysql" ,mariadb "lib")
2052 ("mysql-dev" ,mariadb "dev")))
2053 (home-page "https://metacpan.org/release/DBD-mysql")
2054 (synopsis "DBI MySQL interface")
2055 (description "This package provides a MySQL driver for the Perl5
2056 @dfn{Database Interface} (DBI).")
2057 (license license:perl-license)))
2059 (define-public perl-dbd-sqlite
2061 (name "perl-dbd-sqlite")
2066 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
2070 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
2071 (build-system perl-build-system)
2072 (inputs `(("sqlite" ,sqlite)))
2073 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
2074 (synopsis "SQlite interface for Perl")
2075 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
2076 the entire thing in the distribution. So in order to get a fast transaction
2077 capable RDBMS working for your Perl project you simply have to install this
2078 module, and nothing else.")
2079 (license license:perl-license)
2080 (home-page "https://metacpan.org/release/DBD-SQLite")))
2082 (define-public perl-mysql-config
2084 (name "perl-mysql-config")
2090 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
2095 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
2096 (build-system perl-build-system)
2097 (home-page "https://metacpan.org/release/MySQL-Config")
2098 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
2100 "@code{MySQL::Config} emulates the @code{load_defaults} function from
2101 libmysqlclient. It will fill an array with long options, ready to be parsed by
2102 @code{Getopt::Long}.")
2103 (license license:perl-license)))
2105 (define-public perl-sql-abstract
2107 (name "perl-sql-abstract")
2112 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2113 "SQL-Abstract-" version ".tar.gz"))
2115 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
2116 (build-system perl-build-system)
2118 `(("perl-module-install" ,perl-module-install)
2119 ("perl-test-deep" ,perl-test-deep)
2120 ("perl-test-exception" ,perl-test-exception)
2121 ("perl-test-warn" ,perl-test-warn)))
2123 `(("perl-hash-merge" ,perl-hash-merge)
2124 ("perl-moo" ,perl-moo)
2125 ("perl-mro-compat" ,perl-mro-compat)
2126 ("perl-text-balanced" ,perl-text-balanced)))
2127 (home-page "https://metacpan.org/release/SQL-Abstract")
2128 (synopsis "Generate SQL from Perl data structures")
2129 (description "This module was inspired by the excellent DBIx::Abstract.
2130 While based on the concepts used by DBIx::Abstract, the concepts used have
2131 been modified to make the SQL easier to generate from Perl data structures.
2132 The underlying idea is for this module to do what you mean, based on the data
2133 structures you provide it, so that you don't have to modify your code every
2134 time your data changes.")
2135 (license license:perl-license)))
2137 (define-public perl-sql-abstract-classic
2139 (name "perl-sql-abstract-classic")
2144 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
2145 "SQL-Abstract-Classic-" version ".tar.gz"))
2147 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
2148 (build-system perl-build-system)
2150 `(("perl-test-deep" ,perl-test-deep)
2151 ("perl-test-exception" ,perl-test-exception)
2152 ("perl-test-warn" ,perl-test-warn)))
2154 `(("perl-mro-compat" ,perl-mro-compat)
2155 ("perl-sql-abstract" ,perl-sql-abstract)))
2156 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
2157 (synopsis "Generate SQL from Perl data structures")
2159 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
2160 to preserve the ability of users to opt into the new way of doing things in
2161 later versions according to their own schedules.
2163 It is an abstract SQL generation module based on the concepts used by
2164 @code{DBIx::Abstract}, with several important differences, especially when it
2165 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
2166 easier to generate from Perl data structures.
2168 The underlying idea is for this module to do what you mean, based on the data
2169 structures you provide it. You shouldn't have to modify your code every time
2170 your data changes, as this module figures it out.")
2171 (license license:perl-license)))
2173 (define-public perl-sql-splitstatement
2175 (name "perl-sql-splitstatement")
2180 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
2181 "SQL-SplitStatement-" version ".tar.gz"))
2184 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
2185 (build-system perl-build-system)
2187 `(("perl-test-exception" ,perl-test-exception)))
2189 `(("perl-class-accessor" ,perl-class-accessor)
2190 ("perl-list-moreutils" ,perl-list-moreutils)
2191 ("perl-regexp-common" ,perl-regexp-common)
2192 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2193 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2194 (synopsis "Split SQL code into atomic statements")
2195 (description "This module tries to split any SQL code, even including
2196 non-standard extensions, into the atomic statements it is composed of.")
2197 (license license:perl-license)))
2199 (define-public perl-sql-tokenizer
2201 (name "perl-sql-tokenizer")
2206 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2207 "SQL-Tokenizer-" version ".tar.gz"))
2210 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2211 (build-system perl-build-system)
2212 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2213 (synopsis "SQL tokenizer")
2214 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2215 claim to be a parser or query verifier. It just creates sane tokens from a
2217 (license license:perl-license)))
2219 (define-public unixodbc
2227 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2230 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2231 (build-system gnu-build-system)
2232 (synopsis "Data source abstraction library")
2233 (description "Unixodbc is a library providing an API with which to access
2234 data sources. Data sources include SQL Servers and any software with an ODBC
2236 (license license:lgpl2.1+)
2237 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2238 (home-page "http://www.unixodbc.org")))
2240 (define-public unqlite
2246 ;; Contains bug fixes against the official release, and has an
2247 ;; autotooled build system.
2248 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2250 "unqlite-unofficial-" version ".tar.gz"))
2253 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2254 (build-system gnu-build-system)
2255 (arguments `(#:tests? #f)) ;No check target
2256 (home-page "https://www.unqlite.org")
2257 (synopsis "In-memory key/value and document store")
2259 "UnQLite is an in-process software library which implements a
2260 self-contained, serverless, zero-configuration, transactional NoSQL
2261 database engine. UnQLite is a document store database similar to
2262 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2263 similar to BerkeleyDB, LevelDB, etc.")
2264 (license license:bsd-2)))
2266 (define-public redis
2272 (uri (string-append "http://download.redis.io/releases/redis-"
2276 "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9"))
2277 (modules '((guix build utils)))
2279 ;; Delete bundled jemalloc, as the package will use the libc one
2280 '(begin (delete-file-recursively "deps/jemalloc")
2282 (build-system gnu-build-system)
2284 `(("procps" ,procps) ; for tests
2285 ("tcl" ,tcl))) ; for tests
2288 (modify-phases %standard-phases
2290 (add-after 'unpack 'use-correct-tclsh
2291 (lambda* (#:key inputs #:allow-other-keys)
2292 (substitute* "runtest"
2294 (string-append "TCLSH="
2295 (assoc-ref inputs "tcl")
2298 (add-after 'unpack 'adjust-tests
2300 ;; Disable failing tests
2301 (substitute* "tests/test_helper.tcl"
2302 ((" integration/replication[^-]") "")
2303 ((" integration/replication-4") "")
2304 ((" integration/replication-psync") ""))
2306 #:make-flags `("CC=gcc"
2309 ,(string-append "PREFIX="
2310 (assoc-ref %outputs "out")))))
2311 (synopsis "Key-value cache and store")
2312 (description "Redis is an advanced key-value cache and store. Redis
2313 supports many data structures including strings, hashes, lists, sets, sorted
2314 sets, bitmaps and hyperloglogs.")
2315 (home-page "https://redis.io/")
2316 (license license:bsd-3)))
2318 (define-public kyotocabinet
2320 (name "kyotocabinet")
2324 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2325 "kyotocabinet-" version ".tar.gz"))
2328 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2329 (build-system gnu-build-system)
2333 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2334 (string-append "LDFLAGS=-Wl,-rpath="
2335 (assoc-ref %outputs "out") "/lib"))))
2336 (inputs `(("zlib" ,zlib)))
2337 (home-page "https://fallabs.com/kyotocabinet/")
2339 "Kyoto Cabinet is a modern implementation of the DBM database")
2341 "Kyoto Cabinet is a standalone file-based database that supports Hash
2342 and B+ Tree data storage models. It is a fast key-value lightweight
2343 database and supports many programming languages. It is a NoSQL database.")
2344 (license license:gpl3+)))
2346 (define-public tokyocabinet
2348 (name "tokyocabinet")
2353 (uri (string-append "http://fallabs.com/tokyocabinet/"
2354 name "-" version ".tar.gz"))
2357 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2358 (build-system gnu-build-system)
2361 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2362 (string-append "LDFLAGS=-Wl,-rpath="
2363 (assoc-ref %outputs "out") "/lib"))))
2366 (home-page "http://fallabs.com/tokyocabinet/")
2367 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2369 "Tokyo Cabinet is a library of routines for managing a database.
2370 The database is a simple data file containing records, each is a pair of a
2371 key and a value. Every key and value is serial bytes with variable length.
2372 Both binary data and character string can be used as a key and a value.
2373 There is neither concept of data tables nor data types. Records are
2374 organized in hash table, B+ tree, or fixed-length array.")
2375 (license license:lgpl2.1+)))
2377 (define-public wiredtiger
2384 "http://source.wiredtiger.com/releases/wiredtiger-"
2385 version ".tar.bz2"))
2388 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2389 (build-system gnu-build-system)
2391 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2393 (modify-phases %standard-phases
2394 (add-before 'check 'disable-test/fops
2396 ;; XXX: timed out after 3600 seconds of silence
2397 (substitute* "Makefile"
2403 ("snappy" ,snappy)))
2404 (home-page "http://source.wiredtiger.com/")
2405 (synopsis "NoSQL data engine")
2407 "WiredTiger is an extensible platform for data management. It supports
2408 row-oriented storage (where all columns of a row are stored together),
2409 column-oriented storage (where columns are stored in groups, allowing for
2410 more efficient access and storage of column subsets) and log-structured merge
2411 trees (LSM), for sustained throughput under random insert workloads.")
2412 (license license:gpl3) ; or GPL-2
2413 ;; configure.ac: WiredTiger requires a 64-bit build.
2414 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2416 (define-public wiredtiger-3
2418 (inherit wiredtiger)
2423 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2424 version ".tar.bz2"))
2427 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2429 (define-public guile-wiredtiger
2431 (name "guile-wiredtiger")
2436 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2437 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2438 (file-name (string-append name "-" version "-checkout"))
2441 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2442 (build-system gnu-build-system)
2444 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2446 (list (string-append "--with-libwiredtiger-prefix="
2447 (assoc-ref %build-inputs "wiredtiger")))
2448 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2450 `(("autoconf" ,autoconf)
2451 ("automake" ,automake)
2452 ("pkg-config" ,pkg-config)))
2454 `(("wiredtiger" ,wiredtiger-3)
2455 ("guile" ,guile-2.2)))
2457 `(("guile-bytestructures" ,guile-bytestructures)))
2458 (synopsis "WiredTiger bindings for GNU Guile")
2460 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2462 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2463 (license license:gpl3+)))
2465 (define-public perl-db-file
2467 (name "perl-db-file")
2472 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2475 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2476 (build-system perl-build-system)
2477 (inputs `(("bdb" ,bdb)))
2478 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2480 `(#:phases (modify-phases %standard-phases
2482 'configure 'modify-config.in
2483 (lambda* (#:key inputs #:allow-other-keys)
2484 (substitute* "config.in"
2485 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2487 (home-page "https://metacpan.org/release/DB_File")
2488 (synopsis "Perl5 access to Berkeley DB version 1.x")
2490 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2491 (license license:perl-license)))
2501 (url "https://git.openldap.org/openldap/openldap.git")
2502 (commit (string-append "LMDB_" version))))
2503 (file-name (git-file-name name version))
2505 (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as"))))
2506 (build-system gnu-build-system)
2508 `(#:test-target "test"
2510 (modify-phases %standard-phases
2512 (lambda* (#:key outputs #:allow-other-keys)
2513 (chdir "libraries/liblmdb")
2514 (substitute* "Makefile"
2515 (("/usr/local") (assoc-ref outputs "out")))
2517 (add-after 'install 'create-pkg-config-file
2518 (lambda* (#:key outputs #:allow-other-keys)
2519 (let ((out (assoc-ref outputs "out")))
2520 (mkdir-p (string-append out "/lib/pkgconfig"))
2521 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2523 (format #t "prefix=~a~@
2526 includedir=~a/include~@
2530 Description: Lightning Memory-Mapped Database library~@
2531 Libs: -L${libdir} -llmdb~@
2532 Cflags: -I${includedir}~%"
2533 out out out out ,version)))
2535 (home-page "https://symas.com/lmdb/")
2536 (synopsis "Lightning Memory-Mapped Database library")
2538 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2539 transactional database. Unlike more complex relational databases, LMDB handles
2540 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2541 underlying operating system for caching and locking, keeping the code small and
2543 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2544 disk-based databases with high read performance that scales linearly over
2545 multiple cores. The size of each database is limited only by the size of the
2546 virtual address space — not physical RAM.")
2547 (license license:openldap2.8)))
2549 (define-public lmdbxx
2552 (version "0.9.14.0")
2557 (url "https://github.com/drycpp/lmdbxx")
2559 (file-name (git-file-name name version))
2561 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2564 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2566 (modify-phases %standard-phases
2567 (delete 'configure))))
2568 (build-system gnu-build-system)
2569 (inputs `(("lmdb" ,lmdb)))
2570 (home-page "http://lmdbxx.sourceforge.net")
2571 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2572 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2573 @code{LMDB} embedded database library, offering both an error-checked
2574 procedural interface and an object-oriented resource interface with RAII
2576 (license license:unlicense)))
2578 (define-public libpqxx
2585 "http://pqxx.org/download/software/libpqxx/"
2586 name "-" version ".tar.gz"))
2589 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2590 (build-system gnu-build-system)
2592 `(("python" ,python-2)))
2593 (inputs `(("postgresql" ,postgresql)))
2595 `(#:tests? #f ; # FAIL: 1
2597 (modify-phases %standard-phases
2598 (add-before 'configure 'fix-sed-command
2600 ;; Newer sed versions error out if double brackets are not used.
2601 (substitute* "configure"
2602 (("\\[:space:\\]") "[[:space:]]"))
2604 (synopsis "C++ connector for PostgreSQL")
2606 "Libpqxx is a C++ library to enable user programs to communicate with the
2607 PostgreSQL database back-end. The database back-end can be local or it may be
2608 on another machine, accessed via TCP/IP.")
2609 (home-page "http://pqxx.org/")
2610 (license license:bsd-3)))
2612 (define-public python-peewee
2614 (name "python-peewee")
2619 (uri (pypi-uri "peewee" version))
2621 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2622 (build-system python-build-system)
2624 `(#:tests? #f)) ; fails to import test data
2626 `(("sqlite" ,sqlite)))
2628 `(("python-cython" ,python-cython)))
2629 (home-page "https://github.com/coleifer/peewee/")
2630 (synopsis "Small object-relational mapping utility")
2632 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2633 handles converting between pythonic values and those used by databases, so you
2634 can use Python types in your code without having to worry. It has built-in
2635 support for sqlite, mysql and postgresql. If you already have a database, you
2636 can autogenerate peewee models using @code{pwiz}, a model generator.")
2637 (license license:expat)))
2639 (define-public python2-peewee
2640 (package-with-python2 python-peewee))
2642 (define-public python-tortoise-orm
2644 (name "python-tortoise-orm")
2649 (uri (pypi-uri "tortoise-orm" version))
2652 "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
2653 (build-system python-build-system)
2655 `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
2657 #:phases (modify-phases %standard-phases
2658 (add-after 'unpack 'relax-version-requirements
2660 (substitute* "setup.py"
2661 (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
2662 (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite"))
2665 `(("python-asynctest" ,python-asynctest)
2666 ("python-nose2" ,python-nose2)))
2668 `(("python-aiosqlite" ,python-aiosqlite)
2669 ("python-pypika" ,python-pypika)
2670 ("python-ciso8601" ,python-ciso8601)
2671 ("python-typing-extensions"
2672 ,python-typing-extensions)))
2674 "https://github.com/tortoise/tortoise-orm")
2676 "Easy async ORM for python, built with relations in mind")
2678 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2679 inspired by Django. Tortoise ORM was build with relations in mind and
2680 admiration for the excellent and popular Django ORM. It’s engraved in its
2681 design that you are working not with just tables, you work with relational
2683 (license license:asl2.0)))
2685 (define-public sqlcipher
2692 (uri (string-append "https://github.com/sqlcipher/" name
2693 "/archive/v" version ".tar.gz"))
2695 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2696 (file-name (string-append name "-" version ".tar.gz"))))
2697 (build-system gnu-build-system)
2699 `(("libcrypto" ,openssl)
2700 ("libtcl8.6" ,tcl))) ; required for running the tests
2705 '("--enable-tempstore=yes"
2706 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2707 "LDFLAGS=-lcrypto -ltcl8.6"
2709 ;; tests cannot be run from the Makefile
2710 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2711 #:test-target "testfixture"
2713 (modify-phases %standard-phases
2714 (add-before 'check 'build-test-runner
2715 (assoc-ref %standard-phases 'check))
2718 (invoke "./testfixture" "test/crypto.test"))))))
2719 (home-page "https://www.zetetic.net/sqlcipher/")
2721 "Library providing transparent encryption of SQLite database files")
2722 (description "SQLCipher is an implementation of SQLite, extended to
2723 provide transparent 256-bit AES encryption of database files. Pages are
2724 encrypted before being written to disk and are decrypted when read back. It’s
2725 well suited for protecting embedded application databases and for mobile
2728 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2729 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2730 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2731 ;; source files are in the public domain.
2732 (license (list license:public-domain license:bsd-3))))
2734 (define-public python-pyodbc-c
2736 (name "python-pyodbc-c")
2741 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2742 "archive.tar.gz?ref=v" version))
2745 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2746 (file-name (string-append name "-" version ".tar.gz"))))
2747 (build-system python-build-system)
2749 `(("unixodbc" ,unixodbc)))
2751 `(;; No unit tests exist.
2753 (home-page "https://github.com/mkleehammer/pyodbc")
2754 (synopsis "Python ODBC Library")
2755 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2757 (license (license:x11-style "file://LICENSE.TXT"))))
2759 (define-public python2-pyodbc-c
2760 (package-with-python2 python-pyodbc-c))
2762 (define-public python-pyodbc
2764 (name "python-pyodbc")
2769 (uri (pypi-uri "pyodbc" version))
2771 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2772 (file-name (string-append name "-" version ".tar.gz"))))
2773 (build-system python-build-system)
2775 `(("unixodbc" ,unixodbc)))
2777 `(#:tests? #f)) ; no unit tests exist
2778 (home-page "https://github.com/mkleehammer/pyodbc")
2779 (synopsis "Python ODBC Library")
2780 (description "@code{python-pyodbc} provides a Python DB-API driver
2782 (license (license:x11-style "file:///LICENSE.TXT"))))
2784 (define-public python2-pyodbc
2785 (package-with-python2 python-pyodbc))
2787 (define-public mdbtools
2795 (url "https://github.com/brianb/mdbtools")
2797 (file-name (git-file-name name version))
2800 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2801 (build-system gnu-build-system)
2805 `(("autoconf" ,autoconf)
2806 ("automake" ,automake)
2807 ("libtool" ,libtool)
2808 ("pkg-config" ,pkg-config)
2809 ("txt2man" ,txt2man)
2811 (home-page "http://mdbtools.sourceforge.net/")
2812 (synopsis "Read Microsoft Access databases")
2813 (description "MDB Tools is a set of tools and applications to read the
2814 proprietary MDB file format used in Microsoft's Access database package. This
2815 includes programs to export schema and data from Microsoft's Access database
2816 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2817 etc., and an SQL engine for performing simple SQL queries.")
2818 (license (list license:lgpl2.0
2821 (define-public python-lmdb
2823 (name "python-lmdb")
2827 (uri (pypi-uri "lmdb" version))
2830 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2831 (modules '((guix build utils)))
2833 ;; Delete bundled lmdb source files.
2835 (for-each delete-file (list "lib/lmdb.h"
2840 (build-system python-build-system)
2845 (modify-phases %standard-phases
2846 (add-before 'build 'use-system-lmdb
2847 (lambda* (#:key inputs #:allow-other-keys)
2848 (let ((lmdb (assoc-ref inputs "lmdb")))
2849 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2850 (setenv "LMDB_FORCE_SYSTEM" "set")
2851 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2852 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2854 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2856 (home-page "https://github.com/dw/py-lmdb")
2857 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2859 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2860 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2862 (list license:openldap2.8
2863 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2864 ;; but not actually needed on platforms currently supported by Guix.
2867 (define-public python-orator
2869 (name "python-orator")
2873 (uri (pypi-uri "orator" version))
2876 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2877 (build-system python-build-system)
2878 ;; FIXME: Tests are not distributed with PyPI, and the repository
2879 ;; does not contain setup.py. How to test?
2880 (arguments '(#:tests? #f))
2882 `(("python-backpack" ,python-backpack)
2883 ("python-blinker" ,python-blinker)
2884 ("python-cleo" ,python-cleo)
2885 ("python-faker" ,python-faker)
2886 ("python-inflection" ,python-inflection)
2887 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2888 ("python-pendulum" ,python-pendulum)
2889 ("python-pyaml" ,python-pyaml)
2890 ("python-pygments" ,python-pygments)
2891 ("python-pyyaml" ,python-pyyaml)
2892 ("python-simplejson" ,python-simplejson)
2893 ("python-six" ,python-six)
2894 ("python-wrapt" ,python-wrapt)))
2895 (home-page "https://orator-orm.com/")
2896 (synopsis "ActiveRecord ORM for Python")
2898 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2899 implementation for Python.")
2900 (license license:expat)
2901 (properties `((python2-variant . ,(delay python2-orator))))))
2903 (define-public python2-orator
2904 (package-with-python2 (strip-python2-variant python-orator)))
2906 (define-public virtuoso-ose
2908 (name "virtuoso-ose")
2914 "https://github.com/openlink/virtuoso-opensource/releases/"
2915 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2917 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2918 (build-system gnu-build-system)
2920 `(#:tests? #f ; Tests require a network connection.
2921 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2922 ;; This indicates that the internal zlib code may still be used.
2923 #:configure-flags '("--without-internal-zlib"
2925 "--enable-static=no")
2927 (modify-phases %standard-phases
2928 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2929 ;; the build output. The following phase removes it.
2930 (add-after 'install 'remove-static-libs
2931 (lambda* (#:key outputs #:allow-other-keys)
2932 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2933 (for-each (lambda (file)
2934 (delete-file (string-append lib "/" file)))
2936 "libvirtuoso-t.la"))))))))
2938 `(("openssl" ,openssl-1.0)
2939 ("net-tools" ,net-tools)
2940 ("readline" ,readline)
2942 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2943 (synopsis "Multi-model database system")
2944 (description "Virtuoso is a scalable cross-platform server that combines
2945 relational, graph, and document data management with web application server
2946 and web services platform functionality.")
2947 ;; configure: error: ... can only be build on 64bit platforms
2948 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2949 (license license:gpl2)))
2951 (define-public python-ccm
2958 (uri (pypi-uri "ccm" version))
2961 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2962 (build-system python-build-system)
2964 `(("python-pyyaml" ,python-pyyaml)
2965 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2967 ("python-psutil" ,python-psutil)
2968 ("python-six" ,python-six)))
2969 (home-page "https://github.com/pcmanus/ccm")
2970 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2972 (description "Cassandra Cluster Manager is a development tool for testing
2973 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2975 (license license:asl2.0)))
2977 (define-public python2-ccm
2978 (package-with-python2 python-ccm))
2980 (define-public python2-pysqlite
2982 (name "python2-pysqlite")
2987 (uri (pypi-uri "pysqlite" version))
2990 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2991 (build-system python-build-system)
2993 `(("sqlite" ,sqlite)))
2995 `(#:python ,python-2 ; incompatible with Python 3
2996 #:tests? #f)) ; no test target
2997 (home-page "https://github.com/ghaering/pysqlite")
2998 (synopsis "SQLite bindings for Python")
3000 "Pysqlite provides SQLite bindings for Python that comply to the
3001 Database API 2.0T.")
3002 (license license:zlib)))
3004 (define-public python-sqlalchemy
3006 (name "python-sqlalchemy")
3011 (uri (pypi-uri "SQLAlchemy" version))
3013 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
3014 (build-system python-build-system)
3016 `(("python-cython" ,python-cython) ; for C extensions
3017 ("python-pytest" ,python-pytest)
3018 ("python-mock" ,python-mock))) ; for tests
3021 (modify-phases %standard-phases
3023 (lambda _ (invoke "py.test"))))))
3024 (home-page "https://www.sqlalchemy.org")
3025 (synopsis "Database abstraction library")
3027 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3028 gives application developers the full power and flexibility of SQL. It
3029 provides a full suite of well known enterprise-level persistence patterns,
3030 designed for efficient and high-performing database access, adapted into a
3031 simple and Pythonic domain language.")
3032 (license license:x11)))
3034 (define-public python2-sqlalchemy
3035 (package-with-python2 python-sqlalchemy))
3037 (define-public python-sqlalchemy-utils
3039 (name "python-sqlalchemy-utils")
3044 (uri (pypi-uri "SQLAlchemy-Utils" version))
3047 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
3048 (build-system python-build-system)
3050 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
3052 ;; (modify-phases %standard-phases
3055 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
3057 `(("python-six" ,python-six)
3058 ("python-sqlalchemy" ,python-sqlalchemy)))
3060 `(("python-dateutil" ,python-dateutil)
3061 ("python-flexmock" ,python-flexmock)
3062 ("python-psycopg2" ,python-psycopg2)
3063 ("python-pytest" ,python-pytest)
3064 ("python-pytz" ,python-pytz)))
3065 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3066 (synopsis "Various utility functions for SQLAlchemy")
3068 "SQLAlchemy-utils provides various utility functions and custom data types
3069 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3071 You might also want to install the following optional dependencies:
3073 @item @code{python-passlib}
3074 @item @code{python-babel}
3075 @item @code{python-cryptography}
3076 @item @code{python-pytz}
3077 @item @code{python-psycopg2}
3078 @item @code{python-furl}
3079 @item @code{python-flask-babel}
3082 (license license:bsd-3)))
3084 (define-public python2-sqlalchemy-utils
3085 (package-with-python2 python-sqlalchemy-utils))
3087 (define-public python-alchemy-mock
3089 (name "python-alchemy-mock")
3091 (home-page "https://github.com/miki725/alchemy-mock")
3094 (uri (pypi-uri "alchemy-mock" version))
3097 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
3098 (build-system python-build-system)
3100 '(#:phases (modify-phases %standard-phases
3103 ;; Create pytest.ini that adds doctest options to
3104 ;; prevent test failure. Taken from tox.ini.
3105 (call-with-output-file "pytest.ini"
3107 (format port "[pytest]
3108 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
3110 (invoke "pytest" "-vv" "--doctest-modules"
3111 "alchemy_mock/"))))))
3113 `(("python-mock" ,python-mock)
3114 ("python-pytest" ,python-pytest)))
3116 `(("python-six" ,python-six)
3117 ("python-sqlalchemy" ,python-sqlalchemy)))
3118 (synopsis "Mock helpers for SQLAlchemy")
3120 "This package provides mock helpers for SQLAlchemy that makes it easy
3121 to mock an SQLAlchemy session while preserving the ability to do asserts.
3123 Normally Normally SQLAlchemy's expressions cannot be easily compared as
3124 comparison on binary expression produces yet another binary expression, but
3125 this library provides functions to facilitate such comparisons.")
3126 (license license:expat)))
3128 (define-public python-alembic
3130 (name "python-alembic")
3135 (uri (pypi-uri "alembic" version))
3137 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
3138 (build-system python-build-system)
3140 '(#:phases (modify-phases %standard-phases
3143 (invoke "pytest" "-vv"))))))
3145 `(("python-mock" ,python-mock)
3146 ("python-pytest-cov" ,python-pytest-cov)))
3148 `(("python-dateutil" ,python-dateutil)
3149 ("python-sqlalchemy" ,python-sqlalchemy)
3150 ("python-mako" ,python-mako)
3151 ("python-editor" ,python-editor)))
3152 (home-page "https://bitbucket.org/zzzeek/alembic")
3153 (synopsis "Database migration tool for SQLAlchemy")
3155 "Alembic is a lightweight database migration tool for usage with the
3156 SQLAlchemy Database Toolkit for Python.")
3157 (license license:expat)))
3159 (define-public python2-alembic
3160 (package-with-python2 python-alembic))
3162 (define-public python-pickleshare
3164 (name "python-pickleshare")
3169 (uri (pypi-uri "pickleshare" version))
3171 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
3172 (build-system python-build-system)
3174 `(#:phases (modify-phases %standard-phases
3177 (invoke "pytest"))))))
3179 `(("python-pytest" ,python-pytest)))
3180 (home-page "https://github.com/vivainio/pickleshare")
3181 (synopsis "Tiny key value database with concurrency support")
3183 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
3184 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
3185 shelve, many processes can access the database simultaneously. Changing a
3186 value in database is immediately visible to other processes accessing the same
3187 database. Concurrency is possible because the values are stored in separate
3188 files. Hence the “database” is a directory where all files are governed by
3190 (properties `((python2-variant . ,(delay python2-pickleshare))))
3191 (license license:expat)))
3193 (define-public python2-pickleshare
3194 (let ((pickleshare (package-with-python2
3195 (strip-python2-variant python-pickleshare))))
3196 (package (inherit pickleshare)
3197 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3198 ,@(package-propagated-inputs pickleshare))))))
3200 (define-public python-apsw
3202 (name "python-apsw")
3203 (version "3.31.1-r1")
3207 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3208 "/download/" version "/apsw-" version ".zip"))
3211 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3212 (build-system python-build-system)
3214 `(("unzip" ,unzip)))
3216 `(("sqlite" ,sqlite)))
3219 (modify-phases %standard-phases
3222 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3224 (add-after 'build 'build-test-helper
3226 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3227 "-I." "-Isqlite3" "src/testextension.c")
3230 (lambda* (#:key inputs outputs #:allow-other-keys)
3231 (add-installed-pythonpath inputs outputs)
3232 (invoke "python" "setup.py" "test")
3234 (home-page "https://github.com/rogerbinns/apsw/")
3235 (synopsis "Another Python SQLite Wrapper")
3236 (description "APSW is a Python wrapper for the SQLite
3237 embedded relational database engine. In contrast to other wrappers such as
3238 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3239 translate the complete SQLite API into Python.")
3240 (license license:zlib)))
3242 (define-public python2-apsw
3243 (package-with-python2 python-apsw))
3245 (define-public python-aiosqlite
3247 (name "python-aiosqlite")
3252 (uri (pypi-uri "aiosqlite" version))
3255 "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph"))))
3256 (build-system python-build-system)
3258 '(#:phases (modify-phases %standard-phases
3260 (lambda* (#:key tests? #:allow-other-keys)
3262 (invoke "python" "-m" "unittest" "aiosqlite.tests")
3263 (format #t "test suite not run~%"))
3266 `(("python-typing-extensions" ,python-typing-extensions)))
3268 `(("python-aiounittest" ,python-aiounittest)))
3269 (home-page "https://github.com/jreese/aiosqlite")
3271 "Asyncio bridge for sqlite3")
3273 "The package aiosqlite replicates the standard sqlite3 module, but with
3274 async versions of all the standard connection and cursor methods, and context
3275 managers for automatically closing connections.")
3276 (license license:expat)))
3278 (define-public python2-neo4j-driver
3280 (name "python2-neo4j-driver")
3281 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3285 (uri (pypi-uri "neo4j-driver" version))
3288 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3289 (build-system python-build-system)
3291 `(#:python ,python-2))
3292 (home-page "https://neo4j.com/developer/python/")
3293 (synopsis "Neo4j driver code written in Python")
3294 (description "This package provides the Neo4j Python driver that connects
3295 to the database using Neo4j's binary protocol. It aims to be minimal, while
3296 being idiomatic to Python.")
3297 (license license:asl2.0)))
3299 (define-public python2-py2neo
3301 (name "python2-py2neo")
3305 (uri (pypi-uri "py2neo" version))
3308 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3309 (build-system python-build-system)
3311 `(#:python ,python-2))
3312 (home-page "https://py2neo.org")
3313 (synopsis "Library and toolkit for working with Neo4j in Python")
3314 (description "This package provides a client library and toolkit for
3315 working with Neo4j from within Python applications and from the command
3316 line. The core library has no external dependencies and has been carefully
3317 designed to be easy and intuitive to use.")
3318 (license license:asl2.0)))
3320 (define-public python-psycopg2
3322 (name "python-psycopg2")
3327 (uri (pypi-uri "psycopg2" version))
3329 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3330 (build-system python-build-system)
3332 ;; Tests would require a postgresql database "psycopg2_test"
3333 ;; and a running postgresql database management service.
3334 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3336 `(("postgresql" ,postgresql))) ; libpq
3337 (home-page "http://initd.org/psycopg/")
3338 (synopsis "Python PostgreSQL adapter")
3340 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3342 (license license:lgpl3+)))
3344 (define-public python2-psycopg2
3345 (package-with-python2 python-psycopg2))
3347 (define-public python-sadisplay
3349 (name "python-sadisplay")
3354 (uri (pypi-uri "sadisplay" version))
3357 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3358 (build-system python-build-system)
3360 `(("python-sqlalchemy" ,python-sqlalchemy)))
3363 `(("python-nose" ,python-nose)))
3364 (home-page "https://bitbucket.org/estin/sadisplay")
3365 (synopsis "SQLAlchemy schema displayer")
3366 (description "This package provides a program to build Entity
3367 Relationship diagrams from a SQLAlchemy model (or directly from the
3369 (license license:bsd-3)))
3371 (define-public python2-sadisplay
3372 (package-with-python2 python-sadisplay))
3374 (define-public yoyo-migrations
3376 (name "yoyo-migrations")
3380 ;; We use the upstream repository, as the tests are not included in the
3384 (url "https://hg.sr.ht/~olly/yoyo")
3385 (changeset (string-append "v" version "-release"))))
3386 (file-name (string-append name "-" version "-checkout"))
3388 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3389 (build-system python-build-system)
3391 ;; XXX: Tests require a connection to some pgsql database and psycopg
3392 ;; fails to connect to it.
3395 `(("python-sqlparse" ,python-sqlparse)
3396 ("python-tabulate" ,python-tabulate)))
3397 (home-page "https://ollycope.com/software/yoyo/latest/")
3398 (synopsis "Database migrations with SQL")
3400 "Yoyo is a database schema migration tool. Migrations are written as SQL
3401 files or Python scripts that define a list of migration steps.")
3402 (license license:asl2.0)))
3404 (define-public python-mysqlclient
3406 (name "python-mysqlclient")
3411 (uri (pypi-uri "mysqlclient" version))
3414 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3415 (build-system python-build-system)
3416 (arguments '(#:tests? #f)) ;XXX: requires a live database
3418 `(("mysql-dev" ,mariadb "dev")))
3419 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3420 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3421 (description "MySQLdb is an interface to the popular MySQL database server
3422 for Python. The design goals are:
3424 @item Compliance with Python database API version 2.0 [PEP-0249],
3425 @item Thread-safety,
3426 @item Thread-friendliness (threads will not block each other).
3428 (license license:gpl2)))
3430 (define-public python-hiredis
3432 (name "python-hiredis")
3437 (uri (pypi-uri "hiredis" version))
3440 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3441 (build-system python-build-system)
3445 (home-page "https://github.com/redis/hiredis-py")
3446 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3447 (description "Python-hiredis is a python extension that wraps protocol
3448 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3449 (license license:bsd-3)))
3451 (define-public python2-hiredis
3452 (package-with-python2 python-hiredis))
3454 (define-public python-fakeredis
3456 (name "python-fakeredis")
3461 (uri (pypi-uri "fakeredis" version))
3464 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3465 (build-system python-build-system)
3470 `(("python-sortedcontainers" ,python-sortedcontainers)))
3471 (home-page "https://github.com/jamesls/fakeredis")
3472 (synopsis "Fake implementation of redis API for testing purposes")
3474 "Fakeredis is a pure-Python implementation of the redis-py Python client
3475 that simulates talking to a redis server. It was created for a single purpose:
3476 to write unit tests.
3478 Setting up redis is not hard, but one often wants to write unit tests that don't
3479 talk to an external server such as redis. This module can be used as a
3480 reasonable substitute.")
3481 (license license:bsd-3)))
3483 (define-public python2-fakeredis
3484 (package-with-python2 python-fakeredis))
3486 (define-public python-redis
3488 (name "python-redis")
3493 (uri (pypi-uri "redis" version))
3495 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3496 (build-system python-build-system)
3497 ;; Tests require a running Redis server.
3498 (arguments '(#:tests? #f))
3499 ;; As long as we are not running test, we do not need this input :-)
3501 ;; `(("python-pytest" ,python-pytest)))
3502 (home-page "https://github.com/andymccurdy/redis-py")
3503 (synopsis "Redis Python client")
3505 "This package provides a Python interface to the Redis key-value store.")
3506 (license license:expat)))
3508 (define-public python2-redis
3509 (package-with-python2 python-redis))
3511 (define-public python-rq
3519 (url "https://github.com/rq/rq")
3520 (commit (string-append "v" version))))
3521 (file-name (git-file-name name version))
3523 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3524 (build-system python-build-system)
3526 '(#:phases (modify-phases %standard-phases
3527 (add-before 'check 'start-redis
3529 (invoke "redis-server" "--daemonize" "yes")))
3531 (lambda* (#:key outputs #:allow-other-keys)
3532 (let ((out (assoc-ref outputs "out")))
3533 ;; Drop test that needs the SDK for Sentry.io.
3534 (delete-file "tests/test_sentry.py")
3535 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3536 (setenv "PATH" (string-append out "/bin:"
3538 (invoke "pytest" "-vv")))))))
3540 `(("python-mock" ,python-mock)
3541 ("python-pytest" ,python-pytest)
3544 `(("python-click" ,python-click)
3545 ("python-redis" ,python-redis)))
3546 (home-page "https://python-rq.org/")
3547 (synopsis "Simple job queues for Python")
3549 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3550 processing them in the background with workers. It is backed by Redis and it
3551 is designed to have a low barrier to entry.")
3552 (license license:bsd-2)))
3554 (define-public python2-rq
3555 (package-with-python2 python-rq))
3557 (define-public python-rq-scheduler
3559 (name "python-rq-scheduler")
3561 (home-page "https://github.com/rq/rq-scheduler")
3566 (commit (string-append "v" version))))
3567 (file-name (git-file-name name version))
3570 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3571 (build-system python-build-system)
3573 '(#:phases (modify-phases %standard-phases
3574 (add-before 'check 'start-redis
3576 (invoke "redis-server" "--daemonize" "yes")))
3579 (substitute* "run_tests.py"
3582 (invoke "./run_tests.py"))))))
3587 `(("python-croniter" ,python-croniter)
3588 ("python-rq" ,python-rq)))
3589 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3591 "This package provides job scheduling capabilities to @code{python-rq}
3593 (license license:expat)))
3595 (define-public python-trollius-redis
3597 (name "python-trollius-redis")
3602 (uri (pypi-uri "trollius_redis" version))
3605 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3606 (build-system python-build-system)
3607 ;; TODO: Tests require packaging 'hiredis'.
3608 (arguments '(#:tests? #f))
3609 (home-page "https://github.com/benjolitz/trollius-redis")
3610 (synopsis "Port of asyncio-redis to trollius")
3611 (description "@code{trollius-redis} is a Redis client for Python
3612 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3614 (license license:bsd-2)))
3616 (define-public python2-trollius-redis
3617 (package-with-python2 python-trollius-redis))
3619 (define-public python-sqlparse
3621 (name "python-sqlparse")
3625 (uri (pypi-uri "sqlparse" version))
3628 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3629 (build-system python-build-system)
3632 (modify-phases %standard-phases
3634 (lambda _ (invoke "py.test"))))))
3636 `(("python-pytest" ,python-pytest)))
3637 (home-page "https://github.com/andialbrecht/sqlparse")
3638 (synopsis "Non-validating SQL parser")
3639 (description "Sqlparse is a non-validating SQL parser for Python. It
3640 provides support for parsing, splitting and formatting SQL statements.")
3641 (license license:bsd-3)))
3643 (define-public python2-sqlparse
3644 (package-with-python2 python-sqlparse))
3646 (define-public python-sql
3653 (uri (pypi-uri "python-sql" version))
3655 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3656 (build-system python-build-system)
3657 (home-page "https://python-sql.tryton.org/")
3658 (synopsis "Library to write SQL queries in a pythonic way")
3659 (description "@code{python-sql} is a library to write SQL queries, that
3660 transforms idiomatic python function calls to well-formed SQL queries.")
3661 (license license:bsd-3)))
3663 (define-public python2-sql
3664 (package-with-python2 python-sql))
3666 (define-public python-pypika
3668 (name "python-pypika")
3671 (origin (method git-fetch)
3673 (url "https://github.com/kayak/pypika")
3674 (commit (string-append "v" version))))
3675 (file-name (git-file-name name version))
3678 "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549"))))
3679 (build-system python-build-system)
3681 `(("python-parameterized" ,python-parameterized)))
3682 (home-page "https://github.com/kayak/pypika")
3683 (synopsis "SQL query builder API for Python")
3685 "PyPika is a python SQL query builder that exposes the full richness of
3686 the SQL language using a syntax that reflects the resulting query.")
3687 (license license:asl2.0)))
3689 (define-public mongo-tools
3691 (name "mongo-tools")
3694 (origin (method git-fetch)
3696 (url "https://github.com/mongodb/mongo-tools")
3697 (commit (string-append "r" version))))
3698 (file-name (git-file-name name version))
3701 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3702 (build-system go-build-system)
3704 `(#:import-path "github.com/mongodb/mongo-tools"
3705 #:modules ((srfi srfi-1)
3706 (guix build go-build-system)
3708 #:install-source? #f
3711 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3712 "mongoimport" "mongooplog" "mongorestore"
3713 "mongostat" "mongotop")))
3714 (modify-phases %standard-phases
3715 (add-after 'unpack 'delete-bundled-source-code
3717 (delete-file-recursively
3718 "src/github.com/mongodb/mongo-tools/vendor")
3720 (add-after 'delete-bundled-source-code 'patch-source
3722 ;; Remove a redundant argument that causes compilation to fail.
3724 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3725 (("skipping restore of system.profile collection\", db)")
3726 "skipping restore of system.profile collection\")"))
3730 (for-each (lambda (tool)
3733 ;; This is where the tests expect to find the
3735 "-o" ,(string-append
3736 "src/github.com/mongodb/mongo-tools/bin/"
3739 "-tags=\"ssl sasl\""
3741 "-extldflags=-Wl,-z,now,-z,relro"
3743 "src/github.com/mongodb/mongo-tools/"
3744 tool "/main/" tool ".go"))))
3745 (simple-format #t "build: running ~A\n"
3746 (string-join command))
3747 (apply invoke command)))
3752 (with-directory-excursion "src"
3753 (for-each (lambda (tool)
3756 (string-append "github.com/mongodb/mongo-tools/"
3761 (lambda* (#:key outputs #:allow-other-keys)
3762 (for-each (lambda (tool)
3764 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3766 (string-append (assoc-ref outputs "out")
3771 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3772 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3773 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3774 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3775 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3776 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3777 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3778 (home-page "https://github.com/mongodb/mongo-tools")
3779 (synopsis "Various tools for interacting with MongoDB and BSON")
3781 "This package includes a collection of tools related to MongoDB.
3784 Display BSON files in a human-readable format
3786 Convert data from JSON, TSV or CSV and insert them into a collection
3788 Write an existing collection to CSV or JSON format
3789 @item mongodump/mongorestore
3790 Dump MongoDB backups to disk in the BSON format
3792 Read MongoDB backups in the BSON format, and restore them to a live database
3794 Monitor live MongoDB servers, replica sets, or sharded clusters
3796 Read, write, delete, or update files in GridFS
3798 Replay oplog entries between MongoDB servers
3800 Monitor read/write activity on a mongo server
3802 (license license:asl2.0)))
3804 ;; There are many wrappers for this in other languages. When touching, please
3805 ;; be sure to ensure all dependencies continue to build.
3806 (define-public apache-arrow
3808 (name "apache-arrow")
3814 (url "https://github.com/apache/arrow")
3815 (commit (string-append "apache-arrow-" version))))
3816 (file-name (git-file-name name version))
3819 "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0"))))
3820 (build-system cmake-build-system)
3824 (modify-phases %standard-phases
3825 (add-before 'configure 'enter-source-directory
3826 (lambda _ (chdir "cpp") #t))
3827 (add-after 'unpack 'set-env
3829 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3830 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3831 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3832 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3834 #:build-type "Release"
3836 (list "-DARROW_PYTHON=ON"
3839 "-DARROW_PARQUET=ON"
3840 "-DPARQUET_BUILD_EXECUTABLES=ON"
3841 ;; The maintainers disallow using system versions of
3843 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3844 ;; is unfortunate because jemalloc increases performance:
3845 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3846 "-DARROW_JEMALLOC=OFF"
3848 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3849 ;; option that instructs the build system how to resolve
3850 ;; each dependency. SYSTEM = Finding the dependency in
3851 ;; system paths using CMake's built-in find_package
3852 ;; function, or using pkg-config for packages that do not
3853 ;; have this feature
3854 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3856 ;; Split output into its component packages.
3857 (string-append "-DCMAKE_INSTALL_PREFIX="
3858 (assoc-ref %outputs "lib"))
3859 (string-append "-DCMAKE_INSTALL_RPATH="
3860 (assoc-ref %outputs "lib")
3862 (string-append "-DCMAKE_INSTALL_BINDIR="
3863 (assoc-ref %outputs "out")
3865 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3866 (assoc-ref %outputs "include")
3870 "-DARROW_WITH_SNAPPY=ON"
3871 "-DARROW_WITH_ZLIB=ON"
3872 "-DARROW_WITH_ZSTD=ON"
3873 "-DARROW_WITH_LZ4=ON"
3874 "-DARROW_COMPUTE=ON"
3876 "-DARROW_DATASET=ON"
3877 "-DARROW_FILESYSTEM=ON"
3880 ;; Arrow Python C++ integration library (required for
3881 ;; building pyarrow). This library must be built against
3882 ;; the same Python version for which you are building
3883 ;; pyarrow. NumPy must also be installed. Enabling this
3884 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3885 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3889 ;; Building the tests forces on all the
3890 ;; optional features and the use of static
3892 "-DARROW_BUILD_TESTS=OFF"
3893 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3894 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3895 "-DARROW_BUILD_STATIC=OFF")))
3897 `(("apache-thrift" ,apache-thrift "lib")
3899 ("brotli" ,google-brotli)
3901 ("double-conversion" ,double-conversion)
3906 ("protobuf" ,protobuf)
3907 ("python-3" ,python)
3908 ("python-numpy" ,python-numpy)
3909 ("rapidjson" ,rapidjson)
3912 ("utf8proc" ,utf8proc)
3914 ("zstd" ,zstd "lib")))
3916 `(("pkg-config" ,pkg-config)))
3917 (outputs '("out" "lib" "include"))
3918 (home-page "https://arrow.apache.org/")
3919 (synopsis "Columnar in-memory analytics")
3920 (description "Apache Arrow is a columnar in-memory analytics layer
3921 designed to accelerate big data. It houses a set of canonical in-memory
3922 representations of flat and hierarchical data along with multiple
3923 language-bindings for structure manipulation. It also provides IPC and common
3924 algorithm implementations.")
3925 (license license:asl2.0)))
3927 (define-public python-pyarrow
3929 (inherit apache-arrow)
3930 (name "python-pyarrow")
3931 (build-system python-build-system)
3933 '(#:tests? #f ; XXX There are no tests in the "python" directory
3935 (modify-phases %standard-phases
3936 (delete 'build) ; XXX the build is performed again during the install phase
3937 (add-after 'unpack 'enter-source-directory
3938 (lambda _ (chdir "python") #t))
3939 (add-after 'unpack 'make-git-checkout-writable
3941 (for-each make-file-writable (find-files "."))
3944 `(("apache-arrow" ,apache-arrow "lib")
3945 ("python-numpy" ,python-numpy)
3946 ("python-pandas" ,python-pandas)
3947 ("python-six" ,python-six)))
3949 `(("cmake" ,cmake-minimal)
3950 ("pkg-config" ,pkg-config)
3951 ("python-cython" ,python-cython)
3952 ("python-pytest" ,python-pytest)
3953 ("python-pytest-runner" ,python-pytest-runner)
3954 ("python-setuptools-scm" ,python-setuptools-scm)))
3956 (home-page "https://arrow.apache.org/docs/python/")
3957 (synopsis "Python bindings for Apache Arrow")
3959 "This library provides a Pythonic API wrapper for the reference Arrow C++
3960 implementation, along with tools for interoperability with pandas, NumPy, and
3961 other traditional Python scientific computing packages.")
3962 (license license:asl2.0)))
3964 (define-public python-crate
3966 (name "python-crate")
3970 (uri (pypi-uri "crate" version))
3973 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3974 (build-system python-build-system)
3976 `(("python-urllib3" ,python-urllib3)))
3977 (home-page "https://github.com/crate/crate-python")
3978 (synopsis "CrateDB Python client")
3980 "This package provides a Python client library for CrateDB.
3981 It implements the Python DB API 2.0 specification and includes support for
3983 (license license:asl2.0)))
3985 (define-public libdbi
3991 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3992 version "/libdbi-" version ".tar.gz"))
3995 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3996 (build-system gnu-build-system)
3997 (synopsis "Database independent abstraction layer in C")
3999 "This library implements a database independent abstraction layer in C,
4000 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
4001 programmers can leverage the power of multiple databases and multiple
4002 simultaneous database connections by using this framework.")
4003 (home-page "http://libdbi.sourceforge.net/")
4004 (license license:lgpl2.1+)))
4006 (define-public libdbi-drivers
4008 (name "libdbi-drivers")
4012 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
4013 "libdbi-drivers/libdbi-drivers-" version
4014 "/libdbi-drivers-" version ".tar.gz"))
4017 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
4018 (build-system gnu-build-system)
4021 ("inetutils" ,inetutils)
4022 ("glibc-locales" ,glibc-locales)
4023 ("mariadb" ,mariadb)))
4025 `(("libdbi" ,libdbi)
4026 ("mariadb:dev" ,mariadb "dev")
4027 ("mariadb:lib" ,mariadb "lib")
4028 ("postgresql" ,postgresql)
4029 ("sqlite" ,sqlite)))
4032 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
4033 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
4034 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
4035 (postgresql (assoc-ref %build-inputs "postgresql"))
4036 (sqlite (assoc-ref %build-inputs "sqlite")))
4037 (list "--disable-docs"
4038 (string-append "--with-dbi-incdir=" libdbi "/include")
4039 (string-append "--with-dbi-libdir=" libdbi "/lib")
4041 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
4042 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
4044 (string-append "--with-pgsql-incdir=" postgresql "/include")
4045 (string-append "--with-pgsql-libdir=" postgresql "/lib")
4047 (string-append "--with-sqlite-incdir=" sqlite "/include")
4048 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
4049 #:tests? #f ; FIXME: Find why the tests get stuck forever.
4051 (modify-phases %standard-phases
4052 (add-after 'unpack 'fix-tests
4053 (lambda* (#:key inputs #:allow-other-keys)
4054 (substitute* "tests/test_mysql.sh"
4056 (string-append "MYMYSQLD="
4057 (assoc-ref inputs "mariadb")
4060 (add-after 'install 'remove-empty-directories
4061 (lambda* (#:key outputs #:allow-other-keys)
4062 (let ((var (string-append (assoc-ref outputs "out") "/var")))
4063 (delete-file-recursively var))
4065 (synopsis "Database drivers for the libdbi framework")
4067 "The @code{libdbi-drivers} library provides the database specific drivers
4068 for the @code{libdbi} framework.
4070 The drivers officially supported by @code{libdbi} are:
4076 (home-page "http://libdbi-drivers.sourceforge.net/")
4077 (license license:lgpl2.1+)))
4086 (url "https://github.com/SOCI/soci/")
4088 (file-name (git-file-name name version))
4091 "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp"))))
4092 (build-system cmake-build-system)
4094 `(("firebird" ,firebird)
4095 ("postgresql" ,postgresql)
4099 ("mariadb:dev" ,mariadb "dev")))
4102 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
4103 (list "-DCMAKE_CXX_STANDARD=17"
4104 "-DSOCI_LIBDIR=lib")
4105 #:tests? #f)) ; may require running database management systems
4106 (synopsis "C++ Database Access Library")
4108 "SOCI is an abstraction layer for several database backends, including
4109 PostreSQL, SQLite, ODBC and MySQL.")
4110 (home-page "http://soci.sourceforge.net/")
4111 (license license:boost1.0)))
4113 (define-public freetds
4120 (uri (string-append "https://www.freetds.org/files/stable/"
4121 "freetds-" version ".tar.gz"))
4123 (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50"))))
4124 (build-system gnu-build-system)
4126 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
4127 ;; disabled for now.
4129 (home-page "https://www.freetds.org/")
4130 (synopsis "Client libraries for MS SQL and Sybase servers")
4132 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
4133 connecting to MS SQL and Sybase servers over TCP/IP.")
4134 (license license:lgpl2.0+)))