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 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>
51 ;;; This file is part of GNU Guix.
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
66 (define-module (gnu packages databases)
67 #:use-module (gnu packages)
68 #:use-module (gnu packages admin)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages autotools)
71 #:use-module (gnu packages avahi)
72 #:use-module (gnu packages base)
73 #:use-module (gnu packages bash)
74 #:use-module (gnu packages bison)
75 #:use-module (gnu packages boost)
76 #:use-module (gnu packages check)
77 #:use-module (gnu packages cmake)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages crypto)
80 #:use-module (gnu packages curl)
81 #:use-module (gnu packages cyrus-sasl)
82 #:use-module (gnu packages dbm)
83 #:use-module (gnu packages emacs)
84 #:use-module (gnu packages flex)
85 #:use-module (gnu packages gcc)
86 #:use-module (gnu packages gettext)
87 #:use-module (gnu packages glib)
88 #:use-module (gnu packages gnupg)
89 #:use-module (gnu packages golang)
90 #:use-module (gnu packages guile)
91 #:use-module (gnu packages icu4c)
92 #:use-module (gnu packages jemalloc)
93 #:use-module (gnu packages language)
94 #:use-module (gnu packages libedit)
95 #:use-module (gnu packages libevent)
96 #:use-module (gnu packages linux)
97 #:use-module (gnu packages lisp)
98 #:use-module (gnu packages lisp-xyz)
99 #:use-module (gnu packages logging)
100 #:use-module (gnu packages man)
101 #:use-module (gnu packages maths)
102 #:use-module (gnu packages multiprecision)
103 #:use-module (gnu packages ncurses)
104 #:use-module (gnu packages onc-rpc)
105 #:use-module (gnu packages parallel)
106 #:use-module (gnu packages pcre)
107 #:use-module (gnu packages perl)
108 #:use-module (gnu packages perl-check)
109 #:use-module (gnu packages perl-web)
110 #:use-module (gnu packages pkg-config)
111 #:use-module (gnu packages popt)
112 #:use-module (gnu packages protobuf)
113 #:use-module (gnu packages python)
114 #:use-module (gnu packages python-crypto)
115 #:use-module (gnu packages python-science)
116 #:use-module (gnu packages python-web)
117 #:use-module (gnu packages python-xyz)
118 #:use-module (gnu packages rdf)
119 #:use-module (gnu packages readline)
120 #:use-module (gnu packages regex)
121 #:use-module (gnu packages rpc)
122 #:use-module (gnu packages ruby)
123 #:use-module (gnu packages serialization)
124 #:use-module (gnu packages sphinx)
125 #:use-module (gnu packages sqlite)
126 #:use-module (gnu packages tcl)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages textutils)
129 #:use-module (gnu packages time)
130 #:use-module (gnu packages tls)
131 #:use-module (gnu packages valgrind)
132 #:use-module (gnu packages web)
133 #:use-module (gnu packages xml)
134 #:use-module ((guix licenses) #:prefix license:)
135 #:use-module (guix packages)
136 #:use-module (guix download)
137 #:use-module (guix bzr-download)
138 #:use-module (guix git-download)
139 #:use-module (guix hg-download)
140 #:use-module (guix build-system emacs)
141 #:use-module (guix build-system gnu)
142 #:use-module (guix build-system go)
143 #:use-module (guix build-system perl)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system ruby)
146 #:use-module (guix build-system cmake)
147 #:use-module (guix build-system scons)
148 #:use-module (guix build-system trivial)
149 #:use-module (guix utils)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26)
152 #:use-module (ice-9 match))
154 (define-public 4store
161 (url "https://github.com/4store/4store")
162 (commit (string-append "v" version))))
163 (file-name (git-file-name name version))
165 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
166 (patches (search-patches "4store-unset-preprocessor-directive.patch"
167 "4store-fix-buildsystem.patch"))))
168 (build-system gnu-build-system)
172 ("autoconf" ,autoconf)
173 ("automake" ,automake)
174 ("gettext" ,gettext-minimal)
176 ("pcre" ,pcre "bin") ;for 'pcre-config'
177 ("pkg-config" ,pkg-config)))
183 ("readline" ,readline)
185 ("cyrus-sasl" ,cyrus-sasl)
187 ("util-linux" ,util-linux "lib")))
188 ;; http://www.4store.org has been down for a while now.
189 (home-page "https://github.com/4store/4store")
190 (synopsis "Clustered RDF storage and query engine")
191 (description "4store is a RDF/SPARQL store written in C, supporting
192 either single machines or networked clusters.")
193 (license license:gpl3+)))
195 (define-public go-gopkg.in-mgo.v2
197 (name "go-gopkg.in-mgo.v2")
198 (version "2016.08.01")
202 (url "https://github.com/go-mgo/mgo")
203 (commit (string-append "r" version))))
204 (file-name (git-file-name name version))
207 "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
208 (build-system go-build-system)
210 `(#:import-path "gopkg.in/mgo.v2"
211 ;; TODO: The tests fail as MongoDB fails to start
212 ;; Error parsing command line: unrecognised option '--chunkSize'
215 (modify-phases %standard-phases
216 (delete 'reset-gzip-timestamps)
217 (add-before 'check 'start-mongodb
218 (lambda* (#:key tests? #:allow-other-keys)
220 (with-directory-excursion "src/gopkg.in/mgo.v2"
221 (invoke "make" "startdb")))
223 (add-after 'check 'stop'mongodb
224 (lambda* (#:key tests? #:allow-other-keys)
226 (with-directory-excursion "src/gopkg.in/mgo.v2"
227 (invoke "make" "stopdb")))
230 `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
232 ("daemontools" ,daemontools)))
233 (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
235 "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
236 It implements a rich selection of features under a simple API following
237 standard Go idioms.")
238 (home-page "https://labix.org/mgo")
239 (license license:bsd-2)))
241 (define-public ephemeralpg
249 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
252 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
253 (build-system gnu-build-system)
255 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
256 (string-append "PREFIX=" %output))
258 (modify-phases %standard-phases
259 (delete 'configure) ; no configure script
260 (add-after 'install 'wrap
261 (lambda* (#:key inputs outputs #:allow-other-keys)
262 (let ((out (assoc-ref outputs "out")))
263 (wrap-program (string-append out "/bin/pg_tmp")
265 (,(string-append (assoc-ref inputs "util-linux")
267 ,(string-append (assoc-ref inputs "postgresql")
270 ,(string-append out "/bin")))))
272 #:test-target "test"))
274 `(("postgresql" ,postgresql)
275 ("util-linux" ,util-linux)))
280 (home-page "https://eradman.com/ephemeralpg/")
281 (synopsis "Run temporary PostgreSQL databases")
283 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
284 like running software test suites. Temporary databases created with
285 @code{pg_tmp} have a limited shared memory footprint and are automatically
286 garbage-collected after a configurable number of seconds (the default is
288 (license license:isc)))
290 (define-public es-dump-restore
292 (name "es-dump-restore")
297 (uri (rubygems-uri "es_dump_restore" version))
300 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
301 (build-system ruby-build-system)
303 '(#:tests? #f)) ;; No testsuite.
305 `(("ruby-httpclient" ,ruby-httpclient)
306 ("ruby-multi-json" ,ruby-multi-json)
307 ("ruby-progress_bar" ,ruby-progress_bar)
308 ("ruby-rubyzip" ,ruby-rubyzip)
309 ("ruby-thor" ,ruby-thor)))
310 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
312 "This package provides a utility for dumping the contents of an
313 ElasticSearch index to a compressed file and restoring the dumpfile back to an
314 ElasticSearch server")
315 (home-page "https://github.com/patientslikeme/es_dump_restore")
316 (license license:expat)))
318 (define-public firebird
323 (let ((revision "33374-0"))
326 (uri (string-append "https://github.com/FirebirdSQL/"
327 "firebird/releases/download/R"
328 (string-replace-substring version "." "_") "/"
329 "Firebird-" version "." revision ".tar.bz2"))
331 (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c"))
332 (modules '((guix build utils)))
336 delete-file-recursively
337 (list "extern/btyacc/test" ; TODO: package and remove entirely
342 "src/include/firebird/impl/boost"
345 "builds/install/arch-specific/solaris"
347 "src/msgs/templates.sql"
349 ;; Generated files missing sources.
350 "doc/Firebird-3-QuickStart.pdf"
351 (string-append "doc/Firebird-" ,version
353 "doc/README.SecureRemotePassword.html"))
355 (build-system gnu-build-system)
356 (outputs (list "debug" "out"))
359 (let ((out (assoc-ref %outputs "out")))
360 (list (string-append "--with-fbsbin=" out "/sbin")
361 (string-append "--with-fbdoc=" out "/share/doc/"
363 (string-append "--with-fbconf=" out "/lib/firebird")
364 (string-append "--with-fbintl=" out "/lib/firebird/intl")
365 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
366 (string-append "--with-fbmsg=" out "/lib/firebird")
367 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
368 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
369 "--with-fbglock=/run/firebird"
370 "--with-fblog=/var/log/firebird"
371 "--with-fbhelp=/var/lib/firebird/system"
372 "--with-fbsecure-db=/var/lib/firebird/secure"
374 "--without-fbsample-db"
375 "--with-system-editline"))
377 (list (string-append "CC=" ,(cc-for-target))
378 ;; The plugins/ can't find libfbclient otherwise.
379 (string-append "LDFLAGS=-Wl,-rpath="
380 (assoc-ref %outputs "out") "/lib"))
381 #:tests? #f ; no test suite
382 #:modules ((guix build gnu-build-system)
386 (modify-phases %standard-phases
387 (add-after 'unpack 'use-system-boost
389 (substitute* "src/include/firebird/Message.h"
390 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
391 "<boost/preprocessor/seq/for_each_i.hpp>")
392 (("FB_BOOST_") "BOOST_"))
394 (add-after 'unpack 'patch-installation
397 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
398 (("/bin/sh") (which "bash"))
399 ;; Remove shell script helpers from $PATH.
400 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
401 ;; Put files where Guix users expect them.
402 (("(License\\.txt.*)@FB_CONFDIR" match)
403 (string-append match "@FB_DOCDIR@"))
404 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
405 (string-append "@FB_DOCDIR@" match))
406 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
407 (string-append head "@FB_DOCDIR@" tail "\n")))
409 (list "builds/install/posix-common/changeServerMode.sh.in"
410 "builds/install/posix-common/install.sh.in")
411 ;; Skip phases that (could) cause problems in Guix.
412 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
414 ;; Skip phases that are merely pointless on Guix.
415 (("buildUninstallFile|installInitdScript|startFirebird") ":")
416 ;; Omit randomly generated password with bonus timestamp.
417 (("setDBAPassword") ":"))
419 ;; These promote proprietary workflows not relevant on Guix.
420 (for-each delete-file-recursively
421 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))
423 (add-after 'configure 'delete-init-scripts
425 (delete-file-recursively "gen/install/misc")
427 (add-before 'build 'set-build-environment-variables
429 ;; ‘isql’ needs to run & find libfbclient.so during the build.
430 ;; This doubles as a rudimentary test in lieu of a test suite.
431 (setenv "LD_LIBRARY_PATH"
432 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))
434 (add-before 'install 'keep-embedded-debug-symbols
436 ;; Let the gnu-build-system separate & deal with them later.
437 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
438 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
439 (substitute* "gen/Makefile.install"
440 (("readelf") "false"))
442 (add-after 'install 'prune-undesirable-files
443 (lambda* (#:key outputs #:allow-other-keys)
444 (let ((out (assoc-ref outputs "out")))
445 (with-directory-excursion out
446 ;; Remove example binaries.
447 (for-each delete-file-recursively
448 (find-files "." "example"))
449 ;; Delete (now-)empty directories.
451 (list "include/firebird/impl"
452 "lib/firebird/plugins/udr"))
456 ("editline" ,editline)
458 ("libtommath" ,libtommath)
461 (home-page "https://www.firebirdsql.org")
462 (synopsis "Relational database with many ANSI SQL standard features")
464 "Firebird is an SQL @acronym{RDBMS, relational database management system}
465 with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
466 @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
467 triggers. Transactions provide full ACID-compliant referential integrity.
469 The database requires very little manual maintenance once set up, making it
470 ideal for small business or embedded use.
472 When installed as a traditional local or remote (network) database server,
473 Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
474 may be a better choice for such very large environments.
476 Firebird can also be embedded into stand-alone applications that don't want or
477 need a full client & server. Used in this manner, it offers richer SQL support
478 than SQLite as well as the option to seamlessly migrate to a client/server
481 `((lint-hidden-cve . ("CVE-2017-6369"))))
483 ;; See doc/license/README.license.usage.txt for rationale & details.
484 (list license:bsd-3 ; src/common/sha2/
485 license:bsd-4 ; src/common/enc.cpp
486 license:gpl2+ ; builds/posix/make.defaults
487 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
488 "InterBase Public License v1.0")
489 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
490 "Initial Developer's Public License v1.0")
491 license:lgpl2.1 ; exception for OSI-compatible licences
492 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
493 license:public-domain)))) ; including files without explicit licence
495 (define-public leveldb
502 (url "https://github.com/google/leveldb")
504 (file-name (git-file-name name version))
507 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
508 (build-system cmake-build-system)
510 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
512 `(("snappy" ,snappy)))
513 (home-page "https://github.com/google/leveldb")
514 (synopsis "Fast key-value storage library")
516 "LevelDB is a fast key-value storage library that provides an ordered
517 mapping from string keys to string values.")
518 (license license:bsd-3)))
520 (define-public memcached
528 "https://memcached.org/files/memcached-" version ".tar.gz"))
530 (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
531 (build-system gnu-build-system)
533 `(("libevent" ,libevent)
534 ("cyrus-sasl" ,cyrus-sasl)))
535 (home-page "https://memcached.org/")
536 (synopsis "In-memory caching service")
537 (description "Memcached is an in-memory key-value store. It has a small
538 and generic API, and was originally intended for use with dynamic web
540 (license license:bsd-3)))
542 (define-public libmemcached
544 (name "libmemcached")
546 ;; We build from the sources since we want to build the extra HTML
547 ;; documentation which is not included with the release.
551 (url "lp:libmemcached/1.0")
552 (revision (string-append "tag:" version))))
553 (file-name (string-append name "-" version "-checkout"))
556 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
558 (search-patches "libmemcached-build-with-gcc7.patch"))))
559 (build-system gnu-build-system)
561 `(("memcached" ,memcached)
563 ("autoconf" ,autoconf)
564 ("automake" ,automake)
568 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
570 `(("libevent" ,libevent)
571 ("cyrus-sasl" ,cyrus-sasl)))
572 (outputs '("out" "doc"))
575 (modify-phases %standard-phases
576 (add-before 'bootstrap 'fix-configure.ac
577 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
578 ;; get the error ``configure: error: cannot find install-sh,
579 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
580 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
581 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
583 (delete-file "bootstrap.sh") ;not useful in the context of Guix
584 (substitute* "configure.ac"
585 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
586 (("(^AC_INIT.*)" anchor)
587 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))
589 (add-before 'bootstrap 'disable-failing-tests
590 ;; See: https://bugs.launchpad.net/libmemcached/+bug/1803926
592 ;; Mark some heavily failing test suites as expected to fail.
593 (substitute* "Makefile.am"
594 (("(XFAIL_TESTS =[^\n]*)" xfail_tests)
595 (string-append xfail_tests " tests/testudp"
596 " tests/libmemcached-1.0/testapp"
597 " tests/libmemcached-1.0/testsocket")))
598 ;; Disable two tests of the unittest test suite.
599 (substitute* "libtest/unittest.cc"
600 ((".*echo_fubar_BINARY \\},.*") "")
601 ((".*application_doesnotexist_BINARY \\},.*") ""))
603 (add-after 'disable-dns-tests 'build-and-install-html-doc
604 (lambda* (#:key outputs #:allow-other-keys)
605 (let ((html (string-append (assoc-ref outputs "doc")
606 "/share/doc/libmemcached/html/")))
607 (invoke "make" "install-html")
608 ;; Cleanup useless files.
609 (for-each delete-file-recursively
610 (map (lambda (x) (string-append html x))
611 '("_sources" ".doctrees" ".buildinfo"))))
613 (home-page "https://libmemcached.org/")
614 (synopsis "C++ library for memcached")
615 (description "libMemcached is a library to use memcached in C/C++
616 applications. It comes with a complete reference guide and documentation of
617 the API, and provides features such as:
619 @item Asynchronous and synchronous transport support
620 @item Consistent hashing and distribution
621 @item Tunable hashing algorithm to match keys
622 @item Access to large object support
623 @item Local replication
625 (license license:bsd-3)))
627 (define-public python-pylibmc
629 (name "python-pylibmc")
634 (uri (pypi-uri "pylibmc" version))
636 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
637 (build-system python-build-system)
640 (modify-phases %standard-phases
641 (add-before 'check 'start-memcached-daemon
642 ;; The test suite requires a memcached server.
644 (invoke "memcached" "-d"))))))
646 `(("memcached" ,memcached)
647 ("python-nose" ,python-nose)))
649 `(("libmemcached" ,libmemcached)
651 ("cyrus-sasl" ,cyrus-sasl)))
652 (home-page "http://sendapatch.se/projects/pylibmc/")
653 (synopsis "Python client for memcached")
655 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
656 around TangentOrg’s libmemcached library, and can be used as a drop-in
657 replacement for the code@{python-memcached} library.")
658 (license license:bsd-3)))
660 (define-public python2-pylibmc
661 (package-with-python2 python-pylibmc))
663 (define-public mongodb
669 (uri (string-append "https://github.com/mongodb/mongo/archive/r"
671 (file-name (string-append name "-" version ".tar.gz"))
673 (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r"))
674 (modules '((guix build utils)))
677 (for-each (lambda (dir)
678 (delete-file-recursively
679 (string-append "src/third_party/" dir)))
680 '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3"
681 "valgrind-3.11.0" "wiredtiger"
682 "yaml-cpp-0.5.3" "zlib-1.2.8"))
686 (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
687 (build-system scons-build-system)
689 `(("openssl" ,openssl-1.0)
691 ,@(match (%current-system)
692 ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
693 `(("wiredtiger" ,wiredtiger)))
695 ("yaml-cpp" ,yaml-cpp)
699 `(("valgrind" ,valgrind)
702 ("python2-pymongo" ,python2-pymongo)
703 ("python2-pyyaml" ,python2-pyyaml)
704 ("tzdata" ,tzdata-for-tests)))
706 `(#:scons ,scons-python2
708 (let ((common-options
709 `(;; "--use-system-tcmalloc" TODO: Missing gperftools
711 ;; wiredtiger is 64-bit only
712 ,,(if (any (cute string-prefix? <> (or (%current-target-system)
714 '("i686-linux" "armhf-linux"))
716 ``"--use-system-wiredtiger")
718 ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
719 ;; --use-system-boost
720 "--use-system-snappy"
722 "--use-system-valgrind"
723 ;; "--use-system-stemmer" TODO: Missing relevant package
725 "--disable-warnings-as-errors"
726 ,(format #f "--jobs=~a" (parallel-job-count))
728 (modify-phases %standard-phases
729 (add-after 'unpack 'patch
731 ;; Remove use of GNU extensions in parse_number_test.cpp, to
732 ;; allow compiling with GCC 7 or later
733 ;; https://jira.mongodb.org/browse/SERVER-28063
734 (substitute* "src/mongo/base/parse_number_test.cpp"
735 (("0xabcab\\.defdefP-10")
736 "687.16784283419838"))
738 (add-after 'unpack 'scons-propagate-environment
740 ;; Modify the SConstruct file to arrange for
741 ;; environment variables to be propagated.
742 (substitute* "SConstruct"
743 (("^env = Environment\\(")
744 "env = Environment(ENV=os.environ, "))
746 (add-after 'unpack 'create-version-file
748 (call-with-output-file "version.json"
750 (display ,(simple-format #f "{
756 (apply invoke `("scons"
758 "mongod" "mongo" "mongos"))))
760 (lambda* (#:key tests? inputs #:allow-other-keys)
762 (string-append (assoc-ref inputs "tzdata")
765 ;; Note that with the tests, especially the unittests, the
766 ;; build can take up to ~45GB of space, as many tests are
767 ;; individual executable files, with some being hundreds of
768 ;; megabytes in size.
769 (apply invoke `("scons" ,@common-options "dbtest" "unittests"))
770 (substitute* "build/unittests.txt"
771 ;; TODO: Don't run the async_stream_test, as it hangs
772 (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
774 ;; TODO: This test fails
775 ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476
776 (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
778 (invoke "python" "buildscripts/resmoke.py"
779 "--suites=dbtest,unittests"
780 (format #f "--jobs=~a" (parallel-job-count))))
783 (lambda* (#:key outputs #:allow-other-keys)
784 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
785 (install-file "mongod" bin)
786 (install-file "mongos" bin)
787 (install-file "mongo" bin))
789 (home-page "https://www.mongodb.org/")
790 (synopsis "High performance and high availability document database")
792 "Mongo is a high-performance, high availability, schema-free
793 document-oriented database. A key goal of MongoDB is to bridge the gap
794 between key/value stores (which are fast and highly scalable) and traditional
795 RDBMS systems (which are deep in functionality).")
796 (license (list license:agpl3
797 ;; Some parts are licensed under the Apache License
807 (uri (pypi-uri "mycli" version))
809 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
810 (build-system python-build-system)
812 `(#:tests? #f)) ; tests expect a running MySQL
814 `(("python-cli-helpers" ,python-cli-helpers)
815 ("python-click" ,python-click)
816 ("python-configobj" ,python-configobj)
817 ("python-cryptography" ,python-cryptography)
818 ("python-prompt-toolkit" ,python-prompt-toolkit)
819 ("python-pygments" ,python-pygments)
820 ("python-pymysql" ,python-pymysql)
821 ("python-sqlparse" ,python-sqlparse)))
822 (home-page "http://mycli.net")
824 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
826 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
827 auto-completion and syntax highlighting.")
828 (license license:bsd-3)))
830 ;; XXX When updating, check whether boost-for-mysql is still needed.
831 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
838 (uri (list (string-append
839 "https://dev.mysql.com/get/Downloads/MySQL-"
840 (version-major+minor version) "/"
841 name "-" version ".tar.gz")
843 "https://downloads.mysql.com/archives/get/file/"
844 name "-" version ".tar.gz")))
847 "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"))))
848 (build-system cmake-build-system)
851 '("-DBUILD_CONFIG=mysql_release"
854 "-DDEFAULT_CHARSET=utf8"
855 "-DDEFAULT_COLLATION=utf8_general_ci"
856 "-DMYSQL_DATADIR=/var/lib/mysql"
857 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
858 "-DINSTALL_INFODIR=share/mysql/docs"
859 "-DINSTALL_MANDIR=share/man"
860 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
861 "-DINSTALL_SCRIPTDIR=bin"
862 "-DINSTALL_INCLUDEDIR=include/mysql"
863 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
864 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
865 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
866 "-DINSTALL_DOCDIR=share/mysql/docs"
867 "-DINSTALL_SHAREDIR=share/mysql"
868 ;; Get rid of test data.
869 "-DINSTALL_MYSQLTESTDIR="
870 "-DINSTALL_SQLBENCHDIR=")
871 #:phases (modify-phases %standard-phases
873 'install 'remove-extra-binaries
874 (lambda* (#:key outputs #:allow-other-keys)
875 (let ((out (assoc-ref outputs "out")))
876 ;; Remove the 3 *_embedded files, which weigh in at
878 (for-each delete-file
879 (find-files (string-append out "/bin")
885 ("pkg-config" ,pkg-config)))
887 `(("boost" ,boost-for-mysql)
889 ("libtirpc" ,libtirpc)
892 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
894 (home-page "https://www.mysql.com/")
895 (synopsis "Fast, easy to use, and popular database")
897 "MySQL is a fast, reliable, and easy to use relational database
898 management system that supports the standardized Structured Query
900 (license license:gpl2)))
902 (define-public mariadb
908 (uri (string-append "https://downloads.mariadb.com/MariaDB"
909 "/mariadb-" version "/source/mariadb-"
913 "1i257h0zdypdfj5wkg6ck9pxlkph0jvjs92k22pjr6gnx5lxs1gz"))
914 (modules '((guix build utils)))
917 ;; Delete bundled snappy and xz.
918 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
919 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
920 ;; This file checks that the bundled sources are present and
921 ;; declares build procedures for them.
922 (("^include\\(TokuThirdParty\\)") ""))
923 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
924 ;; Don't attempt to use the procedures we just removed.
925 ((" build_lzma build_snappy") ""))
927 ;; Preserve CMakeLists.txt for these.
928 (for-each (lambda (file)
929 (unless (string-suffix? "CMakeLists.txt" file)
931 (append (find-files "extra/wolfssl")
932 (find-files "zlib")))
934 (build-system cmake-build-system)
935 (outputs '("out" "lib" "dev"))
939 "-DBUILD_CONFIG=mysql_release"
940 ;; Linking with libarchive fails, like this:
942 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
943 ;; relocation R_X86_64_32 against `.bss' can not be used when
944 ;; making a shared object; recompile with -fPIC
946 ;; For now, disable the features that that use libarchive (xtrabackup).
947 "-DWITH_LIBARCHIVE=OFF"
949 ;; Disable the TokuDB engine, because its test suite frequently fails,
950 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
953 ;; Ensure the system libraries are used.
954 "-DWITH_JEMALLOC=yes"
959 "-DDEFAULT_CHARSET=utf8"
960 "-DDEFAULT_COLLATION=utf8_general_ci"
961 "-DMYSQL_DATADIR=/var/lib/mysql"
962 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
963 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
964 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
966 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
968 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
970 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
971 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
972 "-DCMAKE_INSTALL_LIBDIR=lib"
973 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
974 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
976 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
978 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
980 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
981 "/share/mysql/support-files")
982 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
983 "-DINSTALL_SHAREDIR=share")
985 (modify-phases %standard-phases
986 (add-after 'unpack 'adjust-output-references
988 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
989 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
990 ;; not work when the latter uses an absolute file name.
991 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
992 (("@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@")
993 "@INSTALL_INCLUDEDIR@"))
994 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
995 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
996 "@INSTALL_INCLUDEDIR@"))
997 (substitute* "include/CMakeLists.txt"
998 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
999 "${INSTALL_INCLUDEDIR}"))
1001 (add-after 'unpack 'adjust-tests
1003 (let ((disabled-tests
1004 '(;; These fail because root@hostname == root@localhost in
1005 ;; the build environment, causing a user count mismatch.
1006 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
1007 "funcs_1.is_columns_mysql"
1009 "main.explain_non_select"
1011 "main.stat_tables_innodb"
1012 "roles.acl_statistics"
1014 ;; This file contains a time bomb which makes it fail after
1015 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
1018 ;; This file contains a list of known-flaky tests for this
1019 ;; release. Append our own items.
1020 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
1021 (for-each (lambda (test)
1022 (format unstable-tests "~a : ~a\n"
1023 test "Disabled in Guix"))
1025 (close-port unstable-tests)
1027 ;; XXX: These fail because they expect a latin1 charset and
1028 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
1029 (substitute* '("mysql-test/main/gis_notembedded.result"
1030 "mysql-test/main/system_mysql_db.result")
1031 (("latin1_swedish_ci") "utf8_general_ci")
1032 (("\tlatin1") "\tutf8"))
1034 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
1038 (substitute* "mysql-test/mysql-test-run.pl"
1039 (("/bin/ls") (which "ls"))
1040 (("/bin/sh") (which "sh")))
1042 (add-before 'configure 'disable-plugins
1044 (let ((disable-plugin (lambda (name)
1045 (call-with-output-file
1046 (string-append "plugin/" name
1049 (format port "\n")))))
1050 (disabled-plugins '(;; XXX: Causes a test failure.
1052 (for-each disable-plugin disabled-plugins)
1055 (lambda* (#:key (tests? #t) #:allow-other-keys)
1057 (with-directory-excursion "mysql-test"
1058 (invoke "./mtr" "--verbose"
1060 "--testcase-timeout=40"
1061 "--suite-timeout=600"
1062 "--parallel" (number->string (parallel-job-count))
1063 ;; Skip the replication tests: they are very I/O
1064 ;; intensive and frequently causes indeterministic
1065 ;; failures even on powerful hardware.
1067 "--skip-test-list=unstable-tests"))
1068 (format #t "test suite not run~%"))
1071 'install 'post-install
1072 (lambda* (#:key inputs outputs #:allow-other-keys)
1073 (let* ((out (assoc-ref outputs "out"))
1074 (dev (assoc-ref outputs "dev"))
1075 (lib (assoc-ref outputs "lib"))
1076 (openssl (assoc-ref inputs "openssl")))
1077 (substitute* (list (string-append out "/bin/mariadb-install-db")
1078 (string-append out "/bin/mysql_install_db"))
1080 (string-append "basedir=\"" out "\""))
1081 (("\\$basedir/share/mysql")
1082 (string-append lib "/share/mysql")))
1084 ;; Remove unneeded files for testing.
1085 (with-directory-excursion lib
1086 (for-each delete-file-recursively
1087 '("mysql-test" "sql-bench"))
1088 ;; And static libraries.
1089 (for-each delete-file (find-files "lib" "\\.a$")))
1090 (with-directory-excursion out
1091 (delete-file "share/man/man1/mysql-test-run.pl.1")
1092 ;; Delete huge and unnecessary executables.
1093 (for-each delete-file (find-files "bin" "test$")))
1094 (mkdir-p (string-append dev "/share"))
1095 (mkdir-p (string-append dev "/bin"))
1096 (rename-file (string-append lib "/bin/mariadbd")
1097 (string-append out "/bin/mariadbd"))
1098 (rename-file (string-append lib "/bin/mysqld")
1099 (string-append out "/bin/mysqld"))
1100 (mkdir-p (string-append dev "/lib"))
1101 (rename-file (string-append lib "/lib/pkgconfig")
1102 (string-append dev "/lib/pkgconfig"))
1103 (rename-file (string-append lib "/bin/mariadb_config")
1104 (string-append dev "/bin/mariadb_config"))
1105 (rename-file (string-append out "/bin/mysql_config")
1106 (string-append dev "/bin/mysql_config"))
1108 ;; Embed an absolute reference to OpenSSL in mysql_config
1109 ;; and the pkg-config file to avoid propagation.
1110 ;; XXX: how to do this for mariadb_config.c.in?
1111 (substitute* (list (string-append dev "/bin/mysql_config")
1112 (string-append dev "/lib/pkgconfig/mariadb.pc"))
1113 (("-lssl -lcrypto" all)
1114 (string-append "-L" openssl "/lib " all)))
1121 `(("jemalloc" ,jemalloc)
1123 ("libxml2" ,libxml2)
1124 ("ncurses" ,ncurses)
1125 ("openssl" ,openssl)
1130 ;; The test suite is very resource intensive and can take more than three
1131 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
1132 (properties '((timeout . 64800))) ;18 hours
1133 (home-page "https://mariadb.org/")
1134 (synopsis "SQL database server")
1136 "MariaDB is a multi-user and multi-threaded SQL database server, designed
1137 as a drop-in replacement of MySQL.")
1138 (license license:gpl2)))
1140 (define-public mariadb-connector-c
1142 (name "mariadb-connector-c")
1148 "https://downloads.mariadb.org/f/connector-c-" version
1149 "/mariadb-connector-c-" version "-src.tar.gz"
1150 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
1152 (base32 "03svzahdf7czjlm695c11r4bfd04qdqgx8r1vkpr1zlkjhwnqvry"))))
1154 `(("openssl" ,openssl)))
1155 (build-system cmake-build-system)
1157 '(#:tests? #f)) ; no tests
1158 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1159 (synopsis "Client library to connect to MySQL or MariaDB")
1160 (description "The MariaDB Connector/C is used to connect applications
1161 developed in C/C++ to MariaDB and MySQL databases.")
1162 (license license:lgpl2.1+)))
1164 ;; Don't forget to update the other postgresql packages when upgrading this one.
1165 (define-public postgresql
1171 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1172 version "/postgresql-" version ".tar.bz2"))
1175 "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d"))
1176 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1177 (build-system gnu-build-system)
1179 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
1181 (modify-phases %standard-phases
1182 (add-before 'configure 'patch-/bin/sh
1184 ;; Refer to the actual shell.
1185 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1186 "src/bin/psql/command.c")
1187 (("/bin/sh") (which "sh")))
1189 (add-after 'build 'build-contrib
1191 (invoke "make" "-C" "contrib")))
1192 (add-after 'install 'install-contrib
1194 (invoke "make" "-C" "contrib" "install"))))))
1196 `(("readline" ,readline)
1197 ("libuuid" ,util-linux "lib")
1198 ("openssl" ,openssl)
1200 (home-page "https://www.postgresql.org/")
1201 (synopsis "Powerful object-relational database system")
1203 "PostgreSQL is a powerful object-relational database system. It is fully
1204 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1205 stored procedures (in multiple languages). It includes most SQL:2008 data
1206 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1207 TIMESTAMP. It also supports storage of binary large objects, including
1208 pictures, sounds, or video.")
1209 (license (license:x11-style "file://COPYRIGHT"))))
1211 (define-public postgresql-10 postgresql)
1213 (define-public postgresql-13
1215 (inherit postgresql)
1218 (inherit (package-source postgresql))
1219 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1220 version "/postgresql-" version ".tar.bz2"))
1223 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))))))
1225 (define-public postgresql-11
1227 (inherit postgresql)
1232 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1233 version "/postgresql-" version ".tar.bz2"))
1236 "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
1238 (define-public postgresql-9.6
1240 (inherit postgresql)
1245 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1246 version "/postgresql-" version ".tar.bz2"))
1249 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
1251 (define-public pgloader
1259 (url "https://github.com/dimitri/pgloader")
1260 (commit (string-append "v" version))))
1262 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1263 (file-name (git-file-name name version))))
1264 (build-system gnu-build-system)
1266 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1267 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1268 ;; does not require Quicklisp workarounds. There is no `install' target
1269 ;; configured in Makefile.
1271 #:strip-binaries? #f
1273 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1275 (modify-phases %standard-phases
1277 (add-after 'unpack 'set-home
1279 (setenv "HOME" "/tmp")
1281 (add-after 'unpack 'patch-Makefile
1283 (substitute* "Makefile"
1284 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1290 (install-file "build/bin/pgloader" bin))
1293 `(("buildapp" ,buildapp)
1296 `(("alexandria" ,sbcl-alexandria)
1297 ("cl-abnf" ,sbcl-cl-abnf)
1298 ("cl-base64" ,sbcl-cl-base64)
1299 ("cl-csv" ,sbcl-cl-csv)
1300 ("cl-fad" ,sbcl-cl-fad)
1301 ("cl-log" ,sbcl-cl-log)
1302 ("cl-markdown" ,sbcl-cl-markdown)
1303 ("cl-mustache" ,sbcl-cl-mustache)
1304 ("cl-ppcre" ,sbcl-cl-ppcre)
1305 ("cl-sqlite" ,sbcl-cl-sqlite)
1306 ("closer-mop" ,sbcl-closer-mop)
1307 ("command-line-arguments" ,sbcl-command-line-arguments)
1309 ("drakma" ,sbcl-drakma)
1310 ("esrap" ,sbcl-esrap)
1311 ("flexi-streams" ,sbcl-flexi-streams)
1313 ("local-time" ,sbcl-local-time)
1314 ("lparallel" ,sbcl-lparallel)
1315 ("metabang-bind" ,sbcl-metabang-bind)
1316 ("mssql" ,sbcl-mssql)
1317 ("postmodern" ,sbcl-postmodern)
1318 ("py-configparser" ,sbcl-py-configparser)
1319 ("qmynd" ,sbcl-qmynd)
1321 ("split-sequence" ,sbcl-split-sequence)
1322 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1323 ("usocket" ,sbcl-usocket)
1325 ("yason" ,sbcl-yason)
1327 (home-page "https://pgloader.io/")
1328 (synopsis "Tool to migrate data to PostgreSQL")
1330 "@code{pgloader} is a program that can load data or migrate databases from
1331 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1332 (license (license:x11-style "file://LICENSE"))))
1334 (define-public python-pymysql
1336 (name "python-pymysql")
1341 (uri (pypi-uri "PyMySQL" version))
1343 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1344 (build-system python-build-system)
1346 `(("python-unittest2" ,python-unittest2)))
1348 `(("python-cryptography" ,python-cryptography)))
1350 `(#:tests? #f)) ; tests expect a running MySQL
1351 (home-page "https://github.com/PyMySQL/PyMySQL/")
1352 (synopsis "Pure-Python MySQL driver")
1354 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1355 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1356 (license license:expat)))
1358 (define-public python2-pymysql
1359 (package-with-python2 python-pymysql))
1368 (uri (string-append "http://fallabs.com/" name "/"
1369 name "-" version ".tar.gz"))
1372 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1373 (build-system gnu-build-system)
1375 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1376 (assoc-ref %outputs "out")
1378 #:make-flags (list "CFLAGS=-fPIC")))
1379 (home-page "https://fallabs.com/qdbm/")
1380 (synopsis "Key-value database")
1381 (description "QDBM is a library of routines for managing a
1382 database. The database is a simple data file containing key-value
1383 pairs. Every key and value is serial bytes with variable length.
1384 Binary data as well as character strings can be used as a key or a
1385 value. There is no concept of data tables or data types. Records are
1386 organized in a hash table or B+ tree.")
1387 (license license:lgpl2.1+)))
1389 (define-public recutils
1395 (uri (string-append "mirror://gnu/recutils/recutils-"
1399 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1400 (build-system gnu-build-system)
1402 (arguments '(#:configure-flags
1403 (list (string-append "--with-bash-headers="
1404 (assoc-ref %build-inputs "bash:include")
1407 (native-inputs `(("bc" ,bc)
1408 ("bash:include" ,bash "include")
1409 ("check" ,check-0.14)
1410 ("pkg-config" ,pkg-config)))
1412 ;; TODO: Add more optional inputs.
1413 (inputs `(("curl" ,curl)
1414 ("libgcrypt" ,libgcrypt)
1415 ("libuuid" ,util-linux "lib")))
1416 (synopsis "Manipulate plain text files as databases")
1418 "GNU Recutils is a set of tools and libraries for creating and
1419 manipulating text-based, human-editable databases. Despite being text-based,
1420 databases created with Recutils carry all of the expected features such as
1421 unique fields, primary keys, time stamps and more. Many different field
1422 types are supported, as is encryption.")
1423 (license license:gpl3+)
1424 (home-page "https://www.gnu.org/software/recutils/")))
1426 (define-public emacs-recutils
1429 (name "emacs-recutils")
1430 (build-system emacs-build-system)
1433 (modify-phases %standard-phases
1434 (add-after 'unpack 'change-directory
1440 (synopsis "Emacs mode for working with recutils database files")
1441 (description "This package provides an Emacs major mode @code{rec-mode}
1442 for working with GNU Recutils text-based, human-editable databases. It
1443 supports editing, navigation, and querying of recutils database files
1444 including field and record folding.")))
1446 (define-public rocksdb
1453 (url "https://github.com/facebook/rocksdb")
1454 (commit (string-append "v" version))))
1455 (file-name (git-file-name name version))
1458 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1459 (modules '((guix build utils)))
1462 ;; TODO: unbundle gtest.
1463 (delete-file "build_tools/gnu_parallel")
1464 (substitute* "Makefile"
1465 (("build_tools/gnu_parallel") "parallel"))
1467 (build-system gnu-build-system)
1469 `(#:make-flags (list "CC=gcc" "V=1"
1470 ;; Ceph requires that RTTI is enabled.
1472 "date=1970-01-01" ; build reproducibly
1473 (string-append "INSTALL_PATH="
1474 (assoc-ref %outputs "out"))
1476 ;; Running the full test suite takes hours and require
1477 ;; a lot of disk space. Instead we only run a subset
1478 ;; (see .travis.yml and Makefile).
1479 "ROCKSDBTESTS_END=db_tailing_iter_test")
1480 #:test-target "check_some"
1481 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1482 ;; this upstream, but it's not going to be supported any time soon.
1483 #:tests? (let ((system ,(or (%current-target-system)
1484 (%current-system))))
1485 (or (string-prefix? "x86_64-linux" system)
1486 (string-prefix? "aarch64-linux" system)))
1488 (modify-phases %standard-phases
1489 (add-after 'unpack 'patch-Makefile
1491 (substitute* "Makefile"
1492 ;; Don't depend on the static library when installing.
1493 (("install: install-static")
1494 "install: install-shared")
1495 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1498 ;; The default target is only needed for tests and built on demand.
1500 (add-before 'check 'disable-optimizations
1502 ;; Prevent the build from passing '-march=native' to the compiler.
1503 (setenv "PORTABLE" "1")
1505 (add-before 'check 'disable-failing-tests
1507 (substitute* "Makefile"
1508 ;; These tests reliably fail due to "Too many open files".
1509 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1510 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1512 (add-after 'check 'build
1513 ;; The default build target is a debug build for tests. The
1514 ;; install target depends on the "shared_lib" release target
1515 ;; so we build it here for clarity.
1516 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1517 (apply invoke "make" "shared_lib"
1518 `(,@(if parallel-build?
1519 `("-j" ,(number->string (parallel-job-count)))
1523 `(("parallel" ,parallel)
1526 ("python" ,python-2)
1531 ("jemalloc" ,jemalloc)
1535 (home-page "https://rocksdb.org/")
1536 (synopsis "Persistent key-value store for fast storage")
1538 "RocksDB is a library that forms the core building block for a fast
1539 key-value server, especially suited for storing data on flash drives. It
1540 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1541 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1542 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1543 compactions, making it specially suitable for storing multiple terabytes of
1544 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1545 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1546 ;; files carry the 3-clause BSD license.
1547 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1549 (define-public sparql-query
1551 (name "sparql-query")
1556 (url "https://github.com/tialaramex/sparql-query")
1559 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1560 (file-name (git-file-name name version))))
1561 (build-system gnu-build-system)
1565 ("libxml2" ,libxml2)
1566 ("ncurses" ,ncurses)
1567 ("readline" ,readline)))
1569 `(("pkg-config" ,pkg-config)))
1571 `(#:make-flags '("CC=gcc")
1573 (modify-phases %standard-phases
1575 ;; The Makefile uses git to obtain versioning information. This phase
1576 ;; substitutes the git invocation with the package version.
1577 (add-after 'unpack 'remove-git-dependency
1579 (substitute* "Makefile"
1581 (string-append "gitrev = \"v" ,version "\"")))
1583 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1584 ;; This replacement does the same thing, except for using $PREFIX/bin
1587 (lambda* (#:key outputs #:allow-other-keys)
1588 (let* ((out (assoc-ref outputs "out"))
1589 (bin (string-append out "/bin")))
1590 (install-file "sparql-query" bin)
1591 (symlink (string-append bin "/sparql-query")
1592 (string-append bin "/sparql-update")))
1595 (lambda* (#:key make-flags #:allow-other-keys)
1596 (apply invoke "make" `(,@make-flags "scan-test"))
1597 (invoke "./scan-test"))))))
1598 (home-page "https://github.com/tialaramex/sparql-query/")
1599 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1600 (description "Sparql-query is a command-line tool for accessing SPARQL
1601 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1602 tools for interrogating SQL databases. For example, you can enter a query over
1603 several lines, using a semi-colon at the end of a line to indicate the end of
1604 your query. It also supports readline so that you can more easily recall and
1605 edit previous queries, even across sessions. It can be used non-interactively,
1606 for example from a shell script.")
1607 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1608 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1609 (license (list license:gpl3+))))
1611 (define-public sqitch
1619 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1622 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1623 (build-system perl-build-system)
1626 (modify-phases %standard-phases
1627 (add-before 'check 'set-check-environment
1630 (setenv "HOME" "/tmp")
1632 (add-after 'install 'wrap-program
1633 (lambda* (#:key outputs #:allow-other-keys)
1634 (let* ((out (assoc-ref outputs "out"))
1635 (path (getenv "PERL5LIB")))
1636 (wrap-program (string-append out "/bin/sqitch")
1637 `("PERL5LIB" ":" prefix
1638 (,(string-append out "/lib/perl5/site_perl"
1643 `(("perl-capture-tiny" ,perl-capture-tiny)
1644 ("perl-io-pager" ,perl-io-pager)
1645 ("perl-module-build" ,perl-module-build)
1646 ("perl-module-runtime" ,perl-module-runtime)
1647 ("perl-path-class" ,perl-path-class)
1648 ("perl-test-deep" ,perl-test-deep)
1649 ("perl-test-dir" ,perl-test-dir)
1650 ("perl-test-exception" ,perl-test-exception)
1651 ("perl-test-file" ,perl-test-file)
1652 ("perl-test-file-contents" ,perl-test-file-contents)
1653 ("perl-test-mockmodule" ,perl-test-mockmodule)
1654 ("perl-test-mockobject" ,perl-test-mockobject)
1655 ("perl-test-nowarnings" ,perl-test-nowarnings)
1656 ("perl-test-warn" ,perl-test-warn)))
1658 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1659 ("perl-clone" ,perl-clone)
1660 ("perl-config-gitlike" ,perl-config-gitlike)
1661 ("perl-datetime" ,perl-datetime)
1662 ("perl-datetime-timezone" ,perl-datetime-timezone)
1663 ("perl-dbd-mysql" ,perl-dbd-mysql)
1664 ("perl-dbd-pg" ,perl-dbd-pg)
1665 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1666 ("perl-dbi" ,perl-dbi)
1667 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1668 ("perl-encode-locale" ,perl-encode-locale)
1669 ("perl-hash-merge" ,perl-hash-merge)
1670 ("perl-ipc-run3" ,perl-ipc-run3)
1671 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1672 ("perl-libintl-perl" ,perl-libintl-perl)
1673 ("perl-list-moreutils" ,perl-list-moreutils)
1674 ("perl-moo" ,perl-moo)
1675 ("perl-mysql-config" ,perl-mysql-config)
1676 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1677 ("perl-path-class" ,perl-path-class)
1678 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1679 ("perl-string-formatter" ,perl-string-formatter)
1680 ("perl-string-shellquote" ,perl-string-shellquote)
1681 ("perl-sub-exporter" ,perl-sub-exporter)
1682 ("perl-template-tiny" ,perl-template-tiny)
1683 ("perl-template-toolkit" ,perl-template-toolkit)
1684 ("perl-throwable" ,perl-throwable)
1685 ("perl-try-tiny" ,perl-try-tiny)
1686 ("perl-type-tiny" ,perl-type-tiny)
1687 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1688 ("perl-uri" ,perl-uri)
1689 ("perl-uri-db" ,perl-uri-db)))
1690 (home-page "https://sqitch.org/")
1691 (synopsis "Database change management tool")
1693 "Sqitch is a standalone change management system for database schemas,
1694 which uses SQL to describe changes.")
1695 (license license:x11)))
1697 (define-public sqlcrush
1698 ;; Unfortunately, there is no proper upstream release and may never be.
1699 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1703 (version (git-version "0.1.5" revision commit))
1707 (url "https://github.com/coffeeandscripts/sqlcrush")
1709 (file-name (git-file-name name version))
1712 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1713 (build-system python-build-system)
1715 `(("python-cryptography" ,python-cryptography)
1716 ("python-psycopg2" ,python-psycopg2)
1717 ("python-pymysql" ,python-pymysql)
1718 ("python-sqlalchemy" ,python-sqlalchemy)))
1719 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1720 (synopsis "Text console-based database viewer and editor")
1722 "SQLcrush lets you view and edit a database directly from the text
1723 console through an ncurses interface. You can explore each table's structure,
1724 browse and edit the contents, add and delete entries, all while tracking your
1726 (license license:gpl3+)))) ; no headers, see README.md
1734 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1738 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1739 (build-system gnu-build-system)
1742 (modify-phases %standard-phases
1744 (lambda* (#:key outputs #:allow-other-keys)
1745 (let ((out (assoc-ref outputs "out")))
1746 ;; The 'configure' script is a wrapper for Waf and
1747 ;; doesn't recognize things like '--enable-fast-install'.
1748 (invoke "./configure"
1749 (string-append "--prefix=" out))))))))
1751 `(;; TODO: Build the documentation.
1752 ;; ("docbook-xsl" ,docbook-xsl)
1753 ;; ("libxml2" ,libxml2)
1754 ;; ("libxslt" ,libxslt)
1755 ("python" ,python) ;for the Waf build system
1757 (home-page "https://tdb.samba.org/")
1758 (synopsis "Trivial database")
1760 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1761 and BSD's DB except that it allows multiple simultaneous writers and uses
1762 locking internally to keep writers from trampling on each other. TDB is also
1764 (license license:lgpl3+)))
1766 (define-public perl-dbi
1773 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1777 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1778 (build-system perl-build-system)
1779 (synopsis "Database independent interface for Perl")
1780 (description "This package provides an database interface for Perl.")
1781 (home-page "https://metacpan.org/release/DBI")
1782 (license license:perl-license)))
1784 (define-public perl-dbix-class
1786 (name "perl-dbix-class")
1787 (version "0.082842")
1791 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1792 "DBIx-Class-" version ".tar.gz"))
1794 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1795 (build-system perl-build-system)
1797 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1798 ("perl-file-temp" ,perl-file-temp)
1799 ("perl-module-install" ,perl-module-install)
1800 ("perl-package-stash" ,perl-package-stash)
1801 ("perl-test-deep" ,perl-test-deep)
1802 ("perl-test-exception" ,perl-test-exception)
1803 ("perl-test-warn" ,perl-test-warn)))
1805 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1806 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1807 ("perl-class-inspector" ,perl-class-inspector)
1808 ("perl-config-any" ,perl-config-any)
1809 ("perl-context-preserve" ,perl-context-preserve)
1810 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1811 ("perl-data-page" ,perl-data-page)
1812 ("perl-dbi" ,perl-dbi)
1813 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1814 ("perl-hash-merge" ,perl-hash-merge)
1815 ("perl-module-find" ,perl-module-find)
1816 ("perl-moo" ,perl-moo)
1817 ("perl-mro-compat" ,perl-mro-compat)
1818 ("perl-namespace-clean" ,perl-namespace-clean)
1819 ("perl-path-class" ,perl-path-class)
1820 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1821 ("perl-scope-guard" ,perl-scope-guard)
1822 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1823 ("perl-sub-name" ,perl-sub-name)
1824 ("perl-text-balanced" ,perl-text-balanced)
1825 ("perl-try-tiny" ,perl-try-tiny)))
1826 (home-page "https://metacpan.org/release/DBIx-Class")
1827 (synopsis "Extensible and flexible object <-> relational mapper")
1828 (description "An SQL to OO mapper with an object API inspired by
1829 Class::DBI (with a compatibility layer as a springboard for porting) and a
1830 resultset API that allows abstract encapsulation of database operations. It
1831 aims to make representing queries in your code as perl-ish as possible while
1832 still providing access to as many of the capabilities of the database as
1833 possible, including retrieving related records from multiple tables in a
1834 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1835 \"ORDER BY\" and \"HAVING\" support.")
1836 (license license:perl-license)))
1838 (define-public perl-dbix-class-cursor-cached
1840 (name "perl-dbix-class-cursor-cached")
1841 (version "1.001004")
1845 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1846 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1849 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1850 (build-system perl-build-system)
1852 `(("perl-cache-cache" ,perl-cache-cache)
1853 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1854 ("perl-module-install" ,perl-module-install)))
1856 `(("perl-carp-clan" ,perl-carp-clan)
1857 ("perl-dbix-class" ,perl-dbix-class)))
1858 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1859 (synopsis "Cursor with built-in caching support")
1860 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1861 built-in caching support.")
1862 (license license:perl-license)))
1864 (define-public perl-dbix-class-introspectablem2m
1866 (name "perl-dbix-class-introspectablem2m")
1867 (version "0.001002")
1871 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1872 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1875 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1876 (build-system perl-build-system)
1878 `(("perl-module-install" ,perl-module-install)))
1880 `(("perl-dbix-class" ,perl-dbix-class)))
1881 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1882 (synopsis "Introspect many-to-many relationships")
1883 (description "Because the many-to-many relationships are not real
1884 relationships, they can not be introspected with DBIx::Class. Many-to-many
1885 relationships are actually just a collection of convenience methods installed
1886 to bridge two relationships. This DBIx::Class component can be used to store
1887 all relevant information about these non-relationships so they can later be
1888 introspected and examined.")
1889 (license license:perl-license)))
1891 (define-public perl-dbix-class-schema-loader
1893 (name "perl-dbix-class-schema-loader")
1898 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1899 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1902 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1903 (build-system perl-build-system)
1905 `(("perl-config-any" ,perl-config-any)
1906 ("perl-config-general" ,perl-config-general)
1907 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1908 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1909 ("perl-module-install" ,perl-module-install)
1910 ("perl-moose" ,perl-moose)
1911 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1912 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1913 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1914 ("perl-test-deep" ,perl-test-deep)
1915 ("perl-test-differences" ,perl-test-differences)
1916 ("perl-test-exception" ,perl-test-exception)
1917 ("perl-test-pod" ,perl-test-pod)
1918 ("perl-test-warn" ,perl-test-warn)))
1920 `(("perl-class-unload" ,perl-class-unload)
1921 ("perl-class-inspector" ,perl-class-inspector)
1922 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1923 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1924 ("perl-carp-clan" ,perl-carp-clan)
1925 ("perl-data-dump" ,perl-data-dump)
1926 ("perl-dbix-class" ,perl-dbix-class)
1927 ("perl-hash-merge" ,perl-hash-merge)
1928 ("perl-list-moreutils" ,perl-list-moreutils)
1929 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1930 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1931 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1932 ("perl-namespace-clean" ,perl-namespace-clean)
1933 ("perl-mro-compat" ,perl-mro-compat)
1934 ("perl-scope-guard" ,perl-scope-guard)
1935 ("perl-string-camelcase" ,perl-string-camelcase)
1936 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1937 ("perl-sub-name" ,perl-sub-name)
1938 ("perl-try-tiny" ,perl-try-tiny)))
1939 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1940 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1941 (synopsis "Create a DBIx::Class::Schema based on a database")
1942 (description "DBIx::Class::Schema::Loader automates the definition of a
1943 DBIx::Class::Schema by scanning database table definitions and setting up the
1944 columns, primary keys, unique constraints and relationships.")
1945 (license license:perl-license)))
1947 (define-public perl-dbd-pg
1949 (name "perl-dbd-pg")
1954 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1955 "DBD-Pg-" version ".tar.gz"))
1958 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1959 (build-system perl-build-system)
1961 `(("perl-dbi" ,perl-dbi)))
1963 `(("perl-dbi" ,perl-dbi)
1964 ("postgresql" ,postgresql)))
1965 (home-page "https://metacpan.org/release/DBD-Pg")
1966 (synopsis "DBI PostgreSQL interface")
1967 (description "This package provides a PostgreSQL driver for the Perl5
1968 @dfn{Database Interface} (DBI).")
1969 (license license:perl-license)))
1971 (define-public perl-dbd-mysql
1973 (name "perl-dbd-mysql")
1978 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1979 "DBD-mysql-" version ".tar.gz"))
1981 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1982 (build-system perl-build-system)
1985 (modify-phases %standard-phases
1986 (add-before 'configure 'skip-library-detection
1987 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1988 ;; are really only needed for the test suite; their absence does not
1989 ;; affect the build or the end result.
1991 (substitute* "Makefile.PL"
1992 (("use Devel::CheckLib;" match)
1993 (string-append "# " match))
1997 ;; Tests require running MySQL server.
2000 `(("perl-dbi" ,perl-dbi)
2001 ("mysql" ,mariadb "lib")
2002 ("mysql-dev" ,mariadb "dev")))
2003 (home-page "https://metacpan.org/release/DBD-mysql")
2004 (synopsis "DBI MySQL interface")
2005 (description "This package provides a MySQL driver for the Perl5
2006 @dfn{Database Interface} (DBI).")
2007 (license license:perl-license)))
2009 (define-public perl-dbd-sqlite
2011 (name "perl-dbd-sqlite")
2016 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
2020 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
2021 (build-system perl-build-system)
2022 (inputs `(("sqlite" ,sqlite)))
2023 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
2024 (synopsis "SQlite interface for Perl")
2025 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
2026 the entire thing in the distribution. So in order to get a fast transaction
2027 capable RDBMS working for your Perl project you simply have to install this
2028 module, and nothing else.")
2029 (license license:perl-license)
2030 (home-page "https://metacpan.org/release/DBD-SQLite")))
2032 (define-public perl-mysql-config
2034 (name "perl-mysql-config")
2040 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
2045 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
2046 (build-system perl-build-system)
2047 (home-page "https://metacpan.org/release/MySQL-Config")
2048 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
2050 "@code{MySQL::Config} emulates the @code{load_defaults} function from
2051 libmysqlclient. It will fill an array with long options, ready to be parsed by
2052 @code{Getopt::Long}.")
2053 (license license:perl-license)))
2055 (define-public perl-sql-abstract
2057 (name "perl-sql-abstract")
2062 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2063 "SQL-Abstract-" version ".tar.gz"))
2065 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
2066 (build-system perl-build-system)
2068 `(("perl-module-install" ,perl-module-install)
2069 ("perl-test-deep" ,perl-test-deep)
2070 ("perl-test-exception" ,perl-test-exception)
2071 ("perl-test-warn" ,perl-test-warn)))
2073 `(("perl-hash-merge" ,perl-hash-merge)
2074 ("perl-moo" ,perl-moo)
2075 ("perl-mro-compat" ,perl-mro-compat)
2076 ("perl-text-balanced" ,perl-text-balanced)))
2077 (home-page "https://metacpan.org/release/SQL-Abstract")
2078 (synopsis "Generate SQL from Perl data structures")
2079 (description "This module was inspired by the excellent DBIx::Abstract.
2080 While based on the concepts used by DBIx::Abstract, the concepts used have
2081 been modified to make the SQL easier to generate from Perl data structures.
2082 The underlying idea is for this module to do what you mean, based on the data
2083 structures you provide it, so that you don't have to modify your code every
2084 time your data changes.")
2085 (license license:perl-license)))
2087 (define-public perl-sql-abstract-classic
2089 (name "perl-sql-abstract-classic")
2094 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
2095 "SQL-Abstract-Classic-" version ".tar.gz"))
2097 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
2098 (build-system perl-build-system)
2100 `(("perl-test-deep" ,perl-test-deep)
2101 ("perl-test-exception" ,perl-test-exception)
2102 ("perl-test-warn" ,perl-test-warn)))
2104 `(("perl-mro-compat" ,perl-mro-compat)
2105 ("perl-sql-abstract" ,perl-sql-abstract)))
2106 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
2107 (synopsis "Generate SQL from Perl data structures")
2109 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
2110 to preserve the ability of users to opt into the new way of doing things in
2111 later versions according to their own schedules.
2113 It is an abstract SQL generation module based on the concepts used by
2114 @code{DBIx::Abstract}, with several important differences, especially when it
2115 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
2116 easier to generate from Perl data structures.
2118 The underlying idea is for this module to do what you mean, based on the data
2119 structures you provide it. You shouldn't have to modify your code every time
2120 your data changes, as this module figures it out.")
2121 (license license:perl-license)))
2123 (define-public perl-sql-splitstatement
2125 (name "perl-sql-splitstatement")
2130 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
2131 "SQL-SplitStatement-" version ".tar.gz"))
2134 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
2135 (build-system perl-build-system)
2137 `(("perl-test-exception" ,perl-test-exception)))
2139 `(("perl-class-accessor" ,perl-class-accessor)
2140 ("perl-list-moreutils" ,perl-list-moreutils)
2141 ("perl-regexp-common" ,perl-regexp-common)
2142 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2143 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2144 (synopsis "Split SQL code into atomic statements")
2145 (description "This module tries to split any SQL code, even including
2146 non-standard extensions, into the atomic statements it is composed of.")
2147 (license license:perl-license)))
2149 (define-public perl-sql-tokenizer
2151 (name "perl-sql-tokenizer")
2156 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2157 "SQL-Tokenizer-" version ".tar.gz"))
2160 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2161 (build-system perl-build-system)
2162 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2163 (synopsis "SQL tokenizer")
2164 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2165 claim to be a parser or query verifier. It just creates sane tokens from a
2167 (license license:perl-license)))
2169 (define-public unixodbc
2177 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2180 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2181 (build-system gnu-build-system)
2182 (synopsis "Data source abstraction library")
2183 (description "Unixodbc is a library providing an API with which to access
2184 data sources. Data sources include SQL Servers and any software with an ODBC
2186 (license license:lgpl2.1+)
2187 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2188 (home-page "http://www.unixodbc.org")))
2190 (define-public unqlite
2196 ;; Contains bug fixes against the official release, and has an
2197 ;; autotooled build system.
2198 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2200 "unqlite-unofficial-" version ".tar.gz"))
2203 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2204 (build-system gnu-build-system)
2205 (arguments `(#:tests? #f)) ;No check target
2206 (home-page "https://www.unqlite.org")
2207 (synopsis "In-memory key/value and document store")
2209 "UnQLite is an in-process software library which implements a
2210 self-contained, serverless, zero-configuration, transactional NoSQL
2211 database engine. UnQLite is a document store database similar to
2212 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2213 similar to BerkeleyDB, LevelDB, etc.")
2214 (license license:bsd-2)))
2216 (define-public redis
2222 (uri (string-append "http://download.redis.io/releases/redis-"
2226 "1gc529nfh8frk4pynyjlnmzvwa0j9r5cmqwyd7537sywz6abifvr"))
2227 (modules '((guix build utils)))
2229 ;; Delete bundled jemalloc, as the package will use the libc one
2230 '(begin (delete-file-recursively "deps/jemalloc")
2232 (build-system gnu-build-system)
2234 `(("procps" ,procps) ; for tests
2235 ("tcl" ,tcl))) ; for tests
2238 (modify-phases %standard-phases
2240 (add-after 'unpack 'use-correct-tclsh
2241 (lambda* (#:key inputs #:allow-other-keys)
2242 (substitute* "runtest"
2244 (string-append "TCLSH="
2245 (assoc-ref inputs "tcl")
2248 (add-after 'unpack 'adjust-tests
2250 ;; Disable failing tests
2251 (substitute* "tests/test_helper.tcl"
2252 ((" integration/replication[^-]") "")
2253 ((" integration/replication-4") "")
2254 ((" integration/replication-psync") ""))
2256 #:make-flags `("CC=gcc"
2259 ,(string-append "PREFIX="
2260 (assoc-ref %outputs "out")))))
2261 (synopsis "Key-value cache and store")
2262 (description "Redis is an advanced key-value cache and store. Redis
2263 supports many data structures including strings, hashes, lists, sets, sorted
2264 sets, bitmaps and hyperloglogs.")
2265 (home-page "https://redis.io/")
2266 (license license:bsd-3)))
2268 (define-public kyotocabinet
2270 (name "kyotocabinet")
2274 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2275 "kyotocabinet-" version ".tar.gz"))
2278 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2279 (build-system gnu-build-system)
2283 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2284 (string-append "LDFLAGS=-Wl,-rpath="
2285 (assoc-ref %outputs "out") "/lib"))))
2286 (inputs `(("zlib" ,zlib)))
2287 (home-page "https://fallabs.com/kyotocabinet/")
2289 "Kyoto Cabinet is a modern implementation of the DBM database")
2291 "Kyoto Cabinet is a standalone file-based database that supports Hash
2292 and B+ Tree data storage models. It is a fast key-value lightweight
2293 database and supports many programming languages. It is a NoSQL database.")
2294 (license license:gpl3+)))
2296 (define-public tokyocabinet
2298 (name "tokyocabinet")
2303 (uri (string-append "http://fallabs.com/tokyocabinet/"
2304 name "-" version ".tar.gz"))
2307 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2308 (build-system gnu-build-system)
2311 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2312 (string-append "LDFLAGS=-Wl,-rpath="
2313 (assoc-ref %outputs "out") "/lib"))))
2316 (home-page "http://fallabs.com/tokyocabinet/")
2317 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2319 "Tokyo Cabinet is a library of routines for managing a database.
2320 The database is a simple data file containing records, each is a pair of a
2321 key and a value. Every key and value is serial bytes with variable length.
2322 Both binary data and character string can be used as a key and a value.
2323 There is neither concept of data tables nor data types. Records are
2324 organized in hash table, B+ tree, or fixed-length array.")
2325 (license license:lgpl2.1+)))
2327 (define-public wiredtiger
2334 "http://source.wiredtiger.com/releases/wiredtiger-"
2335 version ".tar.bz2"))
2338 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2339 (build-system gnu-build-system)
2341 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2343 (modify-phases %standard-phases
2344 (add-before 'check 'disable-test/fops
2346 ;; XXX: timed out after 3600 seconds of silence
2347 (substitute* "Makefile"
2353 ("snappy" ,snappy)))
2354 (home-page "http://source.wiredtiger.com/")
2355 (synopsis "NoSQL data engine")
2357 "WiredTiger is an extensible platform for data management. It supports
2358 row-oriented storage (where all columns of a row are stored together),
2359 column-oriented storage (where columns are stored in groups, allowing for
2360 more efficient access and storage of column subsets) and log-structured merge
2361 trees (LSM), for sustained throughput under random insert workloads.")
2362 (license license:gpl3) ; or GPL-2
2363 ;; configure.ac: WiredTiger requires a 64-bit build.
2364 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2366 (define-public wiredtiger-3
2368 (inherit wiredtiger)
2373 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2374 version ".tar.bz2"))
2377 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2379 (define-public guile-wiredtiger
2381 (name "guile-wiredtiger")
2386 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2387 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2388 (file-name (string-append name "-" version "-checkout"))
2391 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2392 (build-system gnu-build-system)
2394 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2396 (list (string-append "--with-libwiredtiger-prefix="
2397 (assoc-ref %build-inputs "wiredtiger")))
2398 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2400 `(("autoconf" ,autoconf)
2401 ("automake" ,automake)
2402 ("pkg-config" ,pkg-config)))
2404 `(("wiredtiger" ,wiredtiger-3)
2405 ("guile" ,guile-2.2)))
2407 `(("guile-bytestructures" ,guile-bytestructures)))
2408 (synopsis "WiredTiger bindings for GNU Guile")
2410 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2412 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2413 (license license:gpl3+)))
2415 (define-public perl-db-file
2417 (name "perl-db-file")
2422 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2425 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2426 (build-system perl-build-system)
2427 (inputs `(("bdb" ,bdb)))
2428 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2430 `(#:phases (modify-phases %standard-phases
2432 'configure 'modify-config.in
2433 (lambda* (#:key inputs #:allow-other-keys)
2434 (substitute* "config.in"
2435 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2437 (home-page "https://metacpan.org/release/DB_File")
2438 (synopsis "Perl5 access to Berkeley DB version 1.x")
2440 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2441 (license license:perl-license)))
2451 (url "https://git.openldap.org/openldap/openldap.git")
2452 (commit (string-append "LMDB_" version))))
2453 (file-name (git-file-name name version))
2455 (base32 "09xqqm8yjsf1gv4gd4llal48sms76hfhxadx6rik1j2g5v3d3f1k"))))
2456 (build-system gnu-build-system)
2458 `(#:test-target "test"
2460 (modify-phases %standard-phases
2462 (lambda* (#:key outputs #:allow-other-keys)
2463 (chdir "libraries/liblmdb")
2464 (substitute* "Makefile"
2465 (("/usr/local") (assoc-ref outputs "out")))
2467 (add-after 'install 'create-pkg-config-file
2468 (lambda* (#:key outputs #:allow-other-keys)
2469 (let ((out (assoc-ref outputs "out")))
2470 (mkdir-p (string-append out "/lib/pkgconfig"))
2471 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2473 (format #t "prefix=~a~@
2476 includedir=~a/include~@
2480 Description: Lightning Memory-Mapped Database library~@
2481 Libs: -L${libdir} -llmdb~@
2482 Cflags: -I${includedir}~%"
2483 out out out out ,version)))
2485 (home-page "https://symas.com/lmdb/")
2486 (synopsis "Lightning Memory-Mapped Database library")
2488 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2489 transactional database. Unlike more complex relational databases, LMDB handles
2490 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2491 underlying operating system for caching and locking, keeping the code small and
2493 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2494 disk-based databases with high read performance that scales linearly over
2495 multiple cores. The size of each database is limited only by the size of the
2496 virtual address space — not physical RAM.")
2497 (license license:openldap2.8)))
2499 (define-public lmdbxx
2502 (version "0.9.14.0")
2507 (url "https://github.com/drycpp/lmdbxx")
2509 (file-name (git-file-name name version))
2511 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2514 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2516 (modify-phases %standard-phases
2517 (delete 'configure))))
2518 (build-system gnu-build-system)
2519 (inputs `(("lmdb" ,lmdb)))
2520 (home-page "http://lmdbxx.sourceforge.net")
2521 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2522 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2523 @code{LMDB} embedded database library, offering both an error-checked
2524 procedural interface and an object-oriented resource interface with RAII
2526 (license license:unlicense)))
2528 (define-public libpqxx
2535 "http://pqxx.org/download/software/libpqxx/"
2536 name "-" version ".tar.gz"))
2539 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2540 (build-system gnu-build-system)
2542 `(("python" ,python-2)))
2543 (inputs `(("postgresql" ,postgresql)))
2545 `(#:tests? #f ; # FAIL: 1
2547 (modify-phases %standard-phases
2548 (add-before 'configure 'fix-sed-command
2550 ;; Newer sed versions error out if double brackets are not used.
2551 (substitute* "configure"
2552 (("\\[:space:\\]") "[[:space:]]"))
2554 (synopsis "C++ connector for PostgreSQL")
2556 "Libpqxx is a C++ library to enable user programs to communicate with the
2557 PostgreSQL database back-end. The database back-end can be local or it may be
2558 on another machine, accessed via TCP/IP.")
2559 (home-page "http://pqxx.org/")
2560 (license license:bsd-3)))
2562 (define-public python-peewee
2564 (name "python-peewee")
2569 (uri (pypi-uri "peewee" version))
2571 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2572 (build-system python-build-system)
2574 `(#:tests? #f)) ; fails to import test data
2576 `(("sqlite" ,sqlite)))
2578 `(("python-cython" ,python-cython)))
2579 (home-page "https://github.com/coleifer/peewee/")
2580 (synopsis "Small object-relational mapping utility")
2582 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2583 handles converting between pythonic values and those used by databases, so you
2584 can use Python types in your code without having to worry. It has built-in
2585 support for sqlite, mysql and postgresql. If you already have a database, you
2586 can autogenerate peewee models using @code{pwiz}, a model generator.")
2587 (license license:expat)))
2589 (define-public python2-peewee
2590 (package-with-python2 python-peewee))
2592 (define-public python-tortoise-orm
2594 (name "python-tortoise-orm")
2599 (uri (pypi-uri "tortoise-orm" version))
2602 "0wr7p4v0b16ypm9fcpwpl99kf491m6w3jkd13xcsgq13fy73fbqc"))))
2603 (build-system python-build-system)
2604 ;; Disable tests for now. They pull in a lot of dependencies.
2605 (arguments `(#:tests? #f))
2607 `(("python-asynctest" ,python-asynctest)
2608 ("python-nose2" ,python-nose2)))
2610 `(("python-aiosqlite" ,python-aiosqlite)
2611 ("python-pypika" ,python-pypika)
2612 ("python-ciso8601" ,python-ciso8601)
2613 ("python-typing-extensions"
2614 ,python-typing-extensions)))
2616 "https://github.com/tortoise/tortoise-orm")
2618 "Easy async ORM for python, built with relations in mind")
2620 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2621 inspired by Django. Tortoise ORM was build with relations in mind and
2622 admiration for the excellent and popular Django ORM. It’s engraved in its
2623 design that you are working not with just tables, you work with relational
2625 (license license:asl2.0)))
2627 (define-public sqlcipher
2634 (uri (string-append "https://github.com/sqlcipher/" name
2635 "/archive/v" version ".tar.gz"))
2637 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2638 (file-name (string-append name "-" version ".tar.gz"))))
2639 (build-system gnu-build-system)
2641 `(("libcrypto" ,openssl)
2642 ("libtcl8.6" ,tcl))) ; required for running the tests
2647 '("--enable-tempstore=yes"
2648 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2649 "LDFLAGS=-lcrypto -ltcl8.6"
2651 ;; tests cannot be run from the Makefile
2652 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2653 #:test-target "testfixture"
2655 (modify-phases %standard-phases
2656 (add-before 'check 'build-test-runner
2657 (assoc-ref %standard-phases 'check))
2660 (invoke "./testfixture" "test/crypto.test"))))))
2661 (home-page "https://www.zetetic.net/sqlcipher/")
2663 "Library providing transparent encryption of SQLite database files")
2664 (description "SQLCipher is an implementation of SQLite, extended to
2665 provide transparent 256-bit AES encryption of database files. Pages are
2666 encrypted before being written to disk and are decrypted when read back. It’s
2667 well suited for protecting embedded application databases and for mobile
2670 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2671 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2672 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2673 ;; source files are in the public domain.
2674 (license (list license:public-domain license:bsd-3))))
2676 (define-public python-pyodbc-c
2678 (name "python-pyodbc-c")
2683 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2684 "archive.tar.gz?ref=v" version))
2687 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2688 (file-name (string-append name "-" version ".tar.gz"))))
2689 (build-system python-build-system)
2691 `(("unixodbc" ,unixodbc)))
2693 `(;; No unit tests exist.
2695 (home-page "https://github.com/mkleehammer/pyodbc")
2696 (synopsis "Python ODBC Library")
2697 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2699 (license (license:x11-style "file://LICENSE.TXT"))))
2701 (define-public python2-pyodbc-c
2702 (package-with-python2 python-pyodbc-c))
2704 (define-public python-pyodbc
2706 (name "python-pyodbc")
2711 (uri (pypi-uri "pyodbc" version))
2713 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2714 (file-name (string-append name "-" version ".tar.gz"))))
2715 (build-system python-build-system)
2717 `(("unixodbc" ,unixodbc)))
2719 `(#:tests? #f)) ; no unit tests exist
2720 (home-page "https://github.com/mkleehammer/pyodbc")
2721 (synopsis "Python ODBC Library")
2722 (description "@code{python-pyodbc} provides a Python DB-API driver
2724 (license (license:x11-style "file:///LICENSE.TXT"))))
2726 (define-public python2-pyodbc
2727 (package-with-python2 python-pyodbc))
2729 (define-public mdbtools
2737 (url "https://github.com/brianb/mdbtools")
2739 (file-name (git-file-name name version))
2742 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2743 (build-system gnu-build-system)
2747 `(("autoconf" ,autoconf)
2748 ("automake" ,automake)
2749 ("libtool" ,libtool)
2750 ("pkg-config" ,pkg-config)
2751 ("txt2man" ,txt2man)
2753 (home-page "http://mdbtools.sourceforge.net/")
2754 (synopsis "Read Microsoft Access databases")
2755 (description "MDB Tools is a set of tools and applications to read the
2756 proprietary MDB file format used in Microsoft's Access database package. This
2757 includes programs to export schema and data from Microsoft's Access database
2758 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2759 etc., and an SQL engine for performing simple SQL queries.")
2760 (license (list license:lgpl2.0
2763 (define-public python-lmdb
2765 (name "python-lmdb")
2769 (uri (pypi-uri "lmdb" version))
2772 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2773 (modules '((guix build utils)))
2775 ;; Delete bundled lmdb source files.
2777 (for-each delete-file (list "lib/lmdb.h"
2782 (build-system python-build-system)
2787 (modify-phases %standard-phases
2788 (add-before 'build 'use-system-lmdb
2789 (lambda* (#:key inputs #:allow-other-keys)
2790 (let ((lmdb (assoc-ref inputs "lmdb")))
2791 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2792 (setenv "LMDB_FORCE_SYSTEM" "set")
2793 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2794 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2796 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2798 (home-page "https://github.com/dw/py-lmdb")
2799 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2801 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2802 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2804 (list license:openldap2.8
2805 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2806 ;; but not actually needed on platforms currently supported by Guix.
2809 (define-public python-orator
2811 (name "python-orator")
2815 (uri (pypi-uri "orator" version))
2818 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2819 (build-system python-build-system)
2820 ;; FIXME: Tests are not distributed with PyPI, and the repository
2821 ;; does not contain setup.py. How to test?
2822 (arguments '(#:tests? #f))
2824 `(("python-backpack" ,python-backpack)
2825 ("python-blinker" ,python-blinker)
2826 ("python-cleo" ,python-cleo)
2827 ("python-faker" ,python-faker)
2828 ("python-inflection" ,python-inflection)
2829 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2830 ("python-pendulum" ,python-pendulum)
2831 ("python-pyaml" ,python-pyaml)
2832 ("python-pygments" ,python-pygments)
2833 ("python-pyyaml" ,python-pyyaml)
2834 ("python-simplejson" ,python-simplejson)
2835 ("python-six" ,python-six)
2836 ("python-wrapt" ,python-wrapt)))
2837 (home-page "https://orator-orm.com/")
2838 (synopsis "ActiveRecord ORM for Python")
2840 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2841 implementation for Python.")
2842 (license license:expat)
2843 (properties `((python2-variant . ,(delay python2-orator))))))
2845 (define-public python2-orator
2846 (package-with-python2 (strip-python2-variant python-orator)))
2848 (define-public virtuoso-ose
2850 (name "virtuoso-ose")
2856 "https://github.com/openlink/virtuoso-opensource/releases/"
2857 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2859 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2860 (build-system gnu-build-system)
2862 `(#:tests? #f ; Tests require a network connection.
2863 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2864 ;; This indicates that the internal zlib code may still be used.
2865 #:configure-flags '("--without-internal-zlib"
2867 "--enable-static=no")
2869 (modify-phases %standard-phases
2870 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2871 ;; the build output. The following phase removes it.
2872 (add-after 'install 'remove-static-libs
2873 (lambda* (#:key outputs #:allow-other-keys)
2874 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2875 (for-each (lambda (file)
2876 (delete-file (string-append lib "/" file)))
2878 "libvirtuoso-t.la"))))))))
2880 `(("openssl" ,openssl-1.0)
2881 ("net-tools" ,net-tools)
2882 ("readline" ,readline)
2884 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2885 (synopsis "Multi-model database system")
2886 (description "Virtuoso is a scalable cross-platform server that combines
2887 relational, graph, and document data management with web application server
2888 and web services platform functionality.")
2889 ;; configure: error: ... can only be build on 64bit platforms
2890 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2891 (license license:gpl2)))
2893 (define-public python-ccm
2900 (uri (pypi-uri "ccm" version))
2903 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2904 (build-system python-build-system)
2906 `(("python-pyyaml" ,python-pyyaml)
2907 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2909 ("python-psutil" ,python-psutil)
2910 ("python-six" ,python-six)))
2911 (home-page "https://github.com/pcmanus/ccm")
2912 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2914 (description "Cassandra Cluster Manager is a development tool for testing
2915 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2917 (license license:asl2.0)))
2919 (define-public python2-ccm
2920 (package-with-python2 python-ccm))
2922 (define-public python2-pysqlite
2924 (name "python2-pysqlite")
2929 (uri (pypi-uri "pysqlite" version))
2932 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2933 (build-system python-build-system)
2935 `(("sqlite" ,sqlite)))
2937 `(#:python ,python-2 ; incompatible with Python 3
2938 #:tests? #f)) ; no test target
2939 (home-page "https://github.com/ghaering/pysqlite")
2940 (synopsis "SQLite bindings for Python")
2942 "Pysqlite provides SQLite bindings for Python that comply to the
2943 Database API 2.0T.")
2944 (license license:zlib)))
2946 (define-public python-sqlalchemy
2948 (name "python-sqlalchemy")
2953 (uri (pypi-uri "SQLAlchemy" version))
2955 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
2956 (build-system python-build-system)
2958 `(("python-cython" ,python-cython) ; for C extensions
2959 ("python-pytest" ,python-pytest)
2960 ("python-mock" ,python-mock))) ; for tests
2963 (modify-phases %standard-phases
2965 (lambda _ (invoke "py.test"))))))
2966 (home-page "https://www.sqlalchemy.org")
2967 (synopsis "Database abstraction library")
2969 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2970 gives application developers the full power and flexibility of SQL. It
2971 provides a full suite of well known enterprise-level persistence patterns,
2972 designed for efficient and high-performing database access, adapted into a
2973 simple and Pythonic domain language.")
2974 (license license:x11)))
2976 (define-public python2-sqlalchemy
2977 (package-with-python2 python-sqlalchemy))
2979 (define-public python-sqlalchemy-utils
2981 (name "python-sqlalchemy-utils")
2986 (uri (pypi-uri "SQLAlchemy-Utils" version))
2989 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2990 (build-system python-build-system)
2992 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2994 ;; (modify-phases %standard-phases
2997 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2999 `(("python-six" ,python-six)
3000 ("python-sqlalchemy" ,python-sqlalchemy)))
3002 `(("python-dateutil" ,python-dateutil)
3003 ("python-flexmock" ,python-flexmock)
3004 ("python-psycopg2" ,python-psycopg2)
3005 ("python-pytest" ,python-pytest)
3006 ("python-pytz" ,python-pytz)))
3007 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3008 (synopsis "Various utility functions for SQLAlchemy")
3010 "SQLAlchemy-utils provides various utility functions and custom data types
3011 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3013 You might also want to install the following optional dependencies:
3015 @item @code{python-passlib}
3016 @item @code{python-babel}
3017 @item @code{python-cryptography}
3018 @item @code{python-pytz}
3019 @item @code{python-psycopg2}
3020 @item @code{python-furl}
3021 @item @code{python-flask-babel}
3024 (license license:bsd-3)))
3026 (define-public python2-sqlalchemy-utils
3027 (package-with-python2 python-sqlalchemy-utils))
3029 (define-public python-alchemy-mock
3031 (name "python-alchemy-mock")
3033 (home-page "https://github.com/miki725/alchemy-mock")
3036 (uri (pypi-uri "alchemy-mock" version))
3039 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
3040 (build-system python-build-system)
3042 '(#:phases (modify-phases %standard-phases
3045 ;; Create pytest.ini that adds doctest options to
3046 ;; prevent test failure. Taken from tox.ini.
3047 (call-with-output-file "pytest.ini"
3049 (format port "[pytest]
3050 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
3052 (invoke "pytest" "-vv" "--doctest-modules"
3053 "alchemy_mock/"))))))
3055 `(("python-mock" ,python-mock)
3056 ("python-pytest" ,python-pytest)))
3058 `(("python-six" ,python-six)
3059 ("python-sqlalchemy" ,python-sqlalchemy)))
3060 (synopsis "Mock helpers for SQLAlchemy")
3062 "This package provides mock helpers for SQLAlchemy that makes it easy
3063 to mock an SQLAlchemy session while preserving the ability to do asserts.
3065 Normally Normally SQLAlchemy's expressions cannot be easily compared as
3066 comparison on binary expression produces yet another binary expression, but
3067 this library provides functions to facilitate such comparisons.")
3068 (license license:expat)))
3070 (define-public python-alembic
3072 (name "python-alembic")
3077 (uri (pypi-uri "alembic" version))
3079 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
3080 (build-system python-build-system)
3082 '(#:phases (modify-phases %standard-phases
3085 (invoke "pytest" "-vv"))))))
3087 `(("python-mock" ,python-mock)
3088 ("python-pytest-cov" ,python-pytest-cov)))
3090 `(("python-dateutil" ,python-dateutil)
3091 ("python-sqlalchemy" ,python-sqlalchemy)
3092 ("python-mako" ,python-mako)
3093 ("python-editor" ,python-editor)))
3094 (home-page "https://bitbucket.org/zzzeek/alembic")
3095 (synopsis "Database migration tool for SQLAlchemy")
3097 "Alembic is a lightweight database migration tool for usage with the
3098 SQLAlchemy Database Toolkit for Python.")
3099 (license license:expat)))
3101 (define-public python2-alembic
3102 (package-with-python2 python-alembic))
3104 (define-public python-pickleshare
3106 (name "python-pickleshare")
3111 (uri (pypi-uri "pickleshare" version))
3113 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
3114 (build-system python-build-system)
3116 `(#:phases (modify-phases %standard-phases
3119 (invoke "pytest"))))))
3121 `(("python-pytest" ,python-pytest)))
3122 (home-page "https://github.com/vivainio/pickleshare")
3123 (synopsis "Tiny key value database with concurrency support")
3125 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
3126 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
3127 shelve, many processes can access the database simultaneously. Changing a
3128 value in database is immediately visible to other processes accessing the same
3129 database. Concurrency is possible because the values are stored in separate
3130 files. Hence the “database” is a directory where all files are governed by
3132 (properties `((python2-variant . ,(delay python2-pickleshare))))
3133 (license license:expat)))
3135 (define-public python2-pickleshare
3136 (let ((pickleshare (package-with-python2
3137 (strip-python2-variant python-pickleshare))))
3138 (package (inherit pickleshare)
3139 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3140 ,@(package-propagated-inputs pickleshare))))))
3142 (define-public python-apsw
3144 (name "python-apsw")
3145 (version "3.31.1-r1")
3149 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3150 "/download/" version "/apsw-" version ".zip"))
3153 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3154 (build-system python-build-system)
3156 `(("unzip" ,unzip)))
3158 `(("sqlite" ,sqlite)))
3161 (modify-phases %standard-phases
3164 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3166 (add-after 'build 'build-test-helper
3168 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3169 "-I." "-Isqlite3" "src/testextension.c")
3172 (lambda* (#:key inputs outputs #:allow-other-keys)
3173 (add-installed-pythonpath inputs outputs)
3174 (invoke "python" "setup.py" "test")
3176 (home-page "https://github.com/rogerbinns/apsw/")
3177 (synopsis "Another Python SQLite Wrapper")
3178 (description "APSW is a Python wrapper for the SQLite
3179 embedded relational database engine. In contrast to other wrappers such as
3180 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3181 translate the complete SQLite API into Python.")
3182 (license license:zlib)))
3184 (define-public python2-apsw
3185 (package-with-python2 python-apsw))
3187 (define-public python-aiosqlite
3189 (name "python-aiosqlite")
3194 (uri (pypi-uri "aiosqlite" version))
3197 "1w8248yz85xyzvvh4jaxnc59fqil45aka6h82kn1rcih4rjxbnn1"))))
3198 (build-system python-build-system)
3200 `(("python-aiounittest" ,python-aiounittest)))
3201 (home-page "https://github.com/jreese/aiosqlite")
3203 "Asyncio bridge for sqlite3")
3205 "The package aiosqlite replicates the standard sqlite3 module, but with
3206 async versions of all the standard connection and cursor methods, and context
3207 managers for automatically closing connections.")
3208 (license license:expat)))
3210 (define-public python2-neo4j-driver
3212 (name "python2-neo4j-driver")
3213 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3217 (uri (pypi-uri "neo4j-driver" version))
3220 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3221 (build-system python-build-system)
3223 `(#:python ,python-2))
3224 (home-page "https://neo4j.com/developer/python/")
3225 (synopsis "Neo4j driver code written in Python")
3226 (description "This package provides the Neo4j Python driver that connects
3227 to the database using Neo4j's binary protocol. It aims to be minimal, while
3228 being idiomatic to Python.")
3229 (license license:asl2.0)))
3231 (define-public python2-py2neo
3233 (name "python2-py2neo")
3237 (uri (pypi-uri "py2neo" version))
3240 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3241 (build-system python-build-system)
3243 `(#:python ,python-2))
3244 (home-page "https://py2neo.org")
3245 (synopsis "Library and toolkit for working with Neo4j in Python")
3246 (description "This package provides a client library and toolkit for
3247 working with Neo4j from within Python applications and from the command
3248 line. The core library has no external dependencies and has been carefully
3249 designed to be easy and intuitive to use.")
3250 (license license:asl2.0)))
3252 (define-public python-psycopg2
3254 (name "python-psycopg2")
3259 (uri (pypi-uri "psycopg2" version))
3261 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3262 (build-system python-build-system)
3264 ;; Tests would require a postgresql database "psycopg2_test"
3265 ;; and a running postgresql database management service.
3266 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3268 `(("postgresql" ,postgresql))) ; libpq
3269 (home-page "http://initd.org/psycopg/")
3270 (synopsis "Python PostgreSQL adapter")
3272 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3274 (license license:lgpl3+)))
3276 (define-public python2-psycopg2
3277 (package-with-python2 python-psycopg2))
3279 (define-public python-sadisplay
3281 (name "python-sadisplay")
3286 (uri (pypi-uri "sadisplay" version))
3289 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3290 (build-system python-build-system)
3292 `(("python-sqlalchemy" ,python-sqlalchemy)))
3295 `(("python-nose" ,python-nose)))
3296 (home-page "https://bitbucket.org/estin/sadisplay")
3297 (synopsis "SQLAlchemy schema displayer")
3298 (description "This package provides a program to build Entity
3299 Relationship diagrams from a SQLAlchemy model (or directly from the
3301 (license license:bsd-3)))
3303 (define-public python2-sadisplay
3304 (package-with-python2 python-sadisplay))
3306 (define-public yoyo-migrations
3308 (name "yoyo-migrations")
3312 ;; We use the upstream repository, as the tests are not included in the
3316 (url "https://hg.sr.ht/~olly/yoyo")
3317 (changeset (string-append "v" version "-release"))))
3318 (file-name (string-append name "-" version "-checkout"))
3320 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3321 (build-system python-build-system)
3323 ;; XXX: Tests require a connection to some pgsql database and psycopg
3324 ;; fails to connect to it.
3327 `(("python-sqlparse" ,python-sqlparse)
3328 ("python-tabulate" ,python-tabulate)))
3329 (home-page "https://ollycope.com/software/yoyo/latest/")
3330 (synopsis "Database migrations with SQL")
3332 "Yoyo is a database schema migration tool. Migrations are written as SQL
3333 files or Python scripts that define a list of migration steps.")
3334 (license license:asl2.0)))
3336 (define-public python-mysqlclient
3338 (name "python-mysqlclient")
3343 (uri (pypi-uri "mysqlclient" version))
3346 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3347 (build-system python-build-system)
3348 (arguments '(#:tests? #f)) ;XXX: requires a live database
3350 `(("mysql-dev" ,mariadb "dev")))
3351 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3352 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3353 (description "MySQLdb is an interface to the popular MySQL database server
3354 for Python. The design goals are:
3356 @item Compliance with Python database API version 2.0 [PEP-0249],
3357 @item Thread-safety,
3358 @item Thread-friendliness (threads will not block each other).
3360 (license license:gpl2)))
3362 (define-public python-hiredis
3364 (name "python-hiredis")
3369 (uri (pypi-uri "hiredis" version))
3372 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3373 (build-system python-build-system)
3377 (home-page "https://github.com/redis/hiredis-py")
3378 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3379 (description "Python-hiredis is a python extension that wraps protocol
3380 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3381 (license license:bsd-3)))
3383 (define-public python2-hiredis
3384 (package-with-python2 python-hiredis))
3386 (define-public python-fakeredis
3388 (name "python-fakeredis")
3393 (uri (pypi-uri "fakeredis" version))
3396 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3397 (build-system python-build-system)
3402 `(("python-sortedcontainers" ,python-sortedcontainers)))
3403 (home-page "https://github.com/jamesls/fakeredis")
3404 (synopsis "Fake implementation of redis API for testing purposes")
3406 "Fakeredis is a pure-Python implementation of the redis-py Python client
3407 that simulates talking to a redis server. It was created for a single purpose:
3408 to write unit tests.
3410 Setting up redis is not hard, but one often wants to write unit tests that don't
3411 talk to an external server such as redis. This module can be used as a
3412 reasonable substitute.")
3413 (license license:bsd-3)))
3415 (define-public python2-fakeredis
3416 (package-with-python2 python-fakeredis))
3418 (define-public python-redis
3420 (name "python-redis")
3425 (uri (pypi-uri "redis" version))
3427 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3428 (build-system python-build-system)
3429 ;; Tests require a running Redis server.
3430 (arguments '(#:tests? #f))
3431 ;; As long as we are not running test, we do not need this input :-)
3433 ;; `(("python-pytest" ,python-pytest)))
3434 (home-page "https://github.com/andymccurdy/redis-py")
3435 (synopsis "Redis Python client")
3437 "This package provides a Python interface to the Redis key-value store.")
3438 (license license:expat)))
3440 (define-public python2-redis
3441 (package-with-python2 python-redis))
3443 (define-public python-rq
3451 (url "https://github.com/rq/rq")
3452 (commit (string-append "v" version))))
3453 (file-name (git-file-name name version))
3455 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3456 (build-system python-build-system)
3458 '(#:phases (modify-phases %standard-phases
3459 (add-before 'check 'start-redis
3461 (invoke "redis-server" "--daemonize" "yes")))
3463 (lambda* (#:key outputs #:allow-other-keys)
3464 (let ((out (assoc-ref outputs "out")))
3465 ;; Drop test that needs the SDK for Sentry.io.
3466 (delete-file "tests/test_sentry.py")
3467 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3468 (setenv "PATH" (string-append out "/bin:"
3470 (invoke "pytest" "-vv")))))))
3472 `(("python-mock" ,python-mock)
3473 ("python-pytest" ,python-pytest)
3476 `(("python-click" ,python-click)
3477 ("python-redis" ,python-redis)))
3478 (home-page "https://python-rq.org/")
3479 (synopsis "Simple job queues for Python")
3481 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3482 processing them in the background with workers. It is backed by Redis and it
3483 is designed to have a low barrier to entry.")
3484 (license license:bsd-2)))
3486 (define-public python2-rq
3487 (package-with-python2 python-rq))
3489 (define-public python-rq-scheduler
3491 (name "python-rq-scheduler")
3493 (home-page "https://github.com/rq/rq-scheduler")
3498 (commit (string-append "v" version))))
3499 (file-name (git-file-name name version))
3502 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3503 (build-system python-build-system)
3505 '(#:phases (modify-phases %standard-phases
3506 (add-before 'check 'start-redis
3508 (invoke "redis-server" "--daemonize" "yes")))
3511 (substitute* "run_tests.py"
3514 (invoke "./run_tests.py"))))))
3519 `(("python-croniter" ,python-croniter)
3520 ("python-rq" ,python-rq)))
3521 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3523 "This package provides job scheduling capabilities to @code{python-rq}
3525 (license license:expat)))
3527 (define-public python-trollius-redis
3529 (name "python-trollius-redis")
3534 (uri (pypi-uri "trollius_redis" version))
3537 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3538 (build-system python-build-system)
3539 ;; TODO: Tests require packaging 'hiredis'.
3540 (arguments '(#:tests? #f))
3541 (home-page "https://github.com/benjolitz/trollius-redis")
3542 (synopsis "Port of asyncio-redis to trollius")
3543 (description "@code{trollius-redis} is a Redis client for Python
3544 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3546 (license license:bsd-2)))
3548 (define-public python2-trollius-redis
3549 (package-with-python2 python-trollius-redis))
3551 (define-public python-sqlparse
3553 (name "python-sqlparse")
3557 (uri (pypi-uri "sqlparse" version))
3560 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3561 (build-system python-build-system)
3564 (modify-phases %standard-phases
3566 (lambda _ (invoke "py.test"))))))
3568 `(("python-pytest" ,python-pytest)))
3569 (home-page "https://github.com/andialbrecht/sqlparse")
3570 (synopsis "Non-validating SQL parser")
3571 (description "Sqlparse is a non-validating SQL parser for Python. It
3572 provides support for parsing, splitting and formatting SQL statements.")
3573 (license license:bsd-3)))
3575 (define-public python2-sqlparse
3576 (package-with-python2 python-sqlparse))
3578 (define-public python-sql
3585 (uri (pypi-uri "python-sql" version))
3587 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3588 (build-system python-build-system)
3589 (home-page "https://python-sql.tryton.org/")
3590 (synopsis "Library to write SQL queries in a pythonic way")
3591 (description "@code{python-sql} is a library to write SQL queries, that
3592 transforms idiomatic python function calls to well-formed SQL queries.")
3593 (license license:bsd-3)))
3595 (define-public python2-sql
3596 (package-with-python2 python-sql))
3598 (define-public python-pypika
3600 (name "python-pypika")
3603 (origin (method git-fetch)
3605 (url "https://github.com/kayak/pypika")
3606 (commit (string-append "v" version))))
3607 (file-name (git-file-name name version))
3610 "0mpddrw9z1pzcc40j3pzhd583hlgjx96aa8ak6m9zzhpm4bv3ard"))))
3611 (build-system python-build-system)
3613 `(("python-parameterized" ,python-parameterized)))
3614 (home-page "https://github.com/kayak/pypika")
3615 (synopsis "SQL query builder API for Python")
3617 "PyPika is a python SQL query builder that exposes the full richness of
3618 the SQL language using a syntax that reflects the resulting query.")
3619 (license license:asl2.0)))
3621 (define-public mongo-tools
3623 (name "mongo-tools")
3626 (origin (method git-fetch)
3628 (url "https://github.com/mongodb/mongo-tools")
3629 (commit (string-append "r" version))))
3630 (file-name (git-file-name name version))
3633 "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1"))))
3634 (build-system go-build-system)
3636 `(#:import-path "github.com/mongodb/mongo-tools"
3637 #:modules ((srfi srfi-1)
3638 (guix build go-build-system)
3640 #:install-source? #f
3643 '("bsondump" "mongodump" "mongoexport" "mongofiles"
3644 "mongoimport" "mongooplog" "mongorestore"
3645 "mongostat" "mongotop")))
3646 (modify-phases %standard-phases
3647 (add-after 'unpack 'delete-bundled-source-code
3649 (delete-file-recursively
3650 "src/github.com/mongodb/mongo-tools/vendor")
3652 (add-after 'delete-bundled-source-code 'patch-source
3654 ;; Remove a redundant argument that causes compilation to fail.
3656 "src/github.com/mongodb/mongo-tools/mongorestore/filepath.go"
3657 (("skipping restore of system.profile collection\", db)")
3658 "skipping restore of system.profile collection\")"))
3662 (for-each (lambda (tool)
3665 ;; This is where the tests expect to find the
3667 "-o" ,(string-append
3668 "src/github.com/mongodb/mongo-tools/bin/"
3671 "-tags=\"ssl sasl\""
3673 "-extldflags=-Wl,-z,now,-z,relro"
3675 "src/github.com/mongodb/mongo-tools/"
3676 tool "/main/" tool ".go"))))
3677 (simple-format #t "build: running ~A\n"
3678 (string-join command))
3679 (apply invoke command)))
3684 (with-directory-excursion "src"
3685 (for-each (lambda (tool)
3688 (string-append "github.com/mongodb/mongo-tools/"
3693 (lambda* (#:key outputs #:allow-other-keys)
3694 (for-each (lambda (tool)
3696 (string-append "src/github.com/mongodb/mongo-tools/bin/"
3698 (string-append (assoc-ref outputs "out")
3703 `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
3704 ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
3705 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3706 ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
3707 ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
3708 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
3709 ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey)))
3710 (home-page "https://github.com/mongodb/mongo-tools")
3711 (synopsis "Various tools for interacting with MongoDB and BSON")
3713 "This package includes a collection of tools related to MongoDB.
3716 Display BSON files in a human-readable format
3718 Convert data from JSON, TSV or CSV and insert them into a collection
3720 Write an existing collection to CSV or JSON format
3721 @item mongodump/mongorestore
3722 Dump MongoDB backups to disk in the BSON format
3724 Read MongoDB backups in the BSON format, and restore them to a live database
3726 Monitor live MongoDB servers, replica sets, or sharded clusters
3728 Read, write, delete, or update files in GridFS
3730 Replay oplog entries between MongoDB servers
3732 Monitor read/write activity on a mongo server
3734 (license license:asl2.0)))
3736 ;; There are many wrappers for this in other languages. When touching, please
3737 ;; be sure to ensure all dependencies continue to build.
3738 (define-public apache-arrow
3740 (name "apache-arrow")
3746 (url "https://github.com/apache/arrow")
3747 (commit (string-append "apache-arrow-" version))))
3748 (file-name (git-file-name name version))
3751 "02r6yx3yhywzikd3b0vfkjgddhfiriyx2vpm3jf5880wq59x798a"))))
3752 (build-system cmake-build-system)
3756 (modify-phases %standard-phases
3757 (add-before 'configure 'enter-source-directory
3758 (lambda _ (chdir "cpp") #t))
3759 (add-after 'unpack 'set-env
3761 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3762 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3763 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3764 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3766 #:build-type "Release"
3768 (list "-DARROW_PYTHON=ON"
3771 "-DARROW_PARQUET=ON"
3772 "-DPARQUET_BUILD_EXECUTABLES=ON"
3773 ;; The maintainers disallow using system versions of
3775 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3776 ;; is unfortunate because jemalloc increases performance:
3777 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3778 "-DARROW_JEMALLOC=OFF"
3780 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3781 ;; option that instructs the build system how to resolve
3782 ;; each dependency. SYSTEM = Finding the dependency in
3783 ;; system paths using CMake's built-in find_package
3784 ;; function, or using pkg-config for packages that do not
3785 ;; have this feature
3786 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3788 ;; Split output into its component packages.
3789 (string-append "-DCMAKE_INSTALL_PREFIX="
3790 (assoc-ref %outputs "lib"))
3791 (string-append "-DCMAKE_INSTALL_RPATH="
3792 (assoc-ref %outputs "lib")
3794 (string-append "-DCMAKE_INSTALL_BINDIR="
3795 (assoc-ref %outputs "out")
3797 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3798 (assoc-ref %outputs "include")
3802 "-DARROW_WITH_SNAPPY=ON"
3803 "-DARROW_WITH_ZLIB=ON"
3804 "-DARROW_WITH_ZSTD=ON"
3805 "-DARROW_WITH_LZ4=ON"
3806 "-DARROW_COMPUTE=ON"
3808 "-DARROW_DATASET=ON"
3809 "-DARROW_FILESYSTEM=ON"
3812 ;; Arrow Python C++ integration library (required for
3813 ;; building pyarrow). This library must be built against
3814 ;; the same Python version for which you are building
3815 ;; pyarrow. NumPy must also be installed. Enabling this
3816 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3817 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3821 ;; Building the tests forces on all the
3822 ;; optional features and the use of static
3824 "-DARROW_BUILD_TESTS=OFF"
3825 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3826 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3827 "-DARROW_BUILD_STATIC=OFF")))
3830 ("brotli" ,google-brotli)
3831 ("double-conversion" ,double-conversion)
3835 ("apache-thrift" ,apache-thrift "lib")
3836 ("protobuf" ,protobuf)
3837 ("rapidjson" ,rapidjson)
3841 ("zstd" ,zstd "lib")
3844 ("python-3" ,python)
3845 ("python-numpy" ,python-numpy)))
3847 `(("pkg-config" ,pkg-config)))
3848 (outputs '("out" "lib" "include"))
3849 (home-page "https://arrow.apache.org/")
3850 (synopsis "Columnar in-memory analytics")
3851 (description "Apache Arrow is a columnar in-memory analytics layer
3852 designed to accelerate big data. It houses a set of canonical in-memory
3853 representations of flat and hierarchical data along with multiple
3854 language-bindings for structure manipulation. It also provides IPC and common
3855 algorithm implementations.")
3856 (license license:asl2.0)))
3858 (define-public python-pyarrow
3860 (inherit apache-arrow)
3861 (name "python-pyarrow")
3862 (build-system python-build-system)
3864 '(#:tests? #f ; XXX There are no tests in the "python" directory
3866 (modify-phases %standard-phases
3867 (delete 'build) ; XXX the build is performed again during the install phase
3868 (add-after 'unpack 'enter-source-directory
3869 (lambda _ (chdir "python") #t))
3870 (add-after 'unpack 'make-git-checkout-writable
3872 (for-each make-file-writable (find-files "."))
3875 `(("apache-arrow" ,apache-arrow "lib")
3876 ("python-numpy" ,python-numpy)
3877 ("python-pandas" ,python-pandas)
3878 ("python-six" ,python-six)))
3880 `(("cmake" ,cmake-minimal)
3881 ("pkg-config" ,pkg-config)
3882 ("python-cython" ,python-cython)
3883 ("python-pytest" ,python-pytest)
3884 ("python-pytest-runner" ,python-pytest-runner)
3885 ("python-setuptools-scm" ,python-setuptools-scm)))
3887 (home-page "https://arrow.apache.org/docs/python/")
3888 (synopsis "Python bindings for Apache Arrow")
3890 "This library provides a Pythonic API wrapper for the reference Arrow C++
3891 implementation, along with tools for interoperability with pandas, NumPy, and
3892 other traditional Python scientific computing packages.")
3893 (license license:asl2.0)))
3895 (define-public python-crate
3897 (name "python-crate")
3901 (uri (pypi-uri "crate" version))
3904 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3905 (build-system python-build-system)
3907 `(("python-urllib3" ,python-urllib3)))
3908 (home-page "https://github.com/crate/crate-python")
3909 (synopsis "CrateDB Python client")
3911 "This package provides a Python client library for CrateDB.
3912 It implements the Python DB API 2.0 specification and includes support for
3914 (license license:asl2.0)))
3916 (define-public libdbi
3922 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3923 version "/libdbi-" version ".tar.gz"))
3926 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3927 (build-system gnu-build-system)
3928 (synopsis "Database independent abstraction layer in C")
3930 "This library implements a database independent abstraction layer in C,
3931 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3932 programmers can leverage the power of multiple databases and multiple
3933 simultaneous database connections by using this framework.")
3934 (home-page "http://libdbi.sourceforge.net/")
3935 (license license:lgpl2.1+)))
3937 (define-public libdbi-drivers
3939 (name "libdbi-drivers")
3943 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3944 "libdbi-drivers/libdbi-drivers-" version
3945 "/libdbi-drivers-" version ".tar.gz"))
3948 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3949 (build-system gnu-build-system)
3952 ("inetutils" ,inetutils)
3953 ("glibc-locales" ,glibc-locales)
3954 ("mariadb" ,mariadb)))
3956 `(("libdbi" ,libdbi)
3957 ("mariadb:dev" ,mariadb "dev")
3958 ("mariadb:lib" ,mariadb "lib")
3959 ("postgresql" ,postgresql)
3960 ("sqlite" ,sqlite)))
3963 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3964 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3965 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3966 (postgresql (assoc-ref %build-inputs "postgresql"))
3967 (sqlite (assoc-ref %build-inputs "sqlite")))
3968 (list "--disable-docs"
3969 (string-append "--with-dbi-incdir=" libdbi "/include")
3970 (string-append "--with-dbi-libdir=" libdbi "/lib")
3972 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3973 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3975 (string-append "--with-pgsql-incdir=" postgresql "/include")
3976 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3978 (string-append "--with-sqlite-incdir=" sqlite "/include")
3979 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3981 (modify-phases %standard-phases
3982 (add-after 'unpack 'fix-tests
3983 (lambda* (#:key inputs #:allow-other-keys)
3984 (substitute* "tests/test_mysql.sh"
3986 (string-append "MYMYSQLD="
3987 (assoc-ref inputs "mariadb")
3990 (add-after 'install 'remove-empty-directories
3991 (lambda* (#:key outputs #:allow-other-keys)
3992 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3993 (delete-file-recursively var))
3995 (synopsis "Database drivers for the libdbi framework")
3997 "The @code{libdbi-drivers} library provides the database specific drivers
3998 for the @code{libdbi} framework.
4000 The drivers officially supported by @code{libdbi} are:
4006 (home-page "http://libdbi-drivers.sourceforge.net/")
4007 (license license:lgpl2.1+)))
4016 (url "https://github.com/SOCI/soci/")
4018 (file-name (git-file-name name version))
4021 "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp"))))
4022 (build-system cmake-build-system)
4024 `(("firebird" ,firebird)
4025 ("postgresql" ,postgresql)
4029 ("mariadb:dev" ,mariadb "dev")))
4032 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
4033 (list "-DCMAKE_CXX_STANDARD=17"
4034 "-DSOCI_LIBDIR=lib")
4035 #:tests? #f)) ; may require running database management systems
4036 (synopsis "C++ Database Access Library")
4038 "SOCI is an abstraction layer for several database backends, including
4039 PostreSQL, SQLite, ODBC and MySQL.")
4040 (home-page "http://soci.sourceforge.net/")
4041 (license license:boost1.0)))
4043 (define-public freetds
4050 (uri (string-append "https://www.freetds.org/files/stable/"
4051 "freetds-" version ".tar.gz"))
4053 (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50"))))
4054 (build-system gnu-build-system)
4056 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
4057 ;; disabled for now.
4059 (home-page "https://www.freetds.org/")
4060 (synopsis "Client libraries for MS SQL and Sybase servers")
4062 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
4063 connecting to MS SQL and Sybase servers over TCP/IP.")
4064 (license license:lgpl2.0+)))