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>
51 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
53 ;;; This file is part of GNU Guix.
55 ;;; GNU Guix is free software; you can redistribute it and/or modify it
56 ;;; under the terms of the GNU General Public License as published by
57 ;;; the Free Software Foundation; either version 3 of the License, or (at
58 ;;; your option) any later version.
60 ;;; GNU Guix is distributed in the hope that it will be useful, but
61 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
62 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63 ;;; GNU General Public License for more details.
65 ;;; You should have received a copy of the GNU General Public License
66 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
68 (define-module (gnu packages databases)
69 #:use-module (gnu packages)
70 #:use-module (gnu packages admin)
71 #:use-module (gnu packages algebra)
72 #:use-module (gnu packages autotools)
73 #:use-module (gnu packages avahi)
74 #:use-module (gnu packages base)
75 #:use-module (gnu packages bash)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages boost)
78 #:use-module (gnu packages check)
79 #:use-module (gnu packages cmake)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages crypto)
82 #:use-module (gnu packages curl)
83 #:use-module (gnu packages cyrus-sasl)
84 #:use-module (gnu packages dbm)
85 #:use-module (gnu packages emacs)
86 #:use-module (gnu packages flex)
87 #:use-module (gnu packages gcc)
88 #:use-module (gnu packages gettext)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages gnupg)
91 #:use-module (gnu packages golang)
92 #:use-module (gnu packages guile)
93 #:use-module (gnu packages icu4c)
94 #:use-module (gnu packages jemalloc)
95 #:use-module (gnu packages language)
96 #:use-module (gnu packages libedit)
97 #:use-module (gnu packages libevent)
98 #:use-module (gnu packages linux)
99 #:use-module (gnu packages lisp)
100 #:use-module (gnu packages lisp-xyz)
101 #:use-module (gnu packages logging)
102 #:use-module (gnu packages man)
103 #:use-module (gnu packages maths)
104 #:use-module (gnu packages multiprecision)
105 #:use-module (gnu packages ncurses)
106 #:use-module (gnu packages onc-rpc)
107 #:use-module (gnu packages parallel)
108 #:use-module (gnu packages pcre)
109 #:use-module (gnu packages perl)
110 #:use-module (gnu packages perl-check)
111 #:use-module (gnu packages perl-web)
112 #:use-module (gnu packages pkg-config)
113 #:use-module (gnu packages popt)
114 #:use-module (gnu packages protobuf)
115 #:use-module (gnu packages python)
116 #:use-module (gnu packages python-crypto)
117 #:use-module (gnu packages python-science)
118 #:use-module (gnu packages python-web)
119 #:use-module (gnu packages python-xyz)
120 #:use-module (gnu packages rdf)
121 #:use-module (gnu packages readline)
122 #:use-module (gnu packages regex)
123 #:use-module (gnu packages rpc)
124 #:use-module (gnu packages ruby)
125 #:use-module (gnu packages serialization)
126 #:use-module (gnu packages sphinx)
127 #:use-module (gnu packages sqlite)
128 #:use-module (gnu packages tcl)
129 #:use-module (gnu packages terminals)
130 #:use-module (gnu packages textutils)
131 #:use-module (gnu packages time)
132 #:use-module (gnu packages tls)
133 #:use-module (gnu packages valgrind)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages xml)
136 #:use-module ((guix licenses) #:prefix license:)
137 #:use-module (guix packages)
138 #:use-module (guix download)
139 #:use-module (guix bzr-download)
140 #:use-module (guix git-download)
141 #:use-module (guix hg-download)
142 #:use-module (guix build-system emacs)
143 #:use-module (guix build-system gnu)
144 #:use-module (guix build-system go)
145 #:use-module (guix build-system perl)
146 #:use-module (guix build-system python)
147 #:use-module (guix build-system ruby)
148 #:use-module (guix build-system cmake)
149 #:use-module (guix build-system scons)
150 #:use-module (guix build-system trivial)
151 #:use-module (guix utils)
152 #:use-module (srfi srfi-1)
153 #:use-module (srfi srfi-26)
154 #:use-module (ice-9 match))
156 (define-public 4store
163 (url "https://github.com/4store/4store")
164 (commit (string-append "v" version))))
165 (file-name (git-file-name name version))
167 (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk"))
168 (patches (search-patches "4store-unset-preprocessor-directive.patch"
169 "4store-fix-buildsystem.patch"))))
170 (build-system gnu-build-system)
174 ("autoconf" ,autoconf)
175 ("automake" ,automake)
176 ("gettext" ,gettext-minimal)
178 ("pcre" ,pcre "bin") ;for 'pcre-config'
179 ("pkg-config" ,pkg-config)))
185 ("readline" ,readline)
187 ("cyrus-sasl" ,cyrus-sasl)
189 ("util-linux" ,util-linux "lib")))
190 ;; http://www.4store.org has been down for a while now.
191 (home-page "https://github.com/4store/4store")
192 (synopsis "Clustered RDF storage and query engine")
193 (description "4store is a RDF/SPARQL store written in C, supporting
194 either single machines or networked clusters.")
195 (license license:gpl3+)))
197 (define-public ephemeralpg
205 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
208 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
209 (build-system gnu-build-system)
211 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
212 (string-append "PREFIX=" %output))
214 (modify-phases %standard-phases
215 (delete 'configure) ; no configure script
216 (add-after 'install 'wrap
217 (lambda* (#:key inputs outputs #:allow-other-keys)
218 (let ((out (assoc-ref outputs "out")))
219 (wrap-program (string-append out "/bin/pg_tmp")
221 (,(string-append (assoc-ref inputs "util-linux")
223 ,(string-append (assoc-ref inputs "postgresql")
226 ,(string-append out "/bin")))))
228 #:test-target "test"))
230 `(("postgresql" ,postgresql)
231 ("util-linux" ,util-linux)))
236 (home-page "https://eradman.com/ephemeralpg/")
237 (synopsis "Run temporary PostgreSQL databases")
239 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
240 like running software test suites. Temporary databases created with
241 @code{pg_tmp} have a limited shared memory footprint and are automatically
242 garbage-collected after a configurable number of seconds (the default is
244 (license license:isc)))
246 (define-public es-dump-restore
248 (name "es-dump-restore")
253 (uri (rubygems-uri "es_dump_restore" version))
256 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
257 (build-system ruby-build-system)
259 '(#:tests? #f)) ;; No testsuite.
261 `(("ruby-httpclient" ,ruby-httpclient)
262 ("ruby-multi-json" ,ruby-multi-json)
263 ("ruby-progress_bar" ,ruby-progress_bar)
264 ("ruby-rubyzip" ,ruby-rubyzip)
265 ("ruby-thor" ,ruby-thor)))
266 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
268 "This package provides a utility for dumping the contents of an
269 ElasticSearch index to a compressed file and restoring the dumpfile back to an
270 ElasticSearch server")
271 (home-page "https://github.com/patientslikeme/es_dump_restore")
272 (license license:expat)))
274 (define-public firebird
279 (let ((revision "33374-0"))
282 (uri (string-append "https://github.com/FirebirdSQL/"
283 "firebird/releases/download/R"
284 (string-replace-substring version "." "_") "/"
285 "Firebird-" version "." revision ".tar.bz2"))
287 (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c"))
288 (modules '((guix build utils)))
292 delete-file-recursively
293 (list "extern/btyacc/test" ; TODO: package and remove entirely
298 "src/include/firebird/impl/boost"
301 "builds/install/arch-specific/solaris"
303 "src/msgs/templates.sql"
305 ;; Generated files missing sources.
306 "doc/Firebird-3-QuickStart.pdf"
307 (string-append "doc/Firebird-" ,version
309 "doc/README.SecureRemotePassword.html"))
311 (build-system gnu-build-system)
312 (outputs (list "debug" "out"))
315 (let ((out (assoc-ref %outputs "out")))
316 (list (string-append "--with-fbsbin=" out "/sbin")
317 (string-append "--with-fbdoc=" out "/share/doc/"
319 (string-append "--with-fbconf=" out "/lib/firebird")
320 (string-append "--with-fbintl=" out "/lib/firebird/intl")
321 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
322 (string-append "--with-fbmsg=" out "/lib/firebird")
323 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
324 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
325 "--with-fbglock=/run/firebird"
326 "--with-fblog=/var/log/firebird"
327 "--with-fbhelp=/var/lib/firebird/system"
328 "--with-fbsecure-db=/var/lib/firebird/secure"
330 "--without-fbsample-db"
331 "--with-system-editline"))
333 (list (string-append "CC=" ,(cc-for-target))
334 ;; The plugins/ can't find libfbclient otherwise.
335 (string-append "LDFLAGS=-Wl,-rpath="
336 (assoc-ref %outputs "out") "/lib"))
337 #:tests? #f ; no test suite
338 #:modules ((guix build gnu-build-system)
342 (modify-phases %standard-phases
343 (add-after 'unpack 'use-system-boost
345 (substitute* "src/include/firebird/Message.h"
346 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
347 "<boost/preprocessor/seq/for_each_i.hpp>")
348 (("FB_BOOST_") "BOOST_"))
350 (add-after 'unpack 'patch-installation
353 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
354 (("/bin/sh") (which "bash"))
355 ;; Remove shell script helpers from $PATH.
356 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
357 ;; Put files where Guix users expect them.
358 (("(License\\.txt.*)@FB_CONFDIR" match)
359 (string-append match "@FB_DOCDIR@"))
360 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
361 (string-append "@FB_DOCDIR@" match))
362 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
363 (string-append head "@FB_DOCDIR@" tail "\n")))
365 (list "builds/install/posix-common/changeServerMode.sh.in"
366 "builds/install/posix-common/install.sh.in")
367 ;; Skip phases that (could) cause problems in Guix.
368 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
370 ;; Skip phases that are merely pointless on Guix.
371 (("buildUninstallFile|installInitdScript|startFirebird") ":")
372 ;; Omit randomly generated password with bonus timestamp.
373 (("setDBAPassword") ":"))
375 ;; These promote proprietary workflows not relevant on Guix.
376 (for-each delete-file-recursively
377 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))
379 (add-after 'configure 'delete-init-scripts
381 (delete-file-recursively "gen/install/misc")
383 (add-before 'build 'set-build-environment-variables
385 ;; ‘isql’ needs to run & find libfbclient.so during the build.
386 ;; This doubles as a rudimentary test in lieu of a test suite.
387 (setenv "LD_LIBRARY_PATH"
388 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))
390 (add-before 'install 'keep-embedded-debug-symbols
392 ;; Let the gnu-build-system separate & deal with them later.
393 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
394 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
395 (substitute* "gen/Makefile.install"
396 (("readelf") "false"))
398 (add-after 'install 'prune-undesirable-files
399 (lambda* (#:key outputs #:allow-other-keys)
400 (let ((out (assoc-ref outputs "out")))
401 (with-directory-excursion out
402 ;; Remove example binaries.
403 (for-each delete-file-recursively
404 (find-files "." "example"))
405 ;; Delete (now-)empty directories.
407 (list "include/firebird/impl"
408 "lib/firebird/plugins/udr"))
412 ("editline" ,editline)
414 ("libtommath" ,libtommath)
417 (home-page "https://www.firebirdsql.org")
418 (synopsis "Relational database with many ANSI SQL standard features")
420 "Firebird is an SQL @acronym{RDBMS, relational database management system}
421 with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
422 @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
423 triggers. Transactions provide full ACID-compliant referential integrity.
425 The database requires very little manual maintenance once set up, making it
426 ideal for small business or embedded use.
428 When installed as a traditional local or remote (network) database server,
429 Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
430 may be a better choice for such very large environments.
432 Firebird can also be embedded into stand-alone applications that don't want or
433 need a full client & server. Used in this manner, it offers richer SQL support
434 than SQLite as well as the option to seamlessly migrate to a client/server
437 `((lint-hidden-cve . ("CVE-2017-6369"))))
439 ;; See doc/license/README.license.usage.txt for rationale & details.
440 (list license:bsd-3 ; src/common/sha2/
441 license:bsd-4 ; src/common/enc.cpp
442 license:gpl2+ ; builds/posix/make.defaults
443 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
444 "InterBase Public License v1.0")
445 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
446 "Initial Developer's Public License v1.0")
447 license:lgpl2.1 ; exception for OSI-compatible licences
448 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
449 license:public-domain)))) ; including files without explicit licence
451 (define-public leveldb
458 (url "https://github.com/google/leveldb")
460 (file-name (git-file-name name version))
463 "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7"))))
464 (build-system cmake-build-system)
466 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON")))
468 `(("snappy" ,snappy)))
469 (home-page "https://github.com/google/leveldb")
470 (synopsis "Fast key-value storage library")
472 "LevelDB is a fast key-value storage library that provides an ordered
473 mapping from string keys to string values.")
474 (license license:bsd-3)))
476 (define-public memcached
484 "https://memcached.org/files/memcached-" version ".tar.gz"))
486 (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
487 (build-system gnu-build-system)
489 `(("libevent" ,libevent)
490 ("cyrus-sasl" ,cyrus-sasl)))
491 (home-page "https://memcached.org/")
492 (synopsis "In-memory caching service")
493 (description "Memcached is an in-memory key-value store. It has a small
494 and generic API, and was originally intended for use with dynamic web
496 (license license:bsd-3)))
498 (define-public libmemcached
500 (name "libmemcached")
502 ;; We build from the sources since we want to build the extra HTML
503 ;; documentation which is not included with the release.
507 (url "lp:libmemcached/1.0")
508 (revision (string-append "tag:" version))))
509 (file-name (string-append name "-" version "-checkout"))
512 "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10"))
514 (search-patches "libmemcached-build-with-gcc7.patch"))))
515 (build-system gnu-build-system)
517 `(("memcached" ,memcached)
519 ("autoconf" ,autoconf)
520 ("automake" ,automake)
524 ("python-sphinx" ,python-sphinx))) ;to build the HTML doc.
526 `(("libevent" ,libevent)
527 ("cyrus-sasl" ,cyrus-sasl)))
528 (outputs '("out" "doc"))
530 '(#:tests? #f ;many tests fail and use too much time
532 (modify-phases %standard-phases
533 (add-before 'bootstrap 'fix-configure.ac
534 ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we
535 ;; get the error ``configure: error: cannot find install-sh,
536 ;; install.sh, or shtool in "." "./.." "./../.."`` (see:
537 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and
538 ;; https://bugs.launchpad.net/libmemcached/+bug/1803922).
540 (delete-file "bootstrap.sh") ;not useful in the context of Guix
541 (substitute* "configure.ac"
542 (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "")
543 (("^AC_INIT.*" anchor)
544 (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n")))))
545 (add-before 'build 'build-and-install-html-doc
546 (lambda* (#:key outputs #:allow-other-keys)
547 (let ((html (string-append (assoc-ref outputs "doc")
548 "/share/doc/libmemcached/html/")))
549 (invoke "make" "install-html")
550 ;; Cleanup useless files.
551 (for-each delete-file-recursively
552 (map (lambda (x) (string-append html x))
553 '("_sources" ".doctrees" ".buildinfo")))))))))
554 (home-page "https://libmemcached.org/libMemcached.html")
555 (synopsis "C++ library for memcached")
556 (description "libMemcached is a library to use memcached in C/C++
557 applications. It comes with a complete reference guide and documentation of
558 the API, and provides features such as:
560 @item Asynchronous and synchronous transport support
561 @item Consistent hashing and distribution
562 @item Tunable hashing algorithm to match keys
563 @item Access to large object support
564 @item Local replication
566 (license license:bsd-3)))
568 (define-public python-pylibmc
570 (name "python-pylibmc")
575 (uri (pypi-uri "pylibmc" version))
577 (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca"))))
578 (build-system python-build-system)
581 (modify-phases %standard-phases
582 (add-before 'check 'start-memcached-daemon
583 ;; The test suite requires a memcached server.
585 (invoke "memcached" "-d"))))))
587 `(("memcached" ,memcached)
588 ("python-nose" ,python-nose)))
590 `(("libmemcached" ,libmemcached)
592 ("cyrus-sasl" ,cyrus-sasl)))
593 (home-page "http://sendapatch.se/projects/pylibmc/")
594 (synopsis "Python client for memcached")
596 "@code{pylibmc} is a client in Python for memcached. It is a wrapper
597 around TangentOrg’s libmemcached library, and can be used as a drop-in
598 replacement for the code@{python-memcached} library.")
599 (license license:bsd-3)))
601 (define-public python2-pylibmc
602 (package-with-python2 python-pylibmc))
611 (uri (pypi-uri "mycli" version))
613 (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv"))))
614 (build-system python-build-system)
616 `(#:tests? #f)) ; tests expect a running MySQL
618 `(("python-cli-helpers" ,python-cli-helpers)
619 ("python-click" ,python-click)
620 ("python-configobj" ,python-configobj)
621 ("python-cryptography" ,python-cryptography)
622 ("python-prompt-toolkit" ,python-prompt-toolkit)
623 ("python-pygments" ,python-pygments)
624 ("python-pymysql" ,python-pymysql)
625 ("python-sqlparse" ,python-sqlparse)))
626 (home-page "http://mycli.net")
628 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
630 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
631 auto-completion and syntax highlighting.")
632 (license license:bsd-3)))
634 ;; XXX When updating, check whether boost-for-mysql is still needed.
635 ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past.
642 (uri (list (string-append
643 "https://dev.mysql.com/get/Downloads/MySQL-"
644 (version-major+minor version) "/"
645 name "-" version ".tar.gz")
647 "https://downloads.mysql.com/archives/get/file/"
648 name "-" version ".tar.gz")))
651 "1bb343mf7n0qg2qz497gxjsqprygrjz1q1pbz76hgqxnsy08sfxd"))))
652 (build-system cmake-build-system)
655 '("-DBUILD_CONFIG=mysql_release"
658 "-DDEFAULT_CHARSET=utf8"
659 "-DDEFAULT_COLLATION=utf8_general_ci"
660 "-DMYSQL_DATADIR=/var/lib/mysql"
661 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
662 "-DINSTALL_INFODIR=share/mysql/docs"
663 "-DINSTALL_MANDIR=share/man"
664 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
665 "-DINSTALL_SCRIPTDIR=bin"
666 "-DINSTALL_INCLUDEDIR=include/mysql"
667 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
668 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
669 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
670 "-DINSTALL_DOCDIR=share/mysql/docs"
671 "-DINSTALL_SHAREDIR=share/mysql"
672 ;; Get rid of test data.
673 "-DINSTALL_MYSQLTESTDIR="
674 "-DINSTALL_SQLBENCHDIR=")
675 #:phases (modify-phases %standard-phases
677 'install 'remove-extra-binaries
678 (lambda* (#:key outputs #:allow-other-keys)
679 (let ((out (assoc-ref outputs "out")))
680 ;; Remove the 3 *_embedded files, which weigh in at
682 (for-each delete-file
683 (find-files (string-append out "/bin")
689 ("pkg-config" ,pkg-config)))
691 `(("boost" ,boost-for-mysql)
693 ("libtirpc" ,libtirpc)
696 ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen
698 (home-page "https://www.mysql.com/")
699 (synopsis "Fast, easy to use, and popular database")
701 "MySQL is a fast, reliable, and easy to use relational database
702 management system that supports the standardized Structured Query
704 (license license:gpl2)))
706 (define-public mariadb
712 (uri (string-append "https://downloads.mariadb.com/MariaDB"
713 "/mariadb-" version "/source/mariadb-"
717 "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
718 (modules '((guix build utils)))
721 ;; Delete bundled snappy and xz.
722 (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
723 (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
724 ;; This file checks that the bundled sources are present and
725 ;; declares build procedures for them.
726 (("^include\\(TokuThirdParty\\)") ""))
727 (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
728 ;; Don't attempt to use the procedures we just removed.
729 ((" build_lzma build_snappy") ""))
731 ;; Preserve CMakeLists.txt for these.
732 (for-each (lambda (file)
733 (unless (string-suffix? "CMakeLists.txt" file)
735 (append (find-files "extra/wolfssl")
736 (find-files "zlib")))
738 (replacement mariadb/fixed)
739 (build-system cmake-build-system)
740 (outputs '("out" "lib" "dev"))
744 "-DBUILD_CONFIG=mysql_release"
745 ;; Linking with libarchive fails, like this:
747 ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
748 ;; relocation R_X86_64_32 against `.bss' can not be used when
749 ;; making a shared object; recompile with -fPIC
751 ;; For now, disable the features that that use libarchive (xtrabackup).
752 "-DWITH_LIBARCHIVE=OFF"
754 ;; Disable the TokuDB engine, because its test suite frequently fails,
755 ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
758 ;; Ensure the system libraries are used.
759 "-DWITH_JEMALLOC=yes"
764 "-DDEFAULT_CHARSET=utf8"
765 "-DDEFAULT_COLLATION=utf8_general_ci"
766 "-DMYSQL_DATADIR=/var/lib/mysql"
767 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
769 ;; Do not install the benchmark suite.
770 "-DINSTALL_SQLBENCHDIR=false"
772 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
773 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
775 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
777 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
779 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
780 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
781 "-DCMAKE_INSTALL_LIBDIR=lib"
782 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
783 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
785 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
787 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
789 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
790 "/share/mysql/support-files")
791 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
792 "-DINSTALL_SHAREDIR=share")
794 (modify-phases %standard-phases
795 (add-after 'unpack 'adjust-output-references
797 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
798 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
799 ;; not work when the latter uses an absolute file name.
800 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
801 (("%s/@INSTALL_INCLUDEDIR@")
802 (string-append "@INSTALL_INCLUDEDIR@"))
803 ;; As of 10.5.8, the mariadb_config program tries to be
804 ;; clever and computes the installation directory relative
805 ;; to /proc/self/exe when running on Linux. Make it fall
806 ;; back to the old behaviour.
807 (("defined\\(__linux__\\)")
809 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
810 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
811 "@INSTALL_INCLUDEDIR@"))
812 (substitute* "support-files/mariadb.pc.in"
813 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
814 (string-append dir "dir=")))
815 (substitute* "include/CMakeLists.txt"
816 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
817 "${INSTALL_INCLUDEDIR}"))
818 (substitute* "cmake/mariadb_connector_c.cmake"
819 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
820 "${INSTALL_BINDIR}"))
822 (add-after 'unpack 'adjust-tests
824 (let ((disabled-tests
825 '(;; These fail because root@hostname == root@localhost in
826 ;; the build environment, causing a user count mismatch.
827 ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
828 "funcs_1.is_columns_mysql"
830 "main.explain_non_select"
832 "main.stat_tables_innodb"
833 "main.upgrade_MDEV-19650"
834 "roles.acl_statistics"
836 ;; FIXME: This test checks various table encodings and
837 ;; fails because Guix defaults to UTF8 instead of the
838 ;; upstream default latin1_swedish_ci. It's not easily
839 ;; substitutable because several encodings are tested.
842 ;; XXX: This test occasionally fails on i686-linux:
843 ;; <https://jira.mariadb.org/browse/MDEV-24458>
844 ,@(if (string-prefix? "i686" (%current-system))
848 ;; This file contains a time bomb which makes it fail after
849 ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
852 ;; This file contains a list of known-flaky tests for this
853 ;; release. Append our own items.
854 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
855 (for-each (lambda (test)
856 (format unstable-tests "~a : ~a\n"
857 test "Disabled in Guix"))
859 (close-port unstable-tests)
861 ;; XXX: These fail because they expect a latin1 charset and
862 ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
863 (substitute* '("mysql-test/main/gis_notembedded.result"
864 "mysql-test/main/system_mysql_db.result")
865 (("latin1_swedish_ci") "utf8_general_ci")
866 (("\tlatin1") "\tutf8"))
868 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
872 (substitute* "mysql-test/mysql-test-run.pl"
873 (("/bin/ls") (which "ls"))
874 (("/bin/sh") (which "sh")))
876 (add-before 'configure 'disable-plugins
878 (let ((disable-plugin (lambda (name)
879 (call-with-output-file
880 (string-append "plugin/" name
883 (format port "\n")))))
884 (disabled-plugins '(;; XXX: Causes a test failure.
886 (for-each disable-plugin disabled-plugins)
889 (lambda* (#:key (tests? #t) #:allow-other-keys)
891 (with-directory-excursion "mysql-test"
892 (invoke "./mtr" "--verbose"
894 "--testcase-timeout=40"
895 "--suite-timeout=600"
896 "--parallel" (number->string (parallel-job-count))
897 ;; Skip the replication tests: they are very I/O
898 ;; intensive and frequently causes indeterministic
899 ;; failures even on powerful hardware.
901 "--skip-test-list=unstable-tests"))
902 (format #t "test suite not run~%"))
905 'install 'post-install
906 (lambda* (#:key inputs outputs #:allow-other-keys)
907 (let* ((out (assoc-ref outputs "out"))
908 (dev (assoc-ref outputs "dev"))
909 (lib (assoc-ref outputs "lib"))
910 (openssl (assoc-ref inputs "openssl")))
911 (substitute* (list (string-append out "/bin/mariadb-install-db")
912 (string-append out "/bin/mysql_install_db"))
914 (string-append "basedir=\"" out "\""))
915 (("\\$basedir/share/mysql")
916 (string-append lib "/share/mysql")))
918 (with-directory-excursion lib
920 (delete-file-recursively "mysql-test")
921 ;; Remove static libraries.
922 (for-each delete-file (find-files "lib" "\\.a$")))
924 (with-directory-excursion out
925 (delete-file "share/man/man1/mysql-test-run.pl.1")
926 ;; Delete huge and unnecessary executables.
927 (for-each delete-file (find-files "bin" "test$")))
928 (mkdir-p (string-append dev "/share"))
929 (mkdir-p (string-append dev "/bin"))
930 (rename-file (string-append lib "/bin/mariadbd")
931 (string-append out "/bin/mariadbd"))
932 (rename-file (string-append lib "/bin/mysqld")
933 (string-append out "/bin/mysqld"))
934 (mkdir-p (string-append dev "/lib"))
935 (rename-file (string-append lib "/lib/pkgconfig")
936 (string-append dev "/lib/pkgconfig"))
937 (rename-file (string-append lib "/bin/mariadb_config")
938 (string-append dev "/bin/mariadb_config"))
939 (rename-file (string-append out "/bin/mysql_config")
940 (string-append dev "/bin/mysql_config"))
942 ;; Embed an absolute reference to OpenSSL in mysql_config
943 ;; and the pkg-config file to avoid propagation.
944 ;; XXX: how to do this for mariadb_config.c.in?
945 (substitute* (list (string-append dev "/bin/mysql_config")
946 (string-append dev "/lib/pkgconfig/mariadb.pc"))
947 (("-lssl -lcrypto" all)
948 (string-append "-L" openssl "/lib " all)))
955 `(("jemalloc" ,jemalloc)
964 ;; The test suite is very resource intensive and can take more than three
965 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
966 (properties '((timeout . 64800))) ;18 hours
967 (home-page "https://mariadb.org/")
968 (synopsis "SQL database server")
970 "MariaDB is a multi-user and multi-threaded SQL database server, designed
971 as a drop-in replacement of MySQL.")
972 (license license:gpl2)))
974 (define mariadb/fixed
978 (inherit (package-source mariadb))
979 (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
981 (define-public mariadb-connector-c
983 (name "mariadb-connector-c")
989 "https://downloads.mariadb.org/f/connector-c-" version
990 "/mariadb-connector-c-" version "-src.tar.gz"
991 "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
992 (file-name (string-append name "-" version ".tar.gz"))
994 (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
996 `(("openssl" ,openssl)))
997 (build-system cmake-build-system)
999 '(#:tests? #f)) ; no tests
1000 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1001 (synopsis "Client library to connect to MySQL or MariaDB")
1002 (description "The MariaDB Connector/C is used to connect applications
1003 developed in C/C++ to MariaDB and MySQL databases.")
1004 (license license:lgpl2.1+)))
1006 (define-public galera
1013 (commit "bac8171266cb982fe013ce496d78085438c6f23e")
1014 (url "https://github.com/codership/galera")
1016 (file-name (git-file-name name version))
1018 (base32 "0h7s670pcasq8wzprhyxqfca2cghi62b8xz2kikb2a86wd453qil"))))
1019 (build-system cmake-build-system)
1023 ("openssl" ,openssl)))
1024 (home-page "https://github.com/codership/galera/")
1025 (synopsis "Extension to the MariaDB database server")
1027 "Galera is a wsrep-provider that is used with MariaDB for load-balancing
1028 and high-availability (HA).")
1029 (license license:gpl2))) ;'COPYING' says "version 2" only
1031 ;; Don't forget to update the other postgresql packages when upgrading this one.
1032 (define-public postgresql-13
1035 (replacement postgresql-13.2)
1039 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1040 version "/postgresql-" version ".tar.bz2"))
1043 "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
1044 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
1045 (build-system gnu-build-system)
1047 `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
1048 ;; PostgreSQL installs its own Makefile (should it?).
1049 ;; Prevent it from retaining needless references to
1050 ;; the build tools in order to save size.
1051 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1054 (modify-phases %standard-phases
1055 (add-before 'configure 'patch-/bin/sh
1057 ;; Refer to the actual shell.
1058 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1059 "src/bin/psql/command.c")
1060 (("/bin/sh") (which "sh")))
1062 (add-after 'build 'build-contrib
1064 (invoke "make" "-C" "contrib")))
1065 (add-after 'install 'install-contrib
1067 (invoke "make" "-C" "contrib" "install"))))))
1069 `(("readline" ,readline)
1070 ("libuuid" ,util-linux "lib")
1071 ("openssl" ,openssl)
1073 (home-page "https://www.postgresql.org/")
1074 (synopsis "Powerful object-relational database system")
1076 "PostgreSQL is a powerful object-relational database system. It is fully
1077 ACID compliant, has full support for foreign keys, joins, views, triggers, and
1078 stored procedures (in multiple languages). It includes most SQL:2008 data
1079 types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1080 TIMESTAMP. It also supports storage of binary large objects, including
1081 pictures, sounds, or video.")
1082 (license (license:x11-style "file://COPYRIGHT"))))
1084 (define-public postgresql-13.2
1086 (inherit postgresql-13)
1091 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1092 version "/postgresql-" version ".tar.bz2"))
1095 "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz"))
1096 (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
1098 (define-public postgresql-11
1100 (inherit postgresql-13)
1104 (inherit (package-source postgresql-13))
1105 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1106 version "/postgresql-" version ".tar.bz2"))
1109 "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20"))))))
1111 (define-public postgresql-10
1113 (inherit postgresql-11)
1116 (inherit (package-source postgresql-11))
1117 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1118 version "/postgresql-" version ".tar.bz2"))
1121 "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53"))))))
1123 (define-public postgresql-9.6
1125 (inherit postgresql-10)
1128 (inherit (package-source postgresql-10))
1129 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1130 version "/postgresql-" version ".tar.bz2"))
1133 "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk"))))))
1135 (define-public postgresql postgresql-13)
1137 (define-public pgloader
1145 (url "https://github.com/dimitri/pgloader")
1146 (commit (string-append "v" version))))
1148 (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
1149 (file-name (git-file-name name version))))
1150 (build-system gnu-build-system)
1152 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1153 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1154 ;; does not require Quicklisp workarounds. There is no `install' target
1155 ;; configured in Makefile.
1157 #:strip-binaries? #f
1159 (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1161 (modify-phases %standard-phases
1163 (add-after 'unpack 'set-home
1165 (setenv "HOME" "/tmp")
1167 (add-after 'unpack 'patch-Makefile
1169 (substitute* "Makefile"
1170 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
1173 (lambda* (#:key outputs #:allow-other-keys)
1174 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1176 (install-file "build/bin/pgloader" bin))
1179 `(("buildapp" ,buildapp)
1182 `(("alexandria" ,sbcl-alexandria)
1183 ("cl-abnf" ,sbcl-cl-abnf)
1184 ("cl-base64" ,sbcl-cl-base64)
1185 ("cl-csv" ,sbcl-cl-csv)
1186 ("cl-fad" ,sbcl-cl-fad)
1187 ("cl-log" ,sbcl-cl-log)
1188 ("cl-markdown" ,sbcl-cl-markdown)
1189 ("cl-mustache" ,sbcl-cl-mustache)
1190 ("cl-ppcre" ,sbcl-cl-ppcre)
1191 ("cl-sqlite" ,sbcl-cl-sqlite)
1192 ("closer-mop" ,sbcl-closer-mop)
1193 ("command-line-arguments" ,sbcl-command-line-arguments)
1195 ("drakma" ,sbcl-drakma)
1196 ("esrap" ,sbcl-esrap)
1197 ("flexi-streams" ,sbcl-flexi-streams)
1199 ("local-time" ,sbcl-local-time)
1200 ("lparallel" ,sbcl-lparallel)
1201 ("metabang-bind" ,sbcl-metabang-bind)
1202 ("mssql" ,sbcl-mssql)
1203 ("postmodern" ,sbcl-postmodern)
1204 ("py-configparser" ,sbcl-py-configparser)
1205 ("qmynd" ,sbcl-qmynd)
1207 ("split-sequence" ,sbcl-split-sequence)
1208 ("trivial-backtrace" ,sbcl-trivial-backtrace)
1209 ("usocket" ,sbcl-usocket)
1211 ("yason" ,sbcl-yason)
1213 (home-page "https://pgloader.io/")
1214 (synopsis "Tool to migrate data to PostgreSQL")
1216 "@code{pgloader} is a program that can load data or migrate databases from
1217 CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1218 (license (license:x11-style "file://LICENSE"))))
1220 (define-public python-pymysql
1222 (name "python-pymysql")
1227 (uri (pypi-uri "PyMySQL" version))
1229 (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q"))))
1230 (build-system python-build-system)
1232 `(("python-unittest2" ,python-unittest2)))
1234 `(("python-cryptography" ,python-cryptography)))
1236 `(#:tests? #f)) ; tests expect a running MySQL
1237 (home-page "https://github.com/PyMySQL/PyMySQL/")
1238 (synopsis "Pure-Python MySQL driver")
1240 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
1241 Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
1242 (license license:expat)))
1244 (define-public python2-pymysql
1245 (package-with-python2 python-pymysql))
1254 (uri (string-append "http://fallabs.com/" name "/"
1255 name "-" version ".tar.gz"))
1258 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
1259 (build-system gnu-build-system)
1261 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1262 (assoc-ref %outputs "out")
1264 #:make-flags (list "CFLAGS=-fPIC")))
1265 (home-page "https://fallabs.com/qdbm/")
1266 (synopsis "Key-value database")
1267 (description "QDBM is a library of routines for managing a
1268 database. The database is a simple data file containing key-value
1269 pairs. Every key and value is serial bytes with variable length.
1270 Binary data as well as character strings can be used as a key or a
1271 value. There is no concept of data tables or data types. Records are
1272 organized in a hash table or B+ tree.")
1273 (license license:lgpl2.1+)))
1275 (define-public recutils
1281 (uri (string-append "mirror://gnu/recutils/recutils-"
1285 "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz"))))
1286 (build-system gnu-build-system)
1288 (arguments '(#:configure-flags
1289 (list (string-append "--with-bash-headers="
1290 (assoc-ref %build-inputs "bash:include")
1293 (native-inputs `(("bc" ,bc)
1294 ("bash:include" ,bash "include")
1295 ("check" ,check-0.14)
1296 ("pkg-config" ,pkg-config)))
1298 ;; TODO: Add more optional inputs.
1299 (inputs `(("curl" ,curl)
1300 ("libgcrypt" ,libgcrypt)
1301 ("libuuid" ,util-linux "lib")))
1302 (synopsis "Manipulate plain text files as databases")
1304 "GNU Recutils is a set of tools and libraries for creating and
1305 manipulating text-based, human-editable databases. Despite being text-based,
1306 databases created with Recutils carry all of the expected features such as
1307 unique fields, primary keys, time stamps and more. Many different field
1308 types are supported, as is encryption.")
1309 (license license:gpl3+)
1310 (home-page "https://www.gnu.org/software/recutils/")))
1312 (define-public emacs-recutils
1315 (name "emacs-recutils")
1316 (build-system emacs-build-system)
1319 (modify-phases %standard-phases
1320 (add-after 'unpack 'change-directory
1326 (synopsis "Emacs mode for working with recutils database files")
1327 (description "This package provides an Emacs major mode @code{rec-mode}
1328 for working with GNU Recutils text-based, human-editable databases. It
1329 supports editing, navigation, and querying of recutils database files
1330 including field and record folding.")))
1332 (define-public rocksdb
1339 (url "https://github.com/facebook/rocksdb")
1340 (commit (string-append "v" version))))
1341 (file-name (git-file-name name version))
1344 "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
1345 (modules '((guix build utils)))
1348 ;; TODO: unbundle gtest.
1349 (delete-file "build_tools/gnu_parallel")
1350 (substitute* "Makefile"
1351 (("build_tools/gnu_parallel") "parallel"))
1353 (build-system gnu-build-system)
1355 `(#:make-flags (list "CC=gcc" "V=1"
1356 ;; Ceph requires that RTTI is enabled.
1358 "date=1970-01-01" ; build reproducibly
1359 (string-append "INSTALL_PATH="
1360 (assoc-ref %outputs "out"))
1362 ;; Running the full test suite takes hours and require
1363 ;; a lot of disk space. Instead we only run a subset
1364 ;; (see .travis.yml and Makefile).
1365 "ROCKSDBTESTS_END=db_tailing_iter_test")
1366 #:test-target "check_some"
1367 ;; Many tests fail on 32-bit platforms. There are multiple reports about
1368 ;; this upstream, but it's not going to be supported any time soon.
1369 #:tests? (let ((system ,(or (%current-target-system)
1370 (%current-system))))
1371 (or (string-prefix? "x86_64-linux" system)
1372 (string-prefix? "aarch64-linux" system)))
1374 (modify-phases %standard-phases
1375 (add-after 'unpack 'patch-Makefile
1377 (substitute* "Makefile"
1378 ;; Don't depend on the static library when installing.
1379 (("install: install-static")
1380 "install: install-shared")
1381 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1384 ;; The default target is only needed for tests and built on demand.
1386 (add-before 'check 'disable-optimizations
1388 ;; Prevent the build from passing '-march=native' to the compiler.
1389 (setenv "PORTABLE" "1")
1391 (add-before 'check 'disable-failing-tests
1393 (substitute* "Makefile"
1394 ;; These tests reliably fail due to "Too many open files".
1395 (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
1396 (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
1398 (add-after 'check 'build
1399 ;; The default build target is a debug build for tests. The
1400 ;; install target depends on the "shared_lib" release target
1401 ;; so we build it here for clarity.
1402 (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
1403 (apply invoke "make" "shared_lib"
1404 `(,@(if parallel-build?
1405 `("-j" ,(number->string (parallel-job-count)))
1409 `(("parallel" ,parallel)
1412 ("python" ,python-2)
1417 ("jemalloc" ,jemalloc)
1421 (home-page "https://rocksdb.org/")
1422 (synopsis "Persistent key-value store for fast storage")
1424 "RocksDB is a library that forms the core building block for a fast
1425 key-value server, especially suited for storing data on flash drives. It
1426 has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
1427 between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
1428 (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
1429 compactions, making it specially suitable for storing multiple terabytes of
1430 data in a single database. RocksDB is partially based on @code{LevelDB}.")
1431 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
1432 ;; files carry the 3-clause BSD license.
1433 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
1435 (define-public sparql-query
1437 (name "sparql-query")
1442 (url "https://github.com/tialaramex/sparql-query")
1445 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
1446 (file-name (git-file-name name version))))
1447 (build-system gnu-build-system)
1451 ("libxml2" ,libxml2)
1452 ("ncurses" ,ncurses)
1453 ("readline" ,readline)))
1455 `(("pkg-config" ,pkg-config)))
1457 `(#:make-flags '("CC=gcc")
1459 (modify-phases %standard-phases
1461 ;; The Makefile uses git to obtain versioning information. This phase
1462 ;; substitutes the git invocation with the package version.
1463 (add-after 'unpack 'remove-git-dependency
1465 (substitute* "Makefile"
1467 (string-append "gitrev = \"v" ,version "\"")))
1469 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
1470 ;; This replacement does the same thing, except for using $PREFIX/bin
1473 (lambda* (#:key outputs #:allow-other-keys)
1474 (let* ((out (assoc-ref outputs "out"))
1475 (bin (string-append out "/bin")))
1476 (install-file "sparql-query" bin)
1477 (symlink (string-append bin "/sparql-query")
1478 (string-append bin "/sparql-update")))
1481 (lambda* (#:key make-flags #:allow-other-keys)
1482 (apply invoke "make" `(,@make-flags "scan-test"))
1483 (invoke "./scan-test"))))))
1484 (home-page "https://github.com/tialaramex/sparql-query/")
1485 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
1486 (description "Sparql-query is a command-line tool for accessing SPARQL
1487 endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
1488 tools for interrogating SQL databases. For example, you can enter a query over
1489 several lines, using a semi-colon at the end of a line to indicate the end of
1490 your query. It also supports readline so that you can more easily recall and
1491 edit previous queries, even across sessions. It can be used non-interactively,
1492 for example from a shell script.")
1493 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
1494 ;; others (like sparql-query.c) contain a GPLv2+ license header.
1495 (license (list license:gpl3+))))
1497 (define-public sqitch
1505 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
1508 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
1509 (build-system perl-build-system)
1512 (modify-phases %standard-phases
1513 (add-before 'check 'set-check-environment
1516 (setenv "HOME" "/tmp")
1518 (add-after 'install 'wrap-program
1519 (lambda* (#:key outputs #:allow-other-keys)
1520 (let* ((out (assoc-ref outputs "out"))
1521 (path (getenv "PERL5LIB")))
1522 (wrap-program (string-append out "/bin/sqitch")
1523 `("PERL5LIB" ":" prefix
1524 (,(string-append out "/lib/perl5/site_perl"
1529 `(("perl-capture-tiny" ,perl-capture-tiny)
1530 ("perl-io-pager" ,perl-io-pager)
1531 ("perl-module-build" ,perl-module-build)
1532 ("perl-module-runtime" ,perl-module-runtime)
1533 ("perl-path-class" ,perl-path-class)
1534 ("perl-test-deep" ,perl-test-deep)
1535 ("perl-test-dir" ,perl-test-dir)
1536 ("perl-test-exception" ,perl-test-exception)
1537 ("perl-test-file" ,perl-test-file)
1538 ("perl-test-file-contents" ,perl-test-file-contents)
1539 ("perl-test-mockmodule" ,perl-test-mockmodule)
1540 ("perl-test-mockobject" ,perl-test-mockobject)
1541 ("perl-test-nowarnings" ,perl-test-nowarnings)
1542 ("perl-test-warn" ,perl-test-warn)))
1544 `(("perl-class-xsaccessor" ,perl-class-xsaccessor)
1545 ("perl-clone" ,perl-clone)
1546 ("perl-config-gitlike" ,perl-config-gitlike)
1547 ("perl-datetime" ,perl-datetime)
1548 ("perl-datetime-timezone" ,perl-datetime-timezone)
1549 ("perl-dbd-mysql" ,perl-dbd-mysql)
1550 ("perl-dbd-pg" ,perl-dbd-pg)
1551 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1552 ("perl-dbi" ,perl-dbi)
1553 ("perl-devel-stacktrace" ,perl-devel-stacktrace)
1554 ("perl-encode-locale" ,perl-encode-locale)
1555 ("perl-hash-merge" ,perl-hash-merge)
1556 ("perl-ipc-run3" ,perl-ipc-run3)
1557 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1558 ("perl-libintl-perl" ,perl-libintl-perl)
1559 ("perl-list-moreutils" ,perl-list-moreutils)
1560 ("perl-moo" ,perl-moo)
1561 ("perl-mysql-config" ,perl-mysql-config)
1562 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1563 ("perl-path-class" ,perl-path-class)
1564 ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict)
1565 ("perl-string-formatter" ,perl-string-formatter)
1566 ("perl-string-shellquote" ,perl-string-shellquote)
1567 ("perl-sub-exporter" ,perl-sub-exporter)
1568 ("perl-template-tiny" ,perl-template-tiny)
1569 ("perl-template-toolkit" ,perl-template-toolkit)
1570 ("perl-throwable" ,perl-throwable)
1571 ("perl-try-tiny" ,perl-try-tiny)
1572 ("perl-type-tiny" ,perl-type-tiny)
1573 ("perl-type-tiny-xs" ,perl-type-tiny-xs)
1574 ("perl-uri" ,perl-uri)
1575 ("perl-uri-db" ,perl-uri-db)))
1576 (home-page "https://sqitch.org/")
1577 (synopsis "Database change management tool")
1579 "Sqitch is a standalone change management system for database schemas,
1580 which uses SQL to describe changes.")
1581 (license license:x11)))
1583 (define-public sqlcrush
1584 ;; Unfortunately, there is no proper upstream release and may never be.
1585 (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a")
1589 (version (git-version "0.1.5" revision commit))
1593 (url "https://github.com/coffeeandscripts/sqlcrush")
1595 (file-name (git-file-name name version))
1598 "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8"))))
1599 (build-system python-build-system)
1601 `(("python-cryptography" ,python-cryptography)
1602 ("python-psycopg2" ,python-psycopg2)
1603 ("python-pymysql" ,python-pymysql)
1604 ("python-sqlalchemy" ,python-sqlalchemy)))
1605 (home-page "https://github.com/coffeeandscripts/sqlcrush")
1606 (synopsis "Text console-based database viewer and editor")
1608 "SQLcrush lets you view and edit a database directly from the text
1609 console through an ncurses interface. You can explore each table's structure,
1610 browse and edit the contents, add and delete entries, all while tracking your
1612 (license license:gpl3+)))) ; no headers, see README.md
1620 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
1624 "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"))))
1625 (build-system gnu-build-system)
1628 (modify-phases %standard-phases
1630 (lambda* (#:key outputs #:allow-other-keys)
1631 (let ((out (assoc-ref outputs "out")))
1632 ;; The 'configure' script is a wrapper for Waf and
1633 ;; doesn't recognize things like '--enable-fast-install'.
1634 (invoke "./configure"
1635 (string-append "--prefix=" out))))))))
1637 `(;; TODO: Build the documentation.
1638 ;; ("docbook-xsl" ,docbook-xsl)
1639 ;; ("libxml2" ,libxml2)
1640 ;; ("libxslt" ,libxslt)
1641 ("python" ,python) ;for the Waf build system
1643 (home-page "https://tdb.samba.org/")
1644 (synopsis "Trivial database")
1646 "TDB is a Trivial Database. In concept, it is very much like GDBM,
1647 and BSD's DB except that it allows multiple simultaneous writers and uses
1648 locking internally to keep writers from trampling on each other. TDB is also
1650 (license license:lgpl3+)))
1652 (define-public perl-dbi
1659 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
1663 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
1664 (build-system perl-build-system)
1665 (synopsis "Database independent interface for Perl")
1666 (description "This package provides an database interface for Perl.")
1667 (home-page "https://metacpan.org/release/DBI")
1668 (license license:perl-license)))
1670 (define-public perl-dbix-class
1672 (name "perl-dbix-class")
1673 (version "0.082842")
1677 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1678 "DBIx-Class-" version ".tar.gz"))
1680 (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh"))))
1681 (build-system perl-build-system)
1683 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
1684 ("perl-file-temp" ,perl-file-temp)
1685 ("perl-module-install" ,perl-module-install)
1686 ("perl-package-stash" ,perl-package-stash)
1687 ("perl-test-deep" ,perl-test-deep)
1688 ("perl-test-exception" ,perl-test-exception)
1689 ("perl-test-warn" ,perl-test-warn)))
1691 `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1692 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1693 ("perl-class-inspector" ,perl-class-inspector)
1694 ("perl-config-any" ,perl-config-any)
1695 ("perl-context-preserve" ,perl-context-preserve)
1696 ("perl-data-dumper-concise" ,perl-data-dumper-concise)
1697 ("perl-data-page" ,perl-data-page)
1698 ("perl-dbi" ,perl-dbi)
1699 ("perl-devel-globaldestruction" ,perl-devel-globaldestruction)
1700 ("perl-hash-merge" ,perl-hash-merge)
1701 ("perl-module-find" ,perl-module-find)
1702 ("perl-moo" ,perl-moo)
1703 ("perl-mro-compat" ,perl-mro-compat)
1704 ("perl-namespace-clean" ,perl-namespace-clean)
1705 ("perl-path-class" ,perl-path-class)
1706 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
1707 ("perl-scope-guard" ,perl-scope-guard)
1708 ("perl-sql-abstract-classic" ,perl-sql-abstract-classic)
1709 ("perl-sub-name" ,perl-sub-name)
1710 ("perl-text-balanced" ,perl-text-balanced)
1711 ("perl-try-tiny" ,perl-try-tiny)))
1712 (home-page "https://metacpan.org/release/DBIx-Class")
1713 (synopsis "Extensible and flexible object <-> relational mapper")
1714 (description "An SQL to OO mapper with an object API inspired by
1715 Class::DBI (with a compatibility layer as a springboard for porting) and a
1716 resultset API that allows abstract encapsulation of database operations. It
1717 aims to make representing queries in your code as perl-ish as possible while
1718 still providing access to as many of the capabilities of the database as
1719 possible, including retrieving related records from multiple tables in a
1720 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
1721 \"ORDER BY\" and \"HAVING\" support.")
1722 (license license:perl-license)))
1724 (define-public perl-dbix-class-cursor-cached
1726 (name "perl-dbix-class-cursor-cached")
1727 (version "1.001004")
1731 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
1732 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
1735 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
1736 (build-system perl-build-system)
1738 `(("perl-cache-cache" ,perl-cache-cache)
1739 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1740 ("perl-module-install" ,perl-module-install)))
1742 `(("perl-carp-clan" ,perl-carp-clan)
1743 ("perl-dbix-class" ,perl-dbix-class)))
1744 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
1745 (synopsis "Cursor with built-in caching support")
1746 (description "DBIx::Class::Cursor::Cached provides a cursor class with
1747 built-in caching support.")
1748 (license license:perl-license)))
1750 (define-public perl-dbix-class-introspectablem2m
1752 (name "perl-dbix-class-introspectablem2m")
1753 (version "0.001002")
1757 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1758 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
1761 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
1762 (build-system perl-build-system)
1764 `(("perl-module-install" ,perl-module-install)))
1766 `(("perl-dbix-class" ,perl-dbix-class)))
1767 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
1768 (synopsis "Introspect many-to-many relationships")
1769 (description "Because the many-to-many relationships are not real
1770 relationships, they can not be introspected with DBIx::Class. Many-to-many
1771 relationships are actually just a collection of convenience methods installed
1772 to bridge two relationships. This DBIx::Class component can be used to store
1773 all relevant information about these non-relationships so they can later be
1774 introspected and examined.")
1775 (license license:perl-license)))
1777 (define-public perl-dbix-class-schema-loader
1779 (name "perl-dbix-class-schema-loader")
1784 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1785 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
1788 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
1789 (build-system perl-build-system)
1791 `(("perl-config-any" ,perl-config-any)
1792 ("perl-config-general" ,perl-config-general)
1793 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
1794 ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
1795 ("perl-module-install" ,perl-module-install)
1796 ("perl-moose" ,perl-moose)
1797 ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
1798 ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
1799 ("perl-namespace-autoclean" ,perl-namespace-autoclean)
1800 ("perl-test-deep" ,perl-test-deep)
1801 ("perl-test-differences" ,perl-test-differences)
1802 ("perl-test-exception" ,perl-test-exception)
1803 ("perl-test-pod" ,perl-test-pod)
1804 ("perl-test-warn" ,perl-test-warn)))
1806 `(("perl-class-unload" ,perl-class-unload)
1807 ("perl-class-inspector" ,perl-class-inspector)
1808 ("perl-class-accessor-grouped" ,perl-class-accessor-grouped)
1809 ("perl-class-c3-componentised" ,perl-class-c3-componentised)
1810 ("perl-carp-clan" ,perl-carp-clan)
1811 ("perl-data-dump" ,perl-data-dump)
1812 ("perl-dbix-class" ,perl-dbix-class)
1813 ("perl-hash-merge" ,perl-hash-merge)
1814 ("perl-list-moreutils" ,perl-list-moreutils)
1815 ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
1816 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
1817 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)
1818 ("perl-namespace-clean" ,perl-namespace-clean)
1819 ("perl-mro-compat" ,perl-mro-compat)
1820 ("perl-scope-guard" ,perl-scope-guard)
1821 ("perl-string-camelcase" ,perl-string-camelcase)
1822 ("perl-string-toidentifier-en" ,perl-string-toidentifier-en)
1823 ("perl-sub-name" ,perl-sub-name)
1824 ("perl-try-tiny" ,perl-try-tiny)))
1825 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
1826 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
1827 (synopsis "Create a DBIx::Class::Schema based on a database")
1828 (description "DBIx::Class::Schema::Loader automates the definition of a
1829 DBIx::Class::Schema by scanning database table definitions and setting up the
1830 columns, primary keys, unique constraints and relationships.")
1831 (license license:perl-license)))
1833 (define-public perl-dbd-pg
1835 (name "perl-dbd-pg")
1840 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
1841 "DBD-Pg-" version ".tar.gz"))
1844 "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz"))))
1845 (build-system perl-build-system)
1847 `(("perl-dbi" ,perl-dbi)))
1849 `(("perl-dbi" ,perl-dbi)
1850 ("postgresql" ,postgresql)))
1851 (home-page "https://metacpan.org/release/DBD-Pg")
1852 (synopsis "DBI PostgreSQL interface")
1853 (description "This package provides a PostgreSQL driver for the Perl5
1854 @dfn{Database Interface} (DBI).")
1855 (license license:perl-license)))
1857 (define-public perl-dbd-mysql
1859 (name "perl-dbd-mysql")
1864 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
1865 "DBD-mysql-" version ".tar.gz"))
1867 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
1868 (build-system perl-build-system)
1871 (modify-phases %standard-phases
1872 (add-before 'configure 'skip-library-detection
1873 ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They
1874 ;; are really only needed for the test suite; their absence does not
1875 ;; affect the build or the end result.
1877 (substitute* "Makefile.PL"
1878 (("use Devel::CheckLib;" match)
1879 (string-append "# " match))
1883 ;; Tests require running MySQL server.
1886 `(("perl-dbi" ,perl-dbi)
1887 ("mysql" ,mariadb "lib")
1888 ("mysql-dev" ,mariadb "dev")))
1889 (home-page "https://metacpan.org/release/DBD-mysql")
1890 (synopsis "DBI MySQL interface")
1891 (description "This package provides a MySQL driver for the Perl5
1892 @dfn{Database Interface} (DBI).")
1893 (license license:perl-license)))
1895 (define-public perl-dbd-sqlite
1897 (name "perl-dbd-sqlite")
1902 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
1906 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
1907 (build-system perl-build-system)
1908 (inputs `(("sqlite" ,sqlite)))
1909 (propagated-inputs `(("perl-dbi" ,perl-dbi)))
1910 (synopsis "SQlite interface for Perl")
1911 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
1912 the entire thing in the distribution. So in order to get a fast transaction
1913 capable RDBMS working for your Perl project you simply have to install this
1914 module, and nothing else.")
1915 (license license:perl-license)
1916 (home-page "https://metacpan.org/release/DBD-SQLite")))
1918 (define-public perl-mysql-config
1920 (name "perl-mysql-config")
1926 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
1931 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
1932 (build-system perl-build-system)
1933 (home-page "https://metacpan.org/release/MySQL-Config")
1934 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
1936 "@code{MySQL::Config} emulates the @code{load_defaults} function from
1937 libmysqlclient. It will fill an array with long options, ready to be parsed by
1938 @code{Getopt::Long}.")
1939 (license license:perl-license)))
1941 (define-public perl-sql-abstract
1943 (name "perl-sql-abstract")
1948 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
1949 "SQL-Abstract-" version ".tar.gz"))
1951 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
1952 (build-system perl-build-system)
1954 `(("perl-module-install" ,perl-module-install)
1955 ("perl-test-deep" ,perl-test-deep)
1956 ("perl-test-exception" ,perl-test-exception)
1957 ("perl-test-warn" ,perl-test-warn)))
1959 `(("perl-hash-merge" ,perl-hash-merge)
1960 ("perl-moo" ,perl-moo)
1961 ("perl-mro-compat" ,perl-mro-compat)
1962 ("perl-text-balanced" ,perl-text-balanced)))
1963 (home-page "https://metacpan.org/release/SQL-Abstract")
1964 (synopsis "Generate SQL from Perl data structures")
1965 (description "This module was inspired by the excellent DBIx::Abstract.
1966 While based on the concepts used by DBIx::Abstract, the concepts used have
1967 been modified to make the SQL easier to generate from Perl data structures.
1968 The underlying idea is for this module to do what you mean, based on the data
1969 structures you provide it, so that you don't have to modify your code every
1970 time your data changes.")
1971 (license license:perl-license)))
1973 (define-public perl-sql-abstract-classic
1975 (name "perl-sql-abstract-classic")
1980 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
1981 "SQL-Abstract-Classic-" version ".tar.gz"))
1983 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
1984 (build-system perl-build-system)
1986 `(("perl-test-deep" ,perl-test-deep)
1987 ("perl-test-exception" ,perl-test-exception)
1988 ("perl-test-warn" ,perl-test-warn)))
1990 `(("perl-mro-compat" ,perl-mro-compat)
1991 ("perl-sql-abstract" ,perl-sql-abstract)))
1992 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
1993 (synopsis "Generate SQL from Perl data structures")
1995 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
1996 to preserve the ability of users to opt into the new way of doing things in
1997 later versions according to their own schedules.
1999 It is an abstract SQL generation module based on the concepts used by
2000 @code{DBIx::Abstract}, with several important differences, especially when it
2001 comes to @code{WHERE} clauses. These concepts were modified to make the SQL
2002 easier to generate from Perl data structures.
2004 The underlying idea is for this module to do what you mean, based on the data
2005 structures you provide it. You shouldn't have to modify your code every time
2006 your data changes, as this module figures it out.")
2007 (license license:perl-license)))
2009 (define-public perl-sql-splitstatement
2011 (name "perl-sql-splitstatement")
2016 (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/"
2017 "SQL-SplitStatement-" version ".tar.gz"))
2020 "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p"))))
2021 (build-system perl-build-system)
2023 `(("perl-test-exception" ,perl-test-exception)))
2025 `(("perl-class-accessor" ,perl-class-accessor)
2026 ("perl-list-moreutils" ,perl-list-moreutils)
2027 ("perl-regexp-common" ,perl-regexp-common)
2028 ("perl-sql-tokenizer" ,perl-sql-tokenizer)))
2029 (home-page "https://metacpan.org/release/SQL-SplitStatement")
2030 (synopsis "Split SQL code into atomic statements")
2031 (description "This module tries to split any SQL code, even including
2032 non-standard extensions, into the atomic statements it is composed of.")
2033 (license license:perl-license)))
2035 (define-public perl-sql-tokenizer
2037 (name "perl-sql-tokenizer")
2042 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
2043 "SQL-Tokenizer-" version ".tar.gz"))
2046 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
2047 (build-system perl-build-system)
2048 (home-page "https://metacpan.org/release/SQL-Tokenizer")
2049 (synopsis "SQL tokenizer")
2050 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
2051 claim to be a parser or query verifier. It just creates sane tokens from a
2053 (license license:perl-license)))
2055 (define-public unixodbc
2063 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
2066 (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
2067 (build-system gnu-build-system)
2068 (synopsis "Data source abstraction library")
2069 (description "Unixodbc is a library providing an API with which to access
2070 data sources. Data sources include SQL Servers and any software with an ODBC
2072 (license license:lgpl2.1+)
2073 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
2074 (home-page "http://www.unixodbc.org")))
2076 (define-public unqlite
2082 ;; Contains bug fixes against the official release, and has an
2083 ;; autotooled build system.
2084 (uri (string-append "https://github.com/aidin36/tocc/releases/"
2086 "unqlite-unofficial-" version ".tar.gz"))
2089 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
2090 (build-system gnu-build-system)
2091 (arguments `(#:tests? #f)) ;No check target
2092 (home-page "https://www.unqlite.org")
2093 (synopsis "In-memory key/value and document store")
2095 "UnQLite is an in-process software library which implements a
2096 self-contained, serverless, zero-configuration, transactional NoSQL
2097 database engine. UnQLite is a document store database similar to
2098 MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
2099 similar to BerkeleyDB, LevelDB, etc.")
2100 (license license:bsd-2)))
2102 (define-public redis
2108 (uri (string-append "http://download.redis.io/releases/redis-"
2112 "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9"))
2113 (modules '((guix build utils)))
2115 ;; Delete bundled jemalloc, as the package will use the libc one
2116 '(begin (delete-file-recursively "deps/jemalloc")
2118 (build-system gnu-build-system)
2120 `(("procps" ,procps) ; for tests
2121 ("tcl" ,tcl))) ; for tests
2124 (modify-phases %standard-phases
2126 (add-after 'unpack 'use-correct-tclsh
2127 (lambda* (#:key inputs #:allow-other-keys)
2128 (substitute* "runtest"
2130 (string-append "TCLSH="
2131 (assoc-ref inputs "tcl")
2134 (add-after 'unpack 'adjust-tests
2136 ;; Disable failing tests
2137 (substitute* "tests/test_helper.tcl"
2138 ((" integration/replication[^-]") "")
2139 ((" integration/replication-4") "")
2140 ((" integration/replication-psync") ""))
2142 #:make-flags `("CC=gcc"
2145 ,(string-append "PREFIX="
2146 (assoc-ref %outputs "out")))))
2147 (synopsis "Key-value cache and store")
2148 (description "Redis is an advanced key-value cache and store. Redis
2149 supports many data structures including strings, hashes, lists, sets, sorted
2150 sets, bitmaps and hyperloglogs.")
2151 (home-page "https://redis.io/")
2152 (license license:bsd-3)))
2154 (define-public kyotocabinet
2156 (name "kyotocabinet")
2160 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
2161 "kyotocabinet-" version ".tar.gz"))
2164 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
2165 (build-system gnu-build-system)
2169 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
2170 (string-append "LDFLAGS=-Wl,-rpath="
2171 (assoc-ref %outputs "out") "/lib"))))
2172 (inputs `(("zlib" ,zlib)))
2173 (home-page "https://fallabs.com/kyotocabinet/")
2175 "Kyoto Cabinet is a modern implementation of the DBM database")
2177 "Kyoto Cabinet is a standalone file-based database that supports Hash
2178 and B+ Tree data storage models. It is a fast key-value lightweight
2179 database and supports many programming languages. It is a NoSQL database.")
2180 (license license:gpl3+)))
2182 (define-public tokyocabinet
2184 (name "tokyocabinet")
2189 (uri (string-append "http://fallabs.com/tokyocabinet/"
2190 name "-" version ".tar.gz"))
2193 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
2194 (build-system gnu-build-system)
2197 (list "--enable-pthread" "--enable-off64" "--enable-fastest"
2198 (string-append "LDFLAGS=-Wl,-rpath="
2199 (assoc-ref %outputs "out") "/lib"))))
2202 (home-page "http://fallabs.com/tokyocabinet/")
2203 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
2205 "Tokyo Cabinet is a library of routines for managing a database.
2206 The database is a simple data file containing records, each is a pair of a
2207 key and a value. Every key and value is serial bytes with variable length.
2208 Both binary data and character string can be used as a key and a value.
2209 There is neither concept of data tables nor data types. Records are
2210 organized in hash table, B+ tree, or fixed-length array.")
2211 (license license:lgpl2.1+)))
2213 (define-public wiredtiger
2220 "http://source.wiredtiger.com/releases/wiredtiger-"
2221 version ".tar.bz2"))
2224 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
2225 (build-system gnu-build-system)
2227 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
2229 (modify-phases %standard-phases
2230 (add-before 'check 'disable-test/fops
2232 ;; XXX: timed out after 3600 seconds of silence
2233 (substitute* "Makefile"
2239 ("snappy" ,snappy)))
2240 (home-page "http://source.wiredtiger.com/")
2241 (synopsis "NoSQL data engine")
2243 "WiredTiger is an extensible platform for data management. It supports
2244 row-oriented storage (where all columns of a row are stored together),
2245 column-oriented storage (where columns are stored in groups, allowing for
2246 more efficient access and storage of column subsets) and log-structured merge
2247 trees (LSM), for sustained throughput under random insert workloads.")
2248 (license license:gpl3) ; or GPL-2
2249 ;; configure.ac: WiredTiger requires a 64-bit build.
2250 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))))
2252 (define-public wiredtiger-3
2254 (inherit wiredtiger)
2259 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
2260 version ".tar.bz2"))
2263 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
2265 (define-public guile-wiredtiger
2267 (name "guile-wiredtiger")
2272 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
2273 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
2274 (file-name (string-append name "-" version "-checkout"))
2277 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
2278 (build-system gnu-build-system)
2280 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
2282 (list (string-append "--with-libwiredtiger-prefix="
2283 (assoc-ref %build-inputs "wiredtiger")))
2284 #:make-flags '("GUILE_AUTO_COMPILE=0")))
2286 `(("autoconf" ,autoconf)
2287 ("automake" ,automake)
2288 ("pkg-config" ,pkg-config)))
2290 `(("wiredtiger" ,wiredtiger-3)
2291 ("guile" ,guile-2.2)))
2293 `(("guile-bytestructures" ,guile-bytestructures)))
2294 (synopsis "WiredTiger bindings for GNU Guile")
2296 "This package provides Guile bindings to the WiredTiger ``NoSQL''
2298 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
2299 (license license:gpl3+)))
2301 (define-public perl-db-file
2303 (name "perl-db-file")
2308 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
2311 (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr"))))
2312 (build-system perl-build-system)
2313 (inputs `(("bdb" ,bdb)))
2314 (native-inputs `(("perl-test-pod" ,perl-test-pod)))
2316 `(#:phases (modify-phases %standard-phases
2318 'configure 'modify-config.in
2319 (lambda* (#:key inputs #:allow-other-keys)
2320 (substitute* "config.in"
2321 (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb")))
2323 (home-page "https://metacpan.org/release/DB_File")
2324 (synopsis "Perl5 access to Berkeley DB version 1.x")
2326 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
2327 (license license:perl-license)))
2337 (url "https://git.openldap.org/openldap/openldap.git")
2338 (commit (string-append "LMDB_" version))))
2339 (file-name (git-file-name name version))
2341 (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as"))))
2342 (build-system gnu-build-system)
2344 `(#:test-target "test"
2346 (modify-phases %standard-phases
2348 (lambda* (#:key outputs #:allow-other-keys)
2349 (chdir "libraries/liblmdb")
2350 (substitute* "Makefile"
2351 (("/usr/local") (assoc-ref outputs "out")))
2353 (add-after 'install 'create-pkg-config-file
2354 (lambda* (#:key outputs #:allow-other-keys)
2355 (let ((out (assoc-ref outputs "out")))
2356 (mkdir-p (string-append out "/lib/pkgconfig"))
2357 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
2359 (format #t "prefix=~a~@
2362 includedir=~a/include~@
2366 Description: Lightning Memory-Mapped Database library~@
2367 Libs: -L${libdir} -llmdb~@
2368 Cflags: -I${includedir}~%"
2369 out out out out ,version)))
2371 (home-page "https://symas.com/lmdb/")
2372 (synopsis "Lightning Memory-Mapped Database library")
2374 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
2375 transactional database. Unlike more complex relational databases, LMDB handles
2376 only key-value pairs (stored as arbitrary byte arrays) and relies on the
2377 underlying operating system for caching and locking, keeping the code small and
2379 The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
2380 disk-based databases with high read performance that scales linearly over
2381 multiple cores. The size of each database is limited only by the size of the
2382 virtual address space — not physical RAM.")
2383 (license license:openldap2.8)))
2385 (define-public lmdbxx
2388 (version "0.9.14.0")
2393 (url "https://github.com/drycpp/lmdbxx")
2395 (file-name (git-file-name name version))
2397 (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6"))))
2400 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2402 (modify-phases %standard-phases
2403 (delete 'configure))))
2404 (build-system gnu-build-system)
2405 (inputs `(("lmdb" ,lmdb)))
2406 (home-page "http://lmdbxx.sourceforge.net")
2407 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
2408 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
2409 @code{LMDB} embedded database library, offering both an error-checked
2410 procedural interface and an object-oriented resource interface with RAII
2412 (license license:unlicense)))
2414 (define-public libpqxx
2421 "http://pqxx.org/download/software/libpqxx/"
2422 name "-" version ".tar.gz"))
2425 "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09"))))
2426 (build-system gnu-build-system)
2428 `(("python" ,python-2)))
2429 (inputs `(("postgresql" ,postgresql)))
2431 `(#:tests? #f ; # FAIL: 1
2433 (modify-phases %standard-phases
2434 (add-before 'configure 'fix-sed-command
2436 ;; Newer sed versions error out if double brackets are not used.
2437 (substitute* "configure"
2438 (("\\[:space:\\]") "[[:space:]]"))
2440 (synopsis "C++ connector for PostgreSQL")
2442 "Libpqxx is a C++ library to enable user programs to communicate with the
2443 PostgreSQL database back-end. The database back-end can be local or it may be
2444 on another machine, accessed via TCP/IP.")
2445 (home-page "http://pqxx.org/")
2446 (license license:bsd-3)))
2448 (define-public python-peewee
2450 (name "python-peewee")
2455 (uri (pypi-uri "peewee" version))
2457 (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar"))))
2458 (build-system python-build-system)
2460 `(#:tests? #f)) ; fails to import test data
2462 `(("sqlite" ,sqlite)))
2464 `(("python-cython" ,python-cython)))
2465 (home-page "https://github.com/coleifer/peewee/")
2466 (synopsis "Small object-relational mapping utility")
2468 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
2469 handles converting between pythonic values and those used by databases, so you
2470 can use Python types in your code without having to worry. It has built-in
2471 support for sqlite, mysql and postgresql. If you already have a database, you
2472 can autogenerate peewee models using @code{pwiz}, a model generator.")
2473 (license license:expat)))
2475 (define-public python2-peewee
2476 (package-with-python2 python-peewee))
2478 (define-public python-tortoise-orm
2480 (name "python-tortoise-orm")
2485 (uri (pypi-uri "tortoise-orm" version))
2488 "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
2489 (build-system python-build-system)
2491 `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
2493 #:phases (modify-phases %standard-phases
2494 (add-after 'unpack 'relax-version-requirements
2496 (substitute* "setup.py"
2497 (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
2498 (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite")
2499 (("pytz>=2020\\.4,<2021\\.0") "pytz")
2500 ;; Not required, since ciso8601 is used.
2501 (("'iso8601>=0\\.1\\.13,<0\\.2\\.0',") ""))
2504 `(("python-asynctest" ,python-asynctest)
2505 ("python-nose2" ,python-nose2)))
2507 `(("python-aiosqlite" ,python-aiosqlite)
2508 ("python-pypika" ,python-pypika)
2509 ("python-ciso8601" ,python-ciso8601)
2510 ("python-pytz" ,python-pytz)
2511 ("python-typing-extensions"
2512 ,python-typing-extensions)))
2514 "https://github.com/tortoise/tortoise-orm")
2516 "Easy async ORM for python, built with relations in mind")
2518 "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
2519 inspired by Django. Tortoise ORM was build with relations in mind and
2520 admiration for the excellent and popular Django ORM. It’s engraved in its
2521 design that you are working not with just tables, you work with relational
2523 (license license:asl2.0)))
2525 (define-public sqlcipher
2532 (uri (string-append "https://github.com/sqlcipher/" name
2533 "/archive/v" version ".tar.gz"))
2535 (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9"))
2536 (file-name (string-append name "-" version ".tar.gz"))))
2537 (build-system gnu-build-system)
2539 `(("libcrypto" ,openssl)
2540 ("libtcl8.6" ,tcl))) ; required for running the tests
2545 '("--enable-tempstore=yes"
2546 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
2547 "LDFLAGS=-lcrypto -ltcl8.6"
2549 ;; tests cannot be run from the Makefile
2550 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
2551 #:test-target "testfixture"
2553 (modify-phases %standard-phases
2554 (add-before 'check 'build-test-runner
2555 (assoc-ref %standard-phases 'check))
2558 (invoke "./testfixture" "test/crypto.test"))))))
2559 (home-page "https://www.zetetic.net/sqlcipher/")
2561 "Library providing transparent encryption of SQLite database files")
2562 (description "SQLCipher is an implementation of SQLite, extended to
2563 provide transparent 256-bit AES encryption of database files. Pages are
2564 encrypted before being written to disk and are decrypted when read back. It’s
2565 well suited for protecting embedded application databases and for mobile
2568 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
2569 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
2570 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
2571 ;; source files are in the public domain.
2572 (license (list license:public-domain license:bsd-3))))
2574 (define-public python-pyodbc-c
2576 (name "python-pyodbc-c")
2581 (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/"
2582 "archive.tar.gz?ref=v" version))
2585 "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9"))
2586 (file-name (string-append name "-" version ".tar.gz"))))
2587 (build-system python-build-system)
2589 `(("unixodbc" ,unixodbc)))
2591 `(;; No unit tests exist.
2593 (home-page "https://github.com/mkleehammer/pyodbc")
2594 (synopsis "Python ODBC Library")
2595 (description "@code{python-pyodbc-c} provides a Python DB-API driver
2597 (license (license:x11-style "file://LICENSE.TXT"))))
2599 (define-public python2-pyodbc-c
2600 (package-with-python2 python-pyodbc-c))
2602 (define-public python-pyodbc
2604 (name "python-pyodbc")
2609 (uri (pypi-uri "pyodbc" version))
2611 (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5"))
2612 (file-name (string-append name "-" version ".tar.gz"))))
2613 (build-system python-build-system)
2615 `(("unixodbc" ,unixodbc)))
2617 `(#:tests? #f)) ; no unit tests exist
2618 (home-page "https://github.com/mkleehammer/pyodbc")
2619 (synopsis "Python ODBC Library")
2620 (description "@code{python-pyodbc} provides a Python DB-API driver
2622 (license (license:x11-style "file:///LICENSE.TXT"))))
2624 (define-public python2-pyodbc
2625 (package-with-python2 python-pyodbc))
2627 (define-public mdbtools
2635 (url "https://github.com/brianb/mdbtools")
2637 (file-name (git-file-name name version))
2640 "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l"))))
2641 (build-system gnu-build-system)
2645 `(("autoconf" ,autoconf)
2646 ("automake" ,automake)
2647 ("libtool" ,libtool)
2648 ("pkg-config" ,pkg-config)
2649 ("txt2man" ,txt2man)
2651 (home-page "http://mdbtools.sourceforge.net/")
2652 (synopsis "Read Microsoft Access databases")
2653 (description "MDB Tools is a set of tools and applications to read the
2654 proprietary MDB file format used in Microsoft's Access database package. This
2655 includes programs to export schema and data from Microsoft's Access database
2656 file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
2657 etc., and an SQL engine for performing simple SQL queries.")
2658 (license (list license:lgpl2.0
2661 (define-public python-lmdb
2663 (name "python-lmdb")
2667 (uri (pypi-uri "lmdb" version))
2670 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
2671 (modules '((guix build utils)))
2673 ;; Delete bundled lmdb source files.
2675 (for-each delete-file (list "lib/lmdb.h"
2680 (build-system python-build-system)
2685 (modify-phases %standard-phases
2686 (add-before 'build 'use-system-lmdb
2687 (lambda* (#:key inputs #:allow-other-keys)
2688 (let ((lmdb (assoc-ref inputs "lmdb")))
2689 (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch
2690 (setenv "LMDB_FORCE_SYSTEM" "set")
2691 (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
2692 (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
2694 ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
2696 (home-page "https://github.com/dw/py-lmdb")
2697 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
2699 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
2700 Memory-Mapped Database} (LMDB), a high-performance key-value store.")
2702 (list license:openldap2.8
2703 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
2704 ;; but not actually needed on platforms currently supported by Guix.
2707 (define-public python-orator
2709 (name "python-orator")
2713 (uri (pypi-uri "orator" version))
2716 "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg"))))
2717 (build-system python-build-system)
2718 ;; FIXME: Tests are not distributed with PyPI, and the repository
2719 ;; does not contain setup.py. How to test?
2720 (arguments '(#:tests? #f))
2722 `(("python-backpack" ,python-backpack)
2723 ("python-blinker" ,python-blinker)
2724 ("python-cleo" ,python-cleo)
2725 ("python-faker" ,python-faker)
2726 ("python-inflection" ,python-inflection)
2727 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
2728 ("python-pendulum" ,python-pendulum)
2729 ("python-pyaml" ,python-pyaml)
2730 ("python-pygments" ,python-pygments)
2731 ("python-pyyaml" ,python-pyyaml)
2732 ("python-simplejson" ,python-simplejson)
2733 ("python-six" ,python-six)
2734 ("python-wrapt" ,python-wrapt)))
2735 (home-page "https://orator-orm.com/")
2736 (synopsis "ActiveRecord ORM for Python")
2738 "Orator provides a simple ActiveRecord-like Object Relational Mapping
2739 implementation for Python.")
2740 (license license:expat)
2741 (properties `((python2-variant . ,(delay python2-orator))))))
2743 (define-public python2-orator
2744 (package-with-python2 (strip-python2-variant python-orator)))
2746 (define-public virtuoso-ose
2748 (name "virtuoso-ose")
2754 "https://github.com/openlink/virtuoso-opensource/releases/"
2755 "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
2757 (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42"))))
2758 (build-system gnu-build-system)
2760 `(#:tests? #f ; Tests require a network connection.
2761 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
2762 ;; This indicates that the internal zlib code may still be used.
2763 #:configure-flags '("--without-internal-zlib"
2765 "--enable-static=no")
2767 (modify-phases %standard-phases
2768 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
2769 ;; the build output. The following phase removes it.
2770 (add-after 'install 'remove-static-libs
2771 (lambda* (#:key outputs #:allow-other-keys)
2772 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2773 (for-each (lambda (file)
2774 (delete-file (string-append lib "/" file)))
2776 "libvirtuoso-t.la"))))))))
2778 `(("openssl" ,openssl-1.0)
2779 ("net-tools" ,net-tools)
2780 ("readline" ,readline)
2782 (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
2783 (synopsis "Multi-model database system")
2784 (description "Virtuoso is a scalable cross-platform server that combines
2785 relational, graph, and document data management with web application server
2786 and web services platform functionality.")
2787 ;; configure: error: ... can only be build on 64bit platforms
2788 (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
2789 (license license:gpl2)))
2791 (define-public python-ccm
2798 (uri (pypi-uri "ccm" version))
2801 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
2802 (build-system python-build-system)
2804 `(("python-pyyaml" ,python-pyyaml)
2805 ;; Not listed in setup.py, but used in ccmlib/node.py for full
2807 ("python-psutil" ,python-psutil)
2808 ("python-six" ,python-six)))
2809 (home-page "https://github.com/pcmanus/ccm")
2810 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
2812 (description "Cassandra Cluster Manager is a development tool for testing
2813 local Cassandra clusters. It creates, launches and removes Cassandra clusters
2815 (license license:asl2.0)))
2817 (define-public python2-ccm
2818 (package-with-python2 python-ccm))
2820 (define-public python2-pysqlite
2822 (name "python2-pysqlite")
2827 (uri (pypi-uri "pysqlite" version))
2830 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
2831 (build-system python-build-system)
2833 `(("sqlite" ,sqlite)))
2835 `(#:python ,python-2 ; incompatible with Python 3
2836 #:tests? #f)) ; no test target
2837 (home-page "https://github.com/ghaering/pysqlite")
2838 (synopsis "SQLite bindings for Python")
2840 "Pysqlite provides SQLite bindings for Python that comply to the
2841 Database API 2.0T.")
2842 (license license:zlib)))
2844 (define-public python-sqlalchemy
2846 (name "python-sqlalchemy")
2851 (uri (pypi-uri "SQLAlchemy" version))
2853 (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
2854 (build-system python-build-system)
2856 `(("python-cython" ,python-cython) ; for C extensions
2857 ("python-pytest" ,python-pytest)
2858 ("python-mock" ,python-mock))) ; for tests
2861 (modify-phases %standard-phases
2863 (lambda _ (invoke "py.test"))))))
2864 (home-page "https://www.sqlalchemy.org")
2865 (synopsis "Database abstraction library")
2867 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2868 gives application developers the full power and flexibility of SQL. It
2869 provides a full suite of well known enterprise-level persistence patterns,
2870 designed for efficient and high-performing database access, adapted into a
2871 simple and Pythonic domain language.")
2872 (license license:x11)))
2874 (define-public python2-sqlalchemy
2875 (package-with-python2 python-sqlalchemy))
2877 (define-public python-sqlalchemy-utils
2879 (name "python-sqlalchemy-utils")
2884 (uri (pypi-uri "SQLAlchemy-Utils" version))
2887 "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73"))))
2888 (build-system python-build-system)
2890 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
2892 ;; (modify-phases %standard-phases
2895 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
2897 `(("python-six" ,python-six)
2898 ("python-sqlalchemy" ,python-sqlalchemy)))
2900 `(("python-dateutil" ,python-dateutil)
2901 ("python-flexmock" ,python-flexmock)
2902 ("python-psycopg2" ,python-psycopg2)
2903 ("python-pytest" ,python-pytest)
2904 ("python-pytz" ,python-pytz)))
2905 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
2906 (synopsis "Various utility functions for SQLAlchemy")
2908 "SQLAlchemy-utils provides various utility functions and custom data types
2909 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
2911 You might also want to install the following optional dependencies:
2913 @item @code{python-passlib}
2914 @item @code{python-babel}
2915 @item @code{python-cryptography}
2916 @item @code{python-pytz}
2917 @item @code{python-psycopg2}
2918 @item @code{python-furl}
2919 @item @code{python-flask-babel}
2922 (license license:bsd-3)))
2924 (define-public python2-sqlalchemy-utils
2925 (package-with-python2 python-sqlalchemy-utils))
2927 (define-public python-alchemy-mock
2929 (name "python-alchemy-mock")
2931 (home-page "https://github.com/miki725/alchemy-mock")
2934 (uri (pypi-uri "alchemy-mock" version))
2937 "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r"))))
2938 (build-system python-build-system)
2940 '(#:phases (modify-phases %standard-phases
2943 ;; Create pytest.ini that adds doctest options to
2944 ;; prevent test failure. Taken from tox.ini.
2945 (call-with-output-file "pytest.ini"
2947 (format port "[pytest]
2948 doctest_optionflags=IGNORE_EXCEPTION_DETAIL
2950 (invoke "pytest" "-vv" "--doctest-modules"
2951 "alchemy_mock/"))))))
2953 `(("python-mock" ,python-mock)
2954 ("python-pytest" ,python-pytest)))
2956 `(("python-six" ,python-six)
2957 ("python-sqlalchemy" ,python-sqlalchemy)))
2958 (synopsis "Mock helpers for SQLAlchemy")
2960 "This package provides mock helpers for SQLAlchemy that makes it easy
2961 to mock an SQLAlchemy session while preserving the ability to do asserts.
2963 Normally Normally SQLAlchemy's expressions cannot be easily compared as
2964 comparison on binary expression produces yet another binary expression, but
2965 this library provides functions to facilitate such comparisons.")
2966 (license license:expat)))
2968 (define-public python-alembic
2970 (name "python-alembic")
2975 (uri (pypi-uri "alembic" version))
2977 (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
2978 (build-system python-build-system)
2980 '(#:phases (modify-phases %standard-phases
2983 (invoke "pytest" "-vv"))))))
2985 `(("python-mock" ,python-mock)
2986 ("python-pytest-cov" ,python-pytest-cov)))
2988 `(("python-dateutil" ,python-dateutil)
2989 ("python-sqlalchemy" ,python-sqlalchemy)
2990 ("python-mako" ,python-mako)
2991 ("python-editor" ,python-editor)))
2992 (home-page "https://bitbucket.org/zzzeek/alembic")
2993 (synopsis "Database migration tool for SQLAlchemy")
2995 "Alembic is a lightweight database migration tool for usage with the
2996 SQLAlchemy Database Toolkit for Python.")
2997 (license license:expat)))
2999 (define-public python2-alembic
3000 (package-with-python2 python-alembic))
3002 (define-public python-pickleshare
3004 (name "python-pickleshare")
3009 (uri (pypi-uri "pickleshare" version))
3011 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
3012 (build-system python-build-system)
3014 `(#:phases (modify-phases %standard-phases
3017 (invoke "pytest"))))))
3019 `(("python-pytest" ,python-pytest)))
3020 (home-page "https://github.com/vivainio/pickleshare")
3021 (synopsis "Tiny key value database with concurrency support")
3023 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
3024 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
3025 shelve, many processes can access the database simultaneously. Changing a
3026 value in database is immediately visible to other processes accessing the same
3027 database. Concurrency is possible because the values are stored in separate
3028 files. Hence the “database” is a directory where all files are governed by
3030 (properties `((python2-variant . ,(delay python2-pickleshare))))
3031 (license license:expat)))
3033 (define-public python2-pickleshare
3034 (let ((pickleshare (package-with-python2
3035 (strip-python2-variant python-pickleshare))))
3036 (package (inherit pickleshare)
3037 (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2)
3038 ,@(package-propagated-inputs pickleshare))))))
3040 (define-public python-apsw
3042 (name "python-apsw")
3043 (version "3.31.1-r1")
3047 (uri (string-append "https://github.com/rogerbinns/apsw/releases"
3048 "/download/" version "/apsw-" version ".zip"))
3051 "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
3052 (build-system python-build-system)
3054 `(("unzip" ,unzip)))
3056 `(("sqlite" ,sqlite)))
3059 (modify-phases %standard-phases
3062 (invoke "python" "setup.py" "build" "--enable-all-extensions")
3064 (add-after 'build 'build-test-helper
3066 (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
3067 "-I." "-Isqlite3" "src/testextension.c")
3070 (lambda* (#:key inputs outputs #:allow-other-keys)
3071 (add-installed-pythonpath inputs outputs)
3072 (invoke "python" "setup.py" "test")
3074 (home-page "https://github.com/rogerbinns/apsw/")
3075 (synopsis "Another Python SQLite Wrapper")
3076 (description "APSW is a Python wrapper for the SQLite
3077 embedded relational database engine. In contrast to other wrappers such as
3078 pysqlite it focuses on being a minimal layer over SQLite attempting just to
3079 translate the complete SQLite API into Python.")
3080 (license license:zlib)))
3082 (define-public python2-apsw
3083 (package-with-python2 python-apsw))
3085 (define-public python-aiosqlite
3087 (name "python-aiosqlite")
3092 (uri (pypi-uri "aiosqlite" version))
3095 "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph"))))
3096 (build-system python-build-system)
3098 '(#:phases (modify-phases %standard-phases
3100 (lambda* (#:key tests? #:allow-other-keys)
3102 (invoke "python" "-m" "unittest" "aiosqlite.tests")
3103 (format #t "test suite not run~%"))
3106 `(("python-typing-extensions" ,python-typing-extensions)))
3108 `(("python-aiounittest" ,python-aiounittest)))
3109 (home-page "https://github.com/jreese/aiosqlite")
3111 "Asyncio bridge for sqlite3")
3113 "The package aiosqlite replicates the standard sqlite3 module, but with
3114 async versions of all the standard connection and cursor methods, and context
3115 managers for automatically closing connections.")
3116 (license license:expat)))
3118 (define-public python2-neo4j-driver
3120 (name "python2-neo4j-driver")
3121 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
3125 (uri (pypi-uri "neo4j-driver" version))
3128 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
3129 (build-system python-build-system)
3131 `(#:python ,python-2))
3132 (home-page "https://neo4j.com/developer/python/")
3133 (synopsis "Neo4j driver code written in Python")
3134 (description "This package provides the Neo4j Python driver that connects
3135 to the database using Neo4j's binary protocol. It aims to be minimal, while
3136 being idiomatic to Python.")
3137 (license license:asl2.0)))
3139 (define-public python2-py2neo
3141 (name "python2-py2neo")
3145 (uri (pypi-uri "py2neo" version))
3148 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
3149 (build-system python-build-system)
3151 `(#:python ,python-2))
3152 (home-page "https://py2neo.org")
3153 (synopsis "Library and toolkit for working with Neo4j in Python")
3154 (description "This package provides a client library and toolkit for
3155 working with Neo4j from within Python applications and from the command
3156 line. The core library has no external dependencies and has been carefully
3157 designed to be easy and intuitive to use.")
3158 (license license:asl2.0)))
3160 (define-public python-psycopg2
3162 (name "python-psycopg2")
3167 (uri (pypi-uri "psycopg2" version))
3169 (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"))))
3170 (build-system python-build-system)
3172 ;; Tests would require a postgresql database "psycopg2_test"
3173 ;; and a running postgresql database management service.
3174 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
3176 `(("postgresql" ,postgresql))) ; libpq
3177 (home-page "http://initd.org/psycopg/")
3178 (synopsis "Python PostgreSQL adapter")
3180 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
3182 (license license:lgpl3+)))
3184 (define-public python2-psycopg2
3185 (package-with-python2 python-psycopg2))
3187 (define-public python-sadisplay
3189 (name "python-sadisplay")
3194 (uri (pypi-uri "sadisplay" version))
3197 "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
3198 (build-system python-build-system)
3200 `(("python-sqlalchemy" ,python-sqlalchemy)))
3203 `(("python-nose" ,python-nose)))
3204 (home-page "https://bitbucket.org/estin/sadisplay")
3205 (synopsis "SQLAlchemy schema displayer")
3206 (description "This package provides a program to build Entity
3207 Relationship diagrams from a SQLAlchemy model (or directly from the
3209 (license license:bsd-3)))
3211 (define-public python2-sadisplay
3212 (package-with-python2 python-sadisplay))
3214 (define-public yoyo-migrations
3216 (name "yoyo-migrations")
3220 ;; We use the upstream repository, as the tests are not included in the
3224 (url "https://hg.sr.ht/~olly/yoyo")
3225 (changeset (string-append "v" version "-release"))))
3226 (file-name (string-append name "-" version "-checkout"))
3228 (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq"))))
3229 (build-system python-build-system)
3231 ;; XXX: Tests require a connection to some pgsql database and psycopg
3232 ;; fails to connect to it.
3235 `(("python-sqlparse" ,python-sqlparse)
3236 ("python-tabulate" ,python-tabulate)))
3237 (home-page "https://ollycope.com/software/yoyo/latest/")
3238 (synopsis "Database migrations with SQL")
3240 "Yoyo is a database schema migration tool. Migrations are written as SQL
3241 files or Python scripts that define a list of migration steps.")
3242 (license license:asl2.0)))
3244 (define-public python-mysqlclient
3246 (name "python-mysqlclient")
3251 (uri (pypi-uri "mysqlclient" version))
3254 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
3255 (build-system python-build-system)
3256 (arguments '(#:tests? #f)) ;XXX: requires a live database
3258 `(("mysql-dev" ,mariadb "dev")))
3259 (home-page "https://github.com/PyMySQL/mysqlclient-python")
3260 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
3261 (description "MySQLdb is an interface to the popular MySQL database server
3262 for Python. The design goals are:
3264 @item Compliance with Python database API version 2.0 [PEP-0249],
3265 @item Thread-safety,
3266 @item Thread-friendliness (threads will not block each other).
3268 (license license:gpl2)))
3270 (define-public python-hiredis
3272 (name "python-hiredis")
3277 (uri (pypi-uri "hiredis" version))
3280 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
3281 (build-system python-build-system)
3285 (home-page "https://github.com/redis/hiredis-py")
3286 (synopsis "Python extension that wraps protocol parsing code in hiredis")
3287 (description "Python-hiredis is a python extension that wraps protocol
3288 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
3289 (license license:bsd-3)))
3291 (define-public python2-hiredis
3292 (package-with-python2 python-hiredis))
3294 (define-public python-fakeredis
3296 (name "python-fakeredis")
3301 (uri (pypi-uri "fakeredis" version))
3304 "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
3305 (build-system python-build-system)
3310 `(("python-sortedcontainers" ,python-sortedcontainers)))
3311 (home-page "https://github.com/jamesls/fakeredis")
3312 (synopsis "Fake implementation of redis API for testing purposes")
3314 "Fakeredis is a pure-Python implementation of the redis-py Python client
3315 that simulates talking to a redis server. It was created for a single purpose:
3316 to write unit tests.
3318 Setting up redis is not hard, but one often wants to write unit tests that don't
3319 talk to an external server such as redis. This module can be used as a
3320 reasonable substitute.")
3321 (license license:bsd-3)))
3323 (define-public python2-fakeredis
3324 (package-with-python2 python-fakeredis))
3326 (define-public python-redis
3328 (name "python-redis")
3333 (uri (pypi-uri "redis" version))
3335 (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
3336 (build-system python-build-system)
3337 ;; Tests require a running Redis server.
3338 (arguments '(#:tests? #f))
3339 ;; As long as we are not running test, we do not need this input :-)
3341 ;; `(("python-pytest" ,python-pytest)))
3342 (home-page "https://github.com/andymccurdy/redis-py")
3343 (synopsis "Redis Python client")
3345 "This package provides a Python interface to the Redis key-value store.")
3346 (license license:expat)))
3348 (define-public python2-redis
3349 (package-with-python2 python-redis))
3351 (define-public python-rq
3359 (url "https://github.com/rq/rq")
3360 (commit (string-append "v" version))))
3361 (file-name (git-file-name name version))
3363 (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va"))))
3364 (build-system python-build-system)
3366 '(#:phases (modify-phases %standard-phases
3367 (add-before 'check 'start-redis
3369 (invoke "redis-server" "--daemonize" "yes")))
3371 (lambda* (#:key outputs #:allow-other-keys)
3372 (let ((out (assoc-ref outputs "out")))
3373 ;; Drop test that needs the SDK for Sentry.io.
3374 (delete-file "tests/test_sentry.py")
3375 ;; Ensure 'rq' and 'rqworker' ends up on PATH.
3376 (setenv "PATH" (string-append out "/bin:"
3378 (invoke "pytest" "-vv")))))))
3380 `(("python-mock" ,python-mock)
3381 ("python-pytest" ,python-pytest)
3384 `(("python-click" ,python-click)
3385 ("python-redis" ,python-redis)))
3386 (home-page "https://python-rq.org/")
3387 (synopsis "Simple job queues for Python")
3389 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3390 processing them in the background with workers. It is backed by Redis and it
3391 is designed to have a low barrier to entry.")
3392 (license license:bsd-2)))
3394 (define-public python-rq-scheduler
3396 (name "python-rq-scheduler")
3398 (home-page "https://github.com/rq/rq-scheduler")
3403 (commit (string-append "v" version))))
3404 (file-name (git-file-name name version))
3407 "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
3408 (build-system python-build-system)
3410 '(#:phases (modify-phases %standard-phases
3411 (add-before 'check 'start-redis
3413 (invoke "redis-server" "--daemonize" "yes")))
3416 (substitute* "run_tests.py"
3419 (invoke "./run_tests.py"))))))
3424 `(("python-croniter" ,python-croniter)
3425 ("python-rq" ,python-rq)))
3426 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
3428 "This package provides job scheduling capabilities to @code{python-rq}
3430 (license license:expat)))
3432 (define-public python-trollius-redis
3434 (name "python-trollius-redis")
3439 (uri (pypi-uri "trollius_redis" version))
3442 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
3443 (build-system python-build-system)
3444 ;; TODO: Tests require packaging 'hiredis'.
3445 (arguments '(#:tests? #f))
3446 (home-page "https://github.com/benjolitz/trollius-redis")
3447 (synopsis "Port of asyncio-redis to trollius")
3448 (description "@code{trollius-redis} is a Redis client for Python
3449 trollius. It is an asynchronous IO (PEP 3156) implementation of the
3451 (license license:bsd-2)))
3453 (define-public python2-trollius-redis
3454 (package-with-python2 python-trollius-redis))
3456 (define-public python-sqlparse
3458 (name "python-sqlparse")
3462 (uri (pypi-uri "sqlparse" version))
3465 "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1"))))
3466 (build-system python-build-system)
3469 (modify-phases %standard-phases
3471 (lambda _ (invoke "py.test"))))))
3473 `(("python-pytest" ,python-pytest)))
3474 (home-page "https://github.com/andialbrecht/sqlparse")
3475 (synopsis "Non-validating SQL parser")
3476 (description "Sqlparse is a non-validating SQL parser for Python. It
3477 provides support for parsing, splitting and formatting SQL statements.")
3478 (license license:bsd-3)))
3480 (define-public python2-sqlparse
3481 (package-with-python2 python-sqlparse))
3483 (define-public python-sql
3490 (uri (pypi-uri "python-sql" version))
3492 (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
3493 (build-system python-build-system)
3494 (home-page "https://python-sql.tryton.org/")
3495 (synopsis "Library to write SQL queries in a pythonic way")
3496 (description "@code{python-sql} is a library to write SQL queries, that
3497 transforms idiomatic python function calls to well-formed SQL queries.")
3498 (license license:bsd-3)))
3500 (define-public python2-sql
3501 (package-with-python2 python-sql))
3503 (define-public python-pypika
3505 (name "python-pypika")
3508 (origin (method git-fetch)
3510 (url "https://github.com/kayak/pypika")
3511 (commit (string-append "v" version))))
3512 (file-name (git-file-name name version))
3515 "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549"))))
3516 (build-system python-build-system)
3518 `(("python-parameterized" ,python-parameterized)))
3519 (home-page "https://github.com/kayak/pypika")
3520 (synopsis "SQL query builder API for Python")
3522 "PyPika is a python SQL query builder that exposes the full richness of
3523 the SQL language using a syntax that reflects the resulting query.")
3524 (license license:asl2.0)))
3526 ;; There are many wrappers for this in other languages. When touching, please
3527 ;; be sure to ensure all dependencies continue to build.
3528 (define-public apache-arrow
3530 (name "apache-arrow")
3536 (url "https://github.com/apache/arrow")
3537 (commit (string-append "apache-arrow-" version))))
3538 (file-name (git-file-name name version))
3541 "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0"))))
3542 (build-system cmake-build-system)
3546 (modify-phases %standard-phases
3547 (add-before 'configure 'enter-source-directory
3548 (lambda _ (chdir "cpp") #t))
3549 (add-after 'unpack 'set-env
3551 (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost"))
3552 (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli"))
3553 (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers"))
3554 (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson"))
3556 #:build-type "Release"
3558 (list "-DARROW_PYTHON=ON"
3561 "-DARROW_PARQUET=ON"
3562 "-DPARQUET_BUILD_EXECUTABLES=ON"
3563 ;; The maintainers disallow using system versions of
3565 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
3566 ;; is unfortunate because jemalloc increases performance:
3567 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
3568 "-DARROW_JEMALLOC=OFF"
3570 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
3571 ;; option that instructs the build system how to resolve
3572 ;; each dependency. SYSTEM = Finding the dependency in
3573 ;; system paths using CMake's built-in find_package
3574 ;; function, or using pkg-config for packages that do not
3575 ;; have this feature
3576 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
3578 ;; Split output into its component packages.
3579 (string-append "-DCMAKE_INSTALL_PREFIX="
3580 (assoc-ref %outputs "lib"))
3581 (string-append "-DCMAKE_INSTALL_RPATH="
3582 (assoc-ref %outputs "lib")
3584 (string-append "-DCMAKE_INSTALL_BINDIR="
3585 (assoc-ref %outputs "out")
3587 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
3588 (assoc-ref %outputs "include")
3592 "-DARROW_WITH_SNAPPY=ON"
3593 "-DARROW_WITH_ZLIB=ON"
3594 "-DARROW_WITH_ZSTD=ON"
3595 "-DARROW_WITH_LZ4=ON"
3596 "-DARROW_COMPUTE=ON"
3598 "-DARROW_DATASET=ON"
3599 "-DARROW_FILESYSTEM=ON"
3602 ;; Arrow Python C++ integration library (required for
3603 ;; building pyarrow). This library must be built against
3604 ;; the same Python version for which you are building
3605 ;; pyarrow. NumPy must also be installed. Enabling this
3606 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
3607 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
3611 ;; Building the tests forces on all the
3612 ;; optional features and the use of static
3614 "-DARROW_BUILD_TESTS=OFF"
3615 "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF"
3616 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
3617 "-DARROW_BUILD_STATIC=OFF")))
3619 `(("apache-thrift" ,apache-thrift "lib")
3621 ("brotli" ,google-brotli)
3623 ("double-conversion" ,double-conversion)
3628 ("protobuf" ,protobuf)
3629 ("python-3" ,python)
3630 ("python-numpy" ,python-numpy)
3631 ("rapidjson" ,rapidjson)
3634 ("utf8proc" ,utf8proc)
3636 ("zstd" ,zstd "lib")))
3638 `(("pkg-config" ,pkg-config)))
3639 (outputs '("out" "lib" "include"))
3640 (home-page "https://arrow.apache.org/")
3641 (synopsis "Columnar in-memory analytics")
3642 (description "Apache Arrow is a columnar in-memory analytics layer
3643 designed to accelerate big data. It houses a set of canonical in-memory
3644 representations of flat and hierarchical data along with multiple
3645 language-bindings for structure manipulation. It also provides IPC and common
3646 algorithm implementations.")
3647 (license license:asl2.0)))
3649 (define-public python-pyarrow
3651 (inherit apache-arrow)
3652 (name "python-pyarrow")
3653 (build-system python-build-system)
3655 '(#:tests? #f ; XXX There are no tests in the "python" directory
3657 (modify-phases %standard-phases
3658 (delete 'build) ; XXX the build is performed again during the install phase
3659 (add-after 'unpack 'enter-source-directory
3660 (lambda _ (chdir "python") #t))
3661 (add-after 'unpack 'make-git-checkout-writable
3663 (for-each make-file-writable (find-files "."))
3666 `(("apache-arrow" ,apache-arrow "lib")
3667 ("python-numpy" ,python-numpy)
3668 ("python-pandas" ,python-pandas)
3669 ("python-six" ,python-six)))
3671 `(("cmake" ,cmake-minimal)
3672 ("pkg-config" ,pkg-config)
3673 ("python-cython" ,python-cython)
3674 ("python-pytest" ,python-pytest)
3675 ("python-pytest-runner" ,python-pytest-runner)
3676 ("python-setuptools-scm" ,python-setuptools-scm)))
3678 (home-page "https://arrow.apache.org/docs/python/")
3679 (synopsis "Python bindings for Apache Arrow")
3681 "This library provides a Pythonic API wrapper for the reference Arrow C++
3682 implementation, along with tools for interoperability with pandas, NumPy, and
3683 other traditional Python scientific computing packages.")
3684 (license license:asl2.0)))
3686 (define-public python-crate
3688 (name "python-crate")
3692 (uri (pypi-uri "crate" version))
3695 "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx"))))
3696 (build-system python-build-system)
3698 `(("python-urllib3" ,python-urllib3)))
3699 (home-page "https://github.com/crate/crate-python")
3700 (synopsis "CrateDB Python client")
3702 "This package provides a Python client library for CrateDB.
3703 It implements the Python DB API 2.0 specification and includes support for
3705 (license license:asl2.0)))
3707 (define-public libdbi
3713 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
3714 version "/libdbi-" version ".tar.gz"))
3717 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
3718 (build-system gnu-build-system)
3719 (synopsis "Database independent abstraction layer in C")
3721 "This library implements a database independent abstraction layer in C,
3722 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
3723 programmers can leverage the power of multiple databases and multiple
3724 simultaneous database connections by using this framework.")
3725 (home-page "http://libdbi.sourceforge.net/")
3726 (license license:lgpl2.1+)))
3728 (define-public libdbi-drivers
3730 (name "libdbi-drivers")
3734 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
3735 "libdbi-drivers/libdbi-drivers-" version
3736 "/libdbi-drivers-" version ".tar.gz"))
3739 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
3740 (build-system gnu-build-system)
3743 ("inetutils" ,inetutils)
3744 ("glibc-locales" ,glibc-locales)
3745 ("mariadb" ,mariadb)))
3747 `(("libdbi" ,libdbi)
3748 ("mariadb:dev" ,mariadb "dev")
3749 ("mariadb:lib" ,mariadb "lib")
3750 ("postgresql" ,postgresql)
3751 ("sqlite" ,sqlite)))
3754 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
3755 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
3756 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
3757 (postgresql (assoc-ref %build-inputs "postgresql"))
3758 (sqlite (assoc-ref %build-inputs "sqlite")))
3759 (list "--disable-docs"
3760 (string-append "--with-dbi-incdir=" libdbi "/include")
3761 (string-append "--with-dbi-libdir=" libdbi "/lib")
3763 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
3764 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
3766 (string-append "--with-pgsql-incdir=" postgresql "/include")
3767 (string-append "--with-pgsql-libdir=" postgresql "/lib")
3769 (string-append "--with-sqlite-incdir=" sqlite "/include")
3770 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
3771 #:tests? #f ; FIXME: Find why the tests get stuck forever.
3773 (modify-phases %standard-phases
3774 (add-after 'unpack 'fix-tests
3775 (lambda* (#:key inputs #:allow-other-keys)
3776 (substitute* "tests/test_mysql.sh"
3778 (string-append "MYMYSQLD="
3779 (assoc-ref inputs "mariadb")
3782 (add-after 'install 'remove-empty-directories
3783 (lambda* (#:key outputs #:allow-other-keys)
3784 (let ((var (string-append (assoc-ref outputs "out") "/var")))
3785 (delete-file-recursively var))
3787 (synopsis "Database drivers for the libdbi framework")
3789 "The @code{libdbi-drivers} library provides the database specific drivers
3790 for the @code{libdbi} framework.
3792 The drivers officially supported by @code{libdbi} are:
3798 (home-page "http://libdbi-drivers.sourceforge.net/")
3799 (license license:lgpl2.1+)))
3808 (url "https://github.com/SOCI/soci/")
3810 (file-name (git-file-name name version))
3813 "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp"))))
3814 (build-system cmake-build-system)
3816 ;; Headers of soci has include-references to headers of these inputs.
3817 `(("firebird" ,firebird)
3818 ("postgresql" ,postgresql)
3822 ("mariadb:dev" ,mariadb "dev")))
3825 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it.
3826 (list "-DCMAKE_CXX_STANDARD=17"
3827 "-DSOCI_LIBDIR=lib")
3828 #:tests? #f)) ; may require running database management systems
3829 (synopsis "C++ Database Access Library")
3831 "SOCI is an abstraction layer for several database backends, including
3832 PostreSQL, SQLite, ODBC and MySQL.")
3833 (home-page "http://soci.sourceforge.net/")
3834 (license license:boost1.0)))
3836 (define-public freetds
3843 (uri (string-append "https://www.freetds.org/files/stable/"
3844 "freetds-" version ".tar.gz"))
3846 (base32 "11fzwcahc1bc8npxbif0448v9cwyf7k04167i7fcspmfw7a0hj0d"))))
3847 (build-system gnu-build-system)
3849 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
3850 ;; disabled for now.
3852 (home-page "https://www.freetds.org/")
3853 (synopsis "Client libraries for MS SQL and Sybase servers")
3855 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
3856 connecting to MS SQL and Sybase servers over TCP/IP.")
3857 (license license:lgpl2.0+)))