1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013, 2017 Cyril Roelandt <tipecaml@gmail.com>
5 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
11 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2017, 2018 Roel Janssen <roel@gnu.org>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
18 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
19 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
21 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
22 ;;; Copyright © 2017, 2020 Thomas Danckaert <post@thomasdanckaert.be>
23 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
24 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
25 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
26 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
27 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
28 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
29 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
30 ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
31 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
33 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
34 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
35 ;;; Copyright © 2018, 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>
52 ;;; This file is part of GNU Guix.
54 ;;; GNU Guix is free software; you can redistribute it and/or modify it
55 ;;; under the terms of the GNU General Public License as published by
56 ;;; the Free Software Foundation; either version 3 of the License, or (at
57 ;;; your option) any later version.
59 ;;; GNU Guix is distributed in the hope that it will be useful, but
60 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
61 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62 ;;; GNU General Public License for more details.
64 ;;; You should have received a copy of the GNU General Public License
65 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
67 (define-module (gnu packages databases)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages admin)
70 #:use-module (gnu packages algebra)
71 #:use-module (gnu packages autotools)
72 #:use-module (gnu packages avahi)
73 #:use-module (gnu packages base)
74 #:use-module (gnu packages bash)
75 #:use-module (gnu packages bison)
76 #:use-module (gnu packages boost)
77 #:use-module (gnu packages check)
78 #:use-module (gnu packages cmake)
79 #:use-module (gnu packages compression)
80 #:use-module (gnu packages crypto)
81 #:use-module (gnu packages curl)
82 #:use-module (gnu packages cyrus-sasl)
83 #:use-module (gnu packages dbm)
84 #:use-module (gnu packages emacs)
85 #:use-module (gnu packages flex)
86 #:use-module (gnu packages gcc)
87 #:use-module (gnu packages gettext)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages gnupg)
90 #:use-module (gnu packages golang)
91 #:use-module (gnu packages guile)
92 #:use-module (gnu packages icu4c)
93 #:use-module (gnu packages jemalloc)
94 #:use-module (gnu packages language)
95 #:use-module (gnu packages libedit)
96 #:use-module (gnu packages libevent)
97 #:use-module (gnu packages linux)
98 #:use-module (gnu packages lisp)
99 #:use-module (gnu packages lisp-xyz)
100 #:use-module (gnu packages logging)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages maths)
103 #:use-module (gnu packages multiprecision)
104 #:use-module (gnu packages ncurses)
105 #:use-module (gnu packages onc-rpc)
106 #:use-module (gnu packages parallel)
107 #:use-module (gnu packages pcre)
108 #:use-module (gnu packages perl)
109 #:use-module (gnu packages perl-check)
110 #:use-module (gnu packages perl-web)
111 #:use-module (gnu packages pkg-config)
112 #:use-module (gnu packages popt)
113 #:use-module (gnu packages protobuf)
114 #:use-module (gnu packages python)
115 #:use-module (gnu packages python-crypto)
116 #:use-module (gnu packages python-science)
117 #:use-module (gnu packages python-web)
118 #:use-module (gnu packages python-xyz)
119 #:use-module (gnu packages rdf)
120 #:use-module (gnu packages readline)
121 #:use-module (gnu packages regex)
122 #:use-module (gnu packages rpc)
123 #:use-module (gnu packages ruby)
124 #:use-module (gnu packages serialization)
125 #:use-module (gnu packages sphinx)
126 #:use-module (gnu packages sqlite)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages terminals)
129 #:use-module (gnu packages textutils)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages valgrind)
133 #:use-module (gnu packages web)
134 #:use-module (gnu packages xml)
135 #:use-module ((guix licenses) #:prefix license:)
136 #:use-module (guix packages)
137 #:use-module (guix download)
138 #:use-module (guix bzr-download)
139 #:use-module (guix git-download)
140 #:use-module (guix hg-download)
141 #:use-module (guix build-system emacs)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system go)
144 #:use-module (guix build-system perl)
145 #:use-module (guix build-system python)
146 #:use-module (guix build-system ruby)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system scons)
149 #:use-module (guix build-system trivial)
150 #:use-module (guix utils)
151 #:use-module (srfi srfi-1)
152 #:use-module (srfi srfi-26)
153 #:use-module (ice-9 match))
155 (define-public 4store
162 (url "https://github.com/4store/4store")
163 (commit (string-append "v" version))))
164 (file-name (git-file-name name version))
166 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
167 (patches (search-patches "4store-unset-preprocessor-directive.patch"
168 "4store-fix-buildsystem.patch"))))
169 (build-system gnu-build-system)
173 ("autoconf" ,autoconf)
174 ("automake" ,automake)
175 ("gettext" ,gettext-minimal)
177 ("pcre" ,pcre "bin") ;for 'pcre-config'
178 ("pkg-config" ,pkg-config)))
184 ("readline" ,readline)
186 ("cyrus-sasl" ,cyrus-sasl)
188 ("util-linux" ,util-linux "lib")))
189 ;; http://www.4store.org has been down for a while now.
190 (home-page "https://github.com/4store/4store")
191 (synopsis "Clustered RDF storage and query engine")
192 (description "4store is a RDF/SPARQL store written in C, supporting
193 either single machines or networked clusters.")
194 (license license:gpl3+)))
196 (define-public ephemeralpg
204 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
207 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
208 (build-system gnu-build-system)
210 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
211 (string-append "PREFIX=" %output))
213 (modify-phases %standard-phases
214 (delete 'configure) ; no configure script
215 (add-after 'install 'wrap
216 (lambda* (#:key inputs outputs #:allow-other-keys)
217 (let ((out (assoc-ref outputs "out")))
218 (wrap-program (string-append out "/bin/pg_tmp")
220 (,(string-append (assoc-ref inputs "util-linux")
222 ,(string-append (assoc-ref inputs "postgresql")
225 ,(string-append out "/bin")))))
227 #:test-target "test"))
229 `(("postgresql" ,postgresql)
230 ("util-linux" ,util-linux)))
235 (home-page "https://eradman.com/ephemeralpg/")
236 (synopsis "Run temporary PostgreSQL databases")
238 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
239 like running software test suites. Temporary databases created with
240 @code{pg_tmp} have a limited shared memory footprint and are automatically
241 garbage-collected after a configurable number of seconds (the default is
243 (license license:isc)))
245 (define-public es-dump-restore
247 (name "es-dump-restore")
252 (uri (rubygems-uri "es_dump_restore" version))
255 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
256 (build-system ruby-build-system)
258 '(#:tests? #f)) ;; No testsuite.
260 `(("ruby-httpclient" ,ruby-httpclient)
261 ("ruby-multi-json" ,ruby-multi-json)
262 ("ruby-progress_bar" ,ruby-progress_bar)
263 ("ruby-rubyzip" ,ruby-rubyzip)
264 ("ruby-thor" ,ruby-thor)))
265 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
267 "This package provides a utility for dumping the contents of an
268 ElasticSearch index to a compressed file and restoring the dumpfile back to an
269 ElasticSearch server")
270 (home-page "https://github.com/patientslikeme/es_dump_restore")
271 (license license:expat)))
273 (define-public firebird
278 (let ((revision "33374-0"))
281 (uri (string-append "https://github.com/FirebirdSQL/"
282 "firebird/releases/download/R"
283 (string-replace-substring version "." "_") "/"
284 "Firebird-" version "." revision ".tar.bz2"))
286 (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c"))
287 (modules '((guix build utils)))
291 delete-file-recursively
292 (list "extern/btyacc/test" ; TODO: package and remove entirely
297 "src/include/firebird/impl/boost"
300 "builds/install/arch-specific/solaris"
302 "src/msgs/templates.sql"
304 ;; Generated files missing sources.
305 "doc/Firebird-3-QuickStart.pdf"
306 (string-append "doc/Firebird-" ,version
308 "doc/README.SecureRemotePassword.html"))
310 (build-system gnu-build-system)
311 (outputs (list "debug" "out"))
314 (let ((out (assoc-ref %outputs "out")))
315 (list (string-append "--with-fbsbin=" out "/sbin")
316 (string-append "--with-fbdoc=" out "/share/doc/"
318 (string-append "--with-fbconf=" out "/lib/firebird")
319 (string-append "--with-fbintl=" out "/lib/firebird/intl")
320 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
321 (string-append "--with-fbmsg=" out "/lib/firebird")
322 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
323 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
324 "--with-fbglock=/run/firebird"
325 "--with-fblog=/var/log/firebird"
326 "--with-fbhelp=/var/lib/firebird/system"
327 "--with-fbsecure-db=/var/lib/firebird/secure"
329 "--without-fbsample-db"
330 "--with-system-editline"))
332 (list (string-append "CC=" ,(cc-for-target))
333 ;; The plugins/ can't find libfbclient otherwise.
334 (string-append "LDFLAGS=-Wl,-rpath="
335 (assoc-ref %outputs "out") "/lib"))
336 #:tests? #f ; no test suite
337 #:modules ((guix build gnu-build-system)
341 (modify-phases %standard-phases
342 (add-after 'unpack 'use-system-boost
344 (substitute* "src/include/firebird/Message.h"
345 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
346 "<boost/preprocessor/seq/for_each_i.hpp>")
347 (("FB_BOOST_") "BOOST_"))
349 (add-after 'unpack 'patch-installation
352 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
353 (("/bin/sh") (which "bash"))
354 ;; Remove shell script helpers from $PATH.
355 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
356 ;; Put files where Guix users expect them.
357 (("(License\\.txt.*)@FB_CONFDIR" match)
358 (string-append match "@FB_DOCDIR@"))
359 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
360 (string-append "@FB_DOCDIR@" match))
361 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
362 (string-append head "@FB_DOCDIR@" tail "\n")))
364 (list "builds/install/posix-common/changeServerMode.sh.in"
365 "builds/install/posix-common/install.sh.in")
366 ;; Skip phases that (could) cause problems in Guix.
367 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
369 ;; Skip phases that are merely pointless on Guix.
370 (("buildUninstallFile|installInitdScript|startFirebird") ":")
371 ;; Omit randomly generated password with bonus timestamp.
372 (("setDBAPassword") ":"))
374 ;; These promote proprietary workflows not relevant on Guix.
375 (for-each delete-file-recursively
376 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))
378 (add-after 'configure 'delete-init-scripts
380 (delete-file-recursively "gen/install/misc")
382 (add-before 'build 'set-build-environment-variables
384 ;; ‘isql’ needs to run & find libfbclient.so during the build.
385 ;; This doubles as a rudimentary test in lieu of a test suite.
386 (setenv "LD_LIBRARY_PATH"
387 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))
389 (add-before 'install 'keep-embedded-debug-symbols
391 ;; Let the gnu-build-system separate & deal with them later.
392 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
393 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
394 (substitute* "gen/Makefile.install"
395 (("readelf") "false"))
397 (add-after 'install 'prune-undesirable-files
398 (lambda* (#:key outputs #:allow-other-keys)
399 (let ((out (assoc-ref outputs "out")))
400 (with-directory-excursion out
401 ;; Remove example binaries.
402 (for-each delete-file-recursively
403 (find-files "." "example"))
404 ;; Delete (now-)empty directories.
406 (list "include/firebird/impl"
407 "lib/firebird/plugins/udr"))
411 ("editline" ,editline)
413 ("libtommath" ,libtommath)
416 (home-page "https://www.firebirdsql.org")
417 (synopsis "Relational database with many ANSI SQL standard features")
419 "Firebird is an SQL @acronym{RDBMS, relational database management system}
420 with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
421 @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
422 triggers. Transactions provide full ACID-compliant referential integrity.
424 The database requires very little manual maintenance once set up, making it
425 ideal for small business or embedded use.
427 When installed as a traditional local or remote (network) database server,
428 Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
429 may be a better choice for such very large environments.
431 Firebird can also be embedded into stand-alone applications that don't want or
432 need a full client & server. Used in this manner, it offers richer SQL support
433 than SQLite as well as the option to seamlessly migrate to a client/server
436 `((lint-hidden-cve . ("CVE-2017-6369"))))
438 ;; See doc/license/README.license.usage.txt for rationale & details.
439 (list license:bsd-3 ; src/common/sha2/
440 license:bsd-4 ; src/common/enc.cpp
441 license:gpl2+ ; builds/posix/make.defaults
442 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
443 "InterBase Public License v1.0")
444 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
445 "Initial Developer's Public License v1.0")
446 license:lgpl2.1 ; exception for OSI-compatible licences
447 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
448 license:public-domain)))) ; including files without explicit licence
450 (define-public leveldb
457 (url "https://github.com/google/leveldb")
459 (file-name (git-file-name name version))
462 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
463 (build-system cmake-build-system)
465 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
467 `(("snappy" ,snappy)))
468 (home-page "https://github.com/google/leveldb")
469 (synopsis "Fast key-value storage library")
471 "LevelDB is a fast key-value storage library that provides an ordered
472 mapping from string keys to string values.")
473 (license license:bsd-3)))
475 (define-public memcached
483 "https://memcached.org/files/memcached-" version ".tar.gz"))
485 (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
486 (build-system gnu-build-system)
488 `(("libevent" ,libevent)
489 ("cyrus-sasl" ,cyrus-sasl)))
490 (home-page "https://memcached.org/")
491 (synopsis "In-memory caching service")
492 (description "Memcached is an in-memory key-value store. It has a small
493 and generic API, and was originally intended for use with dynamic web
495 (license license:bsd-3)))
497 (define-public libmemcached
499 (name "libmemcached")
501 ;; We build from the sources since we want to build the extra HTML
502 ;; documentation which is not included with the release.
506 (url "lp:libmemcached/1.0")
507 (revision (string-append "tag:" version))))
508 (file-name (string-append name "-" version "-checkout"))
511 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
513 (search-patches "libmemcached-build-with-gcc7.patch"))))
514 (build-system gnu-build-system)
516 `(("memcached" ,memcached)
518 ("autoconf" ,autoconf)
519 ("automake" ,automake)
523 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
525 `(("libevent" ,libevent)
526 ("cyrus-sasl" ,cyrus-sasl)))
527 (outputs '("out" "doc"))
529 '(#:tests? #f ;many tests fail and use too much time
531 (modify-phases %standard-phases
532 (add-before 'bootstrap 'fix-configure.ac
533 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
534 ;; get the error ``configure: error: cannot find install-sh,
535 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
536 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
537 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
539 (delete-file "bootstrap.sh") ;not useful in the context of Guix
540 (substitute* "configure.ac"
541 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
542 (("^AC_INIT.*" anchor)
543 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))))
544 (add-before 'build 'build-and-install-html-doc
545 (lambda* (#:key outputs #:allow-other-keys)
546 (let ((html (string-append (assoc-ref outputs "doc")
547 "/share/doc/libmemcached/html/")))
548 (invoke "make" "install-html")
549 ;; Cleanup useless files.
550 (for-each delete-file-recursively
551 (map (lambda (x) (string-append html x))
552 '("_sources" ".doctrees" ".buildinfo")))))))))
553 (home-page "https://libmemcached.org/libMemcached.html")
554 (synopsis "C++ library for memcached")
555 (description "libMemcached is a library to use memcached in C/C++
556 applications. It comes with a complete reference guide and documentation of
557 the API, and provides features such as:
559 @item Asynchronous and synchronous transport support
560 @item Consistent hashing and distribution
561 @item Tunable hashing algorithm to match keys
562 @item Access to large object support
563 @item Local replication
565 (license license:bsd-3)))
567 (define-public python-pylibmc
569 (name "python-pylibmc")
574 (uri (pypi-uri "pylibmc" version))
576 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
577 (build-system python-build-system)
580 (modify-phases %standard-phases
581 (add-before 'check 'start-memcached-daemon
582 ;; The test suite requires a memcached server.
584 (invoke "memcached" "-d"))))))
586 `(("memcached" ,memcached)
587 ("python-nose" ,python-nose)))
589 `(("libmemcached" ,libmemcached)
591 ("cyrus-sasl" ,cyrus-sasl)))
592 (home-page "http://sendapatch.se/projects/pylibmc/")
593 (synopsis "Python client for memcached")
595 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
596 around TangentOrg’s libmemcached library, and can be used as a drop-in
597 replacement for the code@{python-memcached} library.")
598 (license license:bsd-3)))
600 (define-public python2-pylibmc
601 (package-with-python2 python-pylibmc))
610 (uri (pypi-uri "mycli" version))
612 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
613 (build-system python-build-system)
615 `(#:tests? #f)) ; tests expect a running MySQL
617 `(("python-cli-helpers" ,python-cli-helpers)
618 ("python-click" ,python-click)
619 ("python-configobj" ,python-configobj)
620 ("python-cryptography" ,python-cryptography)
621 ("python-prompt-toolkit" ,python-prompt-toolkit)
622 ("python-pygments" ,python-pygments)
623 ("python-pymysql" ,python-pymysql)
624 ("python-sqlparse" ,python-sqlparse)))
625 (home-page "http://mycli.net")
627 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
629 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
630 auto-completion and syntax highlighting.")
631 (license license:bsd-3)))
633 ;; XXX When updating, check whether boost-for-mysql is still needed.
634 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
641 (uri (list (string-append
642 "https://dev.mysql.com/get/Downloads/MySQL-"
643 (version-major+minor version) "/"
644 name "-" version ".tar.gz")
646 "https://downloads.mysql.com/archives/get/file/"
647 name "-" version ".tar.gz")))
650 "1bb343mf7n0qg2qz497gxjsqprygrjz1q1pbz76hgqxnsy08sfxd"))))
651 (build-system cmake-build-system)
654 '("-DBUILD_CONFIG=mysql_release"
657 "-DDEFAULT_CHARSET=utf8"
658 "-DDEFAULT_COLLATION=utf8_general_ci"
659 "-DMYSQL_DATADIR=/var/lib/mysql"
660 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
661 "-DINSTALL_INFODIR=share/mysql/docs"
662 "-DINSTALL_MANDIR=share/man"
663 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
664 "-DINSTALL_SCRIPTDIR=bin"
665 "-DINSTALL_INCLUDEDIR=include/mysql"
666 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
667 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
668 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
669 "-DINSTALL_DOCDIR=share/mysql/docs"
670 "-DINSTALL_SHAREDIR=share/mysql"
671 ;; Get rid of test data.
672 "-DINSTALL_MYSQLTESTDIR="
673 "-DINSTALL_SQLBENCHDIR=")
674 #:phases (modify-phases %standard-phases
676 'install 'remove-extra-binaries
677 (lambda* (#:key outputs #:allow-other-keys)
678 (let ((out (assoc-ref outputs "out")))
679 ;; Remove the 3 *_embedded files, which weigh in at
681 (for-each delete-file
682 (find-files (string-append out "/bin")
688 ("pkg-config" ,pkg-config)))
690 `(("boost" ,boost-for-mysql)
692 ("libtirpc" ,libtirpc)
695 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
697 (home-page "https://www.mysql.com/")
698 (synopsis "Fast, easy to use, and popular database")
700 "MySQL is a fast, reliable, and easy to use relational database
701 management system that supports the standardized Structured Query
703 (license license:gpl2)))
705 (define-public mariadb
711 (uri (string-append "https://downloads.mariadb.com/MariaDB"
712 "/mariadb-" version "/source/mariadb-"
716 "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
717 (modules '((guix build utils)))
720 ;; Delete bundled snappy and xz.
721 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
722 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
723 ;; This file checks that the bundled sources are present and
724 ;; declares build procedures for them.
725 (("^include\\(TokuThirdParty\\)") ""))
726 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
727 ;; Don't attempt to use the procedures we just removed.
728 ((" build_lzma build_snappy") ""))
730 ;; Preserve CMakeLists.txt for these.
731 (for-each (lambda (file)
732 (unless (string-suffix? "CMakeLists.txt" file)
734 (append (find-files "extra/wolfssl")
735 (find-files "zlib")))
737 (replacement mariadb/fixed)
738 (build-system cmake-build-system)
739 (outputs '("out" "lib" "dev"))
743 "-DBUILD_CONFIG=mysql_release"
744 ;; Linking with libarchive fails, like this:
746 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
747 ;; relocation R_X86_64_32 against `.bss' can not be used when
748 ;; making a shared object; recompile with -fPIC
750 ;; For now, disable the features that that use libarchive (xtrabackup).
751 "-DWITH_LIBARCHIVE=OFF"
753 ;; Disable the TokuDB engine, because its test suite frequently fails,
754 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
757 ;; Ensure the system libraries are used.
758 "-DWITH_JEMALLOC=yes"
763 "-DDEFAULT_CHARSET=utf8"
764 "-DDEFAULT_COLLATION=utf8_general_ci"
765 "-DMYSQL_DATADIR=/var/lib/mysql"
766 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
768 ;; Do not install the benchmark suite.
769 "-DINSTALL_SQLBENCHDIR=false"
771 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
772 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
774 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
776 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
778 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
779 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
780 "-DCMAKE_INSTALL_LIBDIR=lib"
781 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
782 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
784 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
786 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
788 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
789 "/share/mysql/support-files")
790 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
791 "-DINSTALL_SHAREDIR=share")
793 (modify-phases %standard-phases
794 (add-after 'unpack 'adjust-output-references
796 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
797 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
798 ;; not work when the latter uses an absolute file name.
799 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
800 (("%s/@INSTALL_INCLUDEDIR@")
801 (string-append "@INSTALL_INCLUDEDIR@"))
802 ;; As of 10.5.8, the mariadb_config program tries to be
803 ;; clever and computes the installation directory relative
804 ;; to /proc/self/exe when running on Linux. Make it fall
805 ;; back to the old behaviour.
806 (("defined\\(__linux__\\)")
808 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
809 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
810 "@INSTALL_INCLUDEDIR@"))
811 (substitute* "support-files/mariadb.pc.in"
812 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
813 (string-append dir "dir=")))
814 (substitute* "include/CMakeLists.txt"
815 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
816 "${INSTALL_INCLUDEDIR}"))
817 (substitute* "cmake/mariadb_connector_c.cmake"
818 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
819 "${INSTALL_BINDIR}"))
821 (add-after 'unpack 'adjust-tests
823 (let ((disabled-tests
824 '(;; These fail because root@hostname == root@localhost in
825 ;; the build environment, causing a user count mismatch.
826 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
827 "funcs_1.is_columns_mysql"
829 "main.explain_non_select"
831 "main.stat_tables_innodb"
832 "main.upgrade_MDEV-19650"
833 "roles.acl_statistics"
835 ;; FIXME: This test checks various table encodings and
836 ;; fails because Guix defaults to UTF8 instead of the
837 ;; upstream default latin1_swedish_ci. It's not easily
838 ;; substitutable because several encodings are tested.
841 ;; XXX: This test occasionally fails on i686-linux:
842 ;; <https://jira.mariadb.org/browse/MDEV-24458>
843 ,@(if (string-prefix? "i686" (%current-system))
847 ;; This file contains a time bomb which makes it fail after
848 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
851 ;; This file contains a list of known-flaky tests for this
852 ;; release. Append our own items.
853 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
854 (for-each (lambda (test)
855 (format unstable-tests "~a : ~a\n"
856 test "Disabled in Guix"))
858 (close-port unstable-tests)
860 ;; XXX: These fail because they expect a latin1 charset and
861 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
862 (substitute* '("mysql-test/main/gis_notembedded.result"
863 "mysql-test/main/system_mysql_db.result")
864 (("latin1_swedish_ci") "utf8_general_ci")
865 (("\tlatin1") "\tutf8"))
867 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
871 (substitute* "mysql-test/mysql-test-run.pl"
872 (("/bin/ls") (which "ls"))
873 (("/bin/sh") (which "sh")))
875 (add-before 'configure 'disable-plugins
877 (let ((disable-plugin (lambda (name)
878 (call-with-output-file
879 (string-append "plugin/" name
882 (format port "\n")))))
883 (disabled-plugins '(;; XXX: Causes a test failure.
885 (for-each disable-plugin disabled-plugins)
888 (lambda* (#:key (tests? #t) #:allow-other-keys)
890 (with-directory-excursion "mysql-test"
891 (invoke "./mtr" "--verbose"
893 "--testcase-timeout=40"
894 "--suite-timeout=600"
895 "--parallel" (number->string (parallel-job-count))
896 ;; Skip the replication tests: they are very I/O
897 ;; intensive and frequently causes indeterministic
898 ;; failures even on powerful hardware.
900 "--skip-test-list=unstable-tests"))
901 (format #t "test suite not run~%"))
904 'install 'post-install
905 (lambda* (#:key inputs outputs #:allow-other-keys)
906 (let* ((out (assoc-ref outputs "out"))
907 (dev (assoc-ref outputs "dev"))
908 (lib (assoc-ref outputs "lib"))
909 (openssl (assoc-ref inputs "openssl")))
910 (substitute* (list (string-append out "/bin/mariadb-install-db")
911 (string-append out "/bin/mysql_install_db"))
913 (string-append "basedir=\"" out "\""))
914 (("\\$basedir/share/mysql")
915 (string-append lib "/share/mysql")))
917 (with-directory-excursion lib
919 (delete-file-recursively "mysql-test")
920 ;; Remove static libraries.
921 (for-each delete-file (find-files "lib" "\\.a$")))
923 (with-directory-excursion out
924 (delete-file "share/man/man1/mysql-test-run.pl.1")
925 ;; Delete huge and unnecessary executables.
926 (for-each delete-file (find-files "bin" "test$")))
927 (mkdir-p (string-append dev "/share"))
928 (mkdir-p (string-append dev "/bin"))
929 (rename-file (string-append lib "/bin/mariadbd")
930 (string-append out "/bin/mariadbd"))
931 (rename-file (string-append lib "/bin/mysqld")
932 (string-append out "/bin/mysqld"))
933 (mkdir-p (string-append dev "/lib"))
934 (rename-file (string-append lib "/lib/pkgconfig")
935 (string-append dev "/lib/pkgconfig"))
936 (rename-file (string-append lib "/bin/mariadb_config")
937 (string-append dev "/bin/mariadb_config"))
938 (rename-file (string-append out "/bin/mysql_config")
939 (string-append dev "/bin/mysql_config"))
941 ;; Embed an absolute reference to OpenSSL in mysql_config
942 ;; and the pkg-config file to avoid propagation.
943 ;; XXX: how to do this for mariadb_config.c.in?
944 (substitute* (list (string-append dev "/bin/mysql_config")
945 (string-append dev "/lib/pkgconfig/mariadb.pc"))
946 (("-lssl -lcrypto" all)
947 (string-append "-L" openssl "/lib " all)))
954 `(("jemalloc" ,jemalloc)
963 ;; The test suite is very resource intensive and can take more than three
964 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
965 (properties '((timeout . 64800))) ;18 hours
966 (home-page "https://mariadb.org/")
967 (synopsis "SQL database server")
969 "MariaDB is a multi-user and multi-threaded SQL database server, designed
970 as a drop-in replacement of MySQL.")
971 (license license:gpl2)))
973 (define mariadb/fixed
977 (inherit (package-source mariadb))
978 (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
980 (define-public mariadb-connector-c
982 (name "mariadb-connector-c")
988 "https://downloads.mariadb.org/f/connector-c-" version
989 "/mariadb-connector-c-" version "-src.tar.gz"
990 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
991 (file-name (string-append name "-" version ".tar.gz"))
993 (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
995 `(("openssl" ,openssl)))
996 (build-system cmake-build-system)
998 '(#:tests? #f)) ; no tests
999 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1000 (synopsis "Client library to connect to MySQL or MariaDB")
1001 (description "The MariaDB Connector/C is used to connect applications
1002 developed in C/C++ to MariaDB and MySQL databases.")
1003 (license license:lgpl2.1+)))
1005 ;; Don't forget to update the other postgresql packages when upgrading this one.
1006 (define-public postgresql-13
1009 (replacement postgresql-13.2)
1013 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1014 version "/postgresql-" version ".tar.bz2"))
1017 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
1018 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1019 (build-system gnu-build-system)
1021 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
1022 ;; PostgreSQL installs its own Makefile (should it?).
1023 ;; Prevent it from retaining needless references to
1024 ;; the build tools in order to save size.
1025 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1028 (modify-phases %standard-phases
1029 (add-before 'configure 'patch-/bin/sh
1031 ;; Refer to the actual shell.
1032 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1033 "src/bin/psql/command.c")
1034 (("/bin/sh") (which "sh")))
1036 (add-after 'build 'build-contrib
1038 (invoke "make" "-C" "contrib")))
1039 (add-after 'install 'install-contrib
1041 (invoke "make" "-C" "contrib" "install"))))))
1043 `(("readline" ,readline)
1044 ("libuuid" ,util-linux "lib")
1045 ("openssl" ,openssl)
1047 (home-page "https://www.postgresql.org/")
1048 (synopsis "Powerful object-relational database system")
1050 "PostgreSQL is a powerful object-relational database system. It is fully
1051 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1052 stored procedures (in multiple languages). It includes most SQL:2008 data
1053 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1054 TIMESTAMP. It also supports storage of binary large objects, including
1055 pictures, sounds, or video.")
1056 (license (license:x11-style "file://COPYRIGHT"))))
1058 (define-public postgresql-13.2
1060 (inherit postgresql-13)
1065 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1066 version "/postgresql-" version ".tar.bz2"))
1069 "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz"))
1070 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
1072 (define-public postgresql-11
1074 (inherit postgresql-13)
1078 (inherit (package-source postgresql-13))
1079 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1080 version "/postgresql-" version ".tar.bz2"))
1083 "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20"))))))
1085 (define-public postgresql-10
1087 (inherit postgresql-11)
1090 (inherit (package-source postgresql-11))
1091 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1092 version "/postgresql-" version ".tar.bz2"))
1095 "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53"))))))
1097 (define-public postgresql-9.6
1099 (inherit postgresql-10)
1102 (inherit (package-source postgresql-10))
1103 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1104 version "/postgresql-" version ".tar.bz2"))
1107 "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk"))))))
1109 (define-public postgresql postgresql-13)
1111 (define-public pgloader
1119 (url "https://github.com/dimitri/pgloader")
1120 (commit (string-append "v" version))))
1122 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1123 (file-name (git-file-name name version))))
1124 (build-system gnu-build-system)
1126 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1127 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1128 ;; does not require Quicklisp workarounds. There is no `install' target
1129 ;; configured in Makefile.
1131 #:strip-binaries? #f
1133 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1135 (modify-phases %standard-phases
1137 (add-after 'unpack 'set-home
1139 (setenv "HOME" "/tmp")
1141 (add-after 'unpack 'patch-Makefile
1143 (substitute* "Makefile"
1144 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1147 (lambda* (#:key outputs #:allow-other-keys)
1148 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1150 (install-file "build/bin/pgloader" bin))
1153 `(("buildapp" ,buildapp)
1156 `(("alexandria" ,sbcl-alexandria)
1157 ("cl-abnf" ,sbcl-cl-abnf)
1158 ("cl-base64" ,sbcl-cl-base64)
1159 ("cl-csv" ,sbcl-cl-csv)
1160 ("cl-fad" ,sbcl-cl-fad)
1161 ("cl-log" ,sbcl-cl-log)
1162 ("cl-markdown" ,sbcl-cl-markdown)
1163 ("cl-mustache" ,sbcl-cl-mustache)
1164 ("cl-ppcre" ,sbcl-cl-ppcre)
1165 ("cl-sqlite" ,sbcl-cl-sqlite)
1166 ("closer-mop" ,sbcl-closer-mop)
1167 ("command-line-arguments" ,sbcl-command-line-arguments)
1169 ("drakma" ,sbcl-drakma)
1170 ("esrap" ,sbcl-esrap)
1171 ("flexi-streams" ,sbcl-flexi-streams)
1173 ("local-time" ,sbcl-local-time)
1174 ("lparallel" ,sbcl-lparallel)
1175 ("metabang-bind" ,sbcl-metabang-bind)
1176 ("mssql" ,sbcl-mssql)
1177 ("postmodern" ,sbcl-postmodern)
1178 ("py-configparser" ,sbcl-py-configparser)
1179 ("qmynd" ,sbcl-qmynd)
1181 ("split-sequence" ,sbcl-split-sequence)
1182 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1183 ("usocket" ,sbcl-usocket)
1185 ("yason" ,sbcl-yason)
1187 (home-page "https://pgloader.io/")
1188 (synopsis "Tool to migrate data to PostgreSQL")
1190 "@code{pgloader} is a program that can load data or migrate databases from
1191 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1192 (license (license:x11-style "file://LICENSE"))))
1194 (define-public python-pymysql
1196 (name "python-pymysql")
1201 (uri (pypi-uri "PyMySQL" version))
1203 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1204 (build-system python-build-system)
1206 `(("python-unittest2" ,python-unittest2)))
1208 `(("python-cryptography" ,python-cryptography)))
1210 `(#:tests? #f)) ; tests expect a running MySQL
1211 (home-page "https://github.com/PyMySQL/PyMySQL/")
1212 (synopsis "Pure-Python MySQL driver")
1214 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1215 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1216 (license license:expat)))
1218 (define-public python2-pymysql
1219 (package-with-python2 python-pymysql))
1228 (uri (string-append "http://fallabs.com/" name "/"
1229 name "-" version ".tar.gz"))
1232 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1233 (build-system gnu-build-system)
1235 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1236 (assoc-ref %outputs "out")
1238 #:make-flags (list "CFLAGS=-fPIC")))
1239 (home-page "https://fallabs.com/qdbm/")
1240 (synopsis "Key-value database")
1241 (description "QDBM is a library of routines for managing a
1242 database. The database is a simple data file containing key-value
1243 pairs. Every key and value is serial bytes with variable length.
1244 Binary data as well as character strings can be used as a key or a
1245 value. There is no concept of data tables or data types. Records are
1246 organized in a hash table or B+ tree.")
1247 (license license:lgpl2.1+)))
1249 (define-public recutils
1255 (uri (string-append "mirror://gnu/recutils/recutils-"
1259 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1260 (build-system gnu-build-system)
1262 (arguments '(#:configure-flags
1263 (list (string-append "--with-bash-headers="
1264 (assoc-ref %build-inputs "bash:include")
1267 (native-inputs `(("bc" ,bc)
1268 ("bash:include" ,bash "include")
1269 ("check" ,check-0.14)
1270 ("pkg-config" ,pkg-config)))
1272 ;; TODO: Add more optional inputs.
1273 (inputs `(("curl" ,curl)
1274 ("libgcrypt" ,libgcrypt)
1275 ("libuuid" ,util-linux "lib")))
1276 (synopsis "Manipulate plain text files as databases")
1278 "GNU Recutils is a set of tools and libraries for creating and
1279 manipulating text-based, human-editable databases. Despite being text-based,
1280 databases created with Recutils carry all of the expected features such as
1281 unique fields, primary keys, time stamps and more. Many different field
1282 types are supported, as is encryption.")
1283 (license license:gpl3+)
1284 (home-page "https://www.gnu.org/software/recutils/")))
1286 (define-public emacs-recutils
1289 (name "emacs-recutils")
1290 (build-system emacs-build-system)
1293 (modify-phases %standard-phases
1294 (add-after 'unpack 'change-directory
1300 (synopsis "Emacs mode for working with recutils database files")
1301 (description "This package provides an Emacs major mode @code{rec-mode}
1302 for working with GNU Recutils text-based, human-editable databases. It
1303 supports editing, navigation, and querying of recutils database files
1304 including field and record folding.")))
1306 (define-public rocksdb
1313 (url "https://github.com/facebook/rocksdb")
1314 (commit (string-append "v" version))))
1315 (file-name (git-file-name name version))
1318 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1319 (modules '((guix build utils)))
1322 ;; TODO: unbundle gtest.
1323 (delete-file "build_tools/gnu_parallel")
1324 (substitute* "Makefile"
1325 (("build_tools/gnu_parallel") "parallel"))
1327 (build-system gnu-build-system)
1329 `(#:make-flags (list "CC=gcc" "V=1"
1330 ;; Ceph requires that RTTI is enabled.
1332 "date=1970-01-01" ; build reproducibly
1333 (string-append "INSTALL_PATH="
1334 (assoc-ref %outputs "out"))
1336 ;; Running the full test suite takes hours and require
1337 ;; a lot of disk space. Instead we only run a subset
1338 ;; (see .travis.yml and Makefile).
1339 "ROCKSDBTESTS_END=db_tailing_iter_test")
1340 #:test-target "check_some"
1341 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1342 ;; this upstream, but it's not going to be supported any time soon.
1343 #:tests? (let ((system ,(or (%current-target-system)
1344 (%current-system))))
1345 (or (string-prefix? "x86_64-linux" system)
1346 (string-prefix? "aarch64-linux" system)))
1348 (modify-phases %standard-phases
1349 (add-after 'unpack 'patch-Makefile
1351 (substitute* "Makefile"
1352 ;; Don't depend on the static library when installing.
1353 (("install: install-static")
1354 "install: install-shared")
1355 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1358 ;; The default target is only needed for tests and built on demand.
1360 (add-before 'check 'disable-optimizations
1362 ;; Prevent the build from passing '-march=native' to the compiler.
1363 (setenv "PORTABLE" "1")
1365 (add-before 'check 'disable-failing-tests
1367 (substitute* "Makefile"
1368 ;; These tests reliably fail due to "Too many open files".
1369 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1370 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1372 (add-after 'check 'build
1373 ;; The default build target is a debug build for tests. The
1374 ;; install target depends on the "shared_lib" release target
1375 ;; so we build it here for clarity.
1376 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1377 (apply invoke "make" "shared_lib"
1378 `(,@(if parallel-build?
1379 `("-j" ,(number->string (parallel-job-count)))
1383 `(("parallel" ,parallel)
1386 ("python" ,python-2)
1391 ("jemalloc" ,jemalloc)
1395 (home-page "https://rocksdb.org/")
1396 (synopsis "Persistent key-value store for fast storage")
1398 "RocksDB is a library that forms the core building block for a fast
1399 key-value server, especially suited for storing data on flash drives. It
1400 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1401 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1402 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1403 compactions, making it specially suitable for storing multiple terabytes of
1404 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1405 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1406 ;; files carry the 3-clause BSD license.
1407 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1409 (define-public sparql-query
1411 (name "sparql-query")
1416 (url "https://github.com/tialaramex/sparql-query")
1419 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1420 (file-name (git-file-name name version))))
1421 (build-system gnu-build-system)
1425 ("libxml2" ,libxml2)
1426 ("ncurses" ,ncurses)
1427 ("readline" ,readline)))
1429 `(("pkg-config" ,pkg-config)))
1431 `(#:make-flags '("CC=gcc")
1433 (modify-phases %standard-phases
1435 ;; The Makefile uses git to obtain versioning information. This phase
1436 ;; substitutes the git invocation with the package version.
1437 (add-after 'unpack 'remove-git-dependency
1439 (substitute* "Makefile"
1441 (string-append "gitrev = \"v" ,version "\"")))
1443 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1444 ;; This replacement does the same thing, except for using $PREFIX/bin
1447 (lambda* (#:key outputs #:allow-other-keys)
1448 (let* ((out (assoc-ref outputs "out"))
1449 (bin (string-append out "/bin")))
1450 (install-file "sparql-query" bin)
1451 (symlink (string-append bin "/sparql-query")
1452 (string-append bin "/sparql-update")))
1455 (lambda* (#:key make-flags #:allow-other-keys)
1456 (apply invoke "make" `(,@make-flags "scan-test"))
1457 (invoke "./scan-test"))))))
1458 (home-page "https://github.com/tialaramex/sparql-query/")
1459 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1460 (description "Sparql-query is a command-line tool for accessing SPARQL
1461 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1462 tools for interrogating SQL databases. For example, you can enter a query over
1463 several lines, using a semi-colon at the end of a line to indicate the end of
1464 your query. It also supports readline so that you can more easily recall and
1465 edit previous queries, even across sessions. It can be used non-interactively,
1466 for example from a shell script.")
1467 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1468 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1469 (license (list license:gpl3+))))
1471 (define-public sqitch
1479 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1482 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1483 (build-system perl-build-system)
1486 (modify-phases %standard-phases
1487 (add-before 'check 'set-check-environment
1490 (setenv "HOME" "/tmp")
1492 (add-after 'install 'wrap-program
1493 (lambda* (#:key outputs #:allow-other-keys)
1494 (let* ((out (assoc-ref outputs "out"))
1495 (path (getenv "PERL5LIB")))
1496 (wrap-program (string-append out "/bin/sqitch")
1497 `("PERL5LIB" ":" prefix
1498 (,(string-append out "/lib/perl5/site_perl"
1503 `(("perl-capture-tiny" ,perl-capture-tiny)
1504 ("perl-io-pager" ,perl-io-pager)
1505 ("perl-module-build" ,perl-module-build)
1506 ("perl-module-runtime" ,perl-module-runtime)
1507 ("perl-path-class" ,perl-path-class)
1508 ("perl-test-deep" ,perl-test-deep)
1509 ("perl-test-dir" ,perl-test-dir)
1510 ("perl-test-exception" ,perl-test-exception)
1511 ("perl-test-file" ,perl-test-file)
1512 ("perl-test-file-contents" ,perl-test-file-contents)
1513 ("perl-test-mockmodule" ,perl-test-mockmodule)
1514 ("perl-test-mockobject" ,perl-test-mockobject)
1515 ("perl-test-nowarnings" ,perl-test-nowarnings)
1516 ("perl-test-warn" ,perl-test-warn)))
1518 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1519 ("perl-clone" ,perl-clone)
1520 ("perl-config-gitlike" ,perl-config-gitlike)
1521 ("perl-datetime" ,perl-datetime)
1522 ("perl-datetime-timezone" ,perl-datetime-timezone)
1523 ("perl-dbd-mysql" ,perl-dbd-mysql)
1524 ("perl-dbd-pg" ,perl-dbd-pg)
1525 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1526 ("perl-dbi" ,perl-dbi)
1527 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1528 ("perl-encode-locale" ,perl-encode-locale)
1529 ("perl-hash-merge" ,perl-hash-merge)
1530 ("perl-ipc-run3" ,perl-ipc-run3)
1531 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1532 ("perl-libintl-perl" ,perl-libintl-perl)
1533 ("perl-list-moreutils" ,perl-list-moreutils)
1534 ("perl-moo" ,perl-moo)
1535 ("perl-mysql-config" ,perl-mysql-config)
1536 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1537 ("perl-path-class" ,perl-path-class)
1538 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1539 ("perl-string-formatter" ,perl-string-formatter)
1540 ("perl-string-shellquote" ,perl-string-shellquote)
1541 ("perl-sub-exporter" ,perl-sub-exporter)
1542 ("perl-template-tiny" ,perl-template-tiny)
1543 ("perl-template-toolkit" ,perl-template-toolkit)
1544 ("perl-throwable" ,perl-throwable)
1545 ("perl-try-tiny" ,perl-try-tiny)
1546 ("perl-type-tiny" ,perl-type-tiny)
1547 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1548 ("perl-uri" ,perl-uri)
1549 ("perl-uri-db" ,perl-uri-db)))
1550 (home-page "https://sqitch.org/")
1551 (synopsis "Database change management tool")
1553 "Sqitch is a standalone change management system for database schemas,
1554 which uses SQL to describe changes.")
1555 (license license:x11)))
1557 (define-public sqlcrush
1558 ;; Unfortunately, there is no proper upstream release and may never be.
1559 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1563 (version (git-version "0.1.5" revision commit))
1567 (url "https://github.com/coffeeandscripts/sqlcrush")
1569 (file-name (git-file-name name version))
1572 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1573 (build-system python-build-system)
1575 `(("python-cryptography" ,python-cryptography)
1576 ("python-psycopg2" ,python-psycopg2)
1577 ("python-pymysql" ,python-pymysql)
1578 ("python-sqlalchemy" ,python-sqlalchemy)))
1579 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1580 (synopsis "Text console-based database viewer and editor")
1582 "SQLcrush lets you view and edit a database directly from the text
1583 console through an ncurses interface. You can explore each table's structure,
1584 browse and edit the contents, add and delete entries, all while tracking your
1586 (license license:gpl3+)))) ; no headers, see README.md
1594 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1598 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1599 (build-system gnu-build-system)
1602 (modify-phases %standard-phases
1604 (lambda* (#:key outputs #:allow-other-keys)
1605 (let ((out (assoc-ref outputs "out")))
1606 ;; The 'configure' script is a wrapper for Waf and
1607 ;; doesn't recognize things like '--enable-fast-install'.
1608 (invoke "./configure"
1609 (string-append "--prefix=" out))))))))
1611 `(;; TODO: Build the documentation.
1612 ;; ("docbook-xsl" ,docbook-xsl)
1613 ;; ("libxml2" ,libxml2)
1614 ;; ("libxslt" ,libxslt)
1615 ("python" ,python) ;for the Waf build system
1617 (home-page "https://tdb.samba.org/")
1618 (synopsis "Trivial database")
1620 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1621 and BSD's DB except that it allows multiple simultaneous writers and uses
1622 locking internally to keep writers from trampling on each other. TDB is also
1624 (license license:lgpl3+)))
1626 (define-public perl-dbi
1633 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1637 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1638 (build-system perl-build-system)
1639 (synopsis "Database independent interface for Perl")
1640 (description "This package provides an database interface for Perl.")
1641 (home-page "https://metacpan.org/release/DBI")
1642 (license license:perl-license)))
1644 (define-public perl-dbix-class
1646 (name "perl-dbix-class")
1647 (version "0.082842")
1651 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1652 "DBIx-Class-" version ".tar.gz"))
1654 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1655 (build-system perl-build-system)
1657 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1658 ("perl-file-temp" ,perl-file-temp)
1659 ("perl-module-install" ,perl-module-install)
1660 ("perl-package-stash" ,perl-package-stash)
1661 ("perl-test-deep" ,perl-test-deep)
1662 ("perl-test-exception" ,perl-test-exception)
1663 ("perl-test-warn" ,perl-test-warn)))
1665 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1666 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1667 ("perl-class-inspector" ,perl-class-inspector)
1668 ("perl-config-any" ,perl-config-any)
1669 ("perl-context-preserve" ,perl-context-preserve)
1670 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1671 ("perl-data-page" ,perl-data-page)
1672 ("perl-dbi" ,perl-dbi)
1673 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1674 ("perl-hash-merge" ,perl-hash-merge)
1675 ("perl-module-find" ,perl-module-find)
1676 ("perl-moo" ,perl-moo)
1677 ("perl-mro-compat" ,perl-mro-compat)
1678 ("perl-namespace-clean" ,perl-namespace-clean)
1679 ("perl-path-class" ,perl-path-class)
1680 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1681 ("perl-scope-guard" ,perl-scope-guard)
1682 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1683 ("perl-sub-name" ,perl-sub-name)
1684 ("perl-text-balanced" ,perl-text-balanced)
1685 ("perl-try-tiny" ,perl-try-tiny)))
1686 (home-page "https://metacpan.org/release/DBIx-Class")
1687 (synopsis "Extensible and flexible object <-> relational mapper")
1688 (description "An SQL to OO mapper with an object API inspired by
1689 Class::DBI (with a compatibility layer as a springboard for porting) and a
1690 resultset API that allows abstract encapsulation of database operations. It
1691 aims to make representing queries in your code as perl-ish as possible while
1692 still providing access to as many of the capabilities of the database as
1693 possible, including retrieving related records from multiple tables in a
1694 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1695 \"ORDER BY\" and \"HAVING\" support.")
1696 (license license:perl-license)))
1698 (define-public perl-dbix-class-cursor-cached
1700 (name "perl-dbix-class-cursor-cached")
1701 (version "1.001004")
1705 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1706 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1709 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1710 (build-system perl-build-system)
1712 `(("perl-cache-cache" ,perl-cache-cache)
1713 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1714 ("perl-module-install" ,perl-module-install)))
1716 `(("perl-carp-clan" ,perl-carp-clan)
1717 ("perl-dbix-class" ,perl-dbix-class)))
1718 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1719 (synopsis "Cursor with built-in caching support")
1720 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1721 built-in caching support.")
1722 (license license:perl-license)))
1724 (define-public perl-dbix-class-introspectablem2m
1726 (name "perl-dbix-class-introspectablem2m")
1727 (version "0.001002")
1731 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1732 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1735 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1736 (build-system perl-build-system)
1738 `(("perl-module-install" ,perl-module-install)))
1740 `(("perl-dbix-class" ,perl-dbix-class)))
1741 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1742 (synopsis "Introspect many-to-many relationships")
1743 (description "Because the many-to-many relationships are not real
1744 relationships, they can not be introspected with DBIx::Class. Many-to-many
1745 relationships are actually just a collection of convenience methods installed
1746 to bridge two relationships. This DBIx::Class component can be used to store
1747 all relevant information about these non-relationships so they can later be
1748 introspected and examined.")
1749 (license license:perl-license)))
1751 (define-public perl-dbix-class-schema-loader
1753 (name "perl-dbix-class-schema-loader")
1758 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1759 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1762 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1763 (build-system perl-build-system)
1765 `(("perl-config-any" ,perl-config-any)
1766 ("perl-config-general" ,perl-config-general)
1767 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1768 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1769 ("perl-module-install" ,perl-module-install)
1770 ("perl-moose" ,perl-moose)
1771 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1772 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1773 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1774 ("perl-test-deep" ,perl-test-deep)
1775 ("perl-test-differences" ,perl-test-differences)
1776 ("perl-test-exception" ,perl-test-exception)
1777 ("perl-test-pod" ,perl-test-pod)
1778 ("perl-test-warn" ,perl-test-warn)))
1780 `(("perl-class-unload" ,perl-class-unload)
1781 ("perl-class-inspector" ,perl-class-inspector)
1782 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1783 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1784 ("perl-carp-clan" ,perl-carp-clan)
1785 ("perl-data-dump" ,perl-data-dump)
1786 ("perl-dbix-class" ,perl-dbix-class)
1787 ("perl-hash-merge" ,perl-hash-merge)
1788 ("perl-list-moreutils" ,perl-list-moreutils)
1789 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1790 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1791 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1792 ("perl-namespace-clean" ,perl-namespace-clean)
1793 ("perl-mro-compat" ,perl-mro-compat)
1794 ("perl-scope-guard" ,perl-scope-guard)
1795 ("perl-string-camelcase" ,perl-string-camelcase)
1796 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1797 ("perl-sub-name" ,perl-sub-name)
1798 ("perl-try-tiny" ,perl-try-tiny)))
1799 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1800 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1801 (synopsis "Create a DBIx::Class::Schema based on a database")
1802 (description "DBIx::Class::Schema::Loader automates the definition of a
1803 DBIx::Class::Schema by scanning database table definitions and setting up the
1804 columns, primary keys, unique constraints and relationships.")
1805 (license license:perl-license)))
1807 (define-public perl-dbd-pg
1809 (name "perl-dbd-pg")
1814 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1815 "DBD-Pg-" version ".tar.gz"))
1818 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1819 (build-system perl-build-system)
1821 `(("perl-dbi" ,perl-dbi)))
1823 `(("perl-dbi" ,perl-dbi)
1824 ("postgresql" ,postgresql)))
1825 (home-page "https://metacpan.org/release/DBD-Pg")
1826 (synopsis "DBI PostgreSQL interface")
1827 (description "This package provides a PostgreSQL driver for the Perl5
1828 @dfn{Database Interface} (DBI).")
1829 (license license:perl-license)))
1831 (define-public perl-dbd-mysql
1833 (name "perl-dbd-mysql")
1838 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1839 "DBD-mysql-" version ".tar.gz"))
1841 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1842 (build-system perl-build-system)
1845 (modify-phases %standard-phases
1846 (add-before 'configure 'skip-library-detection
1847 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1848 ;; are really only needed for the test suite; their absence does not
1849 ;; affect the build or the end result.
1851 (substitute* "Makefile.PL"
1852 (("use Devel::CheckLib;" match)
1853 (string-append "# " match))
1857 ;; Tests require running MySQL server.
1860 `(("perl-dbi" ,perl-dbi)
1861 ("mysql" ,mariadb "lib")
1862 ("mysql-dev" ,mariadb "dev")))
1863 (home-page "https://metacpan.org/release/DBD-mysql")
1864 (synopsis "DBI MySQL interface")
1865 (description "This package provides a MySQL driver for the Perl5
1866 @dfn{Database Interface} (DBI).")
1867 (license license:perl-license)))
1869 (define-public perl-dbd-sqlite
1871 (name "perl-dbd-sqlite")
1876 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1880 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
1881 (build-system perl-build-system)
1882 (inputs `(("sqlite" ,sqlite)))
1883 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1884 (synopsis "SQlite interface for Perl")
1885 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1886 the entire thing in the distribution. So in order to get a fast transaction
1887 capable RDBMS working for your Perl project you simply have to install this
1888 module, and nothing else.")
1889 (license license:perl-license)
1890 (home-page "https://metacpan.org/release/DBD-SQLite")))
1892 (define-public perl-mysql-config
1894 (name "perl-mysql-config")
1900 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1905 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1906 (build-system perl-build-system)
1907 (home-page "https://metacpan.org/release/MySQL-Config")
1908 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1910 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1911 libmysqlclient. It will fill an array with long options, ready to be parsed by
1912 @code{Getopt::Long}.")
1913 (license license:perl-license)))
1915 (define-public perl-sql-abstract
1917 (name "perl-sql-abstract")
1922 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1923 "SQL-Abstract-" version ".tar.gz"))
1925 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
1926 (build-system perl-build-system)
1928 `(("perl-module-install" ,perl-module-install)
1929 ("perl-test-deep" ,perl-test-deep)
1930 ("perl-test-exception" ,perl-test-exception)
1931 ("perl-test-warn" ,perl-test-warn)))
1933 `(("perl-hash-merge" ,perl-hash-merge)
1934 ("perl-moo" ,perl-moo)
1935 ("perl-mro-compat" ,perl-mro-compat)
1936 ("perl-text-balanced" ,perl-text-balanced)))
1937 (home-page "https://metacpan.org/release/SQL-Abstract")
1938 (synopsis "Generate SQL from Perl data structures")
1939 (description "This module was inspired by the excellent DBIx::Abstract.
1940 While based on the concepts used by DBIx::Abstract, the concepts used have
1941 been modified to make the SQL easier to generate from Perl data structures.
1942 The underlying idea is for this module to do what you mean, based on the data
1943 structures you provide it, so that you don't have to modify your code every
1944 time your data changes.")
1945 (license license:perl-license)))
1947 (define-public perl-sql-abstract-classic
1949 (name "perl-sql-abstract-classic")
1954 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1955 "SQL-Abstract-Classic-" version ".tar.gz"))
1957 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
1958 (build-system perl-build-system)
1960 `(("perl-test-deep" ,perl-test-deep)
1961 ("perl-test-exception" ,perl-test-exception)
1962 ("perl-test-warn" ,perl-test-warn)))
1964 `(("perl-mro-compat" ,perl-mro-compat)
1965 ("perl-sql-abstract" ,perl-sql-abstract)))
1966 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
1967 (synopsis "Generate SQL from Perl data structures")
1969 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
1970 to preserve the ability of users to opt into the new way of doing things in
1971 later versions according to their own schedules.
1973 It is an abstract SQL generation module based on the concepts used by
1974 @code{DBIx::Abstract}, with several important differences, especially when it
1975 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
1976 easier to generate from Perl data structures.
1978 The underlying idea is for this module to do what you mean, based on the data
1979 structures you provide it. You shouldn't have to modify your code every time
1980 your data changes, as this module figures it out.")
1981 (license license:perl-license)))
1983 (define-public perl-sql-splitstatement
1985 (name "perl-sql-splitstatement")
1990 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
1991 "SQL-SplitStatement-" version ".tar.gz"))
1994 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
1995 (build-system perl-build-system)
1997 `(("perl-test-exception" ,perl-test-exception)))
1999 `(("perl-class-accessor" ,perl-class-accessor)
2000 ("perl-list-moreutils" ,perl-list-moreutils)
2001 ("perl-regexp-common" ,perl-regexp-common)
2002 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2003 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2004 (synopsis "Split SQL code into atomic statements")
2005 (description "This module tries to split any SQL code, even including
2006 non-standard extensions, into the atomic statements it is composed of.")
2007 (license license:perl-license)))
2009 (define-public perl-sql-tokenizer
2011 (name "perl-sql-tokenizer")
2016 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2017 "SQL-Tokenizer-" version ".tar.gz"))
2020 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2021 (build-system perl-build-system)
2022 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2023 (synopsis "SQL tokenizer")
2024 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2025 claim to be a parser or query verifier. It just creates sane tokens from a
2027 (license license:perl-license)))
2029 (define-public unixodbc
2037 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2040 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2041 (build-system gnu-build-system)
2042 (synopsis "Data source abstraction library")
2043 (description "Unixodbc is a library providing an API with which to access
2044 data sources. Data sources include SQL Servers and any software with an ODBC
2046 (license license:lgpl2.1+)
2047 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2048 (home-page "http://www.unixodbc.org")))
2050 (define-public unqlite
2056 ;; Contains bug fixes against the official release, and has an
2057 ;; autotooled build system.
2058 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2060 "unqlite-unofficial-" version ".tar.gz"))
2063 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2064 (build-system gnu-build-system)
2065 (arguments `(#:tests? #f)) ;No check target
2066 (home-page "https://www.unqlite.org")
2067 (synopsis "In-memory key/value and document store")
2069 "UnQLite is an in-process software library which implements a
2070 self-contained, serverless, zero-configuration, transactional NoSQL
2071 database engine. UnQLite is a document store database similar to
2072 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2073 similar to BerkeleyDB, LevelDB, etc.")
2074 (license license:bsd-2)))
2076 (define-public redis
2082 (uri (string-append "http://download.redis.io/releases/redis-"
2086 "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9"))
2087 (modules '((guix build utils)))
2089 ;; Delete bundled jemalloc, as the package will use the libc one
2090 '(begin (delete-file-recursively "deps/jemalloc")
2092 (build-system gnu-build-system)
2094 `(("procps" ,procps) ; for tests
2095 ("tcl" ,tcl))) ; for tests
2098 (modify-phases %standard-phases
2100 (add-after 'unpack 'use-correct-tclsh
2101 (lambda* (#:key inputs #:allow-other-keys)
2102 (substitute* "runtest"
2104 (string-append "TCLSH="
2105 (assoc-ref inputs "tcl")
2108 (add-after 'unpack 'adjust-tests
2110 ;; Disable failing tests
2111 (substitute* "tests/test_helper.tcl"
2112 ((" integration/replication[^-]") "")
2113 ((" integration/replication-4") "")
2114 ((" integration/replication-psync") ""))
2116 #:make-flags `("CC=gcc"
2119 ,(string-append "PREFIX="
2120 (assoc-ref %outputs "out")))))
2121 (synopsis "Key-value cache and store")
2122 (description "Redis is an advanced key-value cache and store. Redis
2123 supports many data structures including strings, hashes, lists, sets, sorted
2124 sets, bitmaps and hyperloglogs.")
2125 (home-page "https://redis.io/")
2126 (license license:bsd-3)))
2128 (define-public kyotocabinet
2130 (name "kyotocabinet")
2134 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2135 "kyotocabinet-" version ".tar.gz"))
2138 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2139 (build-system gnu-build-system)
2143 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2144 (string-append "LDFLAGS=-Wl,-rpath="
2145 (assoc-ref %outputs "out") "/lib"))))
2146 (inputs `(("zlib" ,zlib)))
2147 (home-page "https://fallabs.com/kyotocabinet/")
2149 "Kyoto Cabinet is a modern implementation of the DBM database")
2151 "Kyoto Cabinet is a standalone file-based database that supports Hash
2152 and B+ Tree data storage models. It is a fast key-value lightweight
2153 database and supports many programming languages. It is a NoSQL database.")
2154 (license license:gpl3+)))
2156 (define-public tokyocabinet
2158 (name "tokyocabinet")
2163 (uri (string-append "http://fallabs.com/tokyocabinet/"
2164 name "-" version ".tar.gz"))
2167 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2168 (build-system gnu-build-system)
2171 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2172 (string-append "LDFLAGS=-Wl,-rpath="
2173 (assoc-ref %outputs "out") "/lib"))))
2176 (home-page "http://fallabs.com/tokyocabinet/")
2177 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2179 "Tokyo Cabinet is a library of routines for managing a database.
2180 The database is a simple data file containing records, each is a pair of a
2181 key and a value. Every key and value is serial bytes with variable length.
2182 Both binary data and character string can be used as a key and a value.
2183 There is neither concept of data tables nor data types. Records are
2184 organized in hash table, B+ tree, or fixed-length array.")
2185 (license license:lgpl2.1+)))
2187 (define-public wiredtiger
2194 "http://source.wiredtiger.com/releases/wiredtiger-"
2195 version ".tar.bz2"))
2198 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2199 (build-system gnu-build-system)
2201 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2203 (modify-phases %standard-phases
2204 (add-before 'check 'disable-test/fops
2206 ;; XXX: timed out after 3600 seconds of silence
2207 (substitute* "Makefile"
2213 ("snappy" ,snappy)))
2214 (home-page "http://source.wiredtiger.com/")
2215 (synopsis "NoSQL data engine")
2217 "WiredTiger is an extensible platform for data management. It supports
2218 row-oriented storage (where all columns of a row are stored together),
2219 column-oriented storage (where columns are stored in groups, allowing for
2220 more efficient access and storage of column subsets) and log-structured merge
2221 trees (LSM), for sustained throughput under random insert workloads.")
2222 (license license:gpl3) ; or GPL-2
2223 ;; configure.ac: WiredTiger requires a 64-bit build.
2224 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2226 (define-public wiredtiger-3
2228 (inherit wiredtiger)
2233 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2234 version ".tar.bz2"))
2237 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2239 (define-public guile-wiredtiger
2241 (name "guile-wiredtiger")
2246 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2247 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2248 (file-name (string-append name "-" version "-checkout"))
2251 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2252 (build-system gnu-build-system)
2254 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2256 (list (string-append "--with-libwiredtiger-prefix="
2257 (assoc-ref %build-inputs "wiredtiger")))
2258 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2260 `(("autoconf" ,autoconf)
2261 ("automake" ,automake)
2262 ("pkg-config" ,pkg-config)))
2264 `(("wiredtiger" ,wiredtiger-3)
2265 ("guile" ,guile-2.2)))
2267 `(("guile-bytestructures" ,guile-bytestructures)))
2268 (synopsis "WiredTiger bindings for GNU Guile")
2270 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2272 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2273 (license license:gpl3+)))
2275 (define-public perl-db-file
2277 (name "perl-db-file")
2282 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2285 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2286 (build-system perl-build-system)
2287 (inputs `(("bdb" ,bdb)))
2288 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2290 `(#:phases (modify-phases %standard-phases
2292 'configure 'modify-config.in
2293 (lambda* (#:key inputs #:allow-other-keys)
2294 (substitute* "config.in"
2295 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2297 (home-page "https://metacpan.org/release/DB_File")
2298 (synopsis "Perl5 access to Berkeley DB version 1.x")
2300 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2301 (license license:perl-license)))
2311 (url "https://git.openldap.org/openldap/openldap.git")
2312 (commit (string-append "LMDB_" version))))
2313 (file-name (git-file-name name version))
2315 (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as"))))
2316 (build-system gnu-build-system)
2318 `(#:test-target "test"
2320 (modify-phases %standard-phases
2322 (lambda* (#:key outputs #:allow-other-keys)
2323 (chdir "libraries/liblmdb")
2324 (substitute* "Makefile"
2325 (("/usr/local") (assoc-ref outputs "out")))
2327 (add-after 'install 'create-pkg-config-file
2328 (lambda* (#:key outputs #:allow-other-keys)
2329 (let ((out (assoc-ref outputs "out")))
2330 (mkdir-p (string-append out "/lib/pkgconfig"))
2331 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2333 (format #t "prefix=~a~@
2336 includedir=~a/include~@
2340 Description: Lightning Memory-Mapped Database library~@
2341 Libs: -L${libdir} -llmdb~@
2342 Cflags: -I${includedir}~%"
2343 out out out out ,version)))
2345 (home-page "https://symas.com/lmdb/")
2346 (synopsis "Lightning Memory-Mapped Database library")
2348 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2349 transactional database. Unlike more complex relational databases, LMDB handles
2350 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2351 underlying operating system for caching and locking, keeping the code small and
2353 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2354 disk-based databases with high read performance that scales linearly over
2355 multiple cores. The size of each database is limited only by the size of the
2356 virtual address space — not physical RAM.")
2357 (license license:openldap2.8)))
2359 (define-public lmdbxx
2362 (version "0.9.14.0")
2367 (url "https://github.com/drycpp/lmdbxx")
2369 (file-name (git-file-name name version))
2371 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2374 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2376 (modify-phases %standard-phases
2377 (delete 'configure))))
2378 (build-system gnu-build-system)
2379 (inputs `(("lmdb" ,lmdb)))
2380 (home-page "http://lmdbxx.sourceforge.net")
2381 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2382 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2383 @code{LMDB} embedded database library, offering both an error-checked
2384 procedural interface and an object-oriented resource interface with RAII
2386 (license license:unlicense)))
2388 (define-public libpqxx
2395 "http://pqxx.org/download/software/libpqxx/"
2396 name "-" version ".tar.gz"))
2399 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2400 (build-system gnu-build-system)
2402 `(("python" ,python-2)))
2403 (inputs `(("postgresql" ,postgresql)))
2405 `(#:tests? #f ; # FAIL: 1
2407 (modify-phases %standard-phases
2408 (add-before 'configure 'fix-sed-command
2410 ;; Newer sed versions error out if double brackets are not used.
2411 (substitute* "configure"
2412 (("\\[:space:\\]") "[[:space:]]"))
2414 (synopsis "C++ connector for PostgreSQL")
2416 "Libpqxx is a C++ library to enable user programs to communicate with the
2417 PostgreSQL database back-end. The database back-end can be local or it may be
2418 on another machine, accessed via TCP/IP.")
2419 (home-page "http://pqxx.org/")
2420 (license license:bsd-3)))
2422 (define-public python-peewee
2424 (name "python-peewee")
2429 (uri (pypi-uri "peewee" version))
2431 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2432 (build-system python-build-system)
2434 `(#:tests? #f)) ; fails to import test data
2436 `(("sqlite" ,sqlite)))
2438 `(("python-cython" ,python-cython)))
2439 (home-page "https://github.com/coleifer/peewee/")
2440 (synopsis "Small object-relational mapping utility")
2442 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2443 handles converting between pythonic values and those used by databases, so you
2444 can use Python types in your code without having to worry. It has built-in
2445 support for sqlite, mysql and postgresql. If you already have a database, you
2446 can autogenerate peewee models using @code{pwiz}, a model generator.")
2447 (license license:expat)))
2449 (define-public python2-peewee
2450 (package-with-python2 python-peewee))
2452 (define-public python-tortoise-orm
2454 (name "python-tortoise-orm")
2459 (uri (pypi-uri "tortoise-orm" version))
2462 "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
2463 (build-system python-build-system)
2465 `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
2467 #:phases (modify-phases %standard-phases
2468 (add-after 'unpack 'relax-version-requirements
2470 (substitute* "setup.py"
2471 (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
2472 (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite"))
2475 `(("python-asynctest" ,python-asynctest)
2476 ("python-nose2" ,python-nose2)))
2478 `(("python-aiosqlite" ,python-aiosqlite)
2479 ("python-pypika" ,python-pypika)
2480 ("python-ciso8601" ,python-ciso8601)
2481 ("python-typing-extensions"
2482 ,python-typing-extensions)))
2484 "https://github.com/tortoise/tortoise-orm")
2486 "Easy async ORM for python, built with relations in mind")
2488 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2489 inspired by Django. Tortoise ORM was build with relations in mind and
2490 admiration for the excellent and popular Django ORM. It’s engraved in its
2491 design that you are working not with just tables, you work with relational
2493 (license license:asl2.0)))
2495 (define-public sqlcipher
2502 (uri (string-append "https://github.com/sqlcipher/" name
2503 "/archive/v" version ".tar.gz"))
2505 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2506 (file-name (string-append name "-" version ".tar.gz"))))
2507 (build-system gnu-build-system)
2509 `(("libcrypto" ,openssl)
2510 ("libtcl8.6" ,tcl))) ; required for running the tests
2515 '("--enable-tempstore=yes"
2516 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2517 "LDFLAGS=-lcrypto -ltcl8.6"
2519 ;; tests cannot be run from the Makefile
2520 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2521 #:test-target "testfixture"
2523 (modify-phases %standard-phases
2524 (add-before 'check 'build-test-runner
2525 (assoc-ref %standard-phases 'check))
2528 (invoke "./testfixture" "test/crypto.test"))))))
2529 (home-page "https://www.zetetic.net/sqlcipher/")
2531 "Library providing transparent encryption of SQLite database files")
2532 (description "SQLCipher is an implementation of SQLite, extended to
2533 provide transparent 256-bit AES encryption of database files. Pages are
2534 encrypted before being written to disk and are decrypted when read back. It’s
2535 well suited for protecting embedded application databases and for mobile
2538 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2539 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2540 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2541 ;; source files are in the public domain.
2542 (license (list license:public-domain license:bsd-3))))
2544 (define-public python-pyodbc-c
2546 (name "python-pyodbc-c")
2551 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2552 "archive.tar.gz?ref=v" version))
2555 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2556 (file-name (string-append name "-" version ".tar.gz"))))
2557 (build-system python-build-system)
2559 `(("unixodbc" ,unixodbc)))
2561 `(;; No unit tests exist.
2563 (home-page "https://github.com/mkleehammer/pyodbc")
2564 (synopsis "Python ODBC Library")
2565 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2567 (license (license:x11-style "file://LICENSE.TXT"))))
2569 (define-public python2-pyodbc-c
2570 (package-with-python2 python-pyodbc-c))
2572 (define-public python-pyodbc
2574 (name "python-pyodbc")
2579 (uri (pypi-uri "pyodbc" version))
2581 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2582 (file-name (string-append name "-" version ".tar.gz"))))
2583 (build-system python-build-system)
2585 `(("unixodbc" ,unixodbc)))
2587 `(#:tests? #f)) ; no unit tests exist
2588 (home-page "https://github.com/mkleehammer/pyodbc")
2589 (synopsis "Python ODBC Library")
2590 (description "@code{python-pyodbc} provides a Python DB-API driver
2592 (license (license:x11-style "file:///LICENSE.TXT"))))
2594 (define-public python2-pyodbc
2595 (package-with-python2 python-pyodbc))
2597 (define-public mdbtools
2605 (url "https://github.com/brianb/mdbtools")
2607 (file-name (git-file-name name version))
2610 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2611 (build-system gnu-build-system)
2615 `(("autoconf" ,autoconf)
2616 ("automake" ,automake)
2617 ("libtool" ,libtool)
2618 ("pkg-config" ,pkg-config)
2619 ("txt2man" ,txt2man)
2621 (home-page "http://mdbtools.sourceforge.net/")
2622 (synopsis "Read Microsoft Access databases")
2623 (description "MDB Tools is a set of tools and applications to read the
2624 proprietary MDB file format used in Microsoft's Access database package. This
2625 includes programs to export schema and data from Microsoft's Access database
2626 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2627 etc., and an SQL engine for performing simple SQL queries.")
2628 (license (list license:lgpl2.0
2631 (define-public python-lmdb
2633 (name "python-lmdb")
2637 (uri (pypi-uri "lmdb" version))
2640 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2641 (modules '((guix build utils)))
2643 ;; Delete bundled lmdb source files.
2645 (for-each delete-file (list "lib/lmdb.h"
2650 (build-system python-build-system)
2655 (modify-phases %standard-phases
2656 (add-before 'build 'use-system-lmdb
2657 (lambda* (#:key inputs #:allow-other-keys)
2658 (let ((lmdb (assoc-ref inputs "lmdb")))
2659 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2660 (setenv "LMDB_FORCE_SYSTEM" "set")
2661 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2662 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2664 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2666 (home-page "https://github.com/dw/py-lmdb")
2667 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2669 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2670 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2672 (list license:openldap2.8
2673 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2674 ;; but not actually needed on platforms currently supported by Guix.
2677 (define-public python-orator
2679 (name "python-orator")
2683 (uri (pypi-uri "orator" version))
2686 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2687 (build-system python-build-system)
2688 ;; FIXME: Tests are not distributed with PyPI, and the repository
2689 ;; does not contain setup.py. How to test?
2690 (arguments '(#:tests? #f))
2692 `(("python-backpack" ,python-backpack)
2693 ("python-blinker" ,python-blinker)
2694 ("python-cleo" ,python-cleo)
2695 ("python-faker" ,python-faker)
2696 ("python-inflection" ,python-inflection)
2697 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2698 ("python-pendulum" ,python-pendulum)
2699 ("python-pyaml" ,python-pyaml)
2700 ("python-pygments" ,python-pygments)
2701 ("python-pyyaml" ,python-pyyaml)
2702 ("python-simplejson" ,python-simplejson)
2703 ("python-six" ,python-six)
2704 ("python-wrapt" ,python-wrapt)))
2705 (home-page "https://orator-orm.com/")
2706 (synopsis "ActiveRecord ORM for Python")
2708 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2709 implementation for Python.")
2710 (license license:expat)
2711 (properties `((python2-variant . ,(delay python2-orator))))))
2713 (define-public python2-orator
2714 (package-with-python2 (strip-python2-variant python-orator)))
2716 (define-public virtuoso-ose
2718 (name "virtuoso-ose")
2724 "https://github.com/openlink/virtuoso-opensource/releases/"
2725 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2727 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2728 (build-system gnu-build-system)
2730 `(#:tests? #f ; Tests require a network connection.
2731 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2732 ;; This indicates that the internal zlib code may still be used.
2733 #:configure-flags '("--without-internal-zlib"
2735 "--enable-static=no")
2737 (modify-phases %standard-phases
2738 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2739 ;; the build output. The following phase removes it.
2740 (add-after 'install 'remove-static-libs
2741 (lambda* (#:key outputs #:allow-other-keys)
2742 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2743 (for-each (lambda (file)
2744 (delete-file (string-append lib "/" file)))
2746 "libvirtuoso-t.la"))))))))
2748 `(("openssl" ,openssl-1.0)
2749 ("net-tools" ,net-tools)
2750 ("readline" ,readline)
2752 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2753 (synopsis "Multi-model database system")
2754 (description "Virtuoso is a scalable cross-platform server that combines
2755 relational, graph, and document data management with web application server
2756 and web services platform functionality.")
2757 ;; configure: error: ... can only be build on 64bit platforms
2758 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2759 (license license:gpl2)))
2761 (define-public python-ccm
2768 (uri (pypi-uri "ccm" version))
2771 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2772 (build-system python-build-system)
2774 `(("python-pyyaml" ,python-pyyaml)
2775 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2777 ("python-psutil" ,python-psutil)
2778 ("python-six" ,python-six)))
2779 (home-page "https://github.com/pcmanus/ccm")
2780 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2782 (description "Cassandra Cluster Manager is a development tool for testing
2783 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2785 (license license:asl2.0)))
2787 (define-public python2-ccm
2788 (package-with-python2 python-ccm))
2790 (define-public python2-pysqlite
2792 (name "python2-pysqlite")
2797 (uri (pypi-uri "pysqlite" version))
2800 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2801 (build-system python-build-system)
2803 `(("sqlite" ,sqlite)))
2805 `(#:python ,python-2 ; incompatible with Python 3
2806 #:tests? #f)) ; no test target
2807 (home-page "https://github.com/ghaering/pysqlite")
2808 (synopsis "SQLite bindings for Python")
2810 "Pysqlite provides SQLite bindings for Python that comply to the
2811 Database API 2.0T.")
2812 (license license:zlib)))
2814 (define-public python-sqlalchemy
2816 (name "python-sqlalchemy")
2821 (uri (pypi-uri "SQLAlchemy" version))
2823 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
2824 (build-system python-build-system)
2826 `(("python-cython" ,python-cython) ; for C extensions
2827 ("python-pytest" ,python-pytest)
2828 ("python-mock" ,python-mock))) ; for tests
2831 (modify-phases %standard-phases
2833 (lambda _ (invoke "py.test"))))))
2834 (home-page "https://www.sqlalchemy.org")
2835 (synopsis "Database abstraction library")
2837 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2838 gives application developers the full power and flexibility of SQL. It
2839 provides a full suite of well known enterprise-level persistence patterns,
2840 designed for efficient and high-performing database access, adapted into a
2841 simple and Pythonic domain language.")
2842 (license license:x11)))
2844 (define-public python2-sqlalchemy
2845 (package-with-python2 python-sqlalchemy))
2847 (define-public python-sqlalchemy-utils
2849 (name "python-sqlalchemy-utils")
2854 (uri (pypi-uri "SQLAlchemy-Utils" version))
2857 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2858 (build-system python-build-system)
2860 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2862 ;; (modify-phases %standard-phases
2865 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2867 `(("python-six" ,python-six)
2868 ("python-sqlalchemy" ,python-sqlalchemy)))
2870 `(("python-dateutil" ,python-dateutil)
2871 ("python-flexmock" ,python-flexmock)
2872 ("python-psycopg2" ,python-psycopg2)
2873 ("python-pytest" ,python-pytest)
2874 ("python-pytz" ,python-pytz)))
2875 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2876 (synopsis "Various utility functions for SQLAlchemy")
2878 "SQLAlchemy-utils provides various utility functions and custom data types
2879 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2881 You might also want to install the following optional dependencies:
2883 @item @code{python-passlib}
2884 @item @code{python-babel}
2885 @item @code{python-cryptography}
2886 @item @code{python-pytz}
2887 @item @code{python-psycopg2}
2888 @item @code{python-furl}
2889 @item @code{python-flask-babel}
2892 (license license:bsd-3)))
2894 (define-public python2-sqlalchemy-utils
2895 (package-with-python2 python-sqlalchemy-utils))
2897 (define-public python-alchemy-mock
2899 (name "python-alchemy-mock")
2901 (home-page "https://github.com/miki725/alchemy-mock")
2904 (uri (pypi-uri "alchemy-mock" version))
2907 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
2908 (build-system python-build-system)
2910 '(#:phases (modify-phases %standard-phases
2913 ;; Create pytest.ini that adds doctest options to
2914 ;; prevent test failure. Taken from tox.ini.
2915 (call-with-output-file "pytest.ini"
2917 (format port "[pytest]
2918 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
2920 (invoke "pytest" "-vv" "--doctest-modules"
2921 "alchemy_mock/"))))))
2923 `(("python-mock" ,python-mock)
2924 ("python-pytest" ,python-pytest)))
2926 `(("python-six" ,python-six)
2927 ("python-sqlalchemy" ,python-sqlalchemy)))
2928 (synopsis "Mock helpers for SQLAlchemy")
2930 "This package provides mock helpers for SQLAlchemy that makes it easy
2931 to mock an SQLAlchemy session while preserving the ability to do asserts.
2933 Normally Normally SQLAlchemy's expressions cannot be easily compared as
2934 comparison on binary expression produces yet another binary expression, but
2935 this library provides functions to facilitate such comparisons.")
2936 (license license:expat)))
2938 (define-public python-alembic
2940 (name "python-alembic")
2945 (uri (pypi-uri "alembic" version))
2947 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
2948 (build-system python-build-system)
2950 '(#:phases (modify-phases %standard-phases
2953 (invoke "pytest" "-vv"))))))
2955 `(("python-mock" ,python-mock)
2956 ("python-pytest-cov" ,python-pytest-cov)))
2958 `(("python-dateutil" ,python-dateutil)
2959 ("python-sqlalchemy" ,python-sqlalchemy)
2960 ("python-mako" ,python-mako)
2961 ("python-editor" ,python-editor)))
2962 (home-page "https://bitbucket.org/zzzeek/alembic")
2963 (synopsis "Database migration tool for SQLAlchemy")
2965 "Alembic is a lightweight database migration tool for usage with the
2966 SQLAlchemy Database Toolkit for Python.")
2967 (license license:expat)))
2969 (define-public python2-alembic
2970 (package-with-python2 python-alembic))
2972 (define-public python-pickleshare
2974 (name "python-pickleshare")
2979 (uri (pypi-uri "pickleshare" version))
2981 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
2982 (build-system python-build-system)
2984 `(#:phases (modify-phases %standard-phases
2987 (invoke "pytest"))))))
2989 `(("python-pytest" ,python-pytest)))
2990 (home-page "https://github.com/vivainio/pickleshare")
2991 (synopsis "Tiny key value database with concurrency support")
2993 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
2994 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
2995 shelve, many processes can access the database simultaneously. Changing a
2996 value in database is immediately visible to other processes accessing the same
2997 database. Concurrency is possible because the values are stored in separate
2998 files. Hence the “database” is a directory where all files are governed by
3000 (properties `((python2-variant . ,(delay python2-pickleshare))))
3001 (license license:expat)))
3003 (define-public python2-pickleshare
3004 (let ((pickleshare (package-with-python2
3005 (strip-python2-variant python-pickleshare))))
3006 (package (inherit pickleshare)
3007 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3008 ,@(package-propagated-inputs pickleshare))))))
3010 (define-public python-apsw
3012 (name "python-apsw")
3013 (version "3.31.1-r1")
3017 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3018 "/download/" version "/apsw-" version ".zip"))
3021 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3022 (build-system python-build-system)
3024 `(("unzip" ,unzip)))
3026 `(("sqlite" ,sqlite)))
3029 (modify-phases %standard-phases
3032 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3034 (add-after 'build 'build-test-helper
3036 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3037 "-I." "-Isqlite3" "src/testextension.c")
3040 (lambda* (#:key inputs outputs #:allow-other-keys)
3041 (add-installed-pythonpath inputs outputs)
3042 (invoke "python" "setup.py" "test")
3044 (home-page "https://github.com/rogerbinns/apsw/")
3045 (synopsis "Another Python SQLite Wrapper")
3046 (description "APSW is a Python wrapper for the SQLite
3047 embedded relational database engine. In contrast to other wrappers such as
3048 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3049 translate the complete SQLite API into Python.")
3050 (license license:zlib)))
3052 (define-public python2-apsw
3053 (package-with-python2 python-apsw))
3055 (define-public python-aiosqlite
3057 (name "python-aiosqlite")
3062 (uri (pypi-uri "aiosqlite" version))
3065 "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph"))))
3066 (build-system python-build-system)
3068 '(#:phases (modify-phases %standard-phases
3070 (lambda* (#:key tests? #:allow-other-keys)
3072 (invoke "python" "-m" "unittest" "aiosqlite.tests")
3073 (format #t "test suite not run~%"))
3076 `(("python-typing-extensions" ,python-typing-extensions)))
3078 `(("python-aiounittest" ,python-aiounittest)))
3079 (home-page "https://github.com/jreese/aiosqlite")
3081 "Asyncio bridge for sqlite3")
3083 "The package aiosqlite replicates the standard sqlite3 module, but with
3084 async versions of all the standard connection and cursor methods, and context
3085 managers for automatically closing connections.")
3086 (license license:expat)))
3088 (define-public python2-neo4j-driver
3090 (name "python2-neo4j-driver")
3091 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3095 (uri (pypi-uri "neo4j-driver" version))
3098 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3099 (build-system python-build-system)
3101 `(#:python ,python-2))
3102 (home-page "https://neo4j.com/developer/python/")
3103 (synopsis "Neo4j driver code written in Python")
3104 (description "This package provides the Neo4j Python driver that connects
3105 to the database using Neo4j's binary protocol. It aims to be minimal, while
3106 being idiomatic to Python.")
3107 (license license:asl2.0)))
3109 (define-public python2-py2neo
3111 (name "python2-py2neo")
3115 (uri (pypi-uri "py2neo" version))
3118 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3119 (build-system python-build-system)
3121 `(#:python ,python-2))
3122 (home-page "https://py2neo.org")
3123 (synopsis "Library and toolkit for working with Neo4j in Python")
3124 (description "This package provides a client library and toolkit for
3125 working with Neo4j from within Python applications and from the command
3126 line. The core library has no external dependencies and has been carefully
3127 designed to be easy and intuitive to use.")
3128 (license license:asl2.0)))
3130 (define-public python-psycopg2
3132 (name "python-psycopg2")
3137 (uri (pypi-uri "psycopg2" version))
3139 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3140 (build-system python-build-system)
3142 ;; Tests would require a postgresql database "psycopg2_test"
3143 ;; and a running postgresql database management service.
3144 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3146 `(("postgresql" ,postgresql))) ; libpq
3147 (home-page "http://initd.org/psycopg/")
3148 (synopsis "Python PostgreSQL adapter")
3150 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3152 (license license:lgpl3+)))
3154 (define-public python2-psycopg2
3155 (package-with-python2 python-psycopg2))
3157 (define-public python-sadisplay
3159 (name "python-sadisplay")
3164 (uri (pypi-uri "sadisplay" version))
3167 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3168 (build-system python-build-system)
3170 `(("python-sqlalchemy" ,python-sqlalchemy)))
3173 `(("python-nose" ,python-nose)))
3174 (home-page "https://bitbucket.org/estin/sadisplay")
3175 (synopsis "SQLAlchemy schema displayer")
3176 (description "This package provides a program to build Entity
3177 Relationship diagrams from a SQLAlchemy model (or directly from the
3179 (license license:bsd-3)))
3181 (define-public python2-sadisplay
3182 (package-with-python2 python-sadisplay))
3184 (define-public yoyo-migrations
3186 (name "yoyo-migrations")
3190 ;; We use the upstream repository, as the tests are not included in the
3194 (url "https://hg.sr.ht/~olly/yoyo")
3195 (changeset (string-append "v" version "-release"))))
3196 (file-name (string-append name "-" version "-checkout"))
3198 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3199 (build-system python-build-system)
3201 ;; XXX: Tests require a connection to some pgsql database and psycopg
3202 ;; fails to connect to it.
3205 `(("python-sqlparse" ,python-sqlparse)
3206 ("python-tabulate" ,python-tabulate)))
3207 (home-page "https://ollycope.com/software/yoyo/latest/")
3208 (synopsis "Database migrations with SQL")
3210 "Yoyo is a database schema migration tool. Migrations are written as SQL
3211 files or Python scripts that define a list of migration steps.")
3212 (license license:asl2.0)))
3214 (define-public python-mysqlclient
3216 (name "python-mysqlclient")
3221 (uri (pypi-uri "mysqlclient" version))
3224 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3225 (build-system python-build-system)
3226 (arguments '(#:tests? #f)) ;XXX: requires a live database
3228 `(("mysql-dev" ,mariadb "dev")))
3229 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3230 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3231 (description "MySQLdb is an interface to the popular MySQL database server
3232 for Python. The design goals are:
3234 @item Compliance with Python database API version 2.0 [PEP-0249],
3235 @item Thread-safety,
3236 @item Thread-friendliness (threads will not block each other).
3238 (license license:gpl2)))
3240 (define-public python-hiredis
3242 (name "python-hiredis")
3247 (uri (pypi-uri "hiredis" version))
3250 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3251 (build-system python-build-system)
3255 (home-page "https://github.com/redis/hiredis-py")
3256 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3257 (description "Python-hiredis is a python extension that wraps protocol
3258 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3259 (license license:bsd-3)))
3261 (define-public python2-hiredis
3262 (package-with-python2 python-hiredis))
3264 (define-public python-fakeredis
3266 (name "python-fakeredis")
3271 (uri (pypi-uri "fakeredis" version))
3274 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3275 (build-system python-build-system)
3280 `(("python-sortedcontainers" ,python-sortedcontainers)))
3281 (home-page "https://github.com/jamesls/fakeredis")
3282 (synopsis "Fake implementation of redis API for testing purposes")
3284 "Fakeredis is a pure-Python implementation of the redis-py Python client
3285 that simulates talking to a redis server. It was created for a single purpose:
3286 to write unit tests.
3288 Setting up redis is not hard, but one often wants to write unit tests that don't
3289 talk to an external server such as redis. This module can be used as a
3290 reasonable substitute.")
3291 (license license:bsd-3)))
3293 (define-public python2-fakeredis
3294 (package-with-python2 python-fakeredis))
3296 (define-public python-redis
3298 (name "python-redis")
3303 (uri (pypi-uri "redis" version))
3305 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3306 (build-system python-build-system)
3307 ;; Tests require a running Redis server.
3308 (arguments '(#:tests? #f))
3309 ;; As long as we are not running test, we do not need this input :-)
3311 ;; `(("python-pytest" ,python-pytest)))
3312 (home-page "https://github.com/andymccurdy/redis-py")
3313 (synopsis "Redis Python client")
3315 "This package provides a Python interface to the Redis key-value store.")
3316 (license license:expat)))
3318 (define-public python2-redis
3319 (package-with-python2 python-redis))
3321 (define-public python-rq
3329 (url "https://github.com/rq/rq")
3330 (commit (string-append "v" version))))
3331 (file-name (git-file-name name version))
3333 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3334 (build-system python-build-system)
3336 '(#:phases (modify-phases %standard-phases
3337 (add-before 'check 'start-redis
3339 (invoke "redis-server" "--daemonize" "yes")))
3341 (lambda* (#:key outputs #:allow-other-keys)
3342 (let ((out (assoc-ref outputs "out")))
3343 ;; Drop test that needs the SDK for Sentry.io.
3344 (delete-file "tests/test_sentry.py")
3345 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3346 (setenv "PATH" (string-append out "/bin:"
3348 (invoke "pytest" "-vv")))))))
3350 `(("python-mock" ,python-mock)
3351 ("python-pytest" ,python-pytest)
3354 `(("python-click" ,python-click)
3355 ("python-redis" ,python-redis)))
3356 (home-page "https://python-rq.org/")
3357 (synopsis "Simple job queues for Python")
3359 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3360 processing them in the background with workers. It is backed by Redis and it
3361 is designed to have a low barrier to entry.")
3362 (license license:bsd-2)))
3364 (define-public python-rq-scheduler
3366 (name "python-rq-scheduler")
3368 (home-page "https://github.com/rq/rq-scheduler")
3373 (commit (string-append "v" version))))
3374 (file-name (git-file-name name version))
3377 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3378 (build-system python-build-system)
3380 '(#:phases (modify-phases %standard-phases
3381 (add-before 'check 'start-redis
3383 (invoke "redis-server" "--daemonize" "yes")))
3386 (substitute* "run_tests.py"
3389 (invoke "./run_tests.py"))))))
3394 `(("python-croniter" ,python-croniter)
3395 ("python-rq" ,python-rq)))
3396 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3398 "This package provides job scheduling capabilities to @code{python-rq}
3400 (license license:expat)))
3402 (define-public python-trollius-redis
3404 (name "python-trollius-redis")
3409 (uri (pypi-uri "trollius_redis" version))
3412 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3413 (build-system python-build-system)
3414 ;; TODO: Tests require packaging 'hiredis'.
3415 (arguments '(#:tests? #f))
3416 (home-page "https://github.com/benjolitz/trollius-redis")
3417 (synopsis "Port of asyncio-redis to trollius")
3418 (description "@code{trollius-redis} is a Redis client for Python
3419 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3421 (license license:bsd-2)))
3423 (define-public python2-trollius-redis
3424 (package-with-python2 python-trollius-redis))
3426 (define-public python-sqlparse
3428 (name "python-sqlparse")
3432 (uri (pypi-uri "sqlparse" version))
3435 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3436 (build-system python-build-system)
3439 (modify-phases %standard-phases
3441 (lambda _ (invoke "py.test"))))))
3443 `(("python-pytest" ,python-pytest)))
3444 (home-page "https://github.com/andialbrecht/sqlparse")
3445 (synopsis "Non-validating SQL parser")
3446 (description "Sqlparse is a non-validating SQL parser for Python. It
3447 provides support for parsing, splitting and formatting SQL statements.")
3448 (license license:bsd-3)))
3450 (define-public python2-sqlparse
3451 (package-with-python2 python-sqlparse))
3453 (define-public python-sql
3460 (uri (pypi-uri "python-sql" version))
3462 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3463 (build-system python-build-system)
3464 (home-page "https://python-sql.tryton.org/")
3465 (synopsis "Library to write SQL queries in a pythonic way")
3466 (description "@code{python-sql} is a library to write SQL queries, that
3467 transforms idiomatic python function calls to well-formed SQL queries.")
3468 (license license:bsd-3)))
3470 (define-public python2-sql
3471 (package-with-python2 python-sql))
3473 (define-public python-pypika
3475 (name "python-pypika")
3478 (origin (method git-fetch)
3480 (url "https://github.com/kayak/pypika")
3481 (commit (string-append "v" version))))
3482 (file-name (git-file-name name version))
3485 "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549"))))
3486 (build-system python-build-system)
3488 `(("python-parameterized" ,python-parameterized)))
3489 (home-page "https://github.com/kayak/pypika")
3490 (synopsis "SQL query builder API for Python")
3492 "PyPika is a python SQL query builder that exposes the full richness of
3493 the SQL language using a syntax that reflects the resulting query.")
3494 (license license:asl2.0)))
3496 ;; There are many wrappers for this in other languages. When touching, please
3497 ;; be sure to ensure all dependencies continue to build.
3498 (define-public apache-arrow
3500 (name "apache-arrow")
3506 (url "https://github.com/apache/arrow")
3507 (commit (string-append "apache-arrow-" version))))
3508 (file-name (git-file-name name version))
3511 "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0"))))
3512 (build-system cmake-build-system)
3516 (modify-phases %standard-phases
3517 (add-before 'configure 'enter-source-directory
3518 (lambda _ (chdir "cpp") #t))
3519 (add-after 'unpack 'set-env
3521 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3522 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3523 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3524 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3526 #:build-type "Release"
3528 (list "-DARROW_PYTHON=ON"
3531 "-DARROW_PARQUET=ON"
3532 "-DPARQUET_BUILD_EXECUTABLES=ON"
3533 ;; The maintainers disallow using system versions of
3535 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3536 ;; is unfortunate because jemalloc increases performance:
3537 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3538 "-DARROW_JEMALLOC=OFF"
3540 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3541 ;; option that instructs the build system how to resolve
3542 ;; each dependency. SYSTEM = Finding the dependency in
3543 ;; system paths using CMake's built-in find_package
3544 ;; function, or using pkg-config for packages that do not
3545 ;; have this feature
3546 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3548 ;; Split output into its component packages.
3549 (string-append "-DCMAKE_INSTALL_PREFIX="
3550 (assoc-ref %outputs "lib"))
3551 (string-append "-DCMAKE_INSTALL_RPATH="
3552 (assoc-ref %outputs "lib")
3554 (string-append "-DCMAKE_INSTALL_BINDIR="
3555 (assoc-ref %outputs "out")
3557 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3558 (assoc-ref %outputs "include")
3562 "-DARROW_WITH_SNAPPY=ON"
3563 "-DARROW_WITH_ZLIB=ON"
3564 "-DARROW_WITH_ZSTD=ON"
3565 "-DARROW_WITH_LZ4=ON"
3566 "-DARROW_COMPUTE=ON"
3568 "-DARROW_DATASET=ON"
3569 "-DARROW_FILESYSTEM=ON"
3572 ;; Arrow Python C++ integration library (required for
3573 ;; building pyarrow). This library must be built against
3574 ;; the same Python version for which you are building
3575 ;; pyarrow. NumPy must also be installed. Enabling this
3576 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3577 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3581 ;; Building the tests forces on all the
3582 ;; optional features and the use of static
3584 "-DARROW_BUILD_TESTS=OFF"
3585 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3586 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3587 "-DARROW_BUILD_STATIC=OFF")))
3589 `(("apache-thrift" ,apache-thrift "lib")
3591 ("brotli" ,google-brotli)
3593 ("double-conversion" ,double-conversion)
3598 ("protobuf" ,protobuf)
3599 ("python-3" ,python)
3600 ("python-numpy" ,python-numpy)
3601 ("rapidjson" ,rapidjson)
3604 ("utf8proc" ,utf8proc)
3606 ("zstd" ,zstd "lib")))
3608 `(("pkg-config" ,pkg-config)))
3609 (outputs '("out" "lib" "include"))
3610 (home-page "https://arrow.apache.org/")
3611 (synopsis "Columnar in-memory analytics")
3612 (description "Apache Arrow is a columnar in-memory analytics layer
3613 designed to accelerate big data. It houses a set of canonical in-memory
3614 representations of flat and hierarchical data along with multiple
3615 language-bindings for structure manipulation. It also provides IPC and common
3616 algorithm implementations.")
3617 (license license:asl2.0)))
3619 (define-public python-pyarrow
3621 (inherit apache-arrow)
3622 (name "python-pyarrow")
3623 (build-system python-build-system)
3625 '(#:tests? #f ; XXX There are no tests in the "python" directory
3627 (modify-phases %standard-phases
3628 (delete 'build) ; XXX the build is performed again during the install phase
3629 (add-after 'unpack 'enter-source-directory
3630 (lambda _ (chdir "python") #t))
3631 (add-after 'unpack 'make-git-checkout-writable
3633 (for-each make-file-writable (find-files "."))
3636 `(("apache-arrow" ,apache-arrow "lib")
3637 ("python-numpy" ,python-numpy)
3638 ("python-pandas" ,python-pandas)
3639 ("python-six" ,python-six)))
3641 `(("cmake" ,cmake-minimal)
3642 ("pkg-config" ,pkg-config)
3643 ("python-cython" ,python-cython)
3644 ("python-pytest" ,python-pytest)
3645 ("python-pytest-runner" ,python-pytest-runner)
3646 ("python-setuptools-scm" ,python-setuptools-scm)))
3648 (home-page "https://arrow.apache.org/docs/python/")
3649 (synopsis "Python bindings for Apache Arrow")
3651 "This library provides a Pythonic API wrapper for the reference Arrow C++
3652 implementation, along with tools for interoperability with pandas, NumPy, and
3653 other traditional Python scientific computing packages.")
3654 (license license:asl2.0)))
3656 (define-public python-crate
3658 (name "python-crate")
3662 (uri (pypi-uri "crate" version))
3665 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3666 (build-system python-build-system)
3668 `(("python-urllib3" ,python-urllib3)))
3669 (home-page "https://github.com/crate/crate-python")
3670 (synopsis "CrateDB Python client")
3672 "This package provides a Python client library for CrateDB.
3673 It implements the Python DB API 2.0 specification and includes support for
3675 (license license:asl2.0)))
3677 (define-public libdbi
3683 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3684 version "/libdbi-" version ".tar.gz"))
3687 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3688 (build-system gnu-build-system)
3689 (synopsis "Database independent abstraction layer in C")
3691 "This library implements a database independent abstraction layer in C,
3692 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3693 programmers can leverage the power of multiple databases and multiple
3694 simultaneous database connections by using this framework.")
3695 (home-page "http://libdbi.sourceforge.net/")
3696 (license license:lgpl2.1+)))
3698 (define-public libdbi-drivers
3700 (name "libdbi-drivers")
3704 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3705 "libdbi-drivers/libdbi-drivers-" version
3706 "/libdbi-drivers-" version ".tar.gz"))
3709 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3710 (build-system gnu-build-system)
3713 ("inetutils" ,inetutils)
3714 ("glibc-locales" ,glibc-locales)
3715 ("mariadb" ,mariadb)))
3717 `(("libdbi" ,libdbi)
3718 ("mariadb:dev" ,mariadb "dev")
3719 ("mariadb:lib" ,mariadb "lib")
3720 ("postgresql" ,postgresql)
3721 ("sqlite" ,sqlite)))
3724 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3725 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3726 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3727 (postgresql (assoc-ref %build-inputs "postgresql"))
3728 (sqlite (assoc-ref %build-inputs "sqlite")))
3729 (list "--disable-docs"
3730 (string-append "--with-dbi-incdir=" libdbi "/include")
3731 (string-append "--with-dbi-libdir=" libdbi "/lib")
3733 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3734 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3736 (string-append "--with-pgsql-incdir=" postgresql "/include")
3737 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3739 (string-append "--with-sqlite-incdir=" sqlite "/include")
3740 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3741 #:tests? #f ; FIXME: Find why the tests get stuck forever.
3743 (modify-phases %standard-phases
3744 (add-after 'unpack 'fix-tests
3745 (lambda* (#:key inputs #:allow-other-keys)
3746 (substitute* "tests/test_mysql.sh"
3748 (string-append "MYMYSQLD="
3749 (assoc-ref inputs "mariadb")
3752 (add-after 'install 'remove-empty-directories
3753 (lambda* (#:key outputs #:allow-other-keys)
3754 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3755 (delete-file-recursively var))
3757 (synopsis "Database drivers for the libdbi framework")
3759 "The @code{libdbi-drivers} library provides the database specific drivers
3760 for the @code{libdbi} framework.
3762 The drivers officially supported by @code{libdbi} are:
3768 (home-page "http://libdbi-drivers.sourceforge.net/")
3769 (license license:lgpl2.1+)))
3778 (url "https://github.com/SOCI/soci/")
3780 (file-name (git-file-name name version))
3783 "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp"))))
3784 (build-system cmake-build-system)
3786 `(("firebird" ,firebird)
3787 ("postgresql" ,postgresql)
3791 ("mariadb:dev" ,mariadb "dev")))
3794 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
3795 (list "-DCMAKE_CXX_STANDARD=17"
3796 "-DSOCI_LIBDIR=lib")
3797 #:tests? #f)) ; may require running database management systems
3798 (synopsis "C++ Database Access Library")
3800 "SOCI is an abstraction layer for several database backends, including
3801 PostreSQL, SQLite, ODBC and MySQL.")
3802 (home-page "http://soci.sourceforge.net/")
3803 (license license:boost1.0)))
3805 (define-public freetds
3812 (uri (string-append "https://www.freetds.org/files/stable/"
3813 "freetds-" version ".tar.gz"))
3815 (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50"))))
3816 (build-system gnu-build-system)
3818 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
3819 ;; disabled for now.
3821 (home-page "https://www.freetds.org/")
3822 (synopsis "Client libraries for MS SQL and Sybase servers")
3824 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
3825 connecting to MS SQL and Sybase servers over TCP/IP.")
3826 (license license:lgpl2.0+)))