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 "0y1669sqj8wyf0y0njhxs4qhn1qzjhrs2h2qllya5samxrlrjhkg"))
675 (modules '((guix build utils)))
678 (for-each (lambda (dir)
679 (delete-file-recursively
680 (string-append "src/third_party/" dir)))
681 '("pcre-8.42" "scons-2.5.0" "snappy-1.1.3"
682 "valgrind-3.11.0" "wiredtiger"
683 "yaml-cpp-0.6.2" "zlib-1.2.11"))
685 (build-system scons-build-system)
687 `(("openssl" ,openssl-1.0)
689 ,@(match (%current-system)
690 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
691 `(("wiredtiger" ,wiredtiger)))
693 ("yaml-cpp" ,yaml-cpp)
697 `(("valgrind" ,valgrind)
700 ("python2-pymongo" ,python2-pymongo)
701 ("python2-pyyaml" ,python2-pyyaml)
702 ("tzdata" ,tzdata-for-tests)))
704 `(#:scons ,scons-python2
706 (let ((common-options
707 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
709 ;; wiredtiger is 64-bit only
710 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
712 '("i686-linux" "armhf-linux"))
714 ``"--use-system-wiredtiger")
716 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
717 ;; --use-system-boost
718 "--use-system-snappy"
720 "--use-system-valgrind"
721 ;; "--use-system-stemmer" TODO: Missing relevant package
723 "--disable-warnings-as-errors"
724 ,(format #f "--jobs=~a" (parallel-job-count))
726 (modify-phases %standard-phases
727 (add-after 'unpack 'patch
729 ;; Remove use of GNU extensions in parse_number_test.cpp, to
730 ;; allow compiling with GCC 7 or later
731 ;; https://jira.mongodb.org/browse/SERVER-28063
732 (substitute* "src/mongo/base/parse_number_test.cpp"
733 (("0xabcab\\.defdefP-10")
734 "687.16784283419838"))
736 (add-after 'unpack 'scons-propagate-environment
738 ;; Modify the SConstruct file to arrange for
739 ;; environment variables to be propagated.
740 (substitute* "SConstruct"
741 (("^env = Environment\\(")
742 "env = Environment(ENV=os.environ, "))
744 (add-after 'unpack 'create-version-file
746 (call-with-output-file "version.json"
748 (display ,(simple-format #f "{
754 (apply invoke `("scons"
756 "mongod" "mongo" "mongos"))))
758 (lambda* (#:key tests? inputs #:allow-other-keys)
760 (string-append (assoc-ref inputs "tzdata")
763 ;; Note that with the tests, especially the unittests, the
764 ;; build can take up to ~45GB of space, as many tests are
765 ;; individual executable files, with some being hundreds of
766 ;; megabytes in size.
767 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
768 (substitute* "build/unittests.txt"
769 ;; TODO: Don't run the async_stream_test, as it hangs
770 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
772 ;; TODO: This test fails
773 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
774 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
776 (invoke "python" "buildscripts/resmoke.py"
777 "--suites=dbtest,unittests"
778 (format #f "--jobs=~a" (parallel-job-count))))
781 (lambda* (#:key outputs #:allow-other-keys)
782 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
783 (install-file "mongod" bin)
784 (install-file "mongos" bin)
785 (install-file "mongo" bin))
787 (home-page "https://www.mongodb.org/")
788 (synopsis "High performance and high availability document database")
790 "Mongo is a high-performance, high availability, schema-free
791 document-oriented database. A key goal of MongoDB is to bridge the gap
792 between key/value stores (which are fast and highly scalable) and traditional
793 RDBMS systems (which are deep in functionality).")
794 (license (list license:agpl3
795 ;; Some parts are licensed under the Apache License
805 (uri (pypi-uri "mycli" version))
807 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
808 (build-system python-build-system)
810 `(#:tests? #f)) ; tests expect a running MySQL
812 `(("python-cli-helpers" ,python-cli-helpers)
813 ("python-click" ,python-click)
814 ("python-configobj" ,python-configobj)
815 ("python-cryptography" ,python-cryptography)
816 ("python-prompt-toolkit" ,python-prompt-toolkit)
817 ("python-pygments" ,python-pygments)
818 ("python-pymysql" ,python-pymysql)
819 ("python-sqlparse" ,python-sqlparse)))
820 (home-page "http://mycli.net")
822 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
824 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
825 auto-completion and syntax highlighting.")
826 (license license:bsd-3)))
828 ;; XXX When updating, check whether boost-for-mysql is still needed.
829 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
836 (uri (list (string-append
837 "https://dev.mysql.com/get/Downloads/MySQL-"
838 (version-major+minor version) "/"
839 name "-" version ".tar.gz")
841 "https://downloads.mysql.com/archives/get/file/"
842 name "-" version ".tar.gz")))
845 "1bb343mf7n0qg2qz497gxjsqprygrjz1q1pbz76hgqxnsy08sfxd"))))
846 (build-system cmake-build-system)
849 '("-DBUILD_CONFIG=mysql_release"
852 "-DDEFAULT_CHARSET=utf8"
853 "-DDEFAULT_COLLATION=utf8_general_ci"
854 "-DMYSQL_DATADIR=/var/lib/mysql"
855 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
856 "-DINSTALL_INFODIR=share/mysql/docs"
857 "-DINSTALL_MANDIR=share/man"
858 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
859 "-DINSTALL_SCRIPTDIR=bin"
860 "-DINSTALL_INCLUDEDIR=include/mysql"
861 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
862 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
863 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
864 "-DINSTALL_DOCDIR=share/mysql/docs"
865 "-DINSTALL_SHAREDIR=share/mysql"
866 ;; Get rid of test data.
867 "-DINSTALL_MYSQLTESTDIR="
868 "-DINSTALL_SQLBENCHDIR=")
869 #:phases (modify-phases %standard-phases
871 'install 'remove-extra-binaries
872 (lambda* (#:key outputs #:allow-other-keys)
873 (let ((out (assoc-ref outputs "out")))
874 ;; Remove the 3 *_embedded files, which weigh in at
876 (for-each delete-file
877 (find-files (string-append out "/bin")
883 ("pkg-config" ,pkg-config)))
885 `(("boost" ,boost-for-mysql)
887 ("libtirpc" ,libtirpc)
890 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
892 (home-page "https://www.mysql.com/")
893 (synopsis "Fast, easy to use, and popular database")
895 "MySQL is a fast, reliable, and easy to use relational database
896 management system that supports the standardized Structured Query
898 (license license:gpl2)))
900 (define-public mariadb
906 (uri (string-append "https://downloads.mariadb.com/MariaDB"
907 "/mariadb-" version "/source/mariadb-"
911 "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
912 (modules '((guix build utils)))
915 ;; Delete bundled snappy and xz.
916 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
917 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
918 ;; This file checks that the bundled sources are present and
919 ;; declares build procedures for them.
920 (("^include\\(TokuThirdParty\\)") ""))
921 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
922 ;; Don't attempt to use the procedures we just removed.
923 ((" build_lzma build_snappy") ""))
925 ;; Preserve CMakeLists.txt for these.
926 (for-each (lambda (file)
927 (unless (string-suffix? "CMakeLists.txt" file)
929 (append (find-files "extra/wolfssl")
930 (find-files "zlib")))
932 (build-system cmake-build-system)
933 (outputs '("out" "lib" "dev"))
937 "-DBUILD_CONFIG=mysql_release"
938 ;; Linking with libarchive fails, like this:
940 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
941 ;; relocation R_X86_64_32 against `.bss' can not be used when
942 ;; making a shared object; recompile with -fPIC
944 ;; For now, disable the features that that use libarchive (xtrabackup).
945 "-DWITH_LIBARCHIVE=OFF"
947 ;; Disable the TokuDB engine, because its test suite frequently fails,
948 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
951 ;; Ensure the system libraries are used.
952 "-DWITH_JEMALLOC=yes"
957 "-DDEFAULT_CHARSET=utf8"
958 "-DDEFAULT_COLLATION=utf8_general_ci"
959 "-DMYSQL_DATADIR=/var/lib/mysql"
960 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
962 ;; Do not install the benchmark suite.
963 "-DINSTALL_SQLBENCHDIR=false"
965 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
966 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
968 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
970 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
972 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
973 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
974 "-DCMAKE_INSTALL_LIBDIR=lib"
975 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
976 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
978 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
980 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
982 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
983 "/share/mysql/support-files")
984 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
985 "-DINSTALL_SHAREDIR=share")
987 (modify-phases %standard-phases
988 (add-after 'unpack 'adjust-output-references
990 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
991 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
992 ;; not work when the latter uses an absolute file name.
993 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
994 (("%s/@INSTALL_INCLUDEDIR@")
995 (string-append "@INSTALL_INCLUDEDIR@"))
996 ;; As of 10.5.8, the mariadb_config program tries to be
997 ;; clever and computes the installation directory relative
998 ;; to /proc/self/exe when running on Linux. Make it fall
999 ;; back to the old behaviour.
1000 (("defined\\(__linux__\\)")
1002 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
1003 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
1004 "@INSTALL_INCLUDEDIR@"))
1005 (substitute* "support-files/mariadb.pc.in"
1006 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
1007 (string-append dir "dir=")))
1008 (substitute* "include/CMakeLists.txt"
1009 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
1010 "${INSTALL_INCLUDEDIR}"))
1011 (substitute* "cmake/mariadb_connector_c.cmake"
1012 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
1013 "${INSTALL_BINDIR}"))
1015 (add-after 'unpack 'adjust-tests
1017 (let ((disabled-tests
1018 '(;; These fail because root@hostname == root@localhost in
1019 ;; the build environment, causing a user count mismatch.
1020 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
1021 "funcs_1.is_columns_mysql"
1023 "main.explain_non_select"
1025 "main.stat_tables_innodb"
1026 "main.upgrade_MDEV-19650"
1027 "roles.acl_statistics"
1029 ;; FIXME: This test checks various table encodings and
1030 ;; fails because Guix defaults to UTF8 instead of the
1031 ;; upstream default latin1_swedish_ci. It's not easily
1032 ;; substitutable because several encodings are tested.
1035 ;; XXX: This test occasionally fails on i686-linux:
1036 ;; <https://jira.mariadb.org/browse/MDEV-24458>
1037 ,@(if (string-prefix? "i686" (%current-system))
1038 '("main.myisampack")
1041 ;; This file contains a time bomb which makes it fail after
1042 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
1045 ;; This file contains a list of known-flaky tests for this
1046 ;; release. Append our own items.
1047 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
1048 (for-each (lambda (test)
1049 (format unstable-tests "~a : ~a\n"
1050 test "Disabled in Guix"))
1052 (close-port unstable-tests)
1054 ;; XXX: These fail because they expect a latin1 charset and
1055 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
1056 (substitute* '("mysql-test/main/gis_notembedded.result"
1057 "mysql-test/main/system_mysql_db.result")
1058 (("latin1_swedish_ci") "utf8_general_ci")
1059 (("\tlatin1") "\tutf8"))
1061 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
1065 (substitute* "mysql-test/mysql-test-run.pl"
1066 (("/bin/ls") (which "ls"))
1067 (("/bin/sh") (which "sh")))
1069 (add-before 'configure 'disable-plugins
1071 (let ((disable-plugin (lambda (name)
1072 (call-with-output-file
1073 (string-append "plugin/" name
1076 (format port "\n")))))
1077 (disabled-plugins '(;; XXX: Causes a test failure.
1079 (for-each disable-plugin disabled-plugins)
1082 (lambda* (#:key (tests? #t) #:allow-other-keys)
1084 (with-directory-excursion "mysql-test"
1085 (invoke "./mtr" "--verbose"
1087 "--testcase-timeout=40"
1088 "--suite-timeout=600"
1089 "--parallel" (number->string (parallel-job-count))
1090 ;; Skip the replication tests: they are very I/O
1091 ;; intensive and frequently causes indeterministic
1092 ;; failures even on powerful hardware.
1094 "--skip-test-list=unstable-tests"))
1095 (format #t "test suite not run~%"))
1098 'install 'post-install
1099 (lambda* (#:key inputs outputs #:allow-other-keys)
1100 (let* ((out (assoc-ref outputs "out"))
1101 (dev (assoc-ref outputs "dev"))
1102 (lib (assoc-ref outputs "lib"))
1103 (openssl (assoc-ref inputs "openssl")))
1104 (substitute* (list (string-append out "/bin/mariadb-install-db")
1105 (string-append out "/bin/mysql_install_db"))
1107 (string-append "basedir=\"" out "\""))
1108 (("\\$basedir/share/mysql")
1109 (string-append lib "/share/mysql")))
1111 (with-directory-excursion lib
1113 (delete-file-recursively "mysql-test")
1114 ;; Remove static libraries.
1115 (for-each delete-file (find-files "lib" "\\.a$")))
1117 (with-directory-excursion out
1118 (delete-file "share/man/man1/mysql-test-run.pl.1")
1119 ;; Delete huge and unnecessary executables.
1120 (for-each delete-file (find-files "bin" "test$")))
1121 (mkdir-p (string-append dev "/share"))
1122 (mkdir-p (string-append dev "/bin"))
1123 (rename-file (string-append lib "/bin/mariadbd")
1124 (string-append out "/bin/mariadbd"))
1125 (rename-file (string-append lib "/bin/mysqld")
1126 (string-append out "/bin/mysqld"))
1127 (mkdir-p (string-append dev "/lib"))
1128 (rename-file (string-append lib "/lib/pkgconfig")
1129 (string-append dev "/lib/pkgconfig"))
1130 (rename-file (string-append lib "/bin/mariadb_config")
1131 (string-append dev "/bin/mariadb_config"))
1132 (rename-file (string-append out "/bin/mysql_config")
1133 (string-append dev "/bin/mysql_config"))
1135 ;; Embed an absolute reference to OpenSSL in mysql_config
1136 ;; and the pkg-config file to avoid propagation.
1137 ;; XXX: how to do this for mariadb_config.c.in?
1138 (substitute* (list (string-append dev "/bin/mysql_config")
1139 (string-append dev "/lib/pkgconfig/mariadb.pc"))
1140 (("-lssl -lcrypto" all)
1141 (string-append "-L" openssl "/lib " all)))
1148 `(("jemalloc" ,jemalloc)
1150 ("libxml2" ,libxml2)
1151 ("ncurses" ,ncurses)
1152 ("openssl" ,openssl)
1157 ;; The test suite is very resource intensive and can take more than three
1158 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
1159 (properties '((timeout . 64800))) ;18 hours
1160 (home-page "https://mariadb.org/")
1161 (synopsis "SQL database server")
1163 "MariaDB is a multi-user and multi-threaded SQL database server, designed
1164 as a drop-in replacement of MySQL.")
1165 (license license:gpl2)))
1167 (define-public mariadb-connector-c
1169 (name "mariadb-connector-c")
1175 "https://downloads.mariadb.org/f/connector-c-" version
1176 "/mariadb-connector-c-" version "-src.tar.gz"
1177 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
1178 (file-name (string-append name "-" version ".tar.gz"))
1180 (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
1182 `(("openssl" ,openssl)))
1183 (build-system cmake-build-system)
1185 '(#:tests? #f)) ; no tests
1186 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1187 (synopsis "Client library to connect to MySQL or MariaDB")
1188 (description "The MariaDB Connector/C is used to connect applications
1189 developed in C/C++ to MariaDB and MySQL databases.")
1190 (license license:lgpl2.1+)))
1192 ;; Don't forget to update the other postgresql packages when upgrading this one.
1193 (define-public postgresql-13
1196 (replacement postgresql-13.2)
1200 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1201 version "/postgresql-" version ".tar.bz2"))
1204 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
1205 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1206 (build-system gnu-build-system)
1208 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
1209 ;; PostgreSQL installs its own Makefile (should it?).
1210 ;; Prevent it from retaining needless references to
1211 ;; the build tools in order to save size.
1212 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1215 (modify-phases %standard-phases
1216 (add-before 'configure 'patch-/bin/sh
1218 ;; Refer to the actual shell.
1219 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1220 "src/bin/psql/command.c")
1221 (("/bin/sh") (which "sh")))
1223 (add-after 'build 'build-contrib
1225 (invoke "make" "-C" "contrib")))
1226 (add-after 'install 'install-contrib
1228 (invoke "make" "-C" "contrib" "install"))))))
1230 `(("readline" ,readline)
1231 ("libuuid" ,util-linux "lib")
1232 ("openssl" ,openssl)
1234 (home-page "https://www.postgresql.org/")
1235 (synopsis "Powerful object-relational database system")
1237 "PostgreSQL is a powerful object-relational database system. It is fully
1238 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1239 stored procedures (in multiple languages). It includes most SQL:2008 data
1240 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1241 TIMESTAMP. It also supports storage of binary large objects, including
1242 pictures, sounds, or video.")
1243 (license (license:x11-style "file://COPYRIGHT"))))
1245 (define-public postgresql-13.2
1247 (inherit postgresql-13)
1252 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1253 version "/postgresql-" version ".tar.bz2"))
1256 "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz"))
1257 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
1259 (define-public postgresql-11
1261 (inherit postgresql-13)
1265 (inherit (package-source postgresql-13))
1266 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1267 version "/postgresql-" version ".tar.bz2"))
1270 "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20"))))))
1272 (define-public postgresql-10
1274 (inherit postgresql-11)
1277 (inherit (package-source postgresql-11))
1278 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1279 version "/postgresql-" version ".tar.bz2"))
1282 "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53"))))))
1284 (define-public postgresql-9.6
1286 (inherit postgresql-10)
1289 (inherit (package-source postgresql-10))
1290 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1291 version "/postgresql-" version ".tar.bz2"))
1294 "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk"))))))
1296 (define-public postgresql postgresql-13)
1298 (define-public pgloader
1306 (url "https://github.com/dimitri/pgloader")
1307 (commit (string-append "v" version))))
1309 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1310 (file-name (git-file-name name version))))
1311 (build-system gnu-build-system)
1313 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1314 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1315 ;; does not require Quicklisp workarounds. There is no `install' target
1316 ;; configured in Makefile.
1318 #:strip-binaries? #f
1320 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1322 (modify-phases %standard-phases
1324 (add-after 'unpack 'set-home
1326 (setenv "HOME" "/tmp")
1328 (add-after 'unpack 'patch-Makefile
1330 (substitute* "Makefile"
1331 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1334 (lambda* (#:key outputs #:allow-other-keys)
1335 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1337 (install-file "build/bin/pgloader" bin))
1340 `(("buildapp" ,buildapp)
1343 `(("alexandria" ,sbcl-alexandria)
1344 ("cl-abnf" ,sbcl-cl-abnf)
1345 ("cl-base64" ,sbcl-cl-base64)
1346 ("cl-csv" ,sbcl-cl-csv)
1347 ("cl-fad" ,sbcl-cl-fad)
1348 ("cl-log" ,sbcl-cl-log)
1349 ("cl-markdown" ,sbcl-cl-markdown)
1350 ("cl-mustache" ,sbcl-cl-mustache)
1351 ("cl-ppcre" ,sbcl-cl-ppcre)
1352 ("cl-sqlite" ,sbcl-cl-sqlite)
1353 ("closer-mop" ,sbcl-closer-mop)
1354 ("command-line-arguments" ,sbcl-command-line-arguments)
1356 ("drakma" ,sbcl-drakma)
1357 ("esrap" ,sbcl-esrap)
1358 ("flexi-streams" ,sbcl-flexi-streams)
1360 ("local-time" ,sbcl-local-time)
1361 ("lparallel" ,sbcl-lparallel)
1362 ("metabang-bind" ,sbcl-metabang-bind)
1363 ("mssql" ,sbcl-mssql)
1364 ("postmodern" ,sbcl-postmodern)
1365 ("py-configparser" ,sbcl-py-configparser)
1366 ("qmynd" ,sbcl-qmynd)
1368 ("split-sequence" ,sbcl-split-sequence)
1369 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1370 ("usocket" ,sbcl-usocket)
1372 ("yason" ,sbcl-yason)
1374 (home-page "https://pgloader.io/")
1375 (synopsis "Tool to migrate data to PostgreSQL")
1377 "@code{pgloader} is a program that can load data or migrate databases from
1378 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1379 (license (license:x11-style "file://LICENSE"))))
1381 (define-public python-pymysql
1383 (name "python-pymysql")
1388 (uri (pypi-uri "PyMySQL" version))
1390 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1391 (build-system python-build-system)
1393 `(("python-unittest2" ,python-unittest2)))
1395 `(("python-cryptography" ,python-cryptography)))
1397 `(#:tests? #f)) ; tests expect a running MySQL
1398 (home-page "https://github.com/PyMySQL/PyMySQL/")
1399 (synopsis "Pure-Python MySQL driver")
1401 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1402 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1403 (license license:expat)))
1405 (define-public python2-pymysql
1406 (package-with-python2 python-pymysql))
1415 (uri (string-append "http://fallabs.com/" name "/"
1416 name "-" version ".tar.gz"))
1419 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1420 (build-system gnu-build-system)
1422 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1423 (assoc-ref %outputs "out")
1425 #:make-flags (list "CFLAGS=-fPIC")))
1426 (home-page "https://fallabs.com/qdbm/")
1427 (synopsis "Key-value database")
1428 (description "QDBM is a library of routines for managing a
1429 database. The database is a simple data file containing key-value
1430 pairs. Every key and value is serial bytes with variable length.
1431 Binary data as well as character strings can be used as a key or a
1432 value. There is no concept of data tables or data types. Records are
1433 organized in a hash table or B+ tree.")
1434 (license license:lgpl2.1+)))
1436 (define-public recutils
1442 (uri (string-append "mirror://gnu/recutils/recutils-"
1446 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1447 (build-system gnu-build-system)
1449 (arguments '(#:configure-flags
1450 (list (string-append "--with-bash-headers="
1451 (assoc-ref %build-inputs "bash:include")
1454 (native-inputs `(("bc" ,bc)
1455 ("bash:include" ,bash "include")
1456 ("check" ,check-0.14)
1457 ("pkg-config" ,pkg-config)))
1459 ;; TODO: Add more optional inputs.
1460 (inputs `(("curl" ,curl)
1461 ("libgcrypt" ,libgcrypt)
1462 ("libuuid" ,util-linux "lib")))
1463 (synopsis "Manipulate plain text files as databases")
1465 "GNU Recutils is a set of tools and libraries for creating and
1466 manipulating text-based, human-editable databases. Despite being text-based,
1467 databases created with Recutils carry all of the expected features such as
1468 unique fields, primary keys, time stamps and more. Many different field
1469 types are supported, as is encryption.")
1470 (license license:gpl3+)
1471 (home-page "https://www.gnu.org/software/recutils/")))
1473 (define-public emacs-recutils
1476 (name "emacs-recutils")
1477 (build-system emacs-build-system)
1480 (modify-phases %standard-phases
1481 (add-after 'unpack 'change-directory
1487 (synopsis "Emacs mode for working with recutils database files")
1488 (description "This package provides an Emacs major mode @code{rec-mode}
1489 for working with GNU Recutils text-based, human-editable databases. It
1490 supports editing, navigation, and querying of recutils database files
1491 including field and record folding.")))
1493 (define-public rocksdb
1500 (url "https://github.com/facebook/rocksdb")
1501 (commit (string-append "v" version))))
1502 (file-name (git-file-name name version))
1505 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1506 (modules '((guix build utils)))
1509 ;; TODO: unbundle gtest.
1510 (delete-file "build_tools/gnu_parallel")
1511 (substitute* "Makefile"
1512 (("build_tools/gnu_parallel") "parallel"))
1514 (build-system gnu-build-system)
1516 `(#:make-flags (list "CC=gcc" "V=1"
1517 ;; Ceph requires that RTTI is enabled.
1519 "date=1970-01-01" ; build reproducibly
1520 (string-append "INSTALL_PATH="
1521 (assoc-ref %outputs "out"))
1523 ;; Running the full test suite takes hours and require
1524 ;; a lot of disk space. Instead we only run a subset
1525 ;; (see .travis.yml and Makefile).
1526 "ROCKSDBTESTS_END=db_tailing_iter_test")
1527 #:test-target "check_some"
1528 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1529 ;; this upstream, but it's not going to be supported any time soon.
1530 #:tests? (let ((system ,(or (%current-target-system)
1531 (%current-system))))
1532 (or (string-prefix? "x86_64-linux" system)
1533 (string-prefix? "aarch64-linux" system)))
1535 (modify-phases %standard-phases
1536 (add-after 'unpack 'patch-Makefile
1538 (substitute* "Makefile"
1539 ;; Don't depend on the static library when installing.
1540 (("install: install-static")
1541 "install: install-shared")
1542 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1545 ;; The default target is only needed for tests and built on demand.
1547 (add-before 'check 'disable-optimizations
1549 ;; Prevent the build from passing '-march=native' to the compiler.
1550 (setenv "PORTABLE" "1")
1552 (add-before 'check 'disable-failing-tests
1554 (substitute* "Makefile"
1555 ;; These tests reliably fail due to "Too many open files".
1556 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1557 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1559 (add-after 'check 'build
1560 ;; The default build target is a debug build for tests. The
1561 ;; install target depends on the "shared_lib" release target
1562 ;; so we build it here for clarity.
1563 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1564 (apply invoke "make" "shared_lib"
1565 `(,@(if parallel-build?
1566 `("-j" ,(number->string (parallel-job-count)))
1570 `(("parallel" ,parallel)
1573 ("python" ,python-2)
1578 ("jemalloc" ,jemalloc)
1582 (home-page "https://rocksdb.org/")
1583 (synopsis "Persistent key-value store for fast storage")
1585 "RocksDB is a library that forms the core building block for a fast
1586 key-value server, especially suited for storing data on flash drives. It
1587 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1588 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1589 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1590 compactions, making it specially suitable for storing multiple terabytes of
1591 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1592 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1593 ;; files carry the 3-clause BSD license.
1594 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1596 (define-public sparql-query
1598 (name "sparql-query")
1603 (url "https://github.com/tialaramex/sparql-query")
1606 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1607 (file-name (git-file-name name version))))
1608 (build-system gnu-build-system)
1612 ("libxml2" ,libxml2)
1613 ("ncurses" ,ncurses)
1614 ("readline" ,readline)))
1616 `(("pkg-config" ,pkg-config)))
1618 `(#:make-flags '("CC=gcc")
1620 (modify-phases %standard-phases
1622 ;; The Makefile uses git to obtain versioning information. This phase
1623 ;; substitutes the git invocation with the package version.
1624 (add-after 'unpack 'remove-git-dependency
1626 (substitute* "Makefile"
1628 (string-append "gitrev = \"v" ,version "\"")))
1630 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1631 ;; This replacement does the same thing, except for using $PREFIX/bin
1634 (lambda* (#:key outputs #:allow-other-keys)
1635 (let* ((out (assoc-ref outputs "out"))
1636 (bin (string-append out "/bin")))
1637 (install-file "sparql-query" bin)
1638 (symlink (string-append bin "/sparql-query")
1639 (string-append bin "/sparql-update")))
1642 (lambda* (#:key make-flags #:allow-other-keys)
1643 (apply invoke "make" `(,@make-flags "scan-test"))
1644 (invoke "./scan-test"))))))
1645 (home-page "https://github.com/tialaramex/sparql-query/")
1646 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1647 (description "Sparql-query is a command-line tool for accessing SPARQL
1648 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1649 tools for interrogating SQL databases. For example, you can enter a query over
1650 several lines, using a semi-colon at the end of a line to indicate the end of
1651 your query. It also supports readline so that you can more easily recall and
1652 edit previous queries, even across sessions. It can be used non-interactively,
1653 for example from a shell script.")
1654 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1655 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1656 (license (list license:gpl3+))))
1658 (define-public sqitch
1666 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1669 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1670 (build-system perl-build-system)
1673 (modify-phases %standard-phases
1674 (add-before 'check 'set-check-environment
1677 (setenv "HOME" "/tmp")
1679 (add-after 'install 'wrap-program
1680 (lambda* (#:key outputs #:allow-other-keys)
1681 (let* ((out (assoc-ref outputs "out"))
1682 (path (getenv "PERL5LIB")))
1683 (wrap-program (string-append out "/bin/sqitch")
1684 `("PERL5LIB" ":" prefix
1685 (,(string-append out "/lib/perl5/site_perl"
1690 `(("perl-capture-tiny" ,perl-capture-tiny)
1691 ("perl-io-pager" ,perl-io-pager)
1692 ("perl-module-build" ,perl-module-build)
1693 ("perl-module-runtime" ,perl-module-runtime)
1694 ("perl-path-class" ,perl-path-class)
1695 ("perl-test-deep" ,perl-test-deep)
1696 ("perl-test-dir" ,perl-test-dir)
1697 ("perl-test-exception" ,perl-test-exception)
1698 ("perl-test-file" ,perl-test-file)
1699 ("perl-test-file-contents" ,perl-test-file-contents)
1700 ("perl-test-mockmodule" ,perl-test-mockmodule)
1701 ("perl-test-mockobject" ,perl-test-mockobject)
1702 ("perl-test-nowarnings" ,perl-test-nowarnings)
1703 ("perl-test-warn" ,perl-test-warn)))
1705 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1706 ("perl-clone" ,perl-clone)
1707 ("perl-config-gitlike" ,perl-config-gitlike)
1708 ("perl-datetime" ,perl-datetime)
1709 ("perl-datetime-timezone" ,perl-datetime-timezone)
1710 ("perl-dbd-mysql" ,perl-dbd-mysql)
1711 ("perl-dbd-pg" ,perl-dbd-pg)
1712 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1713 ("perl-dbi" ,perl-dbi)
1714 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1715 ("perl-encode-locale" ,perl-encode-locale)
1716 ("perl-hash-merge" ,perl-hash-merge)
1717 ("perl-ipc-run3" ,perl-ipc-run3)
1718 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1719 ("perl-libintl-perl" ,perl-libintl-perl)
1720 ("perl-list-moreutils" ,perl-list-moreutils)
1721 ("perl-moo" ,perl-moo)
1722 ("perl-mysql-config" ,perl-mysql-config)
1723 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1724 ("perl-path-class" ,perl-path-class)
1725 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1726 ("perl-string-formatter" ,perl-string-formatter)
1727 ("perl-string-shellquote" ,perl-string-shellquote)
1728 ("perl-sub-exporter" ,perl-sub-exporter)
1729 ("perl-template-tiny" ,perl-template-tiny)
1730 ("perl-template-toolkit" ,perl-template-toolkit)
1731 ("perl-throwable" ,perl-throwable)
1732 ("perl-try-tiny" ,perl-try-tiny)
1733 ("perl-type-tiny" ,perl-type-tiny)
1734 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1735 ("perl-uri" ,perl-uri)
1736 ("perl-uri-db" ,perl-uri-db)))
1737 (home-page "https://sqitch.org/")
1738 (synopsis "Database change management tool")
1740 "Sqitch is a standalone change management system for database schemas,
1741 which uses SQL to describe changes.")
1742 (license license:x11)))
1744 (define-public sqlcrush
1745 ;; Unfortunately, there is no proper upstream release and may never be.
1746 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1750 (version (git-version "0.1.5" revision commit))
1754 (url "https://github.com/coffeeandscripts/sqlcrush")
1756 (file-name (git-file-name name version))
1759 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1760 (build-system python-build-system)
1762 `(("python-cryptography" ,python-cryptography)
1763 ("python-psycopg2" ,python-psycopg2)
1764 ("python-pymysql" ,python-pymysql)
1765 ("python-sqlalchemy" ,python-sqlalchemy)))
1766 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1767 (synopsis "Text console-based database viewer and editor")
1769 "SQLcrush lets you view and edit a database directly from the text
1770 console through an ncurses interface. You can explore each table's structure,
1771 browse and edit the contents, add and delete entries, all while tracking your
1773 (license license:gpl3+)))) ; no headers, see README.md
1781 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1785 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1786 (build-system gnu-build-system)
1789 (modify-phases %standard-phases
1791 (lambda* (#:key outputs #:allow-other-keys)
1792 (let ((out (assoc-ref outputs "out")))
1793 ;; The 'configure' script is a wrapper for Waf and
1794 ;; doesn't recognize things like '--enable-fast-install'.
1795 (invoke "./configure"
1796 (string-append "--prefix=" out))))))))
1798 `(;; TODO: Build the documentation.
1799 ;; ("docbook-xsl" ,docbook-xsl)
1800 ;; ("libxml2" ,libxml2)
1801 ;; ("libxslt" ,libxslt)
1802 ("python" ,python) ;for the Waf build system
1804 (home-page "https://tdb.samba.org/")
1805 (synopsis "Trivial database")
1807 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1808 and BSD's DB except that it allows multiple simultaneous writers and uses
1809 locking internally to keep writers from trampling on each other. TDB is also
1811 (license license:lgpl3+)))
1813 (define-public perl-dbi
1820 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1824 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1825 (build-system perl-build-system)
1826 (synopsis "Database independent interface for Perl")
1827 (description "This package provides an database interface for Perl.")
1828 (home-page "https://metacpan.org/release/DBI")
1829 (license license:perl-license)))
1831 (define-public perl-dbix-class
1833 (name "perl-dbix-class")
1834 (version "0.082842")
1838 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1839 "DBIx-Class-" version ".tar.gz"))
1841 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1842 (build-system perl-build-system)
1844 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1845 ("perl-file-temp" ,perl-file-temp)
1846 ("perl-module-install" ,perl-module-install)
1847 ("perl-package-stash" ,perl-package-stash)
1848 ("perl-test-deep" ,perl-test-deep)
1849 ("perl-test-exception" ,perl-test-exception)
1850 ("perl-test-warn" ,perl-test-warn)))
1852 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1853 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1854 ("perl-class-inspector" ,perl-class-inspector)
1855 ("perl-config-any" ,perl-config-any)
1856 ("perl-context-preserve" ,perl-context-preserve)
1857 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1858 ("perl-data-page" ,perl-data-page)
1859 ("perl-dbi" ,perl-dbi)
1860 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1861 ("perl-hash-merge" ,perl-hash-merge)
1862 ("perl-module-find" ,perl-module-find)
1863 ("perl-moo" ,perl-moo)
1864 ("perl-mro-compat" ,perl-mro-compat)
1865 ("perl-namespace-clean" ,perl-namespace-clean)
1866 ("perl-path-class" ,perl-path-class)
1867 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1868 ("perl-scope-guard" ,perl-scope-guard)
1869 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1870 ("perl-sub-name" ,perl-sub-name)
1871 ("perl-text-balanced" ,perl-text-balanced)
1872 ("perl-try-tiny" ,perl-try-tiny)))
1873 (home-page "https://metacpan.org/release/DBIx-Class")
1874 (synopsis "Extensible and flexible object <-> relational mapper")
1875 (description "An SQL to OO mapper with an object API inspired by
1876 Class::DBI (with a compatibility layer as a springboard for porting) and a
1877 resultset API that allows abstract encapsulation of database operations. It
1878 aims to make representing queries in your code as perl-ish as possible while
1879 still providing access to as many of the capabilities of the database as
1880 possible, including retrieving related records from multiple tables in a
1881 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1882 \"ORDER BY\" and \"HAVING\" support.")
1883 (license license:perl-license)))
1885 (define-public perl-dbix-class-cursor-cached
1887 (name "perl-dbix-class-cursor-cached")
1888 (version "1.001004")
1892 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1893 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1896 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1897 (build-system perl-build-system)
1899 `(("perl-cache-cache" ,perl-cache-cache)
1900 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1901 ("perl-module-install" ,perl-module-install)))
1903 `(("perl-carp-clan" ,perl-carp-clan)
1904 ("perl-dbix-class" ,perl-dbix-class)))
1905 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1906 (synopsis "Cursor with built-in caching support")
1907 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1908 built-in caching support.")
1909 (license license:perl-license)))
1911 (define-public perl-dbix-class-introspectablem2m
1913 (name "perl-dbix-class-introspectablem2m")
1914 (version "0.001002")
1918 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1919 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1922 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1923 (build-system perl-build-system)
1925 `(("perl-module-install" ,perl-module-install)))
1927 `(("perl-dbix-class" ,perl-dbix-class)))
1928 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1929 (synopsis "Introspect many-to-many relationships")
1930 (description "Because the many-to-many relationships are not real
1931 relationships, they can not be introspected with DBIx::Class. Many-to-many
1932 relationships are actually just a collection of convenience methods installed
1933 to bridge two relationships. This DBIx::Class component can be used to store
1934 all relevant information about these non-relationships so they can later be
1935 introspected and examined.")
1936 (license license:perl-license)))
1938 (define-public perl-dbix-class-schema-loader
1940 (name "perl-dbix-class-schema-loader")
1945 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1946 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1949 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1950 (build-system perl-build-system)
1952 `(("perl-config-any" ,perl-config-any)
1953 ("perl-config-general" ,perl-config-general)
1954 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1955 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1956 ("perl-module-install" ,perl-module-install)
1957 ("perl-moose" ,perl-moose)
1958 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1959 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1960 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1961 ("perl-test-deep" ,perl-test-deep)
1962 ("perl-test-differences" ,perl-test-differences)
1963 ("perl-test-exception" ,perl-test-exception)
1964 ("perl-test-pod" ,perl-test-pod)
1965 ("perl-test-warn" ,perl-test-warn)))
1967 `(("perl-class-unload" ,perl-class-unload)
1968 ("perl-class-inspector" ,perl-class-inspector)
1969 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1970 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1971 ("perl-carp-clan" ,perl-carp-clan)
1972 ("perl-data-dump" ,perl-data-dump)
1973 ("perl-dbix-class" ,perl-dbix-class)
1974 ("perl-hash-merge" ,perl-hash-merge)
1975 ("perl-list-moreutils" ,perl-list-moreutils)
1976 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1977 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1978 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1979 ("perl-namespace-clean" ,perl-namespace-clean)
1980 ("perl-mro-compat" ,perl-mro-compat)
1981 ("perl-scope-guard" ,perl-scope-guard)
1982 ("perl-string-camelcase" ,perl-string-camelcase)
1983 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1984 ("perl-sub-name" ,perl-sub-name)
1985 ("perl-try-tiny" ,perl-try-tiny)))
1986 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1987 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1988 (synopsis "Create a DBIx::Class::Schema based on a database")
1989 (description "DBIx::Class::Schema::Loader automates the definition of a
1990 DBIx::Class::Schema by scanning database table definitions and setting up the
1991 columns, primary keys, unique constraints and relationships.")
1992 (license license:perl-license)))
1994 (define-public perl-dbd-pg
1996 (name "perl-dbd-pg")
2001 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
2002 "DBD-Pg-" version ".tar.gz"))
2005 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
2006 (build-system perl-build-system)
2008 `(("perl-dbi" ,perl-dbi)))
2010 `(("perl-dbi" ,perl-dbi)
2011 ("postgresql" ,postgresql)))
2012 (home-page "https://metacpan.org/release/DBD-Pg")
2013 (synopsis "DBI PostgreSQL interface")
2014 (description "This package provides a PostgreSQL driver for the Perl5
2015 @dfn{Database Interface} (DBI).")
2016 (license license:perl-license)))
2018 (define-public perl-dbd-mysql
2020 (name "perl-dbd-mysql")
2025 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
2026 "DBD-mysql-" version ".tar.gz"))
2028 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
2029 (build-system perl-build-system)
2032 (modify-phases %standard-phases
2033 (add-before 'configure 'skip-library-detection
2034 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
2035 ;; are really only needed for the test suite; their absence does not
2036 ;; affect the build or the end result.
2038 (substitute* "Makefile.PL"
2039 (("use Devel::CheckLib;" match)
2040 (string-append "# " match))
2044 ;; Tests require running MySQL server.
2047 `(("perl-dbi" ,perl-dbi)
2048 ("mysql" ,mariadb "lib")
2049 ("mysql-dev" ,mariadb "dev")))
2050 (home-page "https://metacpan.org/release/DBD-mysql")
2051 (synopsis "DBI MySQL interface")
2052 (description "This package provides a MySQL driver for the Perl5
2053 @dfn{Database Interface} (DBI).")
2054 (license license:perl-license)))
2056 (define-public perl-dbd-sqlite
2058 (name "perl-dbd-sqlite")
2063 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
2067 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
2068 (build-system perl-build-system)
2069 (inputs `(("sqlite" ,sqlite)))
2070 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
2071 (synopsis "SQlite interface for Perl")
2072 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
2073 the entire thing in the distribution. So in order to get a fast transaction
2074 capable RDBMS working for your Perl project you simply have to install this
2075 module, and nothing else.")
2076 (license license:perl-license)
2077 (home-page "https://metacpan.org/release/DBD-SQLite")))
2079 (define-public perl-mysql-config
2081 (name "perl-mysql-config")
2087 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
2092 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
2093 (build-system perl-build-system)
2094 (home-page "https://metacpan.org/release/MySQL-Config")
2095 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
2097 "@code{MySQL::Config} emulates the @code{load_defaults} function from
2098 libmysqlclient. It will fill an array with long options, ready to be parsed by
2099 @code{Getopt::Long}.")
2100 (license license:perl-license)))
2102 (define-public perl-sql-abstract
2104 (name "perl-sql-abstract")
2109 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2110 "SQL-Abstract-" version ".tar.gz"))
2112 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
2113 (build-system perl-build-system)
2115 `(("perl-module-install" ,perl-module-install)
2116 ("perl-test-deep" ,perl-test-deep)
2117 ("perl-test-exception" ,perl-test-exception)
2118 ("perl-test-warn" ,perl-test-warn)))
2120 `(("perl-hash-merge" ,perl-hash-merge)
2121 ("perl-moo" ,perl-moo)
2122 ("perl-mro-compat" ,perl-mro-compat)
2123 ("perl-text-balanced" ,perl-text-balanced)))
2124 (home-page "https://metacpan.org/release/SQL-Abstract")
2125 (synopsis "Generate SQL from Perl data structures")
2126 (description "This module was inspired by the excellent DBIx::Abstract.
2127 While based on the concepts used by DBIx::Abstract, the concepts used have
2128 been modified to make the SQL easier to generate from Perl data structures.
2129 The underlying idea is for this module to do what you mean, based on the data
2130 structures you provide it, so that you don't have to modify your code every
2131 time your data changes.")
2132 (license license:perl-license)))
2134 (define-public perl-sql-abstract-classic
2136 (name "perl-sql-abstract-classic")
2141 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
2142 "SQL-Abstract-Classic-" version ".tar.gz"))
2144 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
2145 (build-system perl-build-system)
2147 `(("perl-test-deep" ,perl-test-deep)
2148 ("perl-test-exception" ,perl-test-exception)
2149 ("perl-test-warn" ,perl-test-warn)))
2151 `(("perl-mro-compat" ,perl-mro-compat)
2152 ("perl-sql-abstract" ,perl-sql-abstract)))
2153 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
2154 (synopsis "Generate SQL from Perl data structures")
2156 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
2157 to preserve the ability of users to opt into the new way of doing things in
2158 later versions according to their own schedules.
2160 It is an abstract SQL generation module based on the concepts used by
2161 @code{DBIx::Abstract}, with several important differences, especially when it
2162 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
2163 easier to generate from Perl data structures.
2165 The underlying idea is for this module to do what you mean, based on the data
2166 structures you provide it. You shouldn't have to modify your code every time
2167 your data changes, as this module figures it out.")
2168 (license license:perl-license)))
2170 (define-public perl-sql-splitstatement
2172 (name "perl-sql-splitstatement")
2177 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
2178 "SQL-SplitStatement-" version ".tar.gz"))
2181 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
2182 (build-system perl-build-system)
2184 `(("perl-test-exception" ,perl-test-exception)))
2186 `(("perl-class-accessor" ,perl-class-accessor)
2187 ("perl-list-moreutils" ,perl-list-moreutils)
2188 ("perl-regexp-common" ,perl-regexp-common)
2189 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2190 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2191 (synopsis "Split SQL code into atomic statements")
2192 (description "This module tries to split any SQL code, even including
2193 non-standard extensions, into the atomic statements it is composed of.")
2194 (license license:perl-license)))
2196 (define-public perl-sql-tokenizer
2198 (name "perl-sql-tokenizer")
2203 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2204 "SQL-Tokenizer-" version ".tar.gz"))
2207 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2208 (build-system perl-build-system)
2209 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2210 (synopsis "SQL tokenizer")
2211 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2212 claim to be a parser or query verifier. It just creates sane tokens from a
2214 (license license:perl-license)))
2216 (define-public unixodbc
2224 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2227 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2228 (build-system gnu-build-system)
2229 (synopsis "Data source abstraction library")
2230 (description "Unixodbc is a library providing an API with which to access
2231 data sources. Data sources include SQL Servers and any software with an ODBC
2233 (license license:lgpl2.1+)
2234 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2235 (home-page "http://www.unixodbc.org")))
2237 (define-public unqlite
2243 ;; Contains bug fixes against the official release, and has an
2244 ;; autotooled build system.
2245 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2247 "unqlite-unofficial-" version ".tar.gz"))
2250 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2251 (build-system gnu-build-system)
2252 (arguments `(#:tests? #f)) ;No check target
2253 (home-page "https://www.unqlite.org")
2254 (synopsis "In-memory key/value and document store")
2256 "UnQLite is an in-process software library which implements a
2257 self-contained, serverless, zero-configuration, transactional NoSQL
2258 database engine. UnQLite is a document store database similar to
2259 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2260 similar to BerkeleyDB, LevelDB, etc.")
2261 (license license:bsd-2)))
2263 (define-public redis
2269 (uri (string-append "http://download.redis.io/releases/redis-"
2273 "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9"))
2274 (modules '((guix build utils)))
2276 ;; Delete bundled jemalloc, as the package will use the libc one
2277 '(begin (delete-file-recursively "deps/jemalloc")
2279 (build-system gnu-build-system)
2281 `(("procps" ,procps) ; for tests
2282 ("tcl" ,tcl))) ; for tests
2285 (modify-phases %standard-phases
2287 (add-after 'unpack 'use-correct-tclsh
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 (substitute* "runtest"
2291 (string-append "TCLSH="
2292 (assoc-ref inputs "tcl")
2295 (add-after 'unpack 'adjust-tests
2297 ;; Disable failing tests
2298 (substitute* "tests/test_helper.tcl"
2299 ((" integration/replication[^-]") "")
2300 ((" integration/replication-4") "")
2301 ((" integration/replication-psync") ""))
2303 #:make-flags `("CC=gcc"
2306 ,(string-append "PREFIX="
2307 (assoc-ref %outputs "out")))))
2308 (synopsis "Key-value cache and store")
2309 (description "Redis is an advanced key-value cache and store. Redis
2310 supports many data structures including strings, hashes, lists, sets, sorted
2311 sets, bitmaps and hyperloglogs.")
2312 (home-page "https://redis.io/")
2313 (license license:bsd-3)))
2315 (define-public kyotocabinet
2317 (name "kyotocabinet")
2321 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2322 "kyotocabinet-" version ".tar.gz"))
2325 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2326 (build-system gnu-build-system)
2330 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2331 (string-append "LDFLAGS=-Wl,-rpath="
2332 (assoc-ref %outputs "out") "/lib"))))
2333 (inputs `(("zlib" ,zlib)))
2334 (home-page "https://fallabs.com/kyotocabinet/")
2336 "Kyoto Cabinet is a modern implementation of the DBM database")
2338 "Kyoto Cabinet is a standalone file-based database that supports Hash
2339 and B+ Tree data storage models. It is a fast key-value lightweight
2340 database and supports many programming languages. It is a NoSQL database.")
2341 (license license:gpl3+)))
2343 (define-public tokyocabinet
2345 (name "tokyocabinet")
2350 (uri (string-append "http://fallabs.com/tokyocabinet/"
2351 name "-" version ".tar.gz"))
2354 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2355 (build-system gnu-build-system)
2358 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2359 (string-append "LDFLAGS=-Wl,-rpath="
2360 (assoc-ref %outputs "out") "/lib"))))
2363 (home-page "http://fallabs.com/tokyocabinet/")
2364 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2366 "Tokyo Cabinet is a library of routines for managing a database.
2367 The database is a simple data file containing records, each is a pair of a
2368 key and a value. Every key and value is serial bytes with variable length.
2369 Both binary data and character string can be used as a key and a value.
2370 There is neither concept of data tables nor data types. Records are
2371 organized in hash table, B+ tree, or fixed-length array.")
2372 (license license:lgpl2.1+)))
2374 (define-public wiredtiger
2381 "http://source.wiredtiger.com/releases/wiredtiger-"
2382 version ".tar.bz2"))
2385 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2386 (build-system gnu-build-system)
2388 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2390 (modify-phases %standard-phases
2391 (add-before 'check 'disable-test/fops
2393 ;; XXX: timed out after 3600 seconds of silence
2394 (substitute* "Makefile"
2400 ("snappy" ,snappy)))
2401 (home-page "http://source.wiredtiger.com/")
2402 (synopsis "NoSQL data engine")
2404 "WiredTiger is an extensible platform for data management. It supports
2405 row-oriented storage (where all columns of a row are stored together),
2406 column-oriented storage (where columns are stored in groups, allowing for
2407 more efficient access and storage of column subsets) and log-structured merge
2408 trees (LSM), for sustained throughput under random insert workloads.")
2409 (license license:gpl3) ; or GPL-2
2410 ;; configure.ac: WiredTiger requires a 64-bit build.
2411 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2413 (define-public wiredtiger-3
2415 (inherit wiredtiger)
2420 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2421 version ".tar.bz2"))
2424 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2426 (define-public guile-wiredtiger
2428 (name "guile-wiredtiger")
2433 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2434 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2435 (file-name (string-append name "-" version "-checkout"))
2438 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2439 (build-system gnu-build-system)
2441 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2443 (list (string-append "--with-libwiredtiger-prefix="
2444 (assoc-ref %build-inputs "wiredtiger")))
2445 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2447 `(("autoconf" ,autoconf)
2448 ("automake" ,automake)
2449 ("pkg-config" ,pkg-config)))
2451 `(("wiredtiger" ,wiredtiger-3)
2452 ("guile" ,guile-2.2)))
2454 `(("guile-bytestructures" ,guile-bytestructures)))
2455 (synopsis "WiredTiger bindings for GNU Guile")
2457 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2459 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2460 (license license:gpl3+)))
2462 (define-public perl-db-file
2464 (name "perl-db-file")
2469 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2472 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2473 (build-system perl-build-system)
2474 (inputs `(("bdb" ,bdb)))
2475 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2477 `(#:phases (modify-phases %standard-phases
2479 'configure 'modify-config.in
2480 (lambda* (#:key inputs #:allow-other-keys)
2481 (substitute* "config.in"
2482 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2484 (home-page "https://metacpan.org/release/DB_File")
2485 (synopsis "Perl5 access to Berkeley DB version 1.x")
2487 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2488 (license license:perl-license)))
2498 (url "https://git.openldap.org/openldap/openldap.git")
2499 (commit (string-append "LMDB_" version))))
2500 (file-name (git-file-name name version))
2502 (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as"))))
2503 (build-system gnu-build-system)
2505 `(#:test-target "test"
2507 (modify-phases %standard-phases
2509 (lambda* (#:key outputs #:allow-other-keys)
2510 (chdir "libraries/liblmdb")
2511 (substitute* "Makefile"
2512 (("/usr/local") (assoc-ref outputs "out")))
2514 (add-after 'install 'create-pkg-config-file
2515 (lambda* (#:key outputs #:allow-other-keys)
2516 (let ((out (assoc-ref outputs "out")))
2517 (mkdir-p (string-append out "/lib/pkgconfig"))
2518 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2520 (format #t "prefix=~a~@
2523 includedir=~a/include~@
2527 Description: Lightning Memory-Mapped Database library~@
2528 Libs: -L${libdir} -llmdb~@
2529 Cflags: -I${includedir}~%"
2530 out out out out ,version)))
2532 (home-page "https://symas.com/lmdb/")
2533 (synopsis "Lightning Memory-Mapped Database library")
2535 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2536 transactional database. Unlike more complex relational databases, LMDB handles
2537 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2538 underlying operating system for caching and locking, keeping the code small and
2540 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2541 disk-based databases with high read performance that scales linearly over
2542 multiple cores. The size of each database is limited only by the size of the
2543 virtual address space — not physical RAM.")
2544 (license license:openldap2.8)))
2546 (define-public lmdbxx
2549 (version "0.9.14.0")
2554 (url "https://github.com/drycpp/lmdbxx")
2556 (file-name (git-file-name name version))
2558 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2561 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2563 (modify-phases %standard-phases
2564 (delete 'configure))))
2565 (build-system gnu-build-system)
2566 (inputs `(("lmdb" ,lmdb)))
2567 (home-page "http://lmdbxx.sourceforge.net")
2568 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2569 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2570 @code{LMDB} embedded database library, offering both an error-checked
2571 procedural interface and an object-oriented resource interface with RAII
2573 (license license:unlicense)))
2575 (define-public libpqxx
2582 "http://pqxx.org/download/software/libpqxx/"
2583 name "-" version ".tar.gz"))
2586 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2587 (build-system gnu-build-system)
2589 `(("python" ,python-2)))
2590 (inputs `(("postgresql" ,postgresql)))
2592 `(#:tests? #f ; # FAIL: 1
2594 (modify-phases %standard-phases
2595 (add-before 'configure 'fix-sed-command
2597 ;; Newer sed versions error out if double brackets are not used.
2598 (substitute* "configure"
2599 (("\\[:space:\\]") "[[:space:]]"))
2601 (synopsis "C++ connector for PostgreSQL")
2603 "Libpqxx is a C++ library to enable user programs to communicate with the
2604 PostgreSQL database back-end. The database back-end can be local or it may be
2605 on another machine, accessed via TCP/IP.")
2606 (home-page "http://pqxx.org/")
2607 (license license:bsd-3)))
2609 (define-public python-peewee
2611 (name "python-peewee")
2616 (uri (pypi-uri "peewee" version))
2618 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2619 (build-system python-build-system)
2621 `(#:tests? #f)) ; fails to import test data
2623 `(("sqlite" ,sqlite)))
2625 `(("python-cython" ,python-cython)))
2626 (home-page "https://github.com/coleifer/peewee/")
2627 (synopsis "Small object-relational mapping utility")
2629 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2630 handles converting between pythonic values and those used by databases, so you
2631 can use Python types in your code without having to worry. It has built-in
2632 support for sqlite, mysql and postgresql. If you already have a database, you
2633 can autogenerate peewee models using @code{pwiz}, a model generator.")
2634 (license license:expat)))
2636 (define-public python2-peewee
2637 (package-with-python2 python-peewee))
2639 (define-public python-tortoise-orm
2641 (name "python-tortoise-orm")
2646 (uri (pypi-uri "tortoise-orm" version))
2649 "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
2650 (build-system python-build-system)
2652 `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
2654 #:phases (modify-phases %standard-phases
2655 (add-after 'unpack 'relax-version-requirements
2657 (substitute* "setup.py"
2658 (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
2659 (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite"))
2662 `(("python-asynctest" ,python-asynctest)
2663 ("python-nose2" ,python-nose2)))
2665 `(("python-aiosqlite" ,python-aiosqlite)
2666 ("python-pypika" ,python-pypika)
2667 ("python-ciso8601" ,python-ciso8601)
2668 ("python-typing-extensions"
2669 ,python-typing-extensions)))
2671 "https://github.com/tortoise/tortoise-orm")
2673 "Easy async ORM for python, built with relations in mind")
2675 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2676 inspired by Django. Tortoise ORM was build with relations in mind and
2677 admiration for the excellent and popular Django ORM. It’s engraved in its
2678 design that you are working not with just tables, you work with relational
2680 (license license:asl2.0)))
2682 (define-public sqlcipher
2689 (uri (string-append "https://github.com/sqlcipher/" name
2690 "/archive/v" version ".tar.gz"))
2692 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2693 (file-name (string-append name "-" version ".tar.gz"))))
2694 (build-system gnu-build-system)
2696 `(("libcrypto" ,openssl)
2697 ("libtcl8.6" ,tcl))) ; required for running the tests
2702 '("--enable-tempstore=yes"
2703 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2704 "LDFLAGS=-lcrypto -ltcl8.6"
2706 ;; tests cannot be run from the Makefile
2707 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2708 #:test-target "testfixture"
2710 (modify-phases %standard-phases
2711 (add-before 'check 'build-test-runner
2712 (assoc-ref %standard-phases 'check))
2715 (invoke "./testfixture" "test/crypto.test"))))))
2716 (home-page "https://www.zetetic.net/sqlcipher/")
2718 "Library providing transparent encryption of SQLite database files")
2719 (description "SQLCipher is an implementation of SQLite, extended to
2720 provide transparent 256-bit AES encryption of database files. Pages are
2721 encrypted before being written to disk and are decrypted when read back. It’s
2722 well suited for protecting embedded application databases and for mobile
2725 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2726 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2727 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2728 ;; source files are in the public domain.
2729 (license (list license:public-domain license:bsd-3))))
2731 (define-public python-pyodbc-c
2733 (name "python-pyodbc-c")
2738 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2739 "archive.tar.gz?ref=v" version))
2742 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2743 (file-name (string-append name "-" version ".tar.gz"))))
2744 (build-system python-build-system)
2746 `(("unixodbc" ,unixodbc)))
2748 `(;; No unit tests exist.
2750 (home-page "https://github.com/mkleehammer/pyodbc")
2751 (synopsis "Python ODBC Library")
2752 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2754 (license (license:x11-style "file://LICENSE.TXT"))))
2756 (define-public python2-pyodbc-c
2757 (package-with-python2 python-pyodbc-c))
2759 (define-public python-pyodbc
2761 (name "python-pyodbc")
2766 (uri (pypi-uri "pyodbc" version))
2768 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2769 (file-name (string-append name "-" version ".tar.gz"))))
2770 (build-system python-build-system)
2772 `(("unixodbc" ,unixodbc)))
2774 `(#:tests? #f)) ; no unit tests exist
2775 (home-page "https://github.com/mkleehammer/pyodbc")
2776 (synopsis "Python ODBC Library")
2777 (description "@code{python-pyodbc} provides a Python DB-API driver
2779 (license (license:x11-style "file:///LICENSE.TXT"))))
2781 (define-public python2-pyodbc
2782 (package-with-python2 python-pyodbc))
2784 (define-public mdbtools
2792 (url "https://github.com/brianb/mdbtools")
2794 (file-name (git-file-name name version))
2797 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2798 (build-system gnu-build-system)
2802 `(("autoconf" ,autoconf)
2803 ("automake" ,automake)
2804 ("libtool" ,libtool)
2805 ("pkg-config" ,pkg-config)
2806 ("txt2man" ,txt2man)
2808 (home-page "http://mdbtools.sourceforge.net/")
2809 (synopsis "Read Microsoft Access databases")
2810 (description "MDB Tools is a set of tools and applications to read the
2811 proprietary MDB file format used in Microsoft's Access database package. This
2812 includes programs to export schema and data from Microsoft's Access database
2813 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2814 etc., and an SQL engine for performing simple SQL queries.")
2815 (license (list license:lgpl2.0
2818 (define-public python-lmdb
2820 (name "python-lmdb")
2824 (uri (pypi-uri "lmdb" version))
2827 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2828 (modules '((guix build utils)))
2830 ;; Delete bundled lmdb source files.
2832 (for-each delete-file (list "lib/lmdb.h"
2837 (build-system python-build-system)
2842 (modify-phases %standard-phases
2843 (add-before 'build 'use-system-lmdb
2844 (lambda* (#:key inputs #:allow-other-keys)
2845 (let ((lmdb (assoc-ref inputs "lmdb")))
2846 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2847 (setenv "LMDB_FORCE_SYSTEM" "set")
2848 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2849 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2851 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2853 (home-page "https://github.com/dw/py-lmdb")
2854 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2856 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2857 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2859 (list license:openldap2.8
2860 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2861 ;; but not actually needed on platforms currently supported by Guix.
2864 (define-public python-orator
2866 (name "python-orator")
2870 (uri (pypi-uri "orator" version))
2873 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2874 (build-system python-build-system)
2875 ;; FIXME: Tests are not distributed with PyPI, and the repository
2876 ;; does not contain setup.py. How to test?
2877 (arguments '(#:tests? #f))
2879 `(("python-backpack" ,python-backpack)
2880 ("python-blinker" ,python-blinker)
2881 ("python-cleo" ,python-cleo)
2882 ("python-faker" ,python-faker)
2883 ("python-inflection" ,python-inflection)
2884 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2885 ("python-pendulum" ,python-pendulum)
2886 ("python-pyaml" ,python-pyaml)
2887 ("python-pygments" ,python-pygments)
2888 ("python-pyyaml" ,python-pyyaml)
2889 ("python-simplejson" ,python-simplejson)
2890 ("python-six" ,python-six)
2891 ("python-wrapt" ,python-wrapt)))
2892 (home-page "https://orator-orm.com/")
2893 (synopsis "ActiveRecord ORM for Python")
2895 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2896 implementation for Python.")
2897 (license license:expat)
2898 (properties `((python2-variant . ,(delay python2-orator))))))
2900 (define-public python2-orator
2901 (package-with-python2 (strip-python2-variant python-orator)))
2903 (define-public virtuoso-ose
2905 (name "virtuoso-ose")
2911 "https://github.com/openlink/virtuoso-opensource/releases/"
2912 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2914 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2915 (build-system gnu-build-system)
2917 `(#:tests? #f ; Tests require a network connection.
2918 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2919 ;; This indicates that the internal zlib code may still be used.
2920 #:configure-flags '("--without-internal-zlib"
2922 "--enable-static=no")
2924 (modify-phases %standard-phases
2925 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2926 ;; the build output. The following phase removes it.
2927 (add-after 'install 'remove-static-libs
2928 (lambda* (#:key outputs #:allow-other-keys)
2929 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2930 (for-each (lambda (file)
2931 (delete-file (string-append lib "/" file)))
2933 "libvirtuoso-t.la"))))))))
2935 `(("openssl" ,openssl-1.0)
2936 ("net-tools" ,net-tools)
2937 ("readline" ,readline)
2939 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2940 (synopsis "Multi-model database system")
2941 (description "Virtuoso is a scalable cross-platform server that combines
2942 relational, graph, and document data management with web application server
2943 and web services platform functionality.")
2944 ;; configure: error: ... can only be build on 64bit platforms
2945 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2946 (license license:gpl2)))
2948 (define-public python-ccm
2955 (uri (pypi-uri "ccm" version))
2958 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2959 (build-system python-build-system)
2961 `(("python-pyyaml" ,python-pyyaml)
2962 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2964 ("python-psutil" ,python-psutil)
2965 ("python-six" ,python-six)))
2966 (home-page "https://github.com/pcmanus/ccm")
2967 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2969 (description "Cassandra Cluster Manager is a development tool for testing
2970 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2972 (license license:asl2.0)))
2974 (define-public python2-ccm
2975 (package-with-python2 python-ccm))
2977 (define-public python2-pysqlite
2979 (name "python2-pysqlite")
2984 (uri (pypi-uri "pysqlite" version))
2987 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2988 (build-system python-build-system)
2990 `(("sqlite" ,sqlite)))
2992 `(#:python ,python-2 ; incompatible with Python 3
2993 #:tests? #f)) ; no test target
2994 (home-page "https://github.com/ghaering/pysqlite")
2995 (synopsis "SQLite bindings for Python")
2997 "Pysqlite provides SQLite bindings for Python that comply to the
2998 Database API 2.0T.")
2999 (license license:zlib)))
3001 (define-public python-sqlalchemy
3003 (name "python-sqlalchemy")
3008 (uri (pypi-uri "SQLAlchemy" version))
3010 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
3011 (build-system python-build-system)
3013 `(("python-cython" ,python-cython) ; for C extensions
3014 ("python-pytest" ,python-pytest)
3015 ("python-mock" ,python-mock))) ; for tests
3018 (modify-phases %standard-phases
3020 (lambda _ (invoke "py.test"))))))
3021 (home-page "https://www.sqlalchemy.org")
3022 (synopsis "Database abstraction library")
3024 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3025 gives application developers the full power and flexibility of SQL. It
3026 provides a full suite of well known enterprise-level persistence patterns,
3027 designed for efficient and high-performing database access, adapted into a
3028 simple and Pythonic domain language.")
3029 (license license:x11)))
3031 (define-public python2-sqlalchemy
3032 (package-with-python2 python-sqlalchemy))
3034 (define-public python-sqlalchemy-utils
3036 (name "python-sqlalchemy-utils")
3041 (uri (pypi-uri "SQLAlchemy-Utils" version))
3044 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
3045 (build-system python-build-system)
3047 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
3049 ;; (modify-phases %standard-phases
3052 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
3054 `(("python-six" ,python-six)
3055 ("python-sqlalchemy" ,python-sqlalchemy)))
3057 `(("python-dateutil" ,python-dateutil)
3058 ("python-flexmock" ,python-flexmock)
3059 ("python-psycopg2" ,python-psycopg2)
3060 ("python-pytest" ,python-pytest)
3061 ("python-pytz" ,python-pytz)))
3062 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3063 (synopsis "Various utility functions for SQLAlchemy")
3065 "SQLAlchemy-utils provides various utility functions and custom data types
3066 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3068 You might also want to install the following optional dependencies:
3070 @item @code{python-passlib}
3071 @item @code{python-babel}
3072 @item @code{python-cryptography}
3073 @item @code{python-pytz}
3074 @item @code{python-psycopg2}
3075 @item @code{python-furl}
3076 @item @code{python-flask-babel}
3079 (license license:bsd-3)))
3081 (define-public python2-sqlalchemy-utils
3082 (package-with-python2 python-sqlalchemy-utils))
3084 (define-public python-alchemy-mock
3086 (name "python-alchemy-mock")
3088 (home-page "https://github.com/miki725/alchemy-mock")
3091 (uri (pypi-uri "alchemy-mock" version))
3094 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
3095 (build-system python-build-system)
3097 '(#:phases (modify-phases %standard-phases
3100 ;; Create pytest.ini that adds doctest options to
3101 ;; prevent test failure. Taken from tox.ini.
3102 (call-with-output-file "pytest.ini"
3104 (format port "[pytest]
3105 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
3107 (invoke "pytest" "-vv" "--doctest-modules"
3108 "alchemy_mock/"))))))
3110 `(("python-mock" ,python-mock)
3111 ("python-pytest" ,python-pytest)))
3113 `(("python-six" ,python-six)
3114 ("python-sqlalchemy" ,python-sqlalchemy)))
3115 (synopsis "Mock helpers for SQLAlchemy")
3117 "This package provides mock helpers for SQLAlchemy that makes it easy
3118 to mock an SQLAlchemy session while preserving the ability to do asserts.
3120 Normally Normally SQLAlchemy's expressions cannot be easily compared as
3121 comparison on binary expression produces yet another binary expression, but
3122 this library provides functions to facilitate such comparisons.")
3123 (license license:expat)))
3125 (define-public python-alembic
3127 (name "python-alembic")
3132 (uri (pypi-uri "alembic" version))
3134 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
3135 (build-system python-build-system)
3137 '(#:phases (modify-phases %standard-phases
3140 (invoke "pytest" "-vv"))))))
3142 `(("python-mock" ,python-mock)
3143 ("python-pytest-cov" ,python-pytest-cov)))
3145 `(("python-dateutil" ,python-dateutil)
3146 ("python-sqlalchemy" ,python-sqlalchemy)
3147 ("python-mako" ,python-mako)
3148 ("python-editor" ,python-editor)))
3149 (home-page "https://bitbucket.org/zzzeek/alembic")
3150 (synopsis "Database migration tool for SQLAlchemy")
3152 "Alembic is a lightweight database migration tool for usage with the
3153 SQLAlchemy Database Toolkit for Python.")
3154 (license license:expat)))
3156 (define-public python2-alembic
3157 (package-with-python2 python-alembic))
3159 (define-public python-pickleshare
3161 (name "python-pickleshare")
3166 (uri (pypi-uri "pickleshare" version))
3168 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
3169 (build-system python-build-system)
3171 `(#:phases (modify-phases %standard-phases
3174 (invoke "pytest"))))))
3176 `(("python-pytest" ,python-pytest)))
3177 (home-page "https://github.com/vivainio/pickleshare")
3178 (synopsis "Tiny key value database with concurrency support")
3180 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
3181 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
3182 shelve, many processes can access the database simultaneously. Changing a
3183 value in database is immediately visible to other processes accessing the same
3184 database. Concurrency is possible because the values are stored in separate
3185 files. Hence the “database” is a directory where all files are governed by
3187 (properties `((python2-variant . ,(delay python2-pickleshare))))
3188 (license license:expat)))
3190 (define-public python2-pickleshare
3191 (let ((pickleshare (package-with-python2
3192 (strip-python2-variant python-pickleshare))))
3193 (package (inherit pickleshare)
3194 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3195 ,@(package-propagated-inputs pickleshare))))))
3197 (define-public python-apsw
3199 (name "python-apsw")
3200 (version "3.31.1-r1")
3204 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3205 "/download/" version "/apsw-" version ".zip"))
3208 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3209 (build-system python-build-system)
3211 `(("unzip" ,unzip)))
3213 `(("sqlite" ,sqlite)))
3216 (modify-phases %standard-phases
3219 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3221 (add-after 'build 'build-test-helper
3223 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3224 "-I." "-Isqlite3" "src/testextension.c")
3227 (lambda* (#:key inputs outputs #:allow-other-keys)
3228 (add-installed-pythonpath inputs outputs)
3229 (invoke "python" "setup.py" "test")
3231 (home-page "https://github.com/rogerbinns/apsw/")
3232 (synopsis "Another Python SQLite Wrapper")
3233 (description "APSW is a Python wrapper for the SQLite
3234 embedded relational database engine. In contrast to other wrappers such as
3235 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3236 translate the complete SQLite API into Python.")
3237 (license license:zlib)))
3239 (define-public python2-apsw
3240 (package-with-python2 python-apsw))
3242 (define-public python-aiosqlite
3244 (name "python-aiosqlite")
3249 (uri (pypi-uri "aiosqlite" version))
3252 "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph"))))
3253 (build-system python-build-system)
3255 '(#:phases (modify-phases %standard-phases
3257 (lambda* (#:key tests? #:allow-other-keys)
3259 (invoke "python" "-m" "unittest" "aiosqlite.tests")
3260 (format #t "test suite not run~%"))
3263 `(("python-typing-extensions" ,python-typing-extensions)))
3265 `(("python-aiounittest" ,python-aiounittest)))
3266 (home-page "https://github.com/jreese/aiosqlite")
3268 "Asyncio bridge for sqlite3")
3270 "The package aiosqlite replicates the standard sqlite3 module, but with
3271 async versions of all the standard connection and cursor methods, and context
3272 managers for automatically closing connections.")
3273 (license license:expat)))
3275 (define-public python2-neo4j-driver
3277 (name "python2-neo4j-driver")
3278 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3282 (uri (pypi-uri "neo4j-driver" version))
3285 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3286 (build-system python-build-system)
3288 `(#:python ,python-2))
3289 (home-page "https://neo4j.com/developer/python/")
3290 (synopsis "Neo4j driver code written in Python")
3291 (description "This package provides the Neo4j Python driver that connects
3292 to the database using Neo4j's binary protocol. It aims to be minimal, while
3293 being idiomatic to Python.")
3294 (license license:asl2.0)))
3296 (define-public python2-py2neo
3298 (name "python2-py2neo")
3302 (uri (pypi-uri "py2neo" version))
3305 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3306 (build-system python-build-system)
3308 `(#:python ,python-2))
3309 (home-page "https://py2neo.org")
3310 (synopsis "Library and toolkit for working with Neo4j in Python")
3311 (description "This package provides a client library and toolkit for
3312 working with Neo4j from within Python applications and from the command
3313 line. The core library has no external dependencies and has been carefully
3314 designed to be easy and intuitive to use.")
3315 (license license:asl2.0)))
3317 (define-public python-psycopg2
3319 (name "python-psycopg2")
3324 (uri (pypi-uri "psycopg2" version))
3326 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3327 (build-system python-build-system)
3329 ;; Tests would require a postgresql database "psycopg2_test"
3330 ;; and a running postgresql database management service.
3331 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3333 `(("postgresql" ,postgresql))) ; libpq
3334 (home-page "http://initd.org/psycopg/")
3335 (synopsis "Python PostgreSQL adapter")
3337 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3339 (license license:lgpl3+)))
3341 (define-public python2-psycopg2
3342 (package-with-python2 python-psycopg2))
3344 (define-public python-sadisplay
3346 (name "python-sadisplay")
3351 (uri (pypi-uri "sadisplay" version))
3354 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3355 (build-system python-build-system)
3357 `(("python-sqlalchemy" ,python-sqlalchemy)))
3360 `(("python-nose" ,python-nose)))
3361 (home-page "https://bitbucket.org/estin/sadisplay")
3362 (synopsis "SQLAlchemy schema displayer")
3363 (description "This package provides a program to build Entity
3364 Relationship diagrams from a SQLAlchemy model (or directly from the
3366 (license license:bsd-3)))
3368 (define-public python2-sadisplay
3369 (package-with-python2 python-sadisplay))
3371 (define-public yoyo-migrations
3373 (name "yoyo-migrations")
3377 ;; We use the upstream repository, as the tests are not included in the
3381 (url "https://hg.sr.ht/~olly/yoyo")
3382 (changeset (string-append "v" version "-release"))))
3383 (file-name (string-append name "-" version "-checkout"))
3385 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3386 (build-system python-build-system)
3388 ;; XXX: Tests require a connection to some pgsql database and psycopg
3389 ;; fails to connect to it.
3392 `(("python-sqlparse" ,python-sqlparse)
3393 ("python-tabulate" ,python-tabulate)))
3394 (home-page "https://ollycope.com/software/yoyo/latest/")
3395 (synopsis "Database migrations with SQL")
3397 "Yoyo is a database schema migration tool. Migrations are written as SQL
3398 files or Python scripts that define a list of migration steps.")
3399 (license license:asl2.0)))
3401 (define-public python-mysqlclient
3403 (name "python-mysqlclient")
3408 (uri (pypi-uri "mysqlclient" version))
3411 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3412 (build-system python-build-system)
3413 (arguments '(#:tests? #f)) ;XXX: requires a live database
3415 `(("mysql-dev" ,mariadb "dev")))
3416 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3417 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3418 (description "MySQLdb is an interface to the popular MySQL database server
3419 for Python. The design goals are:
3421 @item Compliance with Python database API version 2.0 [PEP-0249],
3422 @item Thread-safety,
3423 @item Thread-friendliness (threads will not block each other).
3425 (license license:gpl2)))
3427 (define-public python-hiredis
3429 (name "python-hiredis")
3434 (uri (pypi-uri "hiredis" version))
3437 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3438 (build-system python-build-system)
3442 (home-page "https://github.com/redis/hiredis-py")
3443 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3444 (description "Python-hiredis is a python extension that wraps protocol
3445 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3446 (license license:bsd-3)))
3448 (define-public python2-hiredis
3449 (package-with-python2 python-hiredis))
3451 (define-public python-fakeredis
3453 (name "python-fakeredis")
3458 (uri (pypi-uri "fakeredis" version))
3461 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3462 (build-system python-build-system)
3467 `(("python-sortedcontainers" ,python-sortedcontainers)))
3468 (home-page "https://github.com/jamesls/fakeredis")
3469 (synopsis "Fake implementation of redis API for testing purposes")
3471 "Fakeredis is a pure-Python implementation of the redis-py Python client
3472 that simulates talking to a redis server. It was created for a single purpose:
3473 to write unit tests.
3475 Setting up redis is not hard, but one often wants to write unit tests that don't
3476 talk to an external server such as redis. This module can be used as a
3477 reasonable substitute.")
3478 (license license:bsd-3)))
3480 (define-public python2-fakeredis
3481 (package-with-python2 python-fakeredis))
3483 (define-public python-redis
3485 (name "python-redis")
3490 (uri (pypi-uri "redis" version))
3492 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3493 (build-system python-build-system)
3494 ;; Tests require a running Redis server.
3495 (arguments '(#:tests? #f))
3496 ;; As long as we are not running test, we do not need this input :-)
3498 ;; `(("python-pytest" ,python-pytest)))
3499 (home-page "https://github.com/andymccurdy/redis-py")
3500 (synopsis "Redis Python client")
3502 "This package provides a Python interface to the Redis key-value store.")
3503 (license license:expat)))
3505 (define-public python2-redis
3506 (package-with-python2 python-redis))
3508 (define-public python-rq
3516 (url "https://github.com/rq/rq")
3517 (commit (string-append "v" version))))
3518 (file-name (git-file-name name version))
3520 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3521 (build-system python-build-system)
3523 '(#:phases (modify-phases %standard-phases
3524 (add-before 'check 'start-redis
3526 (invoke "redis-server" "--daemonize" "yes")))
3528 (lambda* (#:key outputs #:allow-other-keys)
3529 (let ((out (assoc-ref outputs "out")))
3530 ;; Drop test that needs the SDK for Sentry.io.
3531 (delete-file "tests/test_sentry.py")
3532 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3533 (setenv "PATH" (string-append out "/bin:"
3535 (invoke "pytest" "-vv")))))))
3537 `(("python-mock" ,python-mock)
3538 ("python-pytest" ,python-pytest)
3541 `(("python-click" ,python-click)
3542 ("python-redis" ,python-redis)))
3543 (home-page "https://python-rq.org/")
3544 (synopsis "Simple job queues for Python")
3546 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3547 processing them in the background with workers. It is backed by Redis and it
3548 is designed to have a low barrier to entry.")
3549 (license license:bsd-2)))
3551 (define-public python2-rq
3552 (package-with-python2 python-rq))
3554 (define-public python-rq-scheduler
3556 (name "python-rq-scheduler")
3558 (home-page "https://github.com/rq/rq-scheduler")
3563 (commit (string-append "v" version))))
3564 (file-name (git-file-name name version))
3567 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3568 (build-system python-build-system)
3570 '(#:phases (modify-phases %standard-phases
3571 (add-before 'check 'start-redis
3573 (invoke "redis-server" "--daemonize" "yes")))
3576 (substitute* "run_tests.py"
3579 (invoke "./run_tests.py"))))))
3584 `(("python-croniter" ,python-croniter)
3585 ("python-rq" ,python-rq)))
3586 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3588 "This package provides job scheduling capabilities to @code{python-rq}
3590 (license license:expat)))
3592 (define-public python-trollius-redis
3594 (name "python-trollius-redis")
3599 (uri (pypi-uri "trollius_redis" version))
3602 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3603 (build-system python-build-system)
3604 ;; TODO: Tests require packaging 'hiredis'.
3605 (arguments '(#:tests? #f))
3606 (home-page "https://github.com/benjolitz/trollius-redis")
3607 (synopsis "Port of asyncio-redis to trollius")
3608 (description "@code{trollius-redis} is a Redis client for Python
3609 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3611 (license license:bsd-2)))
3613 (define-public python2-trollius-redis
3614 (package-with-python2 python-trollius-redis))
3616 (define-public python-sqlparse
3618 (name "python-sqlparse")
3622 (uri (pypi-uri "sqlparse" version))
3625 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3626 (build-system python-build-system)
3629 (modify-phases %standard-phases
3631 (lambda _ (invoke "py.test"))))))
3633 `(("python-pytest" ,python-pytest)))
3634 (home-page "https://github.com/andialbrecht/sqlparse")
3635 (synopsis "Non-validating SQL parser")
3636 (description "Sqlparse is a non-validating SQL parser for Python. It
3637 provides support for parsing, splitting and formatting SQL statements.")
3638 (license license:bsd-3)))
3640 (define-public python2-sqlparse
3641 (package-with-python2 python-sqlparse))
3643 (define-public python-sql
3650 (uri (pypi-uri "python-sql" version))
3652 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3653 (build-system python-build-system)
3654 (home-page "https://python-sql.tryton.org/")
3655 (synopsis "Library to write SQL queries in a pythonic way")
3656 (description "@code{python-sql} is a library to write SQL queries, that
3657 transforms idiomatic python function calls to well-formed SQL queries.")
3658 (license license:bsd-3)))
3660 (define-public python2-sql
3661 (package-with-python2 python-sql))
3663 (define-public python-pypika
3665 (name "python-pypika")
3668 (origin (method git-fetch)
3670 (url "https://github.com/kayak/pypika")
3671 (commit (string-append "v" version))))
3672 (file-name (git-file-name name version))
3675 "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549"))))
3676 (build-system python-build-system)
3678 `(("python-parameterized" ,python-parameterized)))
3679 (home-page "https://github.com/kayak/pypika")
3680 (synopsis "SQL query builder API for Python")
3682 "PyPika is a python SQL query builder that exposes the full richness of
3683 the SQL language using a syntax that reflects the resulting query.")
3684 (license license:asl2.0)))
3686 (define-public mongo-tools
3688 (name "mongo-tools")
3691 (origin (method git-fetch)
3693 (url "https://github.com/mongodb/mongo-tools")
3694 (commit (string-append "r" version))))
3695 (file-name (git-file-name name version))
3698 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3699 (build-system go-build-system)
3701 `(#:import-path "github.com/mongodb/mongo-tools"
3702 #:modules ((srfi srfi-1)
3703 (guix build go-build-system)
3705 #:install-source? #f
3708 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3709 "mongoimport" "mongooplog" "mongorestore"
3710 "mongostat" "mongotop")))
3711 (modify-phases %standard-phases
3712 (add-after 'unpack 'delete-bundled-source-code
3714 (delete-file-recursively
3715 "src/github.com/mongodb/mongo-tools/vendor")
3717 (add-after 'delete-bundled-source-code 'patch-source
3719 ;; Remove a redundant argument that causes compilation to fail.
3721 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3722 (("skipping restore of system.profile collection\", db)")
3723 "skipping restore of system.profile collection\")"))
3727 (for-each (lambda (tool)
3730 ;; This is where the tests expect to find the
3732 "-o" ,(string-append
3733 "src/github.com/mongodb/mongo-tools/bin/"
3736 "-tags=\"ssl sasl\""
3738 "-extldflags=-Wl,-z,now,-z,relro"
3740 "src/github.com/mongodb/mongo-tools/"
3741 tool "/main/" tool ".go"))))
3742 (simple-format #t "build: running ~A\n"
3743 (string-join command))
3744 (apply invoke command)))
3749 (with-directory-excursion "src"
3750 (for-each (lambda (tool)
3753 (string-append "github.com/mongodb/mongo-tools/"
3758 (lambda* (#:key outputs #:allow-other-keys)
3759 (for-each (lambda (tool)
3761 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3763 (string-append (assoc-ref outputs "out")
3768 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3769 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3770 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3771 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3772 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3773 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3774 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3775 (home-page "https://github.com/mongodb/mongo-tools")
3776 (synopsis "Various tools for interacting with MongoDB and BSON")
3778 "This package includes a collection of tools related to MongoDB.
3781 Display BSON files in a human-readable format
3783 Convert data from JSON, TSV or CSV and insert them into a collection
3785 Write an existing collection to CSV or JSON format
3786 @item mongodump/mongorestore
3787 Dump MongoDB backups to disk in the BSON format
3789 Read MongoDB backups in the BSON format, and restore them to a live database
3791 Monitor live MongoDB servers, replica sets, or sharded clusters
3793 Read, write, delete, or update files in GridFS
3795 Replay oplog entries between MongoDB servers
3797 Monitor read/write activity on a mongo server
3799 (license license:asl2.0)))
3801 ;; There are many wrappers for this in other languages. When touching, please
3802 ;; be sure to ensure all dependencies continue to build.
3803 (define-public apache-arrow
3805 (name "apache-arrow")
3811 (url "https://github.com/apache/arrow")
3812 (commit (string-append "apache-arrow-" version))))
3813 (file-name (git-file-name name version))
3816 "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0"))))
3817 (build-system cmake-build-system)
3821 (modify-phases %standard-phases
3822 (add-before 'configure 'enter-source-directory
3823 (lambda _ (chdir "cpp") #t))
3824 (add-after 'unpack 'set-env
3826 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3827 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3828 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3829 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3831 #:build-type "Release"
3833 (list "-DARROW_PYTHON=ON"
3836 "-DARROW_PARQUET=ON"
3837 "-DPARQUET_BUILD_EXECUTABLES=ON"
3838 ;; The maintainers disallow using system versions of
3840 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3841 ;; is unfortunate because jemalloc increases performance:
3842 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3843 "-DARROW_JEMALLOC=OFF"
3845 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3846 ;; option that instructs the build system how to resolve
3847 ;; each dependency. SYSTEM = Finding the dependency in
3848 ;; system paths using CMake's built-in find_package
3849 ;; function, or using pkg-config for packages that do not
3850 ;; have this feature
3851 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3853 ;; Split output into its component packages.
3854 (string-append "-DCMAKE_INSTALL_PREFIX="
3855 (assoc-ref %outputs "lib"))
3856 (string-append "-DCMAKE_INSTALL_RPATH="
3857 (assoc-ref %outputs "lib")
3859 (string-append "-DCMAKE_INSTALL_BINDIR="
3860 (assoc-ref %outputs "out")
3862 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3863 (assoc-ref %outputs "include")
3867 "-DARROW_WITH_SNAPPY=ON"
3868 "-DARROW_WITH_ZLIB=ON"
3869 "-DARROW_WITH_ZSTD=ON"
3870 "-DARROW_WITH_LZ4=ON"
3871 "-DARROW_COMPUTE=ON"
3873 "-DARROW_DATASET=ON"
3874 "-DARROW_FILESYSTEM=ON"
3877 ;; Arrow Python C++ integration library (required for
3878 ;; building pyarrow). This library must be built against
3879 ;; the same Python version for which you are building
3880 ;; pyarrow. NumPy must also be installed. Enabling this
3881 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3882 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3886 ;; Building the tests forces on all the
3887 ;; optional features and the use of static
3889 "-DARROW_BUILD_TESTS=OFF"
3890 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3891 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3892 "-DARROW_BUILD_STATIC=OFF")))
3894 `(("apache-thrift" ,apache-thrift "lib")
3896 ("brotli" ,google-brotli)
3898 ("double-conversion" ,double-conversion)
3903 ("protobuf" ,protobuf)
3904 ("python-3" ,python)
3905 ("python-numpy" ,python-numpy)
3906 ("rapidjson" ,rapidjson)
3909 ("utf8proc" ,utf8proc)
3911 ("zstd" ,zstd "lib")))
3913 `(("pkg-config" ,pkg-config)))
3914 (outputs '("out" "lib" "include"))
3915 (home-page "https://arrow.apache.org/")
3916 (synopsis "Columnar in-memory analytics")
3917 (description "Apache Arrow is a columnar in-memory analytics layer
3918 designed to accelerate big data. It houses a set of canonical in-memory
3919 representations of flat and hierarchical data along with multiple
3920 language-bindings for structure manipulation. It also provides IPC and common
3921 algorithm implementations.")
3922 (license license:asl2.0)))
3924 (define-public python-pyarrow
3926 (inherit apache-arrow)
3927 (name "python-pyarrow")
3928 (build-system python-build-system)
3930 '(#:tests? #f ; XXX There are no tests in the "python" directory
3932 (modify-phases %standard-phases
3933 (delete 'build) ; XXX the build is performed again during the install phase
3934 (add-after 'unpack 'enter-source-directory
3935 (lambda _ (chdir "python") #t))
3936 (add-after 'unpack 'make-git-checkout-writable
3938 (for-each make-file-writable (find-files "."))
3941 `(("apache-arrow" ,apache-arrow "lib")
3942 ("python-numpy" ,python-numpy)
3943 ("python-pandas" ,python-pandas)
3944 ("python-six" ,python-six)))
3946 `(("cmake" ,cmake-minimal)
3947 ("pkg-config" ,pkg-config)
3948 ("python-cython" ,python-cython)
3949 ("python-pytest" ,python-pytest)
3950 ("python-pytest-runner" ,python-pytest-runner)
3951 ("python-setuptools-scm" ,python-setuptools-scm)))
3953 (home-page "https://arrow.apache.org/docs/python/")
3954 (synopsis "Python bindings for Apache Arrow")
3956 "This library provides a Pythonic API wrapper for the reference Arrow C++
3957 implementation, along with tools for interoperability with pandas, NumPy, and
3958 other traditional Python scientific computing packages.")
3959 (license license:asl2.0)))
3961 (define-public python-crate
3963 (name "python-crate")
3967 (uri (pypi-uri "crate" version))
3970 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3971 (build-system python-build-system)
3973 `(("python-urllib3" ,python-urllib3)))
3974 (home-page "https://github.com/crate/crate-python")
3975 (synopsis "CrateDB Python client")
3977 "This package provides a Python client library for CrateDB.
3978 It implements the Python DB API 2.0 specification and includes support for
3980 (license license:asl2.0)))
3982 (define-public libdbi
3988 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3989 version "/libdbi-" version ".tar.gz"))
3992 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3993 (build-system gnu-build-system)
3994 (synopsis "Database independent abstraction layer in C")
3996 "This library implements a database independent abstraction layer in C,
3997 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3998 programmers can leverage the power of multiple databases and multiple
3999 simultaneous database connections by using this framework.")
4000 (home-page "http://libdbi.sourceforge.net/")
4001 (license license:lgpl2.1+)))
4003 (define-public libdbi-drivers
4005 (name "libdbi-drivers")
4009 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
4010 "libdbi-drivers/libdbi-drivers-" version
4011 "/libdbi-drivers-" version ".tar.gz"))
4014 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
4015 (build-system gnu-build-system)
4018 ("inetutils" ,inetutils)
4019 ("glibc-locales" ,glibc-locales)
4020 ("mariadb" ,mariadb)))
4022 `(("libdbi" ,libdbi)
4023 ("mariadb:dev" ,mariadb "dev")
4024 ("mariadb:lib" ,mariadb "lib")
4025 ("postgresql" ,postgresql)
4026 ("sqlite" ,sqlite)))
4029 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
4030 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
4031 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
4032 (postgresql (assoc-ref %build-inputs "postgresql"))
4033 (sqlite (assoc-ref %build-inputs "sqlite")))
4034 (list "--disable-docs"
4035 (string-append "--with-dbi-incdir=" libdbi "/include")
4036 (string-append "--with-dbi-libdir=" libdbi "/lib")
4038 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
4039 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
4041 (string-append "--with-pgsql-incdir=" postgresql "/include")
4042 (string-append "--with-pgsql-libdir=" postgresql "/lib")
4044 (string-append "--with-sqlite-incdir=" sqlite "/include")
4045 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
4046 #:tests? #f ; FIXME: Find why the tests get stuck forever.
4048 (modify-phases %standard-phases
4049 (add-after 'unpack 'fix-tests
4050 (lambda* (#:key inputs #:allow-other-keys)
4051 (substitute* "tests/test_mysql.sh"
4053 (string-append "MYMYSQLD="
4054 (assoc-ref inputs "mariadb")
4057 (add-after 'install 'remove-empty-directories
4058 (lambda* (#:key outputs #:allow-other-keys)
4059 (let ((var (string-append (assoc-ref outputs "out") "/var")))
4060 (delete-file-recursively var))
4062 (synopsis "Database drivers for the libdbi framework")
4064 "The @code{libdbi-drivers} library provides the database specific drivers
4065 for the @code{libdbi} framework.
4067 The drivers officially supported by @code{libdbi} are:
4073 (home-page "http://libdbi-drivers.sourceforge.net/")
4074 (license license:lgpl2.1+)))
4083 (url "https://github.com/SOCI/soci/")
4085 (file-name (git-file-name name version))
4088 "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp"))))
4089 (build-system cmake-build-system)
4091 `(("firebird" ,firebird)
4092 ("postgresql" ,postgresql)
4096 ("mariadb:dev" ,mariadb "dev")))
4099 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
4100 (list "-DCMAKE_CXX_STANDARD=17"
4101 "-DSOCI_LIBDIR=lib")
4102 #:tests? #f)) ; may require running database management systems
4103 (synopsis "C++ Database Access Library")
4105 "SOCI is an abstraction layer for several database backends, including
4106 PostreSQL, SQLite, ODBC and MySQL.")
4107 (home-page "http://soci.sourceforge.net/")
4108 (license license:boost1.0)))
4110 (define-public freetds
4117 (uri (string-append "https://www.freetds.org/files/stable/"
4118 "freetds-" version ".tar.gz"))
4120 (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50"))))
4121 (build-system gnu-build-system)
4123 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
4124 ;; disabled for now.
4126 (home-page "https://www.freetds.org/")
4127 (synopsis "Client libraries for MS SQL and Sybase servers")
4129 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
4130 connecting to MS SQL and Sybase servers over TCP/IP.")
4131 (license license:lgpl2.0+)))