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, 2021 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, 2021 Marius Bakke <marius@gnu.org>
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, 2021 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, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
36 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
37 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
38 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
39 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
40 ;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
41 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
42 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
43 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
44 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
45 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
46 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
47 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
48 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
49 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
50 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
51 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
52 ;;; Copyright © 2021 Pjotr Prins <pjotr.guix@thebird.nl>
53 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
54 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
56 ;;; This file is part of GNU Guix.
58 ;;; GNU Guix is free software; you can redistribute it and/or modify it
59 ;;; under the terms of the GNU General Public License as published by
60 ;;; the Free Software Foundation; either version 3 of the License, or (at
61 ;;; your option) any later version.
63 ;;; GNU Guix is distributed in the hope that it will be useful, but
64 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
65 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66 ;;; GNU General Public License for more details.
68 ;;; You should have received a copy of the GNU General Public License
69 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
71 (define-module (gnu packages databases)
72 #:use-module (gnu packages)
73 #:use-module (gnu packages admin)
74 #:use-module (gnu packages algebra)
75 #:use-module (gnu packages autotools)
76 #:use-module (gnu packages avahi)
77 #:use-module (gnu packages base)
78 #:use-module (gnu packages bash)
79 #:use-module (gnu packages bison)
80 #:use-module (gnu packages boost)
81 #:use-module (gnu packages check)
82 #:use-module (gnu packages cmake)
83 #:use-module (gnu packages compression)
84 #:use-module (gnu packages cpp)
85 #:use-module (gnu packages crypto)
86 #:use-module (gnu packages curl)
87 #:use-module (gnu packages cyrus-sasl)
88 #:use-module (gnu packages dbm)
89 #:use-module (gnu packages emacs)
90 #:use-module (gnu packages flex)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages gettext)
93 #:use-module (gnu packages glib)
94 #:use-module (gnu packages gnupg)
95 #:use-module (gnu packages golang)
96 #:use-module (gnu packages guile)
97 #:use-module (gnu packages icu4c)
98 #:use-module (gnu packages jemalloc)
99 #:use-module (gnu packages language)
100 #:use-module (gnu packages libedit)
101 #:use-module (gnu packages libevent)
102 #:use-module (gnu packages linux)
103 #:use-module (gnu packages lisp)
104 #:use-module (gnu packages lisp-xyz)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages logging)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
109 #:use-module (gnu packages multiprecision)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages onc-rpc)
112 #:use-module (gnu packages parallel)
113 #:use-module (gnu packages pcre)
114 #:use-module (gnu packages perl)
115 #:use-module (gnu packages perl-check)
116 #:use-module (gnu packages perl-web)
117 #:use-module (gnu packages pkg-config)
118 #:use-module (gnu packages popt)
119 #:use-module (gnu packages protobuf)
120 #:use-module (gnu packages python)
121 #:use-module (gnu packages python-check)
122 #:use-module (gnu packages python-crypto)
123 #:use-module (gnu packages python-science)
124 #:use-module (gnu packages python-web)
125 #:use-module (gnu packages python-xyz)
126 #:use-module (gnu packages rdf)
127 #:use-module (gnu packages readline)
128 #:use-module (gnu packages regex)
129 #:use-module (gnu packages rpc)
130 #:use-module (gnu packages ruby)
131 #:use-module (gnu packages serialization)
132 #:use-module (gnu packages sphinx)
133 #:use-module (gnu packages sqlite)
134 #:use-module (gnu packages tcl)
135 #:use-module (gnu packages terminals)
136 #:use-module (gnu packages textutils)
137 #:use-module (gnu packages time)
138 #:use-module (gnu packages tls)
139 #:use-module (gnu packages valgrind)
140 #:use-module (gnu packages web)
141 #:use-module (gnu packages xml)
142 #:use-module ((guix licenses) #:prefix license:)
143 #:use-module (guix packages)
144 #:use-module (guix download)
145 #:use-module (guix bzr-download)
146 #:use-module (guix git-download)
147 #:use-module (guix hg-download)
148 #:use-module (guix build-system emacs)
149 #:use-module (guix build-system gnu)
150 #:use-module (guix build-system go)
151 #:use-module (guix build-system perl)
152 #:use-module (guix build-system python)
153 #:use-module (guix build-system ruby)
154 #:use-module (guix build-system cmake)
155 #:use-module (guix build-system scons)
156 #:use-module (guix build-system trivial)
157 #:use-module (guix utils)
158 #:use-module (srfi srfi-1)
159 #:use-module (srfi srfi-26)
160 #:use-module (ice-9 match))
162 (define-public 4store
169 (url "https://github.com/4store/4store")
170 (commit (string-append "v" version))))
171 (file-name (git-file-name name version))
173 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
174 (patches (search-patches "4store-unset-preprocessor-directive.patch"
175 "4store-fix-buildsystem.patch"))))
176 (build-system gnu-build-system)
180 ("autoconf" ,autoconf)
181 ("automake" ,automake)
182 ("gettext" ,gettext-minimal)
184 ("pcre" ,pcre "bin") ;for 'pcre-config'
185 ("pkg-config" ,pkg-config)))
191 ("readline" ,readline)
193 ("cyrus-sasl" ,cyrus-sasl)
195 ("util-linux" ,util-linux "lib")))
196 ;; http://www.4store.org has been down for a while now.
197 (home-page "https://github.com/4store/4store")
198 (synopsis "Clustered RDF storage and query engine")
199 (description "4store is a RDF/SPARQL store written in C, supporting
200 either single machines or networked clusters.")
201 (license license:gpl3+)))
203 (define-public ephemeralpg
211 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
214 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
215 (build-system gnu-build-system)
217 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
218 (string-append "PREFIX=" %output))
220 (modify-phases %standard-phases
221 (delete 'configure) ; no configure script
222 (add-after 'install 'wrap
223 (lambda* (#:key inputs outputs #:allow-other-keys)
224 (let ((out (assoc-ref outputs "out")))
225 (wrap-program (string-append out "/bin/pg_tmp")
227 (,(string-append (assoc-ref inputs "util-linux")
229 ,(string-append (assoc-ref inputs "postgresql")
232 ,(string-append out "/bin")))))
234 #:test-target "test"))
236 `(("postgresql" ,postgresql)
237 ("util-linux" ,util-linux)))
242 (home-page "https://eradman.com/ephemeralpg/")
243 (synopsis "Run temporary PostgreSQL databases")
245 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
246 like running software test suites. Temporary databases created with
247 @code{pg_tmp} have a limited shared memory footprint and are automatically
248 garbage-collected after a configurable number of seconds (the default is
250 (license license:isc)))
252 (define-public es-dump-restore
254 (name "es-dump-restore")
259 (uri (rubygems-uri "es_dump_restore" version))
262 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
263 (build-system ruby-build-system)
265 '(#:tests? #f)) ;; No testsuite.
267 `(("ruby-httpclient" ,ruby-httpclient)
268 ("ruby-multi-json" ,ruby-multi-json)
269 ("ruby-progress_bar" ,ruby-progress_bar)
270 ("ruby-rubyzip" ,ruby-rubyzip)
271 ("ruby-thor" ,ruby-thor)))
272 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
274 "This package provides a utility for dumping the contents of an
275 ElasticSearch index to a compressed file and restoring the dumpfile back to an
276 ElasticSearch server")
277 (home-page "https://github.com/patientslikeme/es_dump_restore")
278 (license license:expat)))
280 (define-public firebird
285 (let ((revision "33374-0"))
288 (uri (string-append "https://github.com/FirebirdSQL/"
289 "firebird/releases/download/R"
290 (string-replace-substring version "." "_") "/"
291 "Firebird-" version "." revision ".tar.bz2"))
293 (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c"))
294 (modules '((guix build utils)))
298 delete-file-recursively
299 (list "extern/btyacc/test" ; TODO: package and remove entirely
304 "src/include/firebird/impl/boost"
307 "builds/install/arch-specific/solaris"
309 "src/msgs/templates.sql"
311 ;; Generated files missing sources.
312 "doc/Firebird-3-QuickStart.pdf"
313 (string-append "doc/Firebird-" ,version
315 "doc/README.SecureRemotePassword.html"))
317 (build-system gnu-build-system)
318 (outputs (list "debug" "out"))
321 (let ((out (assoc-ref %outputs "out")))
322 (list (string-append "--with-fbsbin=" out "/sbin")
323 (string-append "--with-fbdoc=" out "/share/doc/"
325 (string-append "--with-fbconf=" out "/lib/firebird")
326 (string-append "--with-fbintl=" out "/lib/firebird/intl")
327 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
328 (string-append "--with-fbmsg=" out "/lib/firebird")
329 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
330 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
331 "--with-fbglock=/run/firebird"
332 "--with-fblog=/var/log/firebird"
333 "--with-fbhelp=/var/lib/firebird/system"
334 "--with-fbsecure-db=/var/lib/firebird/secure"
336 "--without-fbsample-db"
337 "--with-system-editline"))
339 (list (string-append "CC=" ,(cc-for-target))
340 ;; The plugins/ can't find libfbclient otherwise.
341 (string-append "LDFLAGS=-Wl,-rpath="
342 (assoc-ref %outputs "out") "/lib"))
343 #:tests? #f ; no test suite
344 #:modules ((guix build gnu-build-system)
348 (modify-phases %standard-phases
349 (add-after 'unpack 'use-system-boost
351 (substitute* "src/include/firebird/Message.h"
352 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
353 "<boost/preprocessor/seq/for_each_i.hpp>")
354 (("FB_BOOST_") "BOOST_"))
356 (add-after 'unpack 'patch-installation
359 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
360 (("/bin/sh") (which "bash"))
361 ;; Remove shell script helpers from $PATH.
362 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
363 ;; Put files where Guix users expect them.
364 (("(License\\.txt.*)@FB_CONFDIR" match)
365 (string-append match "@FB_DOCDIR@"))
366 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
367 (string-append "@FB_DOCDIR@" match))
368 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
369 (string-append head "@FB_DOCDIR@" tail "\n")))
371 (list "builds/install/posix-common/changeServerMode.sh.in"
372 "builds/install/posix-common/install.sh.in")
373 ;; Skip phases that (could) cause problems in Guix.
374 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
376 ;; Skip phases that are merely pointless on Guix.
377 (("buildUninstallFile|installInitdScript|startFirebird") ":")
378 ;; Omit randomly generated password with bonus timestamp.
379 (("setDBAPassword") ":"))
381 ;; These promote proprietary workflows not relevant on Guix.
382 (for-each delete-file-recursively
383 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))
385 (add-after 'configure 'delete-init-scripts
387 (delete-file-recursively "gen/install/misc")
389 (add-before 'build 'set-build-environment-variables
391 ;; ‘isql’ needs to run & find libfbclient.so during the build.
392 ;; This doubles as a rudimentary test in lieu of a test suite.
393 (setenv "LD_LIBRARY_PATH"
394 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))
396 (add-before 'install 'keep-embedded-debug-symbols
398 ;; Let the gnu-build-system separate & deal with them later.
399 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
400 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
401 (substitute* "gen/Makefile.install"
402 (("readelf") "false"))
404 (add-after 'install 'prune-undesirable-files
405 (lambda* (#:key outputs #:allow-other-keys)
406 (let ((out (assoc-ref outputs "out")))
407 (with-directory-excursion out
408 ;; Remove example binaries.
409 (for-each delete-file-recursively
410 (find-files "." "example"))
411 ;; Delete (now-)empty directories.
413 (list "include/firebird/impl"
414 "lib/firebird/plugins/udr"))
418 ("editline" ,editline)
420 ("libtommath" ,libtommath)
423 (home-page "https://www.firebirdsql.org")
424 (synopsis "Relational database with many ANSI SQL standard features")
426 "Firebird is an SQL @acronym{RDBMS, relational database management system}
427 with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
428 @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
429 triggers. Transactions provide full ACID-compliant referential integrity.
431 The database requires very little manual maintenance once set up, making it
432 ideal for small business or embedded use.
434 When installed as a traditional local or remote (network) database server,
435 Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
436 may be a better choice for such very large environments.
438 Firebird can also be embedded into stand-alone applications that don't want or
439 need a full client & server. Used in this manner, it offers richer SQL support
440 than SQLite as well as the option to seamlessly migrate to a client/server
443 `((lint-hidden-cve . ("CVE-2017-6369"))))
445 ;; See doc/license/README.license.usage.txt for rationale & details.
446 (list license:bsd-3 ; src/common/sha2/
447 license:bsd-4 ; src/common/enc.cpp
448 license:gpl2+ ; builds/posix/make.defaults
449 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
450 "InterBase Public License v1.0")
451 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
452 "Initial Developer's Public License v1.0")
453 license:lgpl2.1 ; exception for OSI-compatible licences
454 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
455 license:public-domain)))) ; including files without explicit licence
457 (define-public leveldb
464 (url "https://github.com/google/leveldb")
466 (file-name (git-file-name name version))
469 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
470 (build-system cmake-build-system)
472 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
474 `(("snappy" ,snappy)))
475 (home-page "https://github.com/google/leveldb")
476 (synopsis "Fast key-value storage library")
478 "LevelDB is a fast key-value storage library that provides an ordered
479 mapping from string keys to string values.")
480 (license license:bsd-3)))
482 (define-public memcached
490 "https://memcached.org/files/memcached-" version ".tar.gz"))
492 (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
493 (build-system gnu-build-system)
495 `(("libevent" ,libevent)
496 ("cyrus-sasl" ,cyrus-sasl)))
497 (home-page "https://memcached.org/")
498 (synopsis "In-memory caching service")
499 (description "Memcached is an in-memory key-value store. It has a small
500 and generic API, and was originally intended for use with dynamic web
502 (license license:bsd-3)))
504 (define-public libmemcached
506 (name "libmemcached")
508 ;; We build from the sources since we want to build the extra HTML
509 ;; documentation which is not included with the release.
513 (url "lp:libmemcached/1.0")
514 (revision (string-append "tag:" version))))
515 (file-name (string-append name "-" version "-checkout"))
518 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
520 (search-patches "libmemcached-build-with-gcc7.patch"))))
521 (build-system gnu-build-system)
523 `(("memcached" ,memcached)
525 ("autoconf" ,autoconf)
526 ("automake" ,automake)
530 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
532 `(("libevent" ,libevent)
533 ("cyrus-sasl" ,cyrus-sasl)))
534 (outputs '("out" "doc"))
536 '(#:tests? #f ;many tests fail and use too much time
538 (modify-phases %standard-phases
539 (add-before 'bootstrap 'fix-configure.ac
540 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
541 ;; get the error ``configure: error: cannot find install-sh,
542 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
543 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
544 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
546 (delete-file "bootstrap.sh") ;not useful in the context of Guix
547 (substitute* "configure.ac"
548 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
549 (("^AC_INIT.*" anchor)
550 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))))
551 (add-before 'build 'build-and-install-html-doc
552 (lambda* (#:key outputs #:allow-other-keys)
553 (let ((html (string-append (assoc-ref outputs "doc")
554 "/share/doc/libmemcached/html/")))
555 (invoke "make" "install-html")
556 ;; Cleanup useless files.
557 (for-each delete-file-recursively
558 (map (lambda (x) (string-append html x))
559 '("_sources" ".doctrees" ".buildinfo")))))))))
560 (home-page "https://libmemcached.org/libMemcached.html")
561 (synopsis "C++ library for memcached")
562 (description "libMemcached is a library to use memcached in C/C++
563 applications. It comes with a complete reference guide and documentation of
564 the API, and provides features such as:
566 @item Asynchronous and synchronous transport support
567 @item Consistent hashing and distribution
568 @item Tunable hashing algorithm to match keys
569 @item Access to large object support
570 @item Local replication
572 (license license:bsd-3)))
574 (define-public python-pylibmc
576 (name "python-pylibmc")
581 (uri (pypi-uri "pylibmc" version))
583 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
584 (build-system python-build-system)
587 (modify-phases %standard-phases
588 (add-before 'check 'start-memcached-daemon
589 ;; The test suite requires a memcached server.
591 (invoke "memcached" "-d"))))))
593 `(("memcached" ,memcached)
594 ("python-nose" ,python-nose)))
596 `(("libmemcached" ,libmemcached)
598 ("cyrus-sasl" ,cyrus-sasl)))
599 (home-page "http://sendapatch.se/projects/pylibmc/")
600 (synopsis "Python client for memcached")
602 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
603 around TangentOrg’s libmemcached library, and can be used as a drop-in
604 replacement for the code@{python-memcached} library.")
605 (license license:bsd-3)))
607 (define-public python2-pylibmc
608 (package-with-python2 python-pylibmc))
617 (uri (pypi-uri "mycli" version))
619 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
620 (build-system python-build-system)
622 `(#:tests? #f)) ; tests expect a running MySQL
624 `(("python-cli-helpers" ,python-cli-helpers)
625 ("python-click" ,python-click)
626 ("python-configobj" ,python-configobj)
627 ("python-cryptography" ,python-cryptography)
628 ("python-prompt-toolkit" ,python-prompt-toolkit)
629 ("python-pygments" ,python-pygments)
630 ("python-pymysql" ,python-pymysql)
631 ("python-sqlparse" ,python-sqlparse)))
632 (home-page "http://mycli.net")
634 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
636 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
637 auto-completion and syntax highlighting.")
638 (license license:bsd-3)))
640 ;; XXX When updating, check whether boost-for-mysql is still needed.
641 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
648 (uri (list (string-append
649 "https://dev.mysql.com/get/Downloads/MySQL-"
650 (version-major+minor version) "/"
651 name "-" version ".tar.gz")
653 "https://downloads.mysql.com/archives/get/file/"
654 name "-" version ".tar.gz")))
657 "1bb343mf7n0qg2qz497gxjsqprygrjz1q1pbz76hgqxnsy08sfxd"))))
658 (build-system cmake-build-system)
661 '("-DBUILD_CONFIG=mysql_release"
664 "-DDEFAULT_CHARSET=utf8"
665 "-DDEFAULT_COLLATION=utf8_general_ci"
666 "-DMYSQL_DATADIR=/var/lib/mysql"
667 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
668 "-DINSTALL_INFODIR=share/mysql/docs"
669 "-DINSTALL_MANDIR=share/man"
670 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
671 "-DINSTALL_SCRIPTDIR=bin"
672 "-DINSTALL_INCLUDEDIR=include/mysql"
673 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
674 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
675 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
676 "-DINSTALL_DOCDIR=share/mysql/docs"
677 "-DINSTALL_SHAREDIR=share/mysql"
678 ;; Get rid of test data.
679 "-DINSTALL_MYSQLTESTDIR="
680 "-DINSTALL_SQLBENCHDIR=")
681 #:phases (modify-phases %standard-phases
683 'install 'remove-extra-binaries
684 (lambda* (#:key outputs #:allow-other-keys)
685 (let ((out (assoc-ref outputs "out")))
686 ;; Remove the 3 *_embedded files, which weigh in at
688 (for-each delete-file
689 (find-files (string-append out "/bin")
695 ("pkg-config" ,pkg-config)))
697 `(("boost" ,boost-for-mysql)
699 ("libtirpc" ,libtirpc)
702 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
704 (home-page "https://www.mysql.com/")
705 (synopsis "Fast, easy to use, and popular database")
707 "MySQL is a fast, reliable, and easy to use relational database
708 management system that supports the standardized Structured Query
710 (license license:gpl2)))
712 (define-public mariadb
718 (uri (string-append "https://downloads.mariadb.com/MariaDB"
719 "/mariadb-" version "/source/mariadb-"
723 "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
724 (modules '((guix build utils)))
727 ;; Delete bundled snappy and xz.
728 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
729 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
730 ;; This file checks that the bundled sources are present and
731 ;; declares build procedures for them.
732 (("^include\\(TokuThirdParty\\)") ""))
733 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
734 ;; Don't attempt to use the procedures we just removed.
735 ((" build_lzma build_snappy") ""))
737 ;; Preserve CMakeLists.txt for these.
738 (for-each (lambda (file)
739 (unless (string-suffix? "CMakeLists.txt" file)
741 (append (find-files "extra/wolfssl")
742 (find-files "zlib")))
744 (replacement mariadb/fixed)
745 (build-system cmake-build-system)
746 (outputs '("out" "lib" "dev"))
750 "-DBUILD_CONFIG=mysql_release"
751 ;; Linking with libarchive fails, like this:
753 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
754 ;; relocation R_X86_64_32 against `.bss' can not be used when
755 ;; making a shared object; recompile with -fPIC
757 ;; For now, disable the features that that use libarchive (xtrabackup).
758 "-DWITH_LIBARCHIVE=OFF"
760 ;; Disable the TokuDB engine, because its test suite frequently fails,
761 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
764 ;; Ensure the system libraries are used.
765 "-DWITH_JEMALLOC=yes"
770 "-DDEFAULT_CHARSET=utf8"
771 "-DDEFAULT_COLLATION=utf8_general_ci"
772 "-DMYSQL_DATADIR=/var/lib/mysql"
773 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
775 ;; Do not install the benchmark suite.
776 "-DINSTALL_SQLBENCHDIR=false"
778 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
779 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
781 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
783 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
785 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
786 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
787 "-DCMAKE_INSTALL_LIBDIR=lib"
788 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
789 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
791 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
793 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
795 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
796 "/share/mysql/support-files")
797 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
798 "-DINSTALL_SHAREDIR=share")
800 (modify-phases %standard-phases
801 (add-after 'unpack 'adjust-output-references
803 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
804 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
805 ;; not work when the latter uses an absolute file name.
806 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
807 (("%s/@INSTALL_INCLUDEDIR@")
808 (string-append "@INSTALL_INCLUDEDIR@"))
809 ;; As of 10.5.8, the mariadb_config program tries to be
810 ;; clever and computes the installation directory relative
811 ;; to /proc/self/exe when running on Linux. Make it fall
812 ;; back to the old behaviour.
813 (("defined\\(__linux__\\)")
815 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
816 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
817 "@INSTALL_INCLUDEDIR@"))
818 (substitute* "support-files/mariadb.pc.in"
819 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
820 (string-append dir "dir=")))
821 (substitute* "include/CMakeLists.txt"
822 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
823 "${INSTALL_INCLUDEDIR}"))
824 (substitute* "cmake/mariadb_connector_c.cmake"
825 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
826 "${INSTALL_BINDIR}"))
828 (add-after 'unpack 'adjust-tests
830 (let ((disabled-tests
831 '(;; These fail because root@hostname == root@localhost in
832 ;; the build environment, causing a user count mismatch.
833 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
834 "funcs_1.is_columns_mysql"
836 "main.explain_non_select"
838 "main.stat_tables_innodb"
839 "main.upgrade_MDEV-19650"
840 "roles.acl_statistics"
842 ;; FIXME: This test checks various table encodings and
843 ;; fails because Guix defaults to UTF8 instead of the
844 ;; upstream default latin1_swedish_ci. It's not easily
845 ;; substitutable because several encodings are tested.
848 ;; XXX: This test occasionally fails on i686-linux:
849 ;; <https://jira.mariadb.org/browse/MDEV-24458>
850 ,@(if (string-prefix? "i686" (%current-system))
854 ;; This file contains a time bomb which makes it fail after
855 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
858 ;; This file contains a list of known-flaky tests for this
859 ;; release. Append our own items.
860 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
861 (for-each (lambda (test)
862 (format unstable-tests "~a : ~a\n"
863 test "Disabled in Guix"))
865 (close-port unstable-tests)
867 ;; XXX: These fail because they expect a latin1 charset and
868 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
869 (substitute* '("mysql-test/main/gis_notembedded.result"
870 "mysql-test/main/system_mysql_db.result")
871 (("latin1_swedish_ci") "utf8_general_ci")
872 (("\tlatin1") "\tutf8"))
874 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
878 (substitute* "mysql-test/mysql-test-run.pl"
879 (("/bin/ls") (which "ls"))
880 (("/bin/sh") (which "sh")))
882 (add-before 'configure 'disable-plugins
884 (let ((disable-plugin (lambda (name)
885 (call-with-output-file
886 (string-append "plugin/" name
889 (format port "\n")))))
890 (disabled-plugins '(;; XXX: Causes a test failure.
892 (for-each disable-plugin disabled-plugins)
895 (lambda* (#:key (tests? #t) #:allow-other-keys)
897 (with-directory-excursion "mysql-test"
898 (invoke "./mtr" "--verbose"
900 "--testcase-timeout=40"
901 "--suite-timeout=600"
902 "--parallel" (number->string (parallel-job-count))
903 ;; Skip the replication tests: they are very I/O
904 ;; intensive and frequently causes indeterministic
905 ;; failures even on powerful hardware.
907 "--skip-test-list=unstable-tests"))
908 (format #t "test suite not run~%"))
911 'install 'post-install
912 (lambda* (#:key inputs outputs #:allow-other-keys)
913 (let* ((out (assoc-ref outputs "out"))
914 (dev (assoc-ref outputs "dev"))
915 (lib (assoc-ref outputs "lib"))
916 (openssl (assoc-ref inputs "openssl")))
917 (substitute* (list (string-append out "/bin/mariadb-install-db")
918 (string-append out "/bin/mysql_install_db"))
920 (string-append "basedir=\"" out "\""))
921 (("\\$basedir/share/mysql")
922 (string-append lib "/share/mysql")))
924 (with-directory-excursion lib
926 (delete-file-recursively "mysql-test")
927 ;; Remove static libraries.
928 (for-each delete-file (find-files "lib" "\\.a$")))
930 (with-directory-excursion out
931 (delete-file "share/man/man1/mysql-test-run.pl.1")
932 ;; Delete huge and unnecessary executables.
933 (for-each delete-file (find-files "bin" "test$")))
934 (mkdir-p (string-append dev "/share"))
935 (mkdir-p (string-append dev "/bin"))
936 (rename-file (string-append lib "/bin/mariadbd")
937 (string-append out "/bin/mariadbd"))
938 (rename-file (string-append lib "/bin/mysqld")
939 (string-append out "/bin/mysqld"))
940 (mkdir-p (string-append dev "/lib"))
941 (rename-file (string-append lib "/lib/pkgconfig")
942 (string-append dev "/lib/pkgconfig"))
943 (rename-file (string-append lib "/bin/mariadb_config")
944 (string-append dev "/bin/mariadb_config"))
945 (rename-file (string-append out "/bin/mysql_config")
946 (string-append dev "/bin/mysql_config"))
948 ;; Embed an absolute reference to OpenSSL in mysql_config
949 ;; and the pkg-config file to avoid propagation.
950 ;; XXX: how to do this for mariadb_config.c.in?
951 (substitute* (list (string-append dev "/bin/mysql_config")
952 (string-append dev "/lib/pkgconfig/mariadb.pc"))
953 (("-lssl -lcrypto" all)
954 (string-append "-L" openssl "/lib " all)))
961 `(("jemalloc" ,jemalloc)
970 ;; The test suite is very resource intensive and can take more than three
971 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
972 (properties '((timeout . 64800))) ;18 hours
973 (home-page "https://mariadb.org/")
974 (synopsis "SQL database server")
976 "MariaDB is a multi-user and multi-threaded SQL database server, designed
977 as a drop-in replacement of MySQL.")
978 (license license:gpl2)))
980 (define mariadb/fixed
984 (inherit (package-source mariadb))
985 (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
987 (define-public mariadb-connector-c
989 (name "mariadb-connector-c")
995 "https://downloads.mariadb.org/f/connector-c-" version
996 "/mariadb-connector-c-" version "-src.tar.gz"
997 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
998 (file-name (string-append name "-" version ".tar.gz"))
1000 (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
1002 `(("openssl" ,openssl)))
1003 (build-system cmake-build-system)
1005 '(#:tests? #f)) ; no tests
1006 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1007 (synopsis "Client library to connect to MySQL or MariaDB")
1008 (description "The MariaDB Connector/C is used to connect applications
1009 developed in C/C++ to MariaDB and MySQL databases.")
1010 (license license:lgpl2.1+)))
1012 (define-public galera
1019 (commit "bac8171266cb982fe013ce496d78085438c6f23e")
1020 (url "https://github.com/codership/galera")
1022 (file-name (git-file-name name version))
1024 (base32 "0h7s670pcasq8wzprhyxqfca2cghi62b8xz2kikb2a86wd453qil"))))
1025 (build-system cmake-build-system)
1029 ("openssl" ,openssl)))
1030 (home-page "https://github.com/codership/galera/")
1031 (synopsis "Extension to the MariaDB database server")
1033 "Galera is a wsrep-provider that is used with MariaDB for load-balancing
1034 and high-availability (HA).")
1035 (license license:gpl2))) ;'COPYING' says "version 2" only
1037 ;; Don't forget to update the other postgresql packages when upgrading this one.
1038 (define-public postgresql-13
1041 (replacement postgresql-13.3)
1045 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1046 version "/postgresql-" version ".tar.bz2"))
1049 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
1050 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1051 (build-system gnu-build-system)
1053 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
1054 ;; PostgreSQL installs its own Makefile (should it?).
1055 ;; Prevent it from retaining needless references to
1056 ;; the build tools in order to save size.
1057 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1060 (modify-phases %standard-phases
1061 (add-before 'configure 'patch-/bin/sh
1063 ;; Refer to the actual shell.
1064 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1065 "src/bin/psql/command.c")
1066 (("/bin/sh") (which "sh")))
1068 (add-after 'build 'build-contrib
1070 (invoke "make" "-C" "contrib")))
1071 (add-after 'install 'install-contrib
1073 (invoke "make" "-C" "contrib" "install"))))))
1075 `(("readline" ,readline)
1076 ("libuuid" ,util-linux "lib")
1077 ("openssl" ,openssl)
1079 (home-page "https://www.postgresql.org/")
1080 (synopsis "Powerful object-relational database system")
1082 "PostgreSQL is a powerful object-relational database system. It is fully
1083 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1084 stored procedures (in multiple languages). It includes most SQL:2008 data
1085 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1086 TIMESTAMP. It also supports storage of binary large objects, including
1087 pictures, sounds, or video.")
1088 (license (license:x11-style "file://COPYRIGHT"))))
1090 (define-public postgresql-13.3
1092 (inherit postgresql-13)
1097 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1098 version "/postgresql-" version ".tar.bz2"))
1101 "18dliq7h2l8irffhyyhdmfwx3si515q6gds3cxdjb9n7m17lbn9w"))
1102 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
1104 (define-public postgresql-11
1106 (inherit postgresql-13)
1110 (inherit (package-source postgresql-13))
1111 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1112 version "/postgresql-" version ".tar.bz2"))
1115 "016bacpmqxc676ipzc1l8zv1jj44mjz7dv7jhqazg3ibdfqxiyc7"))))))
1117 (define-public postgresql-10
1119 (inherit postgresql-11)
1122 (inherit (package-source postgresql-11))
1123 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1124 version "/postgresql-" version ".tar.bz2"))
1127 "0v5jahkqm6gkq67s4bac3h7297bscn2ab6y128idi73cc1qq1wjs"))))))
1129 (define-public postgresql-9.6
1131 (inherit postgresql-10)
1134 (inherit (package-source postgresql-10))
1135 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1136 version "/postgresql-" version ".tar.bz2"))
1139 "0c19kzrj5ib5ygmavf5d6qvxdwrxzzz6jz1r2dl5b815208cscix"))))))
1141 (define-public postgresql postgresql-13)
1143 (define-public pgloader
1151 (url "https://github.com/dimitri/pgloader")
1152 (commit (string-append "v" version))))
1154 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1155 (file-name (git-file-name name version))))
1156 (build-system gnu-build-system)
1158 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1159 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1160 ;; does not require Quicklisp workarounds. There is no `install' target
1161 ;; configured in Makefile.
1163 #:strip-binaries? #f
1165 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1167 (modify-phases %standard-phases
1169 (add-after 'unpack 'set-home
1171 (setenv "HOME" "/tmp")
1173 (add-after 'unpack 'patch-Makefile
1175 (substitute* "Makefile"
1176 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1179 (lambda* (#:key outputs #:allow-other-keys)
1180 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1182 (install-file "build/bin/pgloader" bin))
1185 `(("buildapp" ,buildapp)
1188 `(("alexandria" ,sbcl-alexandria)
1189 ("cl-abnf" ,sbcl-cl-abnf)
1190 ("cl-base64" ,sbcl-cl-base64)
1191 ("cl-csv" ,sbcl-cl-csv)
1192 ("cl-fad" ,sbcl-cl-fad)
1193 ("cl-log" ,sbcl-cl-log)
1194 ("cl-markdown" ,sbcl-cl-markdown)
1195 ("cl-mustache" ,sbcl-cl-mustache)
1196 ("cl-ppcre" ,sbcl-cl-ppcre)
1197 ("cl-sqlite" ,sbcl-cl-sqlite)
1198 ("closer-mop" ,sbcl-closer-mop)
1199 ("command-line-arguments" ,sbcl-command-line-arguments)
1201 ("drakma" ,sbcl-drakma)
1202 ("esrap" ,sbcl-esrap)
1203 ("flexi-streams" ,sbcl-flexi-streams)
1205 ("local-time" ,sbcl-local-time)
1206 ("lparallel" ,sbcl-lparallel)
1207 ("metabang-bind" ,sbcl-metabang-bind)
1208 ("mssql" ,sbcl-mssql)
1209 ("postmodern" ,sbcl-postmodern)
1210 ("py-configparser" ,sbcl-py-configparser)
1211 ("qmynd" ,sbcl-qmynd)
1213 ("split-sequence" ,sbcl-split-sequence)
1214 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1215 ("usocket" ,sbcl-usocket)
1217 ("yason" ,sbcl-yason)
1219 (home-page "https://pgloader.io/")
1220 (synopsis "Tool to migrate data to PostgreSQL")
1222 "@code{pgloader} is a program that can load data or migrate databases from
1223 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1224 (license (license:x11-style "file://LICENSE"))))
1226 (define-public python-pymysql
1228 (name "python-pymysql")
1233 (uri (pypi-uri "PyMySQL" version))
1235 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1236 (build-system python-build-system)
1238 `(("python-unittest2" ,python-unittest2)))
1240 `(("python-cryptography" ,python-cryptography)))
1242 `(#:tests? #f)) ; tests expect a running MySQL
1243 (home-page "https://github.com/PyMySQL/PyMySQL/")
1244 (synopsis "Pure-Python MySQL driver")
1246 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1247 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1248 (license license:expat)))
1250 (define-public python2-pymysql
1251 (package-with-python2 python-pymysql))
1260 (uri (string-append "http://fallabs.com/" name "/"
1261 name "-" version ".tar.gz"))
1264 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1265 (build-system gnu-build-system)
1267 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1268 (assoc-ref %outputs "out")
1270 #:make-flags (list "CFLAGS=-fPIC")))
1271 (home-page "https://fallabs.com/qdbm/")
1272 (synopsis "Key-value database")
1273 (description "QDBM is a library of routines for managing a
1274 database. The database is a simple data file containing key-value
1275 pairs. Every key and value is serial bytes with variable length.
1276 Binary data as well as character strings can be used as a key or a
1277 value. There is no concept of data tables or data types. Records are
1278 organized in a hash table or B+ tree.")
1279 (license license:lgpl2.1+)))
1281 (define-public recutils
1287 (uri (string-append "mirror://gnu/recutils/recutils-"
1291 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1292 (build-system gnu-build-system)
1294 (arguments '(#:configure-flags
1295 (list (string-append "--with-bash-headers="
1296 (assoc-ref %build-inputs "bash:include")
1299 (native-inputs `(("bc" ,bc)
1300 ("bash:include" ,bash "include")
1301 ("check" ,check-0.14)
1302 ("pkg-config" ,pkg-config)))
1304 ;; TODO: Add more optional inputs.
1305 (inputs `(("curl" ,curl)
1306 ("libgcrypt" ,libgcrypt)
1307 ("libuuid" ,util-linux "lib")))
1308 (synopsis "Manipulate plain text files as databases")
1310 "GNU Recutils is a set of tools and libraries for creating and
1311 manipulating text-based, human-editable databases. Despite being text-based,
1312 databases created with Recutils carry all of the expected features such as
1313 unique fields, primary keys, time stamps and more. Many different field
1314 types are supported, as is encryption.")
1315 (license license:gpl3+)
1316 (home-page "https://www.gnu.org/software/recutils/")))
1318 (define-public emacs-recutils
1321 (name "emacs-recutils")
1322 (build-system emacs-build-system)
1325 (modify-phases %standard-phases
1326 (add-after 'unpack 'change-directory
1332 (synopsis "Emacs mode for working with recutils database files")
1333 (description "This package provides an Emacs major mode @code{rec-mode}
1334 for working with GNU Recutils text-based, human-editable databases. It
1335 supports editing, navigation, and querying of recutils database files
1336 including field and record folding.")))
1338 (define-public rocksdb
1345 (url "https://github.com/facebook/rocksdb")
1346 (commit (string-append "v" version))))
1347 (file-name (git-file-name name version))
1350 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1351 (modules '((guix build utils)))
1354 ;; TODO: unbundle gtest.
1355 (delete-file "build_tools/gnu_parallel")
1356 (substitute* "Makefile"
1357 (("build_tools/gnu_parallel") "parallel"))
1359 (build-system gnu-build-system)
1361 `(#:make-flags (list "CC=gcc" "V=1"
1362 ;; Ceph requires that RTTI is enabled.
1364 "date=1970-01-01" ; build reproducibly
1365 (string-append "INSTALL_PATH="
1366 (assoc-ref %outputs "out"))
1368 ;; Running the full test suite takes hours and require
1369 ;; a lot of disk space. Instead we only run a subset
1370 ;; (see .travis.yml and Makefile).
1371 "ROCKSDBTESTS_END=db_tailing_iter_test")
1372 #:test-target "check_some"
1373 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1374 ;; this upstream, but it's not going to be supported any time soon.
1375 #:tests? (let ((system ,(or (%current-target-system)
1376 (%current-system))))
1377 (or (string-prefix? "x86_64-linux" system)
1378 (string-prefix? "aarch64-linux" system)))
1380 (modify-phases %standard-phases
1381 (add-after 'unpack 'patch-Makefile
1383 (substitute* "Makefile"
1384 ;; Don't depend on the static library when installing.
1385 (("install: install-static")
1386 "install: install-shared")
1387 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1390 ;; The default target is only needed for tests and built on demand.
1392 (add-before 'check 'disable-optimizations
1394 ;; Prevent the build from passing '-march=native' to the compiler.
1395 (setenv "PORTABLE" "1")
1397 (add-before 'check 'disable-failing-tests
1399 (substitute* "Makefile"
1400 ;; These tests reliably fail due to "Too many open files".
1401 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1402 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1404 (add-after 'check 'build
1405 ;; The default build target is a debug build for tests. The
1406 ;; install target depends on the "shared_lib" release target
1407 ;; so we build it here for clarity.
1408 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1409 (apply invoke "make" "shared_lib"
1410 `(,@(if parallel-build?
1411 `("-j" ,(number->string (parallel-job-count)))
1415 `(("parallel" ,parallel)
1418 ("python" ,python-2)
1423 ("jemalloc" ,jemalloc)
1427 (home-page "https://rocksdb.org/")
1428 (synopsis "Persistent key-value store for fast storage")
1430 "RocksDB is a library that forms the core building block for a fast
1431 key-value server, especially suited for storing data on flash drives. It
1432 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1433 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1434 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1435 compactions, making it specially suitable for storing multiple terabytes of
1436 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1437 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1438 ;; files carry the 3-clause BSD license.
1439 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1441 (define-public sparql-query
1443 (name "sparql-query")
1448 (url "https://github.com/tialaramex/sparql-query")
1451 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1452 (file-name (git-file-name name version))))
1453 (build-system gnu-build-system)
1457 ("libxml2" ,libxml2)
1458 ("ncurses" ,ncurses)
1459 ("readline" ,readline)))
1461 `(("pkg-config" ,pkg-config)))
1463 `(#:make-flags '("CC=gcc")
1465 (modify-phases %standard-phases
1467 ;; The Makefile uses git to obtain versioning information. This phase
1468 ;; substitutes the git invocation with the package version.
1469 (add-after 'unpack 'remove-git-dependency
1471 (substitute* "Makefile"
1473 (string-append "gitrev = \"v" ,version "\"")))
1475 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1476 ;; This replacement does the same thing, except for using $PREFIX/bin
1479 (lambda* (#:key outputs #:allow-other-keys)
1480 (let* ((out (assoc-ref outputs "out"))
1481 (bin (string-append out "/bin")))
1482 (install-file "sparql-query" bin)
1483 (symlink (string-append bin "/sparql-query")
1484 (string-append bin "/sparql-update")))
1487 (lambda* (#:key make-flags #:allow-other-keys)
1488 (apply invoke "make" `(,@make-flags "scan-test"))
1489 (invoke "./scan-test"))))))
1490 (home-page "https://github.com/tialaramex/sparql-query/")
1491 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1492 (description "Sparql-query is a command-line tool for accessing SPARQL
1493 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1494 tools for interrogating SQL databases. For example, you can enter a query over
1495 several lines, using a semi-colon at the end of a line to indicate the end of
1496 your query. It also supports readline so that you can more easily recall and
1497 edit previous queries, even across sessions. It can be used non-interactively,
1498 for example from a shell script.")
1499 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1500 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1501 (license (list license:gpl3+))))
1503 (define-public sqitch
1511 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1514 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1515 (build-system perl-build-system)
1518 (modify-phases %standard-phases
1519 (add-before 'check 'set-check-environment
1522 (setenv "HOME" "/tmp")
1524 (add-after 'install 'wrap-program
1525 (lambda* (#:key outputs #:allow-other-keys)
1526 (let* ((out (assoc-ref outputs "out"))
1527 (path (getenv "PERL5LIB")))
1528 (wrap-program (string-append out "/bin/sqitch")
1529 `("PERL5LIB" ":" prefix
1530 (,(string-append out "/lib/perl5/site_perl"
1535 `(("perl-capture-tiny" ,perl-capture-tiny)
1536 ("perl-io-pager" ,perl-io-pager)
1537 ("perl-module-build" ,perl-module-build)
1538 ("perl-module-runtime" ,perl-module-runtime)
1539 ("perl-path-class" ,perl-path-class)
1540 ("perl-test-deep" ,perl-test-deep)
1541 ("perl-test-dir" ,perl-test-dir)
1542 ("perl-test-exception" ,perl-test-exception)
1543 ("perl-test-file" ,perl-test-file)
1544 ("perl-test-file-contents" ,perl-test-file-contents)
1545 ("perl-test-mockmodule" ,perl-test-mockmodule)
1546 ("perl-test-mockobject" ,perl-test-mockobject)
1547 ("perl-test-nowarnings" ,perl-test-nowarnings)
1548 ("perl-test-warn" ,perl-test-warn)))
1550 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1551 ("perl-clone" ,perl-clone)
1552 ("perl-config-gitlike" ,perl-config-gitlike)
1553 ("perl-datetime" ,perl-datetime)
1554 ("perl-datetime-timezone" ,perl-datetime-timezone)
1555 ("perl-dbd-mysql" ,perl-dbd-mysql)
1556 ("perl-dbd-pg" ,perl-dbd-pg)
1557 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1558 ("perl-dbi" ,perl-dbi)
1559 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1560 ("perl-encode-locale" ,perl-encode-locale)
1561 ("perl-hash-merge" ,perl-hash-merge)
1562 ("perl-ipc-run3" ,perl-ipc-run3)
1563 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1564 ("perl-libintl-perl" ,perl-libintl-perl)
1565 ("perl-list-moreutils" ,perl-list-moreutils)
1566 ("perl-moo" ,perl-moo)
1567 ("perl-mysql-config" ,perl-mysql-config)
1568 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1569 ("perl-path-class" ,perl-path-class)
1570 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1571 ("perl-string-formatter" ,perl-string-formatter)
1572 ("perl-string-shellquote" ,perl-string-shellquote)
1573 ("perl-sub-exporter" ,perl-sub-exporter)
1574 ("perl-template-tiny" ,perl-template-tiny)
1575 ("perl-template-toolkit" ,perl-template-toolkit)
1576 ("perl-throwable" ,perl-throwable)
1577 ("perl-try-tiny" ,perl-try-tiny)
1578 ("perl-type-tiny" ,perl-type-tiny)
1579 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1580 ("perl-uri" ,perl-uri)
1581 ("perl-uri-db" ,perl-uri-db)))
1582 (home-page "https://sqitch.org/")
1583 (synopsis "Database change management tool")
1585 "Sqitch is a standalone change management system for database schemas,
1586 which uses SQL to describe changes.")
1587 (license license:x11)))
1589 (define-public sqlcrush
1590 ;; Unfortunately, there is no proper upstream release and may never be.
1591 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1595 (version (git-version "0.1.5" revision commit))
1599 (url "https://github.com/coffeeandscripts/sqlcrush")
1601 (file-name (git-file-name name version))
1604 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1605 (build-system python-build-system)
1607 `(("python-cryptography" ,python-cryptography)
1608 ("python-psycopg2" ,python-psycopg2)
1609 ("python-pymysql" ,python-pymysql)
1610 ("python-sqlalchemy" ,python-sqlalchemy)))
1611 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1612 (synopsis "Text console-based database viewer and editor")
1614 "SQLcrush lets you view and edit a database directly from the text
1615 console through an ncurses interface. You can explore each table's structure,
1616 browse and edit the contents, add and delete entries, all while tracking your
1618 (license license:gpl3+)))) ; no headers, see README.md
1626 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1630 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1631 (build-system gnu-build-system)
1634 (modify-phases %standard-phases
1636 (lambda* (#:key outputs #:allow-other-keys)
1637 (let ((out (assoc-ref outputs "out")))
1638 ;; The 'configure' script is a wrapper for Waf and
1639 ;; doesn't recognize things like '--enable-fast-install'.
1640 (invoke "./configure"
1641 (string-append "--prefix=" out))))))))
1643 `(;; TODO: Build the documentation.
1644 ;; ("docbook-xsl" ,docbook-xsl)
1645 ;; ("libxml2" ,libxml2)
1646 ;; ("libxslt" ,libxslt)
1647 ("python" ,python) ;for the Waf build system
1649 (home-page "https://tdb.samba.org/")
1650 (synopsis "Trivial database")
1652 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1653 and BSD's DB except that it allows multiple simultaneous writers and uses
1654 locking internally to keep writers from trampling on each other. TDB is also
1656 (license license:lgpl3+)))
1658 (define-public perl-dbi
1665 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1669 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1670 (build-system perl-build-system)
1671 (synopsis "Database independent interface for Perl")
1672 (description "This package provides an database interface for Perl.")
1673 (home-page "https://metacpan.org/release/DBI")
1674 (license license:perl-license)))
1676 (define-public perl-dbix-class
1678 (name "perl-dbix-class")
1679 (version "0.082842")
1683 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1684 "DBIx-Class-" version ".tar.gz"))
1686 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1687 (build-system perl-build-system)
1689 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1690 ("perl-file-temp" ,perl-file-temp)
1691 ("perl-module-install" ,perl-module-install)
1692 ("perl-package-stash" ,perl-package-stash)
1693 ("perl-test-deep" ,perl-test-deep)
1694 ("perl-test-exception" ,perl-test-exception)
1695 ("perl-test-warn" ,perl-test-warn)))
1697 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1698 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1699 ("perl-class-inspector" ,perl-class-inspector)
1700 ("perl-config-any" ,perl-config-any)
1701 ("perl-context-preserve" ,perl-context-preserve)
1702 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1703 ("perl-data-page" ,perl-data-page)
1704 ("perl-dbi" ,perl-dbi)
1705 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1706 ("perl-hash-merge" ,perl-hash-merge)
1707 ("perl-module-find" ,perl-module-find)
1708 ("perl-moo" ,perl-moo)
1709 ("perl-mro-compat" ,perl-mro-compat)
1710 ("perl-namespace-clean" ,perl-namespace-clean)
1711 ("perl-path-class" ,perl-path-class)
1712 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1713 ("perl-scope-guard" ,perl-scope-guard)
1714 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1715 ("perl-sub-name" ,perl-sub-name)
1716 ("perl-text-balanced" ,perl-text-balanced)
1717 ("perl-try-tiny" ,perl-try-tiny)))
1718 (home-page "https://metacpan.org/release/DBIx-Class")
1719 (synopsis "Extensible and flexible object <-> relational mapper")
1720 (description "An SQL to OO mapper with an object API inspired by
1721 Class::DBI (with a compatibility layer as a springboard for porting) and a
1722 resultset API that allows abstract encapsulation of database operations. It
1723 aims to make representing queries in your code as perl-ish as possible while
1724 still providing access to as many of the capabilities of the database as
1725 possible, including retrieving related records from multiple tables in a
1726 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1727 \"ORDER BY\" and \"HAVING\" support.")
1728 (license license:perl-license)))
1730 (define-public perl-dbix-class-cursor-cached
1732 (name "perl-dbix-class-cursor-cached")
1733 (version "1.001004")
1737 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1738 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1741 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1742 (build-system perl-build-system)
1744 `(("perl-cache-cache" ,perl-cache-cache)
1745 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1746 ("perl-module-install" ,perl-module-install)))
1748 `(("perl-carp-clan" ,perl-carp-clan)
1749 ("perl-dbix-class" ,perl-dbix-class)))
1750 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1751 (synopsis "Cursor with built-in caching support")
1752 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1753 built-in caching support.")
1754 (license license:perl-license)))
1756 (define-public perl-dbix-class-introspectablem2m
1758 (name "perl-dbix-class-introspectablem2m")
1759 (version "0.001002")
1763 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1764 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1767 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1768 (build-system perl-build-system)
1770 `(("perl-module-install" ,perl-module-install)))
1772 `(("perl-dbix-class" ,perl-dbix-class)))
1773 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1774 (synopsis "Introspect many-to-many relationships")
1775 (description "Because the many-to-many relationships are not real
1776 relationships, they can not be introspected with DBIx::Class. Many-to-many
1777 relationships are actually just a collection of convenience methods installed
1778 to bridge two relationships. This DBIx::Class component can be used to store
1779 all relevant information about these non-relationships so they can later be
1780 introspected and examined.")
1781 (license license:perl-license)))
1783 (define-public perl-dbix-class-schema-loader
1785 (name "perl-dbix-class-schema-loader")
1790 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1791 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1794 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1795 (build-system perl-build-system)
1797 `(("perl-config-any" ,perl-config-any)
1798 ("perl-config-general" ,perl-config-general)
1799 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1800 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1801 ("perl-module-install" ,perl-module-install)
1802 ("perl-moose" ,perl-moose)
1803 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1804 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1805 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1806 ("perl-test-deep" ,perl-test-deep)
1807 ("perl-test-differences" ,perl-test-differences)
1808 ("perl-test-exception" ,perl-test-exception)
1809 ("perl-test-pod" ,perl-test-pod)
1810 ("perl-test-warn" ,perl-test-warn)))
1812 `(("perl-class-unload" ,perl-class-unload)
1813 ("perl-class-inspector" ,perl-class-inspector)
1814 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1815 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1816 ("perl-carp-clan" ,perl-carp-clan)
1817 ("perl-data-dump" ,perl-data-dump)
1818 ("perl-dbix-class" ,perl-dbix-class)
1819 ("perl-hash-merge" ,perl-hash-merge)
1820 ("perl-list-moreutils" ,perl-list-moreutils)
1821 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1822 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1823 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1824 ("perl-namespace-clean" ,perl-namespace-clean)
1825 ("perl-mro-compat" ,perl-mro-compat)
1826 ("perl-scope-guard" ,perl-scope-guard)
1827 ("perl-string-camelcase" ,perl-string-camelcase)
1828 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1829 ("perl-sub-name" ,perl-sub-name)
1830 ("perl-try-tiny" ,perl-try-tiny)))
1831 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1832 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1833 (synopsis "Create a DBIx::Class::Schema based on a database")
1834 (description "DBIx::Class::Schema::Loader automates the definition of a
1835 DBIx::Class::Schema by scanning database table definitions and setting up the
1836 columns, primary keys, unique constraints and relationships.")
1837 (license license:perl-license)))
1839 (define-public perl-dbd-pg
1841 (name "perl-dbd-pg")
1846 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1847 "DBD-Pg-" version ".tar.gz"))
1850 "0kcfqq7g3832wiix0sbyvlc885qghjrp2ah3akn7h2lnb22fjwy9"))))
1851 (build-system perl-build-system)
1853 `(("perl-dbi" ,perl-dbi)))
1855 `(("perl-dbi" ,perl-dbi)
1856 ("postgresql" ,postgresql)))
1857 (home-page "https://metacpan.org/release/DBD-Pg")
1858 (synopsis "DBI PostgreSQL interface")
1859 (description "This package provides a PostgreSQL driver for the Perl5
1860 @dfn{Database Interface} (DBI).")
1861 (license license:perl-license)))
1863 (define-public perl-dbd-mysql
1865 (name "perl-dbd-mysql")
1870 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1871 "DBD-mysql-" version ".tar.gz"))
1873 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1874 (build-system perl-build-system)
1877 (modify-phases %standard-phases
1878 (add-before 'configure 'skip-library-detection
1879 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1880 ;; are really only needed for the test suite; their absence does not
1881 ;; affect the build or the end result.
1883 (substitute* "Makefile.PL"
1884 (("use Devel::CheckLib;" match)
1885 (string-append "# " match))
1889 ;; Tests require running MySQL server.
1892 `(("perl-dbi" ,perl-dbi)
1893 ("mysql" ,mariadb "lib")
1894 ("mysql-dev" ,mariadb "dev")))
1895 (home-page "https://metacpan.org/release/DBD-mysql")
1896 (synopsis "DBI MySQL interface")
1897 (description "This package provides a MySQL driver for the Perl5
1898 @dfn{Database Interface} (DBI).")
1899 (license license:perl-license)))
1901 (define-public perl-dbd-sqlite
1903 (name "perl-dbd-sqlite")
1908 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1912 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
1913 (build-system perl-build-system)
1914 (inputs `(("sqlite" ,sqlite)))
1915 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1916 (synopsis "SQlite interface for Perl")
1917 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1918 the entire thing in the distribution. So in order to get a fast transaction
1919 capable RDBMS working for your Perl project you simply have to install this
1920 module, and nothing else.")
1921 (license license:perl-license)
1922 (home-page "https://metacpan.org/release/DBD-SQLite")))
1924 (define-public perl-mysql-config
1926 (name "perl-mysql-config")
1932 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1937 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1938 (build-system perl-build-system)
1939 (home-page "https://metacpan.org/release/MySQL-Config")
1940 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1942 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1943 libmysqlclient. It will fill an array with long options, ready to be parsed by
1944 @code{Getopt::Long}.")
1945 (license license:perl-license)))
1947 (define-public perl-sql-abstract
1949 (name "perl-sql-abstract")
1954 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1955 "SQL-Abstract-" version ".tar.gz"))
1957 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
1958 (build-system perl-build-system)
1960 `(("perl-module-install" ,perl-module-install)
1961 ("perl-test-deep" ,perl-test-deep)
1962 ("perl-test-exception" ,perl-test-exception)
1963 ("perl-test-warn" ,perl-test-warn)))
1965 `(("perl-hash-merge" ,perl-hash-merge)
1966 ("perl-moo" ,perl-moo)
1967 ("perl-mro-compat" ,perl-mro-compat)
1968 ("perl-text-balanced" ,perl-text-balanced)))
1969 (home-page "https://metacpan.org/release/SQL-Abstract")
1970 (synopsis "Generate SQL from Perl data structures")
1971 (description "This module was inspired by the excellent DBIx::Abstract.
1972 While based on the concepts used by DBIx::Abstract, the concepts used have
1973 been modified to make the SQL easier to generate from Perl data structures.
1974 The underlying idea is for this module to do what you mean, based on the data
1975 structures you provide it, so that you don't have to modify your code every
1976 time your data changes.")
1977 (license license:perl-license)))
1979 (define-public perl-sql-abstract-classic
1981 (name "perl-sql-abstract-classic")
1986 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1987 "SQL-Abstract-Classic-" version ".tar.gz"))
1989 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
1990 (build-system perl-build-system)
1992 `(("perl-test-deep" ,perl-test-deep)
1993 ("perl-test-exception" ,perl-test-exception)
1994 ("perl-test-warn" ,perl-test-warn)))
1996 `(("perl-mro-compat" ,perl-mro-compat)
1997 ("perl-sql-abstract" ,perl-sql-abstract)))
1998 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
1999 (synopsis "Generate SQL from Perl data structures")
2001 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
2002 to preserve the ability of users to opt into the new way of doing things in
2003 later versions according to their own schedules.
2005 It is an abstract SQL generation module based on the concepts used by
2006 @code{DBIx::Abstract}, with several important differences, especially when it
2007 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
2008 easier to generate from Perl data structures.
2010 The underlying idea is for this module to do what you mean, based on the data
2011 structures you provide it. You shouldn't have to modify your code every time
2012 your data changes, as this module figures it out.")
2013 (license license:perl-license)))
2015 (define-public perl-sql-splitstatement
2017 (name "perl-sql-splitstatement")
2022 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
2023 "SQL-SplitStatement-" version ".tar.gz"))
2026 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
2027 (build-system perl-build-system)
2029 `(("perl-test-exception" ,perl-test-exception)))
2031 `(("perl-class-accessor" ,perl-class-accessor)
2032 ("perl-list-moreutils" ,perl-list-moreutils)
2033 ("perl-regexp-common" ,perl-regexp-common)
2034 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2035 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2036 (synopsis "Split SQL code into atomic statements")
2037 (description "This module tries to split any SQL code, even including
2038 non-standard extensions, into the atomic statements it is composed of.")
2039 (license license:perl-license)))
2041 (define-public perl-sql-tokenizer
2043 (name "perl-sql-tokenizer")
2048 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2049 "SQL-Tokenizer-" version ".tar.gz"))
2052 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2053 (build-system perl-build-system)
2054 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2055 (synopsis "SQL tokenizer")
2056 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2057 claim to be a parser or query verifier. It just creates sane tokens from a
2059 (license license:perl-license)))
2061 (define-public unixodbc
2069 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2072 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2073 (build-system gnu-build-system)
2074 (synopsis "Data source abstraction library")
2075 (description "Unixodbc is a library providing an API with which to access
2076 data sources. Data sources include SQL Servers and any software with an ODBC
2078 (license license:lgpl2.1+)
2079 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2080 (home-page "http://www.unixodbc.org")))
2082 (define-public nanodbc
2090 (url "https://github.com/nanodbc/nanodbc")
2091 (commit (string-append "v" version))))
2092 (file-name (git-file-name name version))
2095 "1q80p7yv9mcl4hyvnvcjdr70y8nc940ypf368lp97vpqn5yckkgm"))))
2096 (build-system cmake-build-system)
2099 ;; The tests require ODBC backends to be installed.
2100 (list "-DNANODBC_DISABLE_TESTS=ON"
2101 "-DBUILD_SHARED_LIBS=ON")
2104 `(("unixodbc" ,unixodbc)))
2105 (home-page "https://nanodbc.io/")
2106 (synopsis "C++ wrapper for the native C ODBC API")
2107 (description "The goal for nanodbc is to make developers happy by providing
2108 a simpler and less verbose API for working with ODBC. Common tasks should be
2109 easy, requiring concise and simple code.")
2110 (license license:expat)))
2112 (define-public nanodbc-for-irods
2118 '("-DBUILD_SHARED_LIBS=ON"
2119 ;; The tests require ODBC backends to be installed.
2120 "-DNANODBC_DISABLE_TESTS=ON"
2121 "-DCMAKE_CXX_COMPILER=clang++"
2122 "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
2123 "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi")
2125 (modify-phases %standard-phases
2126 (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
2127 (lambda* (#:key inputs #:allow-other-keys)
2128 (let ((gcc (assoc-ref inputs "gcc")))
2129 (setenv "CPLUS_INCLUDE_PATH"
2131 (cons (string-append (assoc-ref inputs "libcxx")
2133 ;; Hide GCC's C++ headers so that they do not interfere with
2134 ;; the Clang headers.
2135 (delete (string-append gcc "/include/c++")
2136 (string-split (getenv "CPLUS_INCLUDE_PATH")
2140 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
2141 (getenv "CPLUS_INCLUDE_PATH"))))))))
2142 (properties `((hidden? . #true)))
2144 `(("unixodbc" ,unixodbc)
2145 ("libcxx" ,libcxx+libcxxabi-6)
2146 ("libcxxabi" ,libcxxabi-6)
2147 ("clang" ,clang-6)))))
2149 (define-public unqlite
2155 ;; Contains bug fixes against the official release, and has an
2156 ;; autotooled build system.
2157 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2159 "unqlite-unofficial-" version ".tar.gz"))
2162 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2163 (build-system gnu-build-system)
2164 (arguments `(#:tests? #f)) ;No check target
2165 (home-page "https://www.unqlite.org")
2166 (synopsis "In-memory key/value and document store")
2168 "UnQLite is an in-process software library which implements a
2169 self-contained, serverless, zero-configuration, transactional NoSQL
2170 database engine. UnQLite is a document store database similar to
2171 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2172 similar to BerkeleyDB, LevelDB, etc.")
2173 (license license:bsd-2)))
2175 (define-public redis
2181 (uri (string-append "http://download.redis.io/releases/redis-"
2185 "0vp1d9mlfsppry3nsj9f7bmh9wjgsy3jggp24sac1hhgl43c8cms"))
2186 (modules '((guix build utils)))
2188 ;; Delete bundled jemalloc, as the package will use the libc one
2189 '(begin (delete-file-recursively "deps/jemalloc")
2191 (build-system gnu-build-system)
2193 `(("procps" ,procps) ; for tests
2194 ("tcl" ,tcl))) ; for tests
2197 (modify-phases %standard-phases
2199 (add-after 'unpack 'use-correct-tclsh
2200 (lambda* (#:key inputs #:allow-other-keys)
2201 (substitute* "runtest"
2203 (string-append "TCLSH="
2204 (assoc-ref inputs "tcl")
2207 (add-after 'unpack 'adjust-tests
2209 ;; Disable failing tests
2210 (substitute* "tests/test_helper.tcl"
2211 (("integration/failover") "")
2212 (("integration/replication-4") "")
2213 (("integration/replication-psync") "")
2214 (("integration/replication[^-]") ""))
2216 #:make-flags `("CC=gcc"
2219 ,(string-append "PREFIX="
2220 (assoc-ref %outputs "out")))))
2221 (synopsis "Key-value cache and store")
2222 (description "Redis is an advanced key-value cache and store. Redis
2223 supports many data structures including strings, hashes, lists, sets, sorted
2224 sets, bitmaps and hyperloglogs.")
2225 (home-page "https://redis.io/")
2226 (license license:bsd-3)))
2228 (define-public ruby-redis
2235 (uri (rubygems-uri "redis" version))
2238 "15x2sr6h094rjbvg8pkq6m3lcd5abpyx93aifvfdz3wv6x55xa48"))))
2239 (build-system ruby-build-system)
2241 `(#:tests? #f)) ; Tests require a running redis server.
2242 (synopsis "Ruby client for Redis' API")
2244 "This package provides a Ruby client that tries to match Redis' API
2245 one-to-one, while still providing an idiomatic interface.")
2246 (home-page "https://github.com/redis/redis-rb")
2247 (license license:expat)))
2249 (define-public kyotocabinet
2251 (name "kyotocabinet")
2255 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2256 "kyotocabinet-" version ".tar.gz"))
2259 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2260 (build-system gnu-build-system)
2264 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2265 (string-append "LDFLAGS=-Wl,-rpath="
2266 (assoc-ref %outputs "out") "/lib"))))
2267 (inputs `(("zlib" ,zlib)))
2268 (home-page "https://fallabs.com/kyotocabinet/")
2270 "Kyoto Cabinet is a modern implementation of the DBM database")
2272 "Kyoto Cabinet is a standalone file-based database that supports Hash
2273 and B+ Tree data storage models. It is a fast key-value lightweight
2274 database and supports many programming languages. It is a NoSQL database.")
2275 (license license:gpl3+)))
2277 (define-public tokyocabinet
2279 (name "tokyocabinet")
2284 (uri (string-append "http://fallabs.com/tokyocabinet/"
2285 name "-" version ".tar.gz"))
2288 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2289 (build-system gnu-build-system)
2292 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2293 (string-append "LDFLAGS=-Wl,-rpath="
2294 (assoc-ref %outputs "out") "/lib"))))
2297 (home-page "http://fallabs.com/tokyocabinet/")
2298 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2300 "Tokyo Cabinet is a library of routines for managing a database.
2301 The database is a simple data file containing records, each is a pair of a
2302 key and a value. Every key and value is serial bytes with variable length.
2303 Both binary data and character string can be used as a key and a value.
2304 There is neither concept of data tables nor data types. Records are
2305 organized in hash table, B+ tree, or fixed-length array.")
2306 (license license:lgpl2.1+)))
2308 (define-public wiredtiger
2315 "http://source.wiredtiger.com/releases/wiredtiger-"
2316 version ".tar.bz2"))
2319 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2320 (build-system gnu-build-system)
2322 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2324 (modify-phases %standard-phases
2325 (add-before 'check 'disable-test/fops
2327 ;; XXX: timed out after 3600 seconds of silence
2328 (substitute* "Makefile"
2334 ("snappy" ,snappy)))
2335 (home-page "http://source.wiredtiger.com/")
2336 (synopsis "NoSQL data engine")
2338 "WiredTiger is an extensible platform for data management. It supports
2339 row-oriented storage (where all columns of a row are stored together),
2340 column-oriented storage (where columns are stored in groups, allowing for
2341 more efficient access and storage of column subsets) and log-structured merge
2342 trees (LSM), for sustained throughput under random insert workloads.")
2343 (license license:gpl3) ; or GPL-2
2344 ;; configure.ac: WiredTiger requires a 64-bit build.
2345 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2347 (define-public wiredtiger-3
2349 (inherit wiredtiger)
2354 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2355 version ".tar.bz2"))
2358 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2360 (define-public guile-wiredtiger
2362 (name "guile-wiredtiger")
2367 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2368 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2369 (file-name (string-append name "-" version "-checkout"))
2372 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2373 (build-system gnu-build-system)
2375 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2377 (list (string-append "--with-libwiredtiger-prefix="
2378 (assoc-ref %build-inputs "wiredtiger")))
2379 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2381 `(("autoconf" ,autoconf)
2382 ("automake" ,automake)
2383 ("pkg-config" ,pkg-config)))
2385 `(("wiredtiger" ,wiredtiger-3)
2386 ("guile" ,guile-2.2)))
2388 `(("guile-bytestructures" ,guile-bytestructures)))
2389 (synopsis "WiredTiger bindings for GNU Guile")
2391 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2393 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2394 (license license:gpl3+)))
2396 (define-public perl-db-file
2398 (name "perl-db-file")
2403 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2406 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2407 (build-system perl-build-system)
2408 (inputs `(("bdb" ,bdb)))
2409 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2411 `(#:phases (modify-phases %standard-phases
2413 'configure 'modify-config.in
2414 (lambda* (#:key inputs #:allow-other-keys)
2415 (substitute* "config.in"
2416 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2418 (home-page "https://metacpan.org/release/DB_File")
2419 (synopsis "Perl5 access to Berkeley DB version 1.x")
2421 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2422 (license license:perl-license)))
2432 (url "https://git.openldap.org/openldap/openldap.git")
2433 (commit (string-append "LMDB_" version))))
2434 (file-name (git-file-name name version))
2436 (base32 "0airps4cd0d91nbgy7hgvifa801snxwxzwxyr6pdv61plsi7h8l3"))))
2437 (build-system gnu-build-system)
2439 `(#:test-target "test"
2441 (modify-phases %standard-phases
2443 (lambda* (#:key outputs #:allow-other-keys)
2444 (chdir "libraries/liblmdb")
2445 (substitute* "Makefile"
2446 (("/usr/local") (assoc-ref outputs "out")))
2448 (add-after 'install 'create-pkg-config-file
2449 (lambda* (#:key outputs #:allow-other-keys)
2450 (let ((out (assoc-ref outputs "out")))
2451 (mkdir-p (string-append out "/lib/pkgconfig"))
2452 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2454 (format #t "prefix=~a~@
2457 includedir=~a/include~@
2461 Description: Lightning Memory-Mapped Database library~@
2462 Libs: -L${libdir} -llmdb~@
2463 Cflags: -I${includedir}~%"
2464 out out out out ,version)))
2466 (home-page "https://symas.com/lmdb/")
2467 (synopsis "Lightning Memory-Mapped Database library")
2469 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2470 transactional database. Unlike more complex relational databases, LMDB handles
2471 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2472 underlying operating system for caching and locking, keeping the code small and
2474 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2475 disk-based databases with high read performance that scales linearly over
2476 multiple cores. The size of each database is limited only by the size of the
2477 virtual address space — not physical RAM.")
2478 (license license:openldap2.8)))
2480 (define-public lmdbxx
2483 (version "0.9.14.0")
2488 (url "https://github.com/drycpp/lmdbxx")
2490 (file-name (git-file-name name version))
2492 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2495 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2497 (modify-phases %standard-phases
2498 (delete 'configure))))
2499 (build-system gnu-build-system)
2500 (inputs `(("lmdb" ,lmdb)))
2501 (home-page "http://lmdbxx.sourceforge.net")
2502 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2503 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2504 @code{LMDB} embedded database library, offering both an error-checked
2505 procedural interface and an object-oriented resource interface with RAII
2507 (license license:unlicense)))
2509 (define-public libpqxx
2516 "http://pqxx.org/download/software/libpqxx/"
2517 name "-" version ".tar.gz"))
2520 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2521 (build-system gnu-build-system)
2523 `(("python" ,python-2)))
2524 (inputs `(("postgresql" ,postgresql)))
2526 `(#:tests? #f ; # FAIL: 1
2528 (modify-phases %standard-phases
2529 (add-before 'configure 'fix-sed-command
2531 ;; Newer sed versions error out if double brackets are not used.
2532 (substitute* "configure"
2533 (("\\[:space:\\]") "[[:space:]]"))
2535 (synopsis "C++ connector for PostgreSQL")
2537 "Libpqxx is a C++ library to enable user programs to communicate with the
2538 PostgreSQL database back-end. The database back-end can be local or it may be
2539 on another machine, accessed via TCP/IP.")
2540 (home-page "http://pqxx.org/")
2541 (license license:bsd-3)))
2543 (define-public python-peewee
2545 (name "python-peewee")
2550 (uri (pypi-uri "peewee" version))
2552 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2553 (build-system python-build-system)
2555 `(#:tests? #f)) ; fails to import test data
2557 `(("sqlite" ,sqlite)))
2559 `(("python-cython" ,python-cython)))
2560 (home-page "https://github.com/coleifer/peewee/")
2561 (synopsis "Small object-relational mapping utility")
2563 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2564 handles converting between pythonic values and those used by databases, so you
2565 can use Python types in your code without having to worry. It has built-in
2566 support for sqlite, mysql and postgresql. If you already have a database, you
2567 can autogenerate peewee models using @code{pwiz}, a model generator.")
2568 (license license:expat)))
2570 (define-public python2-peewee
2571 (package-with-python2 python-peewee))
2573 (define-public python-tortoise-orm
2575 (name "python-tortoise-orm")
2580 (uri (pypi-uri "tortoise-orm" version))
2583 "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
2584 (build-system python-build-system)
2586 `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
2588 #:phases (modify-phases %standard-phases
2589 (add-after 'unpack 'relax-version-requirements
2591 (substitute* "setup.py"
2592 (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
2593 (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite")
2594 (("pytz>=2020\\.4,<2021\\.0") "pytz")
2595 ;; Not required, since ciso8601 is used.
2596 (("'iso8601>=0\\.1\\.13,<0\\.2\\.0',") ""))
2599 `(("python-asynctest" ,python-asynctest)
2600 ("python-nose2" ,python-nose2)))
2602 `(("python-aiosqlite" ,python-aiosqlite)
2603 ("python-pypika" ,python-pypika)
2604 ("python-ciso8601" ,python-ciso8601)
2605 ("python-pytz" ,python-pytz)
2606 ("python-typing-extensions"
2607 ,python-typing-extensions)))
2609 "https://github.com/tortoise/tortoise-orm")
2611 "Easy async ORM for python, built with relations in mind")
2613 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2614 inspired by Django. Tortoise ORM was build with relations in mind and
2615 admiration for the excellent and popular Django ORM. It’s engraved in its
2616 design that you are working not with just tables, you work with relational
2618 (license license:asl2.0)))
2620 (define-public sqlcipher
2627 (uri (string-append "https://github.com/sqlcipher/" name
2628 "/archive/v" version ".tar.gz"))
2630 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2631 (file-name (string-append name "-" version ".tar.gz"))))
2632 (build-system gnu-build-system)
2634 `(("libcrypto" ,openssl)
2635 ("libtcl8.6" ,tcl))) ; required for running the tests
2640 '("--enable-tempstore=yes"
2641 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2642 "LDFLAGS=-lcrypto -ltcl8.6"
2644 ;; tests cannot be run from the Makefile
2645 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2646 #:test-target "testfixture"
2648 (modify-phases %standard-phases
2649 (add-before 'check 'build-test-runner
2650 (assoc-ref %standard-phases 'check))
2653 (invoke "./testfixture" "test/crypto.test"))))))
2654 (home-page "https://www.zetetic.net/sqlcipher/")
2656 "Library providing transparent encryption of SQLite database files")
2657 (description "SQLCipher is an implementation of SQLite, extended to
2658 provide transparent 256-bit AES encryption of database files. Pages are
2659 encrypted before being written to disk and are decrypted when read back. It’s
2660 well suited for protecting embedded application databases and for mobile
2663 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2664 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2665 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2666 ;; source files are in the public domain.
2667 (license (list license:public-domain license:bsd-3))))
2669 (define-public python-pyodbc-c
2671 (name "python-pyodbc-c")
2676 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2677 "archive.tar.gz?ref=v" version))
2680 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2681 (file-name (string-append name "-" version ".tar.gz"))))
2682 (build-system python-build-system)
2684 `(("unixodbc" ,unixodbc)))
2686 `(;; No unit tests exist.
2688 (home-page "https://github.com/mkleehammer/pyodbc")
2689 (synopsis "Python ODBC Library")
2690 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2692 (license (license:x11-style "file://LICENSE.TXT"))))
2694 (define-public python2-pyodbc-c
2695 (package-with-python2 python-pyodbc-c))
2697 (define-public python-pyodbc
2699 (name "python-pyodbc")
2704 (uri (pypi-uri "pyodbc" version))
2706 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2707 (file-name (string-append name "-" version ".tar.gz"))))
2708 (build-system python-build-system)
2710 `(("unixodbc" ,unixodbc)))
2712 `(#:tests? #f)) ; no unit tests exist
2713 (home-page "https://github.com/mkleehammer/pyodbc")
2714 (synopsis "Python ODBC Library")
2715 (description "@code{python-pyodbc} provides a Python DB-API driver
2717 (license (license:x11-style "file:///LICENSE.TXT"))))
2719 (define-public python2-pyodbc
2720 (package-with-python2 python-pyodbc))
2722 (define-public mdbtools
2730 (url "https://github.com/brianb/mdbtools")
2732 (file-name (git-file-name name version))
2735 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2736 (build-system gnu-build-system)
2740 `(("autoconf" ,autoconf)
2741 ("automake" ,automake)
2742 ("libtool" ,libtool)
2743 ("pkg-config" ,pkg-config)
2744 ("txt2man" ,txt2man)
2746 (home-page "http://mdbtools.sourceforge.net/")
2747 (synopsis "Read Microsoft Access databases")
2748 (description "MDB Tools is a set of tools and applications to read the
2749 proprietary MDB file format used in Microsoft's Access database package. This
2750 includes programs to export schema and data from Microsoft's Access database
2751 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2752 etc., and an SQL engine for performing simple SQL queries.")
2753 (license (list license:lgpl2.0
2756 (define-public python-lmdb
2758 (name "python-lmdb")
2762 (uri (pypi-uri "lmdb" version))
2765 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2766 (modules '((guix build utils)))
2768 ;; Delete bundled lmdb source files.
2770 (for-each delete-file (list "lib/lmdb.h"
2775 (build-system python-build-system)
2780 (modify-phases %standard-phases
2781 (add-before 'build 'use-system-lmdb
2782 (lambda* (#:key inputs #:allow-other-keys)
2783 (let ((lmdb (assoc-ref inputs "lmdb")))
2784 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2785 (setenv "LMDB_FORCE_SYSTEM" "set")
2786 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2787 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2789 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2791 (home-page "https://github.com/dw/py-lmdb")
2792 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2794 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2795 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2797 (list license:openldap2.8
2798 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2799 ;; but not actually needed on platforms currently supported by Guix.
2802 (define-public python-orator
2804 (name "python-orator")
2808 (uri (pypi-uri "orator" version))
2811 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2812 (build-system python-build-system)
2813 ;; FIXME: Tests are not distributed with PyPI, and the repository
2814 ;; does not contain setup.py. How to test?
2815 (arguments '(#:tests? #f))
2817 `(("python-backpack" ,python-backpack)
2818 ("python-blinker" ,python-blinker)
2819 ("python-cleo" ,python-cleo)
2820 ("python-faker" ,python-faker)
2821 ("python-inflection" ,python-inflection)
2822 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2823 ("python-pendulum" ,python-pendulum)
2824 ("python-pyaml" ,python-pyaml)
2825 ("python-pygments" ,python-pygments)
2826 ("python-pyyaml" ,python-pyyaml)
2827 ("python-simplejson" ,python-simplejson)
2828 ("python-six" ,python-six)
2829 ("python-wrapt" ,python-wrapt)))
2830 (home-page "https://orator-orm.com/")
2831 (synopsis "ActiveRecord ORM for Python")
2833 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2834 implementation for Python.")
2835 (license license:expat)))
2837 (define-public virtuoso-ose
2839 (name "virtuoso-ose")
2845 "https://github.com/openlink/virtuoso-opensource/releases/"
2846 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2848 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2849 (build-system gnu-build-system)
2851 `(#:tests? #f ; Tests require a network connection.
2852 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2853 ;; This indicates that the internal zlib code may still be used.
2854 #:configure-flags '("--without-internal-zlib"
2856 "--enable-static=no")
2858 (modify-phases %standard-phases
2859 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2860 ;; the build output. The following phase removes it.
2861 (add-after 'install 'remove-static-libs
2862 (lambda* (#:key outputs #:allow-other-keys)
2863 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2864 (for-each (lambda (file)
2865 (delete-file (string-append lib "/" file)))
2867 "libvirtuoso-t.la"))))))))
2869 `(("openssl" ,openssl-1.0)
2870 ("net-tools" ,net-tools)
2871 ("readline" ,readline)
2873 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2874 (synopsis "Multi-model database system")
2875 (description "Virtuoso is a scalable cross-platform server that combines
2876 relational, graph, and document data management with web application server
2877 and web services platform functionality.")
2878 ;; configure: error: ... can only be build on 64bit platforms
2879 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2880 (license license:gpl2)))
2882 (define-public python-ccm
2889 (uri (pypi-uri "ccm" version))
2892 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2893 (build-system python-build-system)
2895 `(("python-pyyaml" ,python-pyyaml)
2896 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2898 ("python-psutil" ,python-psutil)
2899 ("python-six" ,python-six)))
2900 (home-page "https://github.com/pcmanus/ccm")
2901 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2903 (description "Cassandra Cluster Manager is a development tool for testing
2904 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2906 (license license:asl2.0)))
2908 (define-public python2-ccm
2909 (package-with-python2 python-ccm))
2911 (define-public python2-pysqlite
2913 (name "python2-pysqlite")
2918 (uri (pypi-uri "pysqlite" version))
2921 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2922 (build-system python-build-system)
2924 `(("sqlite" ,sqlite)))
2926 `(#:python ,python-2 ; incompatible with Python 3
2927 #:tests? #f)) ; no test target
2928 (home-page "https://github.com/ghaering/pysqlite")
2929 (synopsis "SQLite bindings for Python")
2931 "Pysqlite provides SQLite bindings for Python that comply to the
2932 Database API 2.0T.")
2933 (license license:zlib)))
2935 (define-public python-sqlalchemy
2937 (name "python-sqlalchemy")
2942 (uri (pypi-uri "SQLAlchemy" version))
2944 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
2945 (build-system python-build-system)
2947 `(("python-cython" ,python-cython) ; for C extensions
2948 ("python-pytest" ,python-pytest)
2949 ("python-mock" ,python-mock))) ; for tests
2952 (modify-phases %standard-phases
2954 (lambda _ (invoke "py.test"))))))
2955 (home-page "https://www.sqlalchemy.org")
2956 (synopsis "Database abstraction library")
2958 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2959 gives application developers the full power and flexibility of SQL. It
2960 provides a full suite of well known enterprise-level persistence patterns,
2961 designed for efficient and high-performing database access, adapted into a
2962 simple and Pythonic domain language.")
2963 (license license:x11)))
2965 (define-public python2-sqlalchemy
2966 (package-with-python2 python-sqlalchemy))
2968 (define-public python-sqlalchemy-stubs
2970 (name "python-sqlalchemy-stubs")
2975 (uri (pypi-uri "sqlalchemy-stubs" version))
2978 "1bppjmv7v7m0q8gwg791pgxbx4ay7mna0zq204pn9vw28kfxcrf6"))))
2979 (build-system python-build-system)
2981 `(("python-mypy" ,python-mypy)
2982 ("python-typing-extensions" ,python-typing-extensions)))
2983 (home-page "https://github.com/dropbox/sqlalchemy-stubs")
2984 (synopsis "SQLAlchemy stubs and mypy plugin")
2985 (description "This package contains type stubs and a mypy plugin to
2986 provide more precise static types and type inference for SQLAlchemy
2988 (license license:asl2.0)))
2990 (define-public python-sqlalchemy-utils
2992 (name "python-sqlalchemy-utils")
2997 (uri (pypi-uri "SQLAlchemy-Utils" version))
3000 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
3001 (build-system python-build-system)
3003 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
3005 ;; (modify-phases %standard-phases
3008 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
3010 `(("python-six" ,python-six)
3011 ("python-sqlalchemy" ,python-sqlalchemy)))
3013 `(("python-dateutil" ,python-dateutil)
3014 ("python-flexmock" ,python-flexmock)
3015 ("python-psycopg2" ,python-psycopg2)
3016 ("python-pytest" ,python-pytest)
3017 ("python-pytz" ,python-pytz)))
3018 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3019 (synopsis "Various utility functions for SQLAlchemy")
3021 "SQLAlchemy-utils provides various utility functions and custom data types
3022 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3024 You might also want to install the following optional dependencies:
3026 @item @code{python-passlib}
3027 @item @code{python-babel}
3028 @item @code{python-cryptography}
3029 @item @code{python-pytz}
3030 @item @code{python-psycopg2}
3031 @item @code{python-furl}
3032 @item @code{python-flask-babel}
3035 (license license:bsd-3)))
3037 (define-public python2-sqlalchemy-utils
3038 (package-with-python2 python-sqlalchemy-utils))
3040 (define-public python-alchemy-mock
3042 (name "python-alchemy-mock")
3044 (home-page "https://github.com/miki725/alchemy-mock")
3047 (uri (pypi-uri "alchemy-mock" version))
3050 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
3051 (build-system python-build-system)
3053 '(#:phases (modify-phases %standard-phases
3056 ;; Create pytest.ini that adds doctest options to
3057 ;; prevent test failure. Taken from tox.ini.
3058 (call-with-output-file "pytest.ini"
3060 (format port "[pytest]
3061 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
3063 (invoke "pytest" "-vv" "--doctest-modules"
3064 "alchemy_mock/"))))))
3066 `(("python-mock" ,python-mock)
3067 ("python-pytest" ,python-pytest)))
3069 `(("python-six" ,python-six)
3070 ("python-sqlalchemy" ,python-sqlalchemy)))
3071 (synopsis "Mock helpers for SQLAlchemy")
3073 "This package provides mock helpers for SQLAlchemy that makes it easy
3074 to mock an SQLAlchemy session while preserving the ability to do asserts.
3076 Normally Normally SQLAlchemy's expressions cannot be easily compared as
3077 comparison on binary expression produces yet another binary expression, but
3078 this library provides functions to facilitate such comparisons.")
3079 (license license:expat)))
3081 (define-public python-alembic
3083 (name "python-alembic")
3088 (uri (pypi-uri "alembic" version))
3090 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
3091 (build-system python-build-system)
3093 '(#:phases (modify-phases %standard-phases
3096 (invoke "pytest" "-vv"))))))
3098 `(("python-mock" ,python-mock)
3099 ("python-pytest-cov" ,python-pytest-cov)))
3101 `(("python-dateutil" ,python-dateutil)
3102 ("python-sqlalchemy" ,python-sqlalchemy)
3103 ("python-mako" ,python-mako)
3104 ("python-editor" ,python-editor)))
3105 (home-page "https://bitbucket.org/zzzeek/alembic")
3106 (synopsis "Database migration tool for SQLAlchemy")
3108 "Alembic is a lightweight database migration tool for usage with the
3109 SQLAlchemy Database Toolkit for Python.")
3110 (license license:expat)))
3112 (define-public python2-alembic
3113 (package-with-python2 python-alembic))
3115 (define-public python-pickleshare
3117 (name "python-pickleshare")
3122 (uri (pypi-uri "pickleshare" version))
3124 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
3125 (build-system python-build-system)
3127 `(#:phases (modify-phases %standard-phases
3130 (invoke "pytest"))))))
3132 `(("python-pytest" ,python-pytest)))
3133 (home-page "https://github.com/vivainio/pickleshare")
3134 (synopsis "Tiny key value database with concurrency support")
3136 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
3137 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
3138 shelve, many processes can access the database simultaneously. Changing a
3139 value in database is immediately visible to other processes accessing the same
3140 database. Concurrency is possible because the values are stored in separate
3141 files. Hence the “database” is a directory where all files are governed by
3143 (properties `((python2-variant . ,(delay python2-pickleshare))))
3144 (license license:expat)))
3146 (define-public python2-pickleshare
3147 (let ((pickleshare (package-with-python2
3148 (strip-python2-variant python-pickleshare))))
3149 (package (inherit pickleshare)
3150 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3151 ,@(package-propagated-inputs pickleshare))))))
3153 (define-public python-apsw
3155 (name "python-apsw")
3156 (version "3.31.1-r1")
3160 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3161 "/download/" version "/apsw-" version ".zip"))
3164 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3165 (build-system python-build-system)
3167 `(("unzip" ,unzip)))
3169 `(("sqlite" ,sqlite)))
3172 (modify-phases %standard-phases
3175 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3177 (add-after 'build 'build-test-helper
3179 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3180 "-I." "-Isqlite3" "src/testextension.c")
3183 (lambda* (#:key inputs outputs #:allow-other-keys)
3184 (add-installed-pythonpath inputs outputs)
3185 (invoke "python" "setup.py" "test")
3187 (home-page "https://github.com/rogerbinns/apsw/")
3188 (synopsis "Another Python SQLite Wrapper")
3189 (description "APSW is a Python wrapper for the SQLite
3190 embedded relational database engine. In contrast to other wrappers such as
3191 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3192 translate the complete SQLite API into Python.")
3193 (license license:zlib)))
3195 (define-public python2-apsw
3196 (package-with-python2 python-apsw))
3198 (define-public python-aiosqlite
3200 (name "python-aiosqlite")
3205 (uri (pypi-uri "aiosqlite" version))
3208 "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph"))))
3209 (build-system python-build-system)
3211 '(#:phases (modify-phases %standard-phases
3213 (lambda* (#:key tests? #:allow-other-keys)
3215 (invoke "python" "-m" "unittest" "aiosqlite.tests")
3216 (format #t "test suite not run~%"))
3219 `(("python-typing-extensions" ,python-typing-extensions)))
3221 `(("python-aiounittest" ,python-aiounittest)))
3222 (home-page "https://github.com/jreese/aiosqlite")
3224 "Asyncio bridge for sqlite3")
3226 "The package aiosqlite replicates the standard sqlite3 module, but with
3227 async versions of all the standard connection and cursor methods, and context
3228 managers for automatically closing connections.")
3229 (license license:expat)))
3231 (define-public python2-neo4j-driver
3233 (name "python2-neo4j-driver")
3234 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3238 (uri (pypi-uri "neo4j-driver" version))
3241 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3242 (build-system python-build-system)
3244 `(#:python ,python-2))
3245 (home-page "https://neo4j.com/developer/python/")
3246 (synopsis "Neo4j driver code written in Python")
3247 (description "This package provides the Neo4j Python driver that connects
3248 to the database using Neo4j's binary protocol. It aims to be minimal, while
3249 being idiomatic to Python.")
3250 (license license:asl2.0)))
3252 (define-public python2-py2neo
3254 (name "python2-py2neo")
3258 (uri (pypi-uri "py2neo" version))
3261 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3262 (build-system python-build-system)
3264 `(#:python ,python-2))
3265 (home-page "https://py2neo.org")
3266 (synopsis "Library and toolkit for working with Neo4j in Python")
3267 (description "This package provides a client library and toolkit for
3268 working with Neo4j from within Python applications and from the command
3269 line. The core library has no external dependencies and has been carefully
3270 designed to be easy and intuitive to use.")
3271 (license license:asl2.0)))
3273 (define-public python-psycopg2
3275 (name "python-psycopg2")
3280 (uri (pypi-uri "psycopg2" version))
3282 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3283 (build-system python-build-system)
3285 ;; Tests would require a postgresql database "psycopg2_test"
3286 ;; and a running postgresql database management service.
3287 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3289 `(("postgresql" ,postgresql))) ; libpq
3290 (home-page "http://initd.org/psycopg/")
3291 (synopsis "Python PostgreSQL adapter")
3293 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3295 (license license:lgpl3+)))
3297 (define-public python2-psycopg2
3298 (package-with-python2 python-psycopg2))
3300 (define-public python-sadisplay
3302 (name "python-sadisplay")
3307 (uri (pypi-uri "sadisplay" version))
3310 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3311 (build-system python-build-system)
3313 `(("python-sqlalchemy" ,python-sqlalchemy)))
3316 `(("python-nose" ,python-nose)))
3317 (home-page "https://bitbucket.org/estin/sadisplay")
3318 (synopsis "SQLAlchemy schema displayer")
3319 (description "This package provides a program to build Entity
3320 Relationship diagrams from a SQLAlchemy model (or directly from the
3322 (license license:bsd-3)))
3324 (define-public python2-sadisplay
3325 (package-with-python2 python-sadisplay))
3327 (define-public yoyo-migrations
3329 (name "yoyo-migrations")
3333 ;; We use the upstream repository, as the tests are not included in the
3337 (url "https://hg.sr.ht/~olly/yoyo")
3338 (changeset (string-append "v" version "-release"))))
3339 (file-name (string-append name "-" version "-checkout"))
3341 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3342 (build-system python-build-system)
3344 ;; XXX: Tests require a connection to some pgsql database and psycopg
3345 ;; fails to connect to it.
3348 `(("python-sqlparse" ,python-sqlparse)
3349 ("python-tabulate" ,python-tabulate)))
3350 (home-page "https://ollycope.com/software/yoyo/latest/")
3351 (synopsis "Database migrations with SQL")
3353 "Yoyo is a database schema migration tool. Migrations are written as SQL
3354 files or Python scripts that define a list of migration steps.")
3355 (license license:asl2.0)))
3357 (define-public python-mysqlclient
3359 (name "python-mysqlclient")
3364 (uri (pypi-uri "mysqlclient" version))
3367 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3368 (build-system python-build-system)
3369 (arguments '(#:tests? #f)) ;XXX: requires a live database
3371 `(("mysql-dev" ,mariadb "dev")))
3372 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3373 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3374 (description "MySQLdb is an interface to the popular MySQL database server
3375 for Python. The design goals are:
3377 @item Compliance with Python database API version 2.0 [PEP-0249],
3378 @item Thread-safety,
3379 @item Thread-friendliness (threads will not block each other).
3381 (license license:gpl2)))
3383 (define-public python-hiredis
3385 (name "python-hiredis")
3390 (uri (pypi-uri "hiredis" version))
3393 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3394 (build-system python-build-system)
3398 (home-page "https://github.com/redis/hiredis-py")
3399 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3400 (description "Python-hiredis is a python extension that wraps protocol
3401 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3402 (license license:bsd-3)))
3404 (define-public python2-hiredis
3405 (package-with-python2 python-hiredis))
3407 (define-public python-fakeredis
3409 (name "python-fakeredis")
3414 (uri (pypi-uri "fakeredis" version))
3417 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3418 (build-system python-build-system)
3423 `(("python-sortedcontainers" ,python-sortedcontainers)))
3424 (home-page "https://github.com/jamesls/fakeredis")
3425 (synopsis "Fake implementation of redis API for testing purposes")
3427 "Fakeredis is a pure-Python implementation of the redis-py Python client
3428 that simulates talking to a redis server. It was created for a single purpose:
3429 to write unit tests.
3431 Setting up redis is not hard, but one often wants to write unit tests that don't
3432 talk to an external server such as redis. This module can be used as a
3433 reasonable substitute.")
3434 (license license:bsd-3)))
3436 (define-public python2-fakeredis
3437 (package-with-python2 python-fakeredis))
3439 (define-public python-redis
3441 (name "python-redis")
3446 (uri (pypi-uri "redis" version))
3448 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3449 (build-system python-build-system)
3450 ;; Tests require a running Redis server.
3451 (arguments '(#:tests? #f))
3452 ;; As long as we are not running test, we do not need this input :-)
3454 ;; `(("python-pytest" ,python-pytest)))
3455 (home-page "https://github.com/andymccurdy/redis-py")
3456 (synopsis "Redis Python client")
3458 "This package provides a Python interface to the Redis key-value store.")
3459 (license license:expat)))
3461 (define-public python2-redis
3462 (package-with-python2 python-redis))
3464 (define-public python-rq
3472 (url "https://github.com/rq/rq")
3473 (commit (string-append "v" version))))
3474 (file-name (git-file-name name version))
3476 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3477 (build-system python-build-system)
3479 '(#:phases (modify-phases %standard-phases
3480 (add-before 'check 'start-redis
3482 (invoke "redis-server" "--daemonize" "yes")))
3484 (lambda* (#:key outputs #:allow-other-keys)
3485 (let ((out (assoc-ref outputs "out")))
3486 ;; Drop test that needs the SDK for Sentry.io.
3487 (delete-file "tests/test_sentry.py")
3488 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3489 (setenv "PATH" (string-append out "/bin:"
3491 (invoke "pytest" "-vv")))))))
3493 `(("python-mock" ,python-mock)
3494 ("python-pytest" ,python-pytest)
3497 `(("python-click" ,python-click)
3498 ("python-redis" ,python-redis)))
3499 (home-page "https://python-rq.org/")
3500 (synopsis "Simple job queues for Python")
3502 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3503 processing them in the background with workers. It is backed by Redis and it
3504 is designed to have a low barrier to entry.")
3505 (license license:bsd-2)))
3507 (define-public python-rq-scheduler
3509 (name "python-rq-scheduler")
3511 (home-page "https://github.com/rq/rq-scheduler")
3516 (commit (string-append "v" version))))
3517 (file-name (git-file-name name version))
3520 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3521 (build-system python-build-system)
3523 '(#:phases (modify-phases %standard-phases
3524 (add-before 'check 'start-redis
3526 (invoke "redis-server" "--daemonize" "yes")))
3529 (substitute* "run_tests.py"
3532 (invoke "./run_tests.py"))))))
3537 `(("python-croniter" ,python-croniter)
3538 ("python-rq" ,python-rq)))
3539 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3541 "This package provides job scheduling capabilities to @code{python-rq}
3543 (license license:expat)))
3545 (define-public python-trollius-redis
3547 (name "python-trollius-redis")
3552 (uri (pypi-uri "trollius_redis" version))
3555 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3556 (build-system python-build-system)
3557 ;; TODO: Tests require packaging 'hiredis'.
3558 (arguments '(#:tests? #f))
3559 (home-page "https://github.com/benjolitz/trollius-redis")
3560 (synopsis "Port of asyncio-redis to trollius")
3561 (description "@code{trollius-redis} is a Redis client for Python
3562 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3564 (license license:bsd-2)))
3566 (define-public python2-trollius-redis
3567 (package-with-python2 python-trollius-redis))
3569 (define-public python-sqlparse
3571 (name "python-sqlparse")
3575 (uri (pypi-uri "sqlparse" version))
3578 "1s2l0jgi1v7rk7smzb99iamasaz22apfkczsphn3ci4wh8pgv48g"))))
3579 (build-system python-build-system)
3582 (modify-phases %standard-phases
3585 (invoke "py.test")))
3586 ;; XXX: The regular wrap phase ends up storing pytest as a runtime
3587 ;; dependency. See <https://bugs.gnu.org/25235>.
3589 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
3590 (let* ((out (assoc-ref outputs "out"))
3591 (python (assoc-ref (or native-inputs inputs) "python"))
3592 (sitedir (string-append "/lib/python"
3593 (python-version python)
3595 (wrap-program (string-append out "/bin/sqlformat")
3596 `("PYTHONPATH" ":" prefix
3597 ,(map (lambda (output)
3598 (string-append output sitedir))
3599 (list python out))))))))))
3601 `(("python-pytest" ,python-pytest)))
3602 (home-page "https://github.com/andialbrecht/sqlparse")
3603 (synopsis "Non-validating SQL parser")
3604 (description "Sqlparse is a non-validating SQL parser for Python. It
3605 provides support for parsing, splitting and formatting SQL statements.")
3606 (license license:bsd-3)))
3608 (define-public python2-sqlparse
3609 (package-with-python2 python-sqlparse))
3611 (define-public python-sql
3618 (uri (pypi-uri "python-sql" version))
3620 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3621 (build-system python-build-system)
3622 (home-page "https://python-sql.tryton.org/")
3623 (synopsis "Library to write SQL queries in a pythonic way")
3624 (description "@code{python-sql} is a library to write SQL queries, that
3625 transforms idiomatic python function calls to well-formed SQL queries.")
3626 (license license:bsd-3)))
3628 (define-public python2-sql
3629 (package-with-python2 python-sql))
3631 (define-public python-pypika
3633 (name "python-pypika")
3636 (origin (method git-fetch)
3638 (url "https://github.com/kayak/pypika")
3639 (commit (string-append "v" version))))
3640 (file-name (git-file-name name version))
3643 "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549"))))
3644 (build-system python-build-system)
3646 `(("python-parameterized" ,python-parameterized)))
3647 (home-page "https://github.com/kayak/pypika")
3648 (synopsis "SQL query builder API for Python")
3650 "PyPika is a python SQL query builder that exposes the full richness of
3651 the SQL language using a syntax that reflects the resulting query.")
3652 (license license:asl2.0)))
3654 ;; There are many wrappers for this in other languages. When touching, please
3655 ;; be sure to ensure all dependencies continue to build.
3656 (define-public apache-arrow
3658 (name "apache-arrow")
3664 (url "https://github.com/apache/arrow")
3665 (commit (string-append "apache-arrow-" version))))
3666 (file-name (git-file-name name version))
3669 "1lcd9gdpwlrr92rm812a5p4l6zx0arwd0zj72a4ga699s1psz8yv"))))
3670 (build-system cmake-build-system)
3674 (modify-phases %standard-phases
3675 (add-before 'configure 'enter-source-directory
3676 (lambda _ (chdir "cpp")))
3677 (add-after 'unpack 'set-env
3679 (substitute* "cpp/cmake_modules/ThirdpartyToolchain.cmake"
3680 (("set\\(xsimd_SOURCE.*") ""))
3681 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3682 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3683 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3684 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson")))))
3685 #:build-type "Release"
3687 (list "-DARROW_PYTHON=ON"
3690 "-DARROW_PARQUET=ON"
3691 "-DPARQUET_BUILD_EXECUTABLES=ON"
3692 ;; The maintainers disallow using system versions of
3694 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3695 ;; is unfortunate because jemalloc increases performance:
3696 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3697 "-DARROW_JEMALLOC=OFF"
3699 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3700 ;; option that instructs the build system how to resolve
3701 ;; each dependency. SYSTEM = Finding the dependency in
3702 ;; system paths using CMake's built-in find_package
3703 ;; function, or using pkg-config for packages that do not
3704 ;; have this feature
3705 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3706 "-Dxsimd_SOURCE=SYSTEM"
3708 ;; Split output into its component packages.
3709 (string-append "-DCMAKE_INSTALL_PREFIX="
3710 (assoc-ref %outputs "lib"))
3711 (string-append "-DCMAKE_INSTALL_RPATH="
3712 (assoc-ref %outputs "lib")
3714 (string-append "-DCMAKE_INSTALL_BINDIR="
3715 (assoc-ref %outputs "out")
3717 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3718 (assoc-ref %outputs "include")
3722 "-DARROW_WITH_SNAPPY=ON"
3723 "-DARROW_WITH_ZLIB=ON"
3724 "-DARROW_WITH_ZSTD=ON"
3725 "-DARROW_WITH_LZ4=ON"
3726 "-DARROW_COMPUTE=ON"
3728 "-DARROW_DATASET=ON"
3729 "-DARROW_FILESYSTEM=ON"
3732 ;; Arrow Python C++ integration library (required for
3733 ;; building pyarrow). This library must be built against
3734 ;; the same Python version for which you are building
3735 ;; pyarrow. NumPy must also be installed. Enabling this
3736 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3737 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3741 ;; Building the tests forces on all the
3742 ;; optional features and the use of static
3744 "-DARROW_BUILD_TESTS=OFF"
3745 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3746 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3747 "-DARROW_BUILD_STATIC=OFF")))
3749 `(("apache-thrift" ,apache-thrift "lib")
3751 ("brotli" ,google-brotli)
3753 ("double-conversion" ,double-conversion)
3758 ("protobuf" ,protobuf)
3759 ("python-3" ,python)
3760 ("python-numpy" ,python-numpy)
3761 ("rapidjson" ,rapidjson)
3764 ("utf8proc" ,utf8proc)
3767 ("zstd" ,zstd "lib")))
3769 `(("pkg-config" ,pkg-config)))
3770 (outputs '("out" "lib" "include"))
3771 (home-page "https://arrow.apache.org/")
3772 (synopsis "Columnar in-memory analytics")
3773 (description "Apache Arrow is a columnar in-memory analytics layer
3774 designed to accelerate big data. It houses a set of canonical in-memory
3775 representations of flat and hierarchical data along with multiple
3776 language-bindings for structure manipulation. It also provides IPC and common
3777 algorithm implementations.")
3778 (license license:asl2.0)))
3780 (define-public python-pyarrow
3782 (inherit apache-arrow)
3783 (name "python-pyarrow")
3784 (build-system python-build-system)
3786 '(#:tests? #f ; XXX There are no tests in the "python" directory
3788 (modify-phases %standard-phases
3789 (delete 'build) ; XXX the build is performed again during the install phase
3790 (add-after 'unpack 'enter-source-directory
3791 (lambda _ (chdir "python") #t))
3792 (add-after 'unpack 'make-git-checkout-writable
3794 (for-each make-file-writable (find-files "."))
3797 `(("apache-arrow" ,apache-arrow "lib")
3798 ("python-numpy" ,python-numpy)
3799 ("python-pandas" ,python-pandas)
3800 ("python-six" ,python-six)))
3802 `(("cmake" ,cmake-minimal)
3803 ("pkg-config" ,pkg-config)
3804 ("python-cython" ,python-cython)
3805 ("python-pytest" ,python-pytest)
3806 ("python-pytest-runner" ,python-pytest-runner)
3807 ("python-setuptools-scm" ,python-setuptools-scm)))
3809 (home-page "https://arrow.apache.org/docs/python/")
3810 (synopsis "Python bindings for Apache Arrow")
3812 "This library provides a Pythonic API wrapper for the reference Arrow C++
3813 implementation, along with tools for interoperability with pandas, NumPy, and
3814 other traditional Python scientific computing packages.")
3815 (license license:asl2.0)))
3817 (define-public python-crate
3819 (name "python-crate")
3823 (uri (pypi-uri "crate" version))
3826 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3827 (build-system python-build-system)
3829 `(("python-urllib3" ,python-urllib3)))
3830 (home-page "https://github.com/crate/crate-python")
3831 (synopsis "CrateDB Python client")
3833 "This package provides a Python client library for CrateDB.
3834 It implements the Python DB API 2.0 specification and includes support for
3836 (license license:asl2.0)))
3838 (define-public libdbi
3844 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3845 version "/libdbi-" version ".tar.gz"))
3848 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3849 (build-system gnu-build-system)
3850 (synopsis "Database independent abstraction layer in C")
3852 "This library implements a database independent abstraction layer in C,
3853 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3854 programmers can leverage the power of multiple databases and multiple
3855 simultaneous database connections by using this framework.")
3856 (home-page "http://libdbi.sourceforge.net/")
3857 (license license:lgpl2.1+)))
3859 (define-public libdbi-drivers
3861 (name "libdbi-drivers")
3865 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3866 "libdbi-drivers/libdbi-drivers-" version
3867 "/libdbi-drivers-" version ".tar.gz"))
3870 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3871 (build-system gnu-build-system)
3874 ("inetutils" ,inetutils)
3875 ("glibc-locales" ,glibc-locales)
3876 ("mariadb" ,mariadb)))
3878 `(("libdbi" ,libdbi)
3879 ("mariadb:dev" ,mariadb "dev")
3880 ("mariadb:lib" ,mariadb "lib")
3881 ("postgresql" ,postgresql)
3882 ("sqlite" ,sqlite)))
3885 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3886 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3887 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3888 (postgresql (assoc-ref %build-inputs "postgresql"))
3889 (sqlite (assoc-ref %build-inputs "sqlite")))
3890 (list "--disable-docs"
3891 (string-append "--with-dbi-incdir=" libdbi "/include")
3892 (string-append "--with-dbi-libdir=" libdbi "/lib")
3894 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3895 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3897 (string-append "--with-pgsql-incdir=" postgresql "/include")
3898 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3900 (string-append "--with-sqlite-incdir=" sqlite "/include")
3901 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3902 #:tests? #f ; FIXME: Find why the tests get stuck forever.
3904 (modify-phases %standard-phases
3905 (add-after 'unpack 'fix-tests
3906 (lambda* (#:key inputs #:allow-other-keys)
3907 (substitute* "tests/test_mysql.sh"
3909 (string-append "MYMYSQLD="
3910 (assoc-ref inputs "mariadb")
3913 (add-after 'install 'remove-empty-directories
3914 (lambda* (#:key outputs #:allow-other-keys)
3915 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3916 (delete-file-recursively var))
3918 (synopsis "Database drivers for the libdbi framework")
3920 "The @code{libdbi-drivers} library provides the database specific drivers
3921 for the @code{libdbi} framework.
3923 The drivers officially supported by @code{libdbi} are:
3929 (home-page "http://libdbi-drivers.sourceforge.net/")
3930 (license license:lgpl2.1+)))
3939 (url "https://github.com/SOCI/soci/")
3940 (commit (string-append "v" version))))
3941 (file-name (git-file-name name version))
3944 "0qc6d71lyrfh5zb7pmfihd1hjyazlkgq6p0g06ans77wnnjh0k9l"))))
3945 (build-system cmake-build-system)
3947 ;; Headers of soci has include-references to headers of these inputs.
3948 `(("firebird" ,firebird)
3949 ("postgresql" ,postgresql)
3953 ("mariadb:dev" ,mariadb "dev")))
3956 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
3957 (list "-DCMAKE_CXX_STANDARD=17"
3958 "-DSOCI_LIBDIR=lib")
3959 #:tests? #f)) ; may require running database management systems
3960 (synopsis "C++ Database Access Library")
3962 "SOCI is an abstraction layer for several database backends, including
3963 PostreSQL, SQLite, ODBC and MySQL.")
3964 (home-page "http://soci.sourceforge.net/")
3965 (license license:boost1.0)))
3967 (define-public freetds
3974 (uri (string-append "https://www.freetds.org/files/stable/"
3975 "freetds-" version ".tar.gz"))
3977 (base32 "11fzwcahc1bc8npxbif0448v9cwyf7k04167i7fcspmfw7a0hj0d"))))
3978 (build-system gnu-build-system)
3980 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
3981 ;; disabled for now.
3983 (home-page "https://www.freetds.org/")
3984 (synopsis "Client libraries for MS SQL and Sybase servers")
3986 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
3987 connecting to MS SQL and Sybase servers over TCP/IP.")
3988 (license license:lgpl2.0+)))