Commit | Line | Data |
---|---|---|
5f96f303 | 1 | ;;; GNU Guix --- Functional package management for GNU |
189be331 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org> |
a8714bf6 RW |
3 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> |
4 | ;;; Copyright © 2013, 2017 Cyril Roelandt <tipecaml@gmail.com> | |
218a2106 | 5 | ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org> |
b9ed5ef3 | 6 | ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org> |
a8714bf6 | 7 | ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org> |
da1f7a9e | 8 | ;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com> |
b747a9db | 9 | ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> |
a8714bf6 RW |
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> | |
9930beb8 | 13 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
3c986a7d | 14 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> |
6d09a7b5 | 15 | ;;; Copyright © 2016, 2017, 2018 Roel Janssen <roel@gnu.org> |
0e1b262e | 16 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
fe71eee0 | 17 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
62ea44fc | 18 | ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> |
a8714bf6 | 19 | ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> |
51d42caa | 20 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
c336567d | 21 | ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu> |
7dc0f1d5 | 22 | ;;; Copyright © 2017, 2020 Thomas Danckaert <post@thomasdanckaert.be> |
a8714bf6 RW |
23 | ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org> |
24 | ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> | |
d39a84e8 | 25 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
5aa81639 | 26 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
38abef12 | 27 | ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com> |
19601e89 | 28 | ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com> |
231123ee | 29 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
7bcc3405 | 30 | ;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com> |
e58d3a59 | 31 | ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
16973071 | 32 | ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com> |
3926a099 | 33 | ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net> |
dae7661a | 34 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
9bab0950 | 35 | ;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
9df78675 | 36 | ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us> |
a3abc3fd | 37 | ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> |
91477def | 38 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> |
450d5dc2 | 39 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
4e902da6 | 40 | ;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net> |
2072bc08 | 41 | ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> |
659bc436 | 42 | ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz> |
1655e7be | 43 | ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org> |
ba0b249d | 44 | ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org> |
8de54c63 | 45 | ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org> |
d343e0fe | 46 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
945ec6c3 | 47 | ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> |
a7051a0e | 48 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
0c0a2831 | 49 | ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com> |
23af76f1 | 50 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> |
5f96f303 LC |
51 | ;;; |
52 | ;;; This file is part of GNU Guix. | |
53 | ;;; | |
54 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
55 | ;;; under the terms of the GNU General Public License as published by | |
56 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
57 | ;;; your option) any later version. | |
58 | ;;; | |
59 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
60 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
61 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
62 | ;;; GNU General Public License for more details. | |
63 | ;;; | |
64 | ;;; You should have received a copy of the GNU General Public License | |
65 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
66 | ||
67 | (define-module (gnu packages databases) | |
68 | #:use-module (gnu packages) | |
58071723 | 69 | #:use-module (gnu packages admin) |
06a035db | 70 | #:use-module (gnu packages algebra) |
4c6aa73b RJ |
71 | #:use-module (gnu packages autotools) |
72 | #:use-module (gnu packages avahi) | |
77e52190 | 73 | #:use-module (gnu packages base) |
b747a9db | 74 | #:use-module (gnu packages bash) |
06a035db | 75 | #:use-module (gnu packages bison) |
23bbd7dd | 76 | #:use-module (gnu packages boost) |
06a035db | 77 | #:use-module (gnu packages check) |
dae7661a | 78 | #:use-module (gnu packages cmake) |
06a035db | 79 | #:use-module (gnu packages compression) |
62ea44fc | 80 | #:use-module (gnu packages crypto) |
06a035db MB |
81 | #:use-module (gnu packages curl) |
82 | #:use-module (gnu packages cyrus-sasl) | |
255d1bbe | 83 | #:use-module (gnu packages dbm) |
06a035db | 84 | #:use-module (gnu packages emacs) |
da602679 | 85 | #:use-module (gnu packages flex) |
2fa55c72 | 86 | #:use-module (gnu packages gcc) |
4c6aa73b RJ |
87 | #:use-module (gnu packages gettext) |
88 | #:use-module (gnu packages glib) | |
06a035db | 89 | #:use-module (gnu packages gnupg) |
33c88fcb | 90 | #:use-module (gnu packages golang) |
100a4f84 | 91 | #:use-module (gnu packages guile) |
3f8158d6 | 92 | #:use-module (gnu packages icu4c) |
06a035db | 93 | #:use-module (gnu packages jemalloc) |
708155df | 94 | #:use-module (gnu packages language) |
3f8158d6 | 95 | #:use-module (gnu packages libedit) |
686144e9 | 96 | #:use-module (gnu packages libevent) |
5f96f303 | 97 | #:use-module (gnu packages linux) |
100a4f84 SH |
98 | #:use-module (gnu packages lisp) |
99 | #:use-module (gnu packages lisp-xyz) | |
a50628bb | 100 | #:use-module (gnu packages logging) |
d39a84e8 | 101 | #:use-module (gnu packages man) |
a50628bb | 102 | #:use-module (gnu packages maths) |
3f8158d6 | 103 | #:use-module (gnu packages multiprecision) |
5f96f303 | 104 | #:use-module (gnu packages ncurses) |
aace6f6d | 105 | #:use-module (gnu packages onc-rpc) |
d3c6ad0a | 106 | #:use-module (gnu packages parallel) |
77631745 | 107 | #:use-module (gnu packages pcre) |
06a035db | 108 | #:use-module (gnu packages perl) |
5ccde207 | 109 | #:use-module (gnu packages perl-check) |
cabe8f18 | 110 | #:use-module (gnu packages perl-web) |
4c6aa73b | 111 | #:use-module (gnu packages pkg-config) |
d3c6ad0a | 112 | #:use-module (gnu packages popt) |
a50628bb | 113 | #:use-module (gnu packages protobuf) |
06a035db | 114 | #:use-module (gnu packages python) |
9763102b | 115 | #:use-module (gnu packages python-crypto) |
312ec128 | 116 | #:use-module (gnu packages python-science) |
100a4f84 | 117 | #:use-module (gnu packages python-web) |
44d10b1f | 118 | #:use-module (gnu packages python-xyz) |
4c6aa73b | 119 | #:use-module (gnu packages rdf) |
06a035db | 120 | #:use-module (gnu packages readline) |
a50628bb KCB |
121 | #:use-module (gnu packages regex) |
122 | #:use-module (gnu packages rpc) | |
afcbb020 | 123 | #:use-module (gnu packages ruby) |
6bbbca90 | 124 | #:use-module (gnu packages serialization) |
9d0c291e | 125 | #:use-module (gnu packages sphinx) |
cd0322a3 | 126 | #:use-module (gnu packages sqlite) |
06a035db | 127 | #:use-module (gnu packages tcl) |
33c88fcb CB |
128 | #:use-module (gnu packages terminals) |
129 | #:use-module (gnu packages textutils) | |
100a4f84 | 130 | #:use-module (gnu packages time) |
06a035db | 131 | #:use-module (gnu packages tls) |
6bbbca90 | 132 | #:use-module (gnu packages valgrind) |
dae7661a | 133 | #:use-module (gnu packages web) |
77631745 | 134 | #:use-module (gnu packages xml) |
0e1b262e | 135 | #:use-module ((guix licenses) #:prefix license:) |
5f96f303 LC |
136 | #:use-module (guix packages) |
137 | #:use-module (guix download) | |
da602679 | 138 | #:use-module (guix bzr-download) |
16973071 | 139 | #:use-module (guix git-download) |
945ec6c3 | 140 | #:use-module (guix hg-download) |
9df78675 | 141 | #:use-module (guix build-system emacs) |
5f96f303 | 142 | #:use-module (guix build-system gnu) |
58071723 | 143 | #:use-module (guix build-system go) |
274da61d | 144 | #:use-module (guix build-system perl) |
4d98bfaf | 145 | #:use-module (guix build-system python) |
afcbb020 | 146 | #:use-module (guix build-system ruby) |
77631745 | 147 | #:use-module (guix build-system cmake) |
6e385b76 | 148 | #:use-module (guix build-system scons) |
9077cf68 | 149 | #:use-module (guix build-system trivial) |
329d13b8 | 150 | #:use-module (guix utils) |
29cfbfca | 151 | #:use-module (srfi srfi-1) |
5f96f303 LC |
152 | #:use-module (srfi srfi-26) |
153 | #:use-module (ice-9 match)) | |
154 | ||
4c6aa73b RJ |
155 | (define-public 4store |
156 | (package | |
157 | (name "4store") | |
158 | (version "1.1.6") | |
159 | (source (origin | |
50e20b8f EF |
160 | (method git-fetch) |
161 | (uri (git-reference | |
b0e7b699 | 162 | (url "https://github.com/4store/4store") |
50e20b8f EF |
163 | (commit (string-append "v" version)))) |
164 | (file-name (git-file-name name version)) | |
4c6aa73b | 165 | (sha256 |
50e20b8f | 166 | (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk")) |
ea09f99f RJ |
167 | (patches (search-patches "4store-unset-preprocessor-directive.patch" |
168 | "4store-fix-buildsystem.patch")))) | |
4c6aa73b RJ |
169 | (build-system gnu-build-system) |
170 | (native-inputs | |
171 | `(("perl" ,perl) | |
172 | ("python" ,python-2) | |
173 | ("autoconf" ,autoconf) | |
174 | ("automake" ,automake) | |
b94a6ca0 | 175 | ("gettext" ,gettext-minimal) |
4c6aa73b | 176 | ("libtool" ,libtool) |
74c8b174 | 177 | ("pcre" ,pcre "bin") ;for 'pcre-config' |
4c6aa73b RJ |
178 | ("pkg-config" ,pkg-config))) |
179 | (inputs | |
180 | `(("glib" ,glib) | |
181 | ("rasqal" ,rasqal) | |
182 | ("libxml2" ,libxml2) | |
183 | ("raptor2" ,raptor2) | |
184 | ("readline" ,readline) | |
185 | ("avahi" ,avahi) | |
4c6aa73b RJ |
186 | ("cyrus-sasl" ,cyrus-sasl) |
187 | ("openssl" ,openssl) | |
bb93042c | 188 | ("util-linux" ,util-linux "lib"))) |
4c6aa73b | 189 | ;; http://www.4store.org has been down for a while now. |
bbf9092b | 190 | (home-page "https://github.com/4store/4store") |
4c6aa73b RJ |
191 | (synopsis "Clustered RDF storage and query engine") |
192 | (description "4store is a RDF/SPARQL store written in C, supporting | |
193 | either single machines or networked clusters.") | |
ba8b9f8d | 194 | (license license:gpl3+))) |
4c6aa73b | 195 | |
6fc03fcc CB |
196 | (define-public ephemeralpg |
197 | (package | |
198 | (name "ephemeralpg") | |
33df4763 | 199 | (version "3.1") |
6fc03fcc CB |
200 | (source |
201 | (origin | |
202 | (method url-fetch) | |
203 | (uri (string-append | |
8e716256 | 204 | "https://eradman.com/ephemeralpg/code/ephemeralpg-" |
6fc03fcc CB |
205 | version ".tar.gz")) |
206 | (sha256 | |
33df4763 | 207 | (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6")))) |
6fc03fcc CB |
208 | (build-system gnu-build-system) |
209 | (arguments | |
ddb418b5 | 210 | `(#:make-flags (list (string-append "CC=" ,(cc-for-target)) |
6fc03fcc CB |
211 | (string-append "PREFIX=" %output)) |
212 | #:phases | |
213 | (modify-phases %standard-phases | |
6c54d06e | 214 | (delete 'configure) ; no configure script |
6fc03fcc CB |
215 | (add-after 'install 'wrap |
216 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
217 | (let ((out (assoc-ref outputs "out"))) | |
218 | (wrap-program (string-append out "/bin/pg_tmp") | |
219 | `("PATH" ":" prefix | |
220 | (,(string-append (assoc-ref inputs "util-linux") | |
221 | "/bin") | |
222 | ,(string-append (assoc-ref inputs "postgresql") | |
223 | "/bin") | |
fa8343de | 224 | ;; For getsocket. |
6fc03fcc | 225 | ,(string-append out "/bin"))))) |
6c54d06e TGR |
226 | #t))) |
227 | #:test-target "test")) | |
6fc03fcc CB |
228 | (inputs |
229 | `(("postgresql" ,postgresql) | |
230 | ("util-linux" ,util-linux))) | |
231 | (native-inputs | |
6c54d06e | 232 | ;; For tests. |
fa8343de TGR |
233 | `(("ruby" ,ruby) |
234 | ("which" ,which))) | |
8e716256 | 235 | (home-page "https://eradman.com/ephemeralpg/") |
6fc03fcc CB |
236 | (synopsis "Run temporary PostgreSQL databases") |
237 | (description | |
238 | "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks | |
239 | like running software test suites. Temporary databases created with | |
240 | @code{pg_tmp} have a limited shared memory footprint and are automatically | |
241 | garbage-collected after a configurable number of seconds (the default is | |
242 | 60).") | |
243 | (license license:isc))) | |
244 | ||
afcbb020 CB |
245 | (define-public es-dump-restore |
246 | (package | |
247 | (name "es-dump-restore") | |
248 | (version "2.1.0") | |
249 | (source | |
250 | (origin | |
251 | (method url-fetch) | |
252 | (uri (rubygems-uri "es_dump_restore" version)) | |
253 | (sha256 | |
254 | (base32 | |
255 | "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim")))) | |
256 | (build-system ruby-build-system) | |
257 | (arguments | |
0076f5a9 | 258 | '(#:tests? #f)) ;; No testsuite. |
afcbb020 CB |
259 | (propagated-inputs |
260 | `(("ruby-httpclient" ,ruby-httpclient) | |
261 | ("ruby-multi-json" ,ruby-multi-json) | |
262 | ("ruby-progress_bar" ,ruby-progress_bar) | |
263 | ("ruby-rubyzip" ,ruby-rubyzip) | |
264 | ("ruby-thor" ,ruby-thor))) | |
265 | (synopsis "Utility for dumping and restoring ElasticSearch indexes") | |
266 | (description | |
267 | "This package provides a utility for dumping the contents of an | |
268 | ElasticSearch index to a compressed file and restoring the dumpfile back to an | |
269 | ElasticSearch server") | |
270 | (home-page "https://github.com/patientslikeme/es_dump_restore") | |
271 | (license license:expat))) | |
272 | ||
3f8158d6 TGR |
273 | (define-public firebird |
274 | (package | |
275 | (name "firebird") | |
276 | (version "3.0.7") | |
277 | (source | |
278 | (let ((revision "33374-0")) | |
279 | (origin | |
280 | (method url-fetch) | |
281 | (uri (string-append "https://github.com/FirebirdSQL/" | |
282 | "firebird/releases/download/R" | |
283 | (string-replace-substring version "." "_") "/" | |
284 | "Firebird-" version "." revision ".tar.bz2")) | |
285 | (sha256 | |
286 | (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c")) | |
287 | (modules '((guix build utils))) | |
288 | (snippet | |
289 | `(begin | |
290 | (for-each | |
291 | delete-file-recursively | |
292 | (list "extern/btyacc/test" ; TODO: package and remove entirely | |
293 | "extern/editline" | |
294 | "extern/icu" | |
295 | "extern/libtommath" | |
296 | "extern/zlib" | |
297 | "src/include/firebird/impl/boost" | |
298 | ||
299 | ;; Missing licence. | |
300 | "builds/install/arch-specific/solaris" | |
301 | "extern/SfIO" | |
302 | "src/msgs/templates.sql" | |
303 | ||
304 | ;; Generated files missing sources. | |
305 | "doc/Firebird-3-QuickStart.pdf" | |
306 | (string-append "doc/Firebird-" ,version | |
307 | "-ReleaseNotes.pdf") | |
308 | "doc/README.SecureRemotePassword.html")) | |
309 | #t))))) | |
310 | (build-system gnu-build-system) | |
311 | (outputs (list "debug" "out")) | |
312 | (arguments | |
313 | `(#:configure-flags | |
314 | (let ((out (assoc-ref %outputs "out"))) | |
315 | (list (string-append "--with-fbsbin=" out "/sbin") | |
316 | (string-append "--with-fbdoc=" out "/share/doc/" | |
317 | ,name "-" ,version) | |
318 | (string-append "--with-fbconf=" out "/lib/firebird") | |
319 | (string-append "--with-fbintl=" out "/lib/firebird/intl") | |
320 | (string-append "--with-fbmisc=" out "/lib/firebird/misc") | |
321 | (string-append "--with-fbmsg=" out "/lib/firebird") | |
322 | (string-append "--with-fbplugins=" out "/lib/firebird/plugins") | |
323 | (string-append "--with-fbudf=" out "/lib/firebird/UDF") | |
324 | "--with-fbglock=/run/firebird" | |
325 | "--with-fblog=/var/log/firebird" | |
326 | "--with-fbhelp=/var/lib/firebird/system" | |
327 | "--with-fbsecure-db=/var/lib/firebird/secure" | |
328 | "--without-fbsample" | |
329 | "--without-fbsample-db" | |
330 | "--with-system-editline")) | |
331 | #:make-flags | |
332 | (list (string-append "CC=" ,(cc-for-target)) | |
333 | ;; The plugins/ can't find libfbclient otherwise. | |
334 | (string-append "LDFLAGS=-Wl,-rpath=" | |
335 | (assoc-ref %outputs "out") "/lib")) | |
336 | #:tests? #f ; no test suite | |
337 | #:modules ((guix build gnu-build-system) | |
338 | (guix build utils) | |
339 | (srfi srfi-26)) | |
340 | #:phases | |
341 | (modify-phases %standard-phases | |
342 | (add-after 'unpack 'use-system-boost | |
343 | (lambda _ | |
344 | (substitute* "src/include/firebird/Message.h" | |
345 | (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"") | |
346 | "<boost/preprocessor/seq/for_each_i.hpp>") | |
347 | (("FB_BOOST_") "BOOST_")) | |
348 | #t)) | |
349 | (add-after 'unpack 'patch-installation | |
350 | (lambda _ | |
351 | (substitute* | |
352 | "builds/install/arch-specific/linux/makeInstallImage.sh.in" | |
353 | (("/bin/sh") (which "bash")) | |
354 | ;; Remove shell script helpers from $PATH. | |
355 | (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":") | |
356 | ;; Put files where Guix users expect them. | |
357 | (("(License\\.txt.*)@FB_CONFDIR" match) | |
358 | (string-append match "@FB_DOCDIR@")) | |
359 | (("@FB_CONFDIR@(.*License\\.txt.*)" match) | |
360 | (string-append "@FB_DOCDIR@" match)) | |
361 | (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail) | |
362 | (string-append head "@FB_DOCDIR@" tail "\n"))) | |
363 | (substitute* | |
364 | (list "builds/install/posix-common/changeServerMode.sh.in" | |
365 | "builds/install/posix-common/install.sh.in") | |
366 | ;; Skip phases that (could) cause problems in Guix. | |
367 | (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser") | |
368 | ":") | |
369 | ;; Skip phases that are merely pointless on Guix. | |
370 | (("buildUninstallFile|installInitdScript|startFirebird") ":") | |
371 | ;; Omit randomly generated password with bonus timestamp. | |
372 | (("setDBAPassword") ":")) | |
373 | ||
374 | ;; These promote proprietary workflows not relevant on Guix. | |
375 | (for-each delete-file-recursively | |
376 | (find-files "doc" "README\\.(build\\.msvc|NT|Win)")) | |
377 | #t)) | |
378 | (add-after 'configure 'delete-init-scripts | |
379 | (lambda _ | |
380 | (delete-file-recursively "gen/install/misc") | |
381 | #t)) | |
382 | (add-before 'build 'set-build-environment-variables | |
383 | (lambda _ | |
384 | ;; ‘isql’ needs to run & find libfbclient.so during the build. | |
385 | ;; This doubles as a rudimentary test in lieu of a test suite. | |
386 | (setenv "LD_LIBRARY_PATH" | |
387 | (string-append (assoc-ref %build-inputs "icu4c") "/lib")) | |
388 | #t)) | |
389 | (add-before 'install 'keep-embedded-debug-symbols | |
390 | (lambda _ | |
391 | ;; Let the gnu-build-system separate & deal with them later. | |
392 | ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole | |
393 | ;; megabyte off Guix's 7.7M libEngine12.so, for example. | |
394 | (substitute* "gen/Makefile.install" | |
395 | (("readelf") "false")) | |
396 | #t)) | |
397 | (add-after 'install 'prune-undesirable-files | |
398 | (lambda* (#:key outputs #:allow-other-keys) | |
399 | (let ((out (assoc-ref outputs "out"))) | |
400 | (with-directory-excursion out | |
401 | ;; Remove example binaries. | |
402 | (for-each delete-file-recursively | |
403 | (find-files "." "example")) | |
404 | ;; Delete (now-)empty directories. | |
405 | (for-each rmdir | |
406 | (list "include/firebird/impl" | |
407 | "lib/firebird/plugins/udr")) | |
408 | #t))))))) | |
409 | (inputs | |
410 | `(("boost" ,boost) | |
411 | ("editline" ,editline) | |
412 | ("icu4c" ,icu4c-67) | |
413 | ("libtommath" ,libtommath) | |
414 | ("ncurses" ,ncurses) | |
415 | ("zlib" ,zlib))) | |
416 | (home-page "https://www.firebirdsql.org") | |
417 | (synopsis "Relational database with many ANSI SQL standard features") | |
418 | (description | |
419 | "Firebird is an SQL @acronym{RDBMS, relational database management system} | |
e5d5146b TGR |
420 | with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including |
421 | @acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and | |
422 | triggers. Transactions provide full ACID-compliant referential integrity. | |
3f8158d6 TGR |
423 | |
424 | The database requires very little manual maintenance once set up, making it | |
425 | ideal for small business or embedded use. | |
426 | ||
427 | When installed as a traditional local or remote (network) database server, | |
428 | Firebird can grow to terabyte scale with proper tuning---although PostgreSQL | |
429 | may be a better choice for such very large environments. | |
430 | ||
431 | Firebird can also be embedded into stand-alone applications that don't want or | |
432 | need a full client & server. Used in this manner, it offers richer SQL support | |
433 | than SQLite as well as the option to seamlessly migrate to a client/server | |
434 | database later.") | |
435 | (properties | |
436 | `((lint-hidden-cve . ("CVE-2017-6369")))) | |
437 | (license | |
438 | ;; See doc/license/README.license.usage.txt for rationale & details. | |
439 | (list license:bsd-3 ; src/common/sha2/ | |
440 | license:bsd-4 ; src/common/enc.cpp | |
441 | license:gpl2+ ; builds/posix/make.defaults | |
442 | (license:non-copyleft "file:///builds/install/misc/IPLicense.txt" | |
443 | "InterBase Public License v1.0") | |
444 | (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt" | |
445 | "Initial Developer's Public License v1.0") | |
446 | license:lgpl2.1 ; exception for OSI-compatible licences | |
447 | license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp | |
448 | license:public-domain)))) ; including files without explicit licence | |
449 | ||
b9f771a7 MB |
450 | (define-public leveldb |
451 | (package | |
452 | (name "leveldb") | |
3a32be71 | 453 | (version "1.22") |
b9f771a7 | 454 | (source (origin |
ad7c77fd MB |
455 | (method git-fetch) |
456 | (uri (git-reference | |
457 | (url "https://github.com/google/leveldb") | |
5cc013f0 | 458 | (commit version))) |
ad7c77fd | 459 | (file-name (git-file-name name version)) |
b9f771a7 MB |
460 | (sha256 |
461 | (base32 | |
3a32be71 | 462 | "0qrnhiyq7r4wa1a4wi82zgns35smj94mcjsc7kfs1k6ia9ys79z7")))) |
5cc013f0 | 463 | (build-system cmake-build-system) |
b9f771a7 | 464 | (arguments |
5cc013f0 | 465 | `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DLEVELDB_BUILD_TESTS=ON"))) |
b9f771a7 MB |
466 | (inputs |
467 | `(("snappy" ,snappy))) | |
fd423e4d | 468 | (home-page "https://github.com/google/leveldb") |
b9f771a7 MB |
469 | (synopsis "Fast key-value storage library") |
470 | (description | |
471 | "LevelDB is a fast key-value storage library that provides an ordered | |
472 | mapping from string keys to string values.") | |
ba8b9f8d | 473 | (license license:bsd-3))) |
b9f771a7 | 474 | |
686144e9 CB |
475 | (define-public memcached |
476 | (package | |
477 | (name "memcached") | |
91d54249 | 478 | (version "1.6.9") |
686144e9 CB |
479 | (source |
480 | (origin | |
481 | (method url-fetch) | |
482 | (uri (string-append | |
483 | "https://memcached.org/files/memcached-" version ".tar.gz")) | |
484 | (sha256 | |
91d54249 | 485 | (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm")))) |
686144e9 CB |
486 | (build-system gnu-build-system) |
487 | (inputs | |
488 | `(("libevent" ,libevent) | |
489 | ("cyrus-sasl" ,cyrus-sasl))) | |
490 | (home-page "https://memcached.org/") | |
61d996b9 TGR |
491 | (synopsis "In-memory caching service") |
492 | (description "Memcached is an in-memory key-value store. It has a small | |
686144e9 CB |
493 | and generic API, and was originally intended for use with dynamic web |
494 | applications.") | |
495 | (license license:bsd-3))) | |
496 | ||
da602679 MC |
497 | (define-public libmemcached |
498 | (package | |
499 | (name "libmemcached") | |
500 | (version "1.0.18") | |
501 | ;; We build from the sources since we want to build the extra HTML | |
502 | ;; documentation which is not included with the release. | |
503 | (source (origin | |
504 | (method bzr-fetch) | |
505 | (uri (bzr-reference | |
506 | (url "lp:libmemcached/1.0") | |
507 | (revision (string-append "tag:" version)))) | |
508 | (file-name (string-append name "-" version "-checkout")) | |
509 | (sha256 | |
510 | (base32 | |
737a3c12 TGR |
511 | "1842s4dxdh21gdr46q4dgxigidcs6dkqnbnqjwb9l8r0bqx5nb10")) |
512 | (patches | |
513 | (search-patches "libmemcached-build-with-gcc7.patch")))) | |
da602679 MC |
514 | (build-system gnu-build-system) |
515 | (native-inputs | |
516 | `(("memcached" ,memcached) | |
517 | ("libtool" ,libtool) | |
518 | ("autoconf" ,autoconf) | |
519 | ("automake" ,automake) | |
520 | ("bison" ,bison) | |
521 | ("flex" ,flex) | |
522 | ("perl" ,perl) | |
523 | ("python-sphinx" ,python-sphinx))) ;to build the HTML doc. | |
524 | (inputs | |
525 | `(("libevent" ,libevent) | |
526 | ("cyrus-sasl" ,cyrus-sasl))) | |
527 | (outputs '("out" "doc")) | |
528 | (arguments | |
9bab0950 MC |
529 | '(#:tests? #f ;many tests fail and use too much time |
530 | #:phases | |
da602679 MC |
531 | (modify-phases %standard-phases |
532 | (add-before 'bootstrap 'fix-configure.ac | |
533 | ;; Move the AC_CONFIG_AUX_DIR macro use under AC_INIT, otherwise we | |
534 | ;; get the error ``configure: error: cannot find install-sh, | |
535 | ;; install.sh, or shtool in "." "./.." "./../.."`` (see: | |
536 | ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19539 and | |
537 | ;; https://bugs.launchpad.net/libmemcached/+bug/1803922). | |
538 | (lambda _ | |
539 | (delete-file "bootstrap.sh") ;not useful in the context of Guix | |
540 | (substitute* "configure.ac" | |
541 | (("^AC_CONFIG_AUX_DIR\\(\\[build-aux\\]\\).*") "") | |
9bab0950 MC |
542 | (("^AC_INIT.*" anchor) |
543 | (string-append anchor "AC_CONFIG_AUX_DIR([build-aux])\n"))))) | |
544 | (add-before 'build 'build-and-install-html-doc | |
da602679 MC |
545 | (lambda* (#:key outputs #:allow-other-keys) |
546 | (let ((html (string-append (assoc-ref outputs "doc") | |
547 | "/share/doc/libmemcached/html/"))) | |
548 | (invoke "make" "install-html") | |
549 | ;; Cleanup useless files. | |
550 | (for-each delete-file-recursively | |
551 | (map (lambda (x) (string-append html x)) | |
9bab0950 MC |
552 | '("_sources" ".doctrees" ".buildinfo"))))))))) |
553 | (home-page "https://libmemcached.org/libMemcached.html") | |
da602679 MC |
554 | (synopsis "C++ library for memcached") |
555 | (description "libMemcached is a library to use memcached in C/C++ | |
556 | applications. It comes with a complete reference guide and documentation of | |
557 | the API, and provides features such as: | |
558 | @itemize | |
559 | @item Asynchronous and synchronous transport support | |
560 | @item Consistent hashing and distribution | |
561 | @item Tunable hashing algorithm to match keys | |
562 | @item Access to large object support | |
563 | @item Local replication | |
564 | @end itemize") | |
565 | (license license:bsd-3))) | |
566 | ||
063edf92 MC |
567 | (define-public python-pylibmc |
568 | (package | |
569 | (name "python-pylibmc") | |
79bc9176 | 570 | (version "1.6.1") |
063edf92 MC |
571 | (source |
572 | (origin | |
573 | (method url-fetch) | |
574 | (uri (pypi-uri "pylibmc" version)) | |
575 | (sha256 | |
79bc9176 | 576 | (base32 "1sg7d9j0v6g3xg3finf4l1hb72c13vcyyi6rqrc9shbx903d93ca")))) |
063edf92 MC |
577 | (build-system python-build-system) |
578 | (arguments | |
579 | '(#:phases | |
580 | (modify-phases %standard-phases | |
581 | (add-before 'check 'start-memcached-daemon | |
582 | ;; The test suite requires a memcached server. | |
583 | (lambda _ | |
584 | (invoke "memcached" "-d")))))) | |
585 | (native-inputs | |
586 | `(("memcached" ,memcached) | |
587 | ("python-nose" ,python-nose))) | |
588 | (inputs | |
589 | `(("libmemcached" ,libmemcached) | |
590 | ("zlib" ,zlib) | |
591 | ("cyrus-sasl" ,cyrus-sasl))) | |
79bc9176 TGR |
592 | (home-page "http://sendapatch.se/projects/pylibmc/") |
593 | (synopsis "Python client for memcached") | |
063edf92 MC |
594 | (description |
595 | "@code{pylibmc} is a client in Python for memcached. It is a wrapper | |
596 | around TangentOrg’s libmemcached library, and can be used as a drop-in | |
597 | replacement for the code@{python-memcached} library.") | |
598 | (license license:bsd-3))) | |
599 | ||
600 | (define-public python2-pylibmc | |
601 | (package-with-python2 python-pylibmc)) | |
602 | ||
8de54c63 | 603 | (define-public mycli |
604 | (package | |
605 | (name "mycli") | |
ce13a54a | 606 | (version "1.22.2") |
8de54c63 | 607 | (source |
608 | (origin | |
609 | (method url-fetch) | |
610 | (uri (pypi-uri "mycli" version)) | |
611 | (sha256 | |
ce13a54a | 612 | (base32 "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv")))) |
8de54c63 | 613 | (build-system python-build-system) |
614 | (arguments | |
615 | `(#:tests? #f)) ; tests expect a running MySQL | |
616 | (propagated-inputs | |
617 | `(("python-cli-helpers" ,python-cli-helpers) | |
618 | ("python-click" ,python-click) | |
619 | ("python-configobj" ,python-configobj) | |
620 | ("python-cryptography" ,python-cryptography) | |
621 | ("python-prompt-toolkit" ,python-prompt-toolkit) | |
622 | ("python-pygments" ,python-pygments) | |
623 | ("python-pymysql" ,python-pymysql) | |
624 | ("python-sqlparse" ,python-sqlparse))) | |
625 | (home-page "http://mycli.net") | |
626 | (synopsis | |
627 | "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting") | |
628 | (description | |
629 | "MyCLI is a command line interface for MySQL, MariaDB, and Percona with | |
630 | auto-completion and syntax highlighting.") | |
631 | (license license:bsd-3))) | |
632 | ||
7cbf06d8 TGR |
633 | ;; XXX When updating, check whether boost-for-mysql is still needed. |
634 | ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past. | |
5f96f303 LC |
635 | (define-public mysql |
636 | (package | |
637 | (name "mysql") | |
fdf82830 | 638 | (version "5.7.33") |
5f96f303 LC |
639 | (source (origin |
640 | (method url-fetch) | |
23bbd7dd | 641 | (uri (list (string-append |
7fe3a57a | 642 | "https://dev.mysql.com/get/Downloads/MySQL-" |
23bbd7dd EF |
643 | (version-major+minor version) "/" |
644 | name "-" version ".tar.gz") | |
645 | (string-append | |
7fe3a57a | 646 | "https://downloads.mysql.com/archives/get/file/" |
23bbd7dd | 647 | name "-" version ".tar.gz"))) |
5f96f303 LC |
648 | (sha256 |
649 | (base32 | |
fdf82830 | 650 | "1bb343mf7n0qg2qz497gxjsqprygrjz1q1pbz76hgqxnsy08sfxd")))) |
329d13b8 SB |
651 | (build-system cmake-build-system) |
652 | (arguments | |
69419655 | 653 | `(#:configure-flags |
329d13b8 SB |
654 | '("-DBUILD_CONFIG=mysql_release" |
655 | "-DWITH_SSL=system" | |
656 | "-DWITH_ZLIB=system" | |
657 | "-DDEFAULT_CHARSET=utf8" | |
658 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
659 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
660 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
661 | "-DINSTALL_INFODIR=share/mysql/docs" | |
662 | "-DINSTALL_MANDIR=share/man" | |
663 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" | |
664 | "-DINSTALL_SCRIPTDIR=bin" | |
665 | "-DINSTALL_INCLUDEDIR=include/mysql" | |
666 | "-DINSTALL_DOCREADMEDIR=share/mysql/docs" | |
667 | "-DINSTALL_SUPPORTFILESDIR=share/mysql" | |
668 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" | |
669 | "-DINSTALL_DOCDIR=share/mysql/docs" | |
670 | "-DINSTALL_SHAREDIR=share/mysql" | |
671 | ;; Get rid of test data. | |
672 | "-DINSTALL_MYSQLTESTDIR=" | |
3f289db6 LC |
673 | "-DINSTALL_SQLBENCHDIR=") |
674 | #:phases (modify-phases %standard-phases | |
6a52df50 LC |
675 | (add-after |
676 | 'install 'remove-extra-binaries | |
677 | (lambda* (#:key outputs #:allow-other-keys) | |
678 | (let ((out (assoc-ref outputs "out"))) | |
679 | ;; Remove the 3 *_embedded files, which weigh in at | |
680 | ;; 14 MiB each. | |
681 | (for-each delete-file | |
682 | (find-files (string-append out "/bin") | |
683 | "_embedded$")) | |
7d099cbe | 684 | #t)))))) |
329d13b8 SB |
685 | (native-inputs |
686 | `(("bison" ,bison) | |
aace6f6d EF |
687 | ("perl" ,perl) |
688 | ("pkg-config" ,pkg-config))) | |
5f96f303 | 689 | (inputs |
7cbf06d8 | 690 | `(("boost" ,boost-for-mysql) |
23bbd7dd | 691 | ("libaio" ,libaio) |
aace6f6d | 692 | ("libtirpc" ,libtirpc) |
23bbd7dd | 693 | ("ncurses" ,ncurses) |
5f96f303 | 694 | ("openssl" ,openssl) |
aace6f6d | 695 | ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen |
23bbd7dd | 696 | ("zlib" ,zlib))) |
7fe3a57a | 697 | (home-page "https://www.mysql.com/") |
9e771e3b | 698 | (synopsis "Fast, easy to use, and popular database") |
5f96f303 LC |
699 | (description |
700 | "MySQL is a fast, reliable, and easy to use relational database | |
701 | management system that supports the standardized Structured Query | |
702 | Language.") | |
ba8b9f8d | 703 | (license license:gpl2))) |
5f96f303 | 704 | |
77631745 SB |
705 | (define-public mariadb |
706 | (package | |
707 | (name "mariadb") | |
ce29031a | 708 | (version "10.5.8") |
77631745 SB |
709 | (source (origin |
710 | (method url-fetch) | |
cc3c5fc5 MB |
711 | (uri (string-append "https://downloads.mariadb.com/MariaDB" |
712 | "/mariadb-" version "/source/mariadb-" | |
713 | version ".tar.gz")) | |
77631745 SB |
714 | (sha256 |
715 | (base32 | |
ce29031a | 716 | "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b")) |
2001d2da MB |
717 | (modules '((guix build utils))) |
718 | (snippet | |
719 | '(begin | |
720 | ;; Delete bundled snappy and xz. | |
721 | (delete-file-recursively "storage/tokudb/PerconaFT/third_party") | |
4333d48a MB |
722 | (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt" |
723 | ;; This file checks that the bundled sources are present and | |
724 | ;; declares build procedures for them. | |
725 | (("^include\\(TokuThirdParty\\)") "")) | |
726 | (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt" | |
727 | ;; Don't attempt to use the procedures we just removed. | |
728 | ((" build_lzma build_snappy") "")) | |
2001d2da MB |
729 | |
730 | ;; Preserve CMakeLists.txt for these. | |
731 | (for-each (lambda (file) | |
732 | (unless (string-suffix? "CMakeLists.txt" file) | |
733 | (delete-file file))) | |
525ebb85 MB |
734 | (append (find-files "extra/wolfssl") |
735 | (find-files "zlib"))) | |
2001d2da | 736 | #t)))) |
77631745 | 737 | (build-system cmake-build-system) |
2b8491fb | 738 | (outputs '("out" "lib" "dev")) |
77631745 | 739 | (arguments |
5193ae64 | 740 | `(#:configure-flags |
2b8491fb JL |
741 | (list |
742 | "-DBUILD_CONFIG=mysql_release" | |
6cf8e576 LF |
743 | ;; Linking with libarchive fails, like this: |
744 | ||
745 | ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o): | |
746 | ;; relocation R_X86_64_32 against `.bss' can not be used when | |
747 | ;; making a shared object; recompile with -fPIC | |
748 | ||
749 | ;; For now, disable the features that that use libarchive (xtrabackup). | |
750 | "-DWITH_LIBARCHIVE=OFF" | |
751 | ||
bba7a77e MB |
752 | ;; Disable the TokuDB engine, because its test suite frequently fails, |
753 | ;; and loading it crashes the server: <https://bugs.gnu.org/35521>. | |
754 | "-DTOKUDB_OK=OFF" | |
755 | ||
2001d2da MB |
756 | ;; Ensure the system libraries are used. |
757 | "-DWITH_JEMALLOC=yes" | |
758 | "-DWITH_PCRE=system" | |
759 | "-DWITH_SSL=system" | |
760 | "-DWITH_ZLIB=system" | |
761 | ||
77631745 SB |
762 | "-DDEFAULT_CHARSET=utf8" |
763 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
764 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
765 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
ce29031a | 766 | |
704b7861 | 767 | ;; Do not install the benchmark suite. |
ce29031a MB |
768 | "-DINSTALL_SQLBENCHDIR=false" |
769 | ||
2b8491fb JL |
770 | (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib")) |
771 | (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib") | |
772 | "/lib") | |
773 | (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out") | |
774 | "/share/mysql/docs") | |
775 | (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out") | |
776 | "/share/man") | |
777 | (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin") | |
778 | (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin") | |
779 | "-DCMAKE_INSTALL_LIBDIR=lib" | |
77631745 | 780 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" |
2b8491fb JL |
781 | (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev") |
782 | "/include/mysql") | |
783 | (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out") | |
784 | "/share/mysql/docs") | |
785 | (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out") | |
786 | "/share/mysql/docs") | |
787 | (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out") | |
788 | "/share/mysql/support-files") | |
77631745 | 789 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" |
4c27ea06 | 790 | "-DINSTALL_SHAREDIR=share") |
77631745 SB |
791 | #:phases |
792 | (modify-phases %standard-phases | |
525ebb85 | 793 | (add-after 'unpack 'adjust-output-references |
2001d2da | 794 | (lambda _ |
525ebb85 MB |
795 | ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX |
796 | ;; to other variables such as $INSTALL_INCLUDEDIR, which does | |
797 | ;; not work when the latter uses an absolute file name. | |
798 | (substitute* "libmariadb/mariadb_config/mariadb_config.c.in" | |
704b7861 MB |
799 | (("%s/@INSTALL_INCLUDEDIR@") |
800 | (string-append "@INSTALL_INCLUDEDIR@")) | |
801 | ;; As of 10.5.8, the mariadb_config program tries to be | |
802 | ;; clever and computes the installation directory relative | |
803 | ;; to /proc/self/exe when running on Linux. Make it fall | |
804 | ;; back to the old behaviour. | |
805 | (("defined\\(__linux__\\)") | |
806 | "0")) | |
525ebb85 MB |
807 | (substitute* "libmariadb/mariadb_config/libmariadb.pc.in" |
808 | (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@") | |
809 | "@INSTALL_INCLUDEDIR@")) | |
704b7861 MB |
810 | (substitute* "support-files/mariadb.pc.in" |
811 | (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir) | |
812 | (string-append dir "dir="))) | |
525ebb85 MB |
813 | (substitute* "include/CMakeLists.txt" |
814 | (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}") | |
815 | "${INSTALL_INCLUDEDIR}")) | |
704b7861 MB |
816 | (substitute* "cmake/mariadb_connector_c.cmake" |
817 | (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}") | |
818 | "${INSTALL_BINDIR}")) | |
2001d2da | 819 | #t)) |
3869f39e MB |
820 | (add-after 'unpack 'adjust-tests |
821 | (lambda _ | |
822 | (let ((disabled-tests | |
823 | '(;; These fail because root@hostname == root@localhost in | |
824 | ;; the build environment, causing a user count mismatch. | |
825 | ;; See <https://jira.mariadb.org/browse/MDEV-7761>. | |
525ebb85 | 826 | "funcs_1.is_columns_mysql" |
3869f39e MB |
827 | "main.join_cache" |
828 | "main.explain_non_select" | |
e313327e | 829 | "main.stat_tables" |
1d957c79 | 830 | "main.stat_tables_innodb" |
ce29031a | 831 | "main.upgrade_MDEV-19650" |
3418e43b | 832 | "roles.acl_statistics" |
69fb26d4 | 833 | |
ce29031a MB |
834 | ;; FIXME: This test checks various table encodings and |
835 | ;; fails because Guix defaults to UTF8 instead of the | |
836 | ;; upstream default latin1_swedish_ci. It's not easily | |
837 | ;; substitutable because several encodings are tested. | |
838 | "main.sp2" | |
839 | ||
166472e2 MB |
840 | ;; XXX: This test occasionally fails on i686-linux: |
841 | ;; <https://jira.mariadb.org/browse/MDEV-24458> | |
842 | ,@(if (string-prefix? "i686" (%current-system)) | |
843 | '("main.myisampack") | |
844 | '()) | |
845 | ||
69fb26d4 | 846 | ;; This file contains a time bomb which makes it fail after |
0ce64334 | 847 | ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details. |
525ebb85 | 848 | "main.mysqldump")) |
3869f39e MB |
849 | |
850 | ;; This file contains a list of known-flaky tests for this | |
851 | ;; release. Append our own items. | |
852 | (unstable-tests (open-file "mysql-test/unstable-tests" "a"))) | |
853 | (for-each (lambda (test) | |
854 | (format unstable-tests "~a : ~a\n" | |
855 | test "Disabled in Guix")) | |
856 | disabled-tests) | |
857 | (close-port unstable-tests) | |
858 | ||
525ebb85 | 859 | ;; XXX: These fail because they expect a latin1 charset and |
ab0cb26f | 860 | ;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>. |
525ebb85 MB |
861 | (substitute* '("mysql-test/main/gis_notembedded.result" |
862 | "mysql-test/main/system_mysql_db.result") | |
ab0cb26f MB |
863 | (("latin1_swedish_ci") "utf8_general_ci") |
864 | (("\tlatin1") "\tutf8")) | |
865 | ||
e313327e MB |
866 | (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test" |
867 | (("/bin/bash") | |
868 | (which "bash"))) | |
869 | ||
3869f39e MB |
870 | (substitute* "mysql-test/mysql-test-run.pl" |
871 | (("/bin/ls") (which "ls")) | |
872 | (("/bin/sh") (which "sh"))) | |
873 | #t))) | |
5b4d2e40 MB |
874 | (add-before 'configure 'disable-plugins |
875 | (lambda _ | |
876 | (let ((disable-plugin (lambda (name) | |
877 | (call-with-output-file | |
878 | (string-append "plugin/" name | |
879 | "/CMakeLists.txt") | |
880 | (lambda (port) | |
881 | (format port "\n"))))) | |
03335824 | 882 | (disabled-plugins '(;; XXX: Causes a test failure. |
3869f39e | 883 | "disks"))) |
5b4d2e40 MB |
884 | (for-each disable-plugin disabled-plugins) |
885 | #t))) | |
3869f39e MB |
886 | (replace 'check |
887 | (lambda* (#:key (tests? #t) #:allow-other-keys) | |
888 | (if tests? | |
889 | (with-directory-excursion "mysql-test" | |
890 | (invoke "./mtr" "--verbose" | |
3418e43b | 891 | "--retry=3" |
71179b35 MB |
892 | "--testcase-timeout=40" |
893 | "--suite-timeout=600" | |
3869f39e | 894 | "--parallel" (number->string (parallel-job-count)) |
b2bb04bd MB |
895 | ;; Skip the replication tests: they are very I/O |
896 | ;; intensive and frequently causes indeterministic | |
897 | ;; failures even on powerful hardware. | |
898 | "--skip-rpl" | |
3869f39e MB |
899 | "--skip-test-list=unstable-tests")) |
900 | (format #t "test suite not run~%")) | |
901 | #t)) | |
77631745 SB |
902 | (add-after |
903 | 'install 'post-install | |
939c5b2c | 904 | (lambda* (#:key inputs outputs #:allow-other-keys) |
77631745 | 905 | (let* ((out (assoc-ref outputs "out")) |
2b8491fb | 906 | (dev (assoc-ref outputs "dev")) |
939c5b2c MB |
907 | (lib (assoc-ref outputs "lib")) |
908 | (openssl (assoc-ref inputs "openssl"))) | |
525ebb85 MB |
909 | (substitute* (list (string-append out "/bin/mariadb-install-db") |
910 | (string-append out "/bin/mysql_install_db")) | |
77631745 | 911 | (("basedir=\"\"") |
525ebb85 MB |
912 | (string-append "basedir=\"" out "\"")) |
913 | (("\\$basedir/share/mysql") | |
914 | (string-append lib "/share/mysql"))) | |
915 | ||
2b8491fb | 916 | (with-directory-excursion lib |
704b7861 MB |
917 | ;; Remove tests. |
918 | (delete-file-recursively "mysql-test") | |
ce29031a | 919 | ;; Remove static libraries. |
963157f1 | 920 | (for-each delete-file (find-files "lib" "\\.a$"))) |
ce29031a | 921 | |
2b8491fb JL |
922 | (with-directory-excursion out |
923 | (delete-file "share/man/man1/mysql-test-run.pl.1") | |
924 | ;; Delete huge and unnecessary executables. | |
525ebb85 | 925 | (for-each delete-file (find-files "bin" "test$"))) |
2b8491fb JL |
926 | (mkdir-p (string-append dev "/share")) |
927 | (mkdir-p (string-append dev "/bin")) | |
525ebb85 MB |
928 | (rename-file (string-append lib "/bin/mariadbd") |
929 | (string-append out "/bin/mariadbd")) | |
2b8491fb JL |
930 | (rename-file (string-append lib "/bin/mysqld") |
931 | (string-append out "/bin/mysqld")) | |
525ebb85 MB |
932 | (mkdir-p (string-append dev "/lib")) |
933 | (rename-file (string-append lib "/lib/pkgconfig") | |
934 | (string-append dev "/lib/pkgconfig")) | |
935 | (rename-file (string-append lib "/bin/mariadb_config") | |
936 | (string-append dev "/bin/mariadb_config")) | |
2b8491fb JL |
937 | (rename-file (string-append out "/bin/mysql_config") |
938 | (string-append dev "/bin/mysql_config")) | |
939c5b2c MB |
939 | |
940 | ;; Embed an absolute reference to OpenSSL in mysql_config | |
941 | ;; and the pkg-config file to avoid propagation. | |
525ebb85 | 942 | ;; XXX: how to do this for mariadb_config.c.in? |
939c5b2c | 943 | (substitute* (list (string-append dev "/bin/mysql_config") |
525ebb85 | 944 | (string-append dev "/lib/pkgconfig/mariadb.pc")) |
939c5b2c MB |
945 | (("-lssl -lcrypto" all) |
946 | (string-append "-L" openssl "/lib " all))) | |
947 | ||
841ee2a8 | 948 | #t)))))) |
77631745 SB |
949 | (native-inputs |
950 | `(("bison" ,bison) | |
03335824 | 951 | ("perl" ,perl))) |
77631745 SB |
952 | (inputs |
953 | `(("jemalloc" ,jemalloc) | |
954 | ("libaio" ,libaio) | |
955 | ("libxml2" ,libxml2) | |
956 | ("ncurses" ,ncurses) | |
525ebb85 | 957 | ("openssl" ,openssl) |
ab0cb26f | 958 | ("pam" ,linux-pam) |
525ebb85 | 959 | ("pcre2" ,pcre2) |
2001d2da | 960 | ("xz" ,xz) |
77631745 | 961 | ("zlib" ,zlib))) |
3869f39e MB |
962 | ;; The test suite is very resource intensive and can take more than three |
963 | ;; hours on a x86_64 system. Give slow and busy machines some leeway. | |
964 | (properties '((timeout . 64800))) ;18 hours | |
77631745 SB |
965 | (home-page "https://mariadb.org/") |
966 | (synopsis "SQL database server") | |
967 | (description | |
968 | "MariaDB is a multi-user and multi-threaded SQL database server, designed | |
969 | as a drop-in replacement of MySQL.") | |
ba8b9f8d | 970 | (license license:gpl2))) |
77631745 | 971 | |
2072bc08 PN |
972 | (define-public mariadb-connector-c |
973 | (package | |
974 | (name "mariadb-connector-c") | |
51059be3 | 975 | (version "3.1.12") |
3881d0dc TGR |
976 | (source |
977 | (origin | |
978 | (method url-fetch) | |
979 | (uri (string-append | |
980 | "https://downloads.mariadb.org/f/connector-c-" version | |
981 | "/mariadb-connector-c-" version "-src.tar.gz" | |
982 | "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve")) | |
f6a94e7e | 983 | (file-name (string-append name "-" version ".tar.gz")) |
3881d0dc | 984 | (sha256 |
51059be3 | 985 | (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig")))) |
9077cf68 | 986 | (inputs |
2072bc08 PN |
987 | `(("openssl" ,openssl))) |
988 | (build-system cmake-build-system) | |
9077cf68 | 989 | (arguments |
87078871 | 990 | '(#:tests? #f)) ; no tests |
2072bc08 PN |
991 | (home-page "https://mariadb.com/kb/en/mariadb-connector-c/") |
992 | (synopsis "Client library to connect to MySQL or MariaDB") | |
993 | (description "The MariaDB Connector/C is used to connect applications | |
994 | developed in C/C++ to MariaDB and MySQL databases.") | |
995 | (license license:lgpl2.1+))) | |
9077cf68 | 996 | |
97dd1b15 | 997 | ;; Don't forget to update the other postgresql packages when upgrading this one. |
a73302ec | 998 | (define-public postgresql-13 |
5f96f303 LC |
999 | (package |
1000 | (name "postgresql") | |
392e230d | 1001 | (replacement postgresql-13.2) |
a73302ec | 1002 | (version "13.1") |
5f96f303 LC |
1003 | (source (origin |
1004 | (method url-fetch) | |
dbeaf8f2 | 1005 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
9020890b | 1006 | version "/postgresql-" version ".tar.bz2")) |
5f96f303 LC |
1007 | (sha256 |
1008 | (base32 | |
a73302ec | 1009 | "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j")) |
c336567d | 1010 | (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) |
5f96f303 | 1011 | (build-system gnu-build-system) |
dd213082 | 1012 | (arguments |
e693617f MB |
1013 | `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl" |
1014 | ;; PostgreSQL installs its own Makefile (should it?). | |
1015 | ;; Prevent it from retaining needless references to | |
1016 | ;; the build tools in order to save size. | |
1017 | "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c" | |
1018 | "LD=ld" "TAR=tar") | |
b7aa3f5d | 1019 | #:phases |
dd213082 JD |
1020 | (modify-phases %standard-phases |
1021 | (add-before 'configure 'patch-/bin/sh | |
1022 | (lambda _ | |
1023 | ;; Refer to the actual shell. | |
1024 | (substitute* '("src/bin/pg_ctl/pg_ctl.c" | |
1025 | "src/bin/psql/command.c") | |
1026 | (("/bin/sh") (which "sh"))) | |
b7aa3f5d DM |
1027 | #t)) |
1028 | (add-after 'build 'build-contrib | |
1029 | (lambda _ | |
1fbad3ad | 1030 | (invoke "make" "-C" "contrib"))) |
b7aa3f5d DM |
1031 | (add-after 'install 'install-contrib |
1032 | (lambda _ | |
1fbad3ad | 1033 | (invoke "make" "-C" "contrib" "install")))))) |
5f96f303 LC |
1034 | (inputs |
1035 | `(("readline" ,readline) | |
bb93042c | 1036 | ("libuuid" ,util-linux "lib") |
8b7e6d00 | 1037 | ("openssl" ,openssl) |
5f96f303 | 1038 | ("zlib" ,zlib))) |
d887f420 | 1039 | (home-page "https://www.postgresql.org/") |
5f96f303 LC |
1040 | (synopsis "Powerful object-relational database system") |
1041 | (description | |
1042 | "PostgreSQL is a powerful object-relational database system. It is fully | |
1043 | ACID compliant, has full support for foreign keys, joins, views, triggers, and | |
1044 | stored procedures (in multiple languages). It includes most SQL:2008 data | |
1045 | types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and | |
1046 | TIMESTAMP. It also supports storage of binary large objects, including | |
1047 | pictures, sounds, or video.") | |
ba8b9f8d | 1048 | (license (license:x11-style "file://COPYRIGHT")))) |
5f96f303 | 1049 | |
392e230d LLB |
1050 | (define-public postgresql-13.2 |
1051 | (package | |
1052 | (inherit postgresql-13) | |
1053 | (name "postgresql") | |
1054 | (version "13.2") | |
1055 | (source (origin | |
1056 | (method url-fetch) | |
1057 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" | |
1058 | version "/postgresql-" version ".tar.bz2")) | |
1059 | (sha256 | |
1060 | (base32 | |
1061 | "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz")) | |
1062 | (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))))) | |
1063 | ||
a73302ec | 1064 | (define-public postgresql-11 |
ddeec8ca | 1065 | (package |
a73302ec MB |
1066 | (inherit postgresql-13) |
1067 | (name "postgresql") | |
812f0d69 | 1068 | (version "11.11") |
ddeec8ca | 1069 | (source (origin |
a73302ec | 1070 | (inherit (package-source postgresql-13)) |
ddeec8ca MB |
1071 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
1072 | version "/postgresql-" version ".tar.bz2")) | |
1073 | (sha256 | |
1074 | (base32 | |
812f0d69 | 1075 | "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20")))))) |
ddeec8ca | 1076 | |
a73302ec | 1077 | (define-public postgresql-10 |
91477def | 1078 | (package |
a73302ec | 1079 | (inherit postgresql-11) |
e55812e6 | 1080 | (version "10.16") |
91477def | 1081 | (source (origin |
a73302ec | 1082 | (inherit (package-source postgresql-11)) |
91477def GB |
1083 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
1084 | version "/postgresql-" version ".tar.bz2")) | |
1085 | (sha256 | |
1086 | (base32 | |
e55812e6 | 1087 | "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53")))))) |
91477def | 1088 | |
7658d89b EF |
1089 | (define-public postgresql-9.6 |
1090 | (package | |
a73302ec | 1091 | (inherit postgresql-10) |
6941dbf9 | 1092 | (version "9.6.21") |
7658d89b | 1093 | (source (origin |
a73302ec | 1094 | (inherit (package-source postgresql-10)) |
7658d89b EF |
1095 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
1096 | version "/postgresql-" version ".tar.bz2")) | |
1097 | (sha256 | |
1098 | (base32 | |
6941dbf9 | 1099 | "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk")))))) |
7658d89b | 1100 | |
a73302ec MB |
1101 | (define-public postgresql postgresql-13) |
1102 | ||
100a4f84 SH |
1103 | (define-public pgloader |
1104 | (package | |
1105 | (name "pgloader") | |
1106 | (version "3.6.2") | |
1107 | (source | |
1108 | (origin | |
1109 | (method git-fetch) | |
1110 | (uri (git-reference | |
1111 | (url "https://github.com/dimitri/pgloader") | |
1112 | (commit (string-append "v" version)))) | |
1113 | (sha256 | |
1114 | (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh")) | |
1115 | (file-name (git-file-name name version)))) | |
1116 | (build-system gnu-build-system) | |
1117 | (arguments | |
1118 | ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being | |
1119 | ;; dependent on Quicklisp, main build target is `pgloader-standalone' which | |
1120 | ;; does not require Quicklisp workarounds. There is no `install' target | |
1121 | ;; configured in Makefile. | |
1122 | `(#:tests? #f | |
1123 | #:strip-binaries? #f | |
1124 | #:make-flags | |
1125 | (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp") | |
1126 | #:phases | |
1127 | (modify-phases %standard-phases | |
1128 | (delete 'configure) | |
1129 | (add-after 'unpack 'set-home | |
1130 | (lambda _ | |
1131 | (setenv "HOME" "/tmp") | |
1132 | #t)) | |
1133 | (add-after 'unpack 'patch-Makefile | |
1134 | (lambda _ | |
1135 | (substitute* "Makefile" | |
1136 | (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n")) | |
1137 | #t)) | |
1138 | (replace 'install | |
1139 | (lambda* (#:key outputs #:allow-other-keys) | |
1140 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
1141 | (mkdir-p bin) | |
1142 | (install-file "build/bin/pgloader" bin)) | |
1143 | #t))))) | |
1144 | (native-inputs | |
1145 | `(("buildapp" ,buildapp) | |
1146 | ("sbcl" ,sbcl))) | |
1147 | (inputs | |
1148 | `(("alexandria" ,sbcl-alexandria) | |
1149 | ("cl-abnf" ,sbcl-cl-abnf) | |
1150 | ("cl-base64" ,sbcl-cl-base64) | |
1151 | ("cl-csv" ,sbcl-cl-csv) | |
1152 | ("cl-fad" ,sbcl-cl-fad) | |
1153 | ("cl-log" ,sbcl-cl-log) | |
1154 | ("cl-markdown" ,sbcl-cl-markdown) | |
1155 | ("cl-mustache" ,sbcl-cl-mustache) | |
1156 | ("cl-ppcre" ,sbcl-cl-ppcre) | |
1157 | ("cl-sqlite" ,sbcl-cl-sqlite) | |
1158 | ("closer-mop" ,sbcl-closer-mop) | |
1159 | ("command-line-arguments" ,sbcl-command-line-arguments) | |
1160 | ("db3" ,sbcl-db3) | |
1161 | ("drakma" ,sbcl-drakma) | |
1162 | ("esrap" ,sbcl-esrap) | |
1163 | ("flexi-streams" ,sbcl-flexi-streams) | |
1164 | ("ixf" ,sbcl-ixf) | |
1165 | ("local-time" ,sbcl-local-time) | |
1166 | ("lparallel" ,sbcl-lparallel) | |
1167 | ("metabang-bind" ,sbcl-metabang-bind) | |
1168 | ("mssql" ,sbcl-mssql) | |
1169 | ("postmodern" ,sbcl-postmodern) | |
1170 | ("py-configparser" ,sbcl-py-configparser) | |
1171 | ("qmynd" ,sbcl-qmynd) | |
1172 | ("quri" ,sbcl-quri) | |
1173 | ("split-sequence" ,sbcl-split-sequence) | |
1174 | ("trivial-backtrace" ,sbcl-trivial-backtrace) | |
1175 | ("usocket" ,sbcl-usocket) | |
1176 | ("uuid" ,sbcl-uuid) | |
1177 | ("yason" ,sbcl-yason) | |
1178 | ("zs3" ,sbcl-zs3))) | |
1179 | (home-page "https://pgloader.io/") | |
1180 | (synopsis "Tool to migrate data to PostgreSQL") | |
1181 | (description | |
1182 | "@code{pgloader} is a program that can load data or migrate databases from | |
1183 | CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.") | |
1184 | (license (license:x11-style "file://LICENSE")))) | |
1185 | ||
9763102b TGR |
1186 | (define-public python-pymysql |
1187 | (package | |
1188 | (name "python-pymysql") | |
4cb2f29e | 1189 | (version "0.9.3") |
9763102b TGR |
1190 | (source |
1191 | (origin | |
1192 | (method url-fetch) | |
1193 | (uri (pypi-uri "PyMySQL" version)) | |
1194 | (sha256 | |
4cb2f29e | 1195 | (base32 "1ry8lxgdc1p3k7gbw20r405jqi5lvhi5wk83kxdbiv8xv3f5kh6q")))) |
9763102b TGR |
1196 | (build-system python-build-system) |
1197 | (native-inputs | |
1198 | `(("python-unittest2" ,python-unittest2))) | |
1199 | (inputs | |
1200 | `(("python-cryptography" ,python-cryptography))) | |
1201 | (arguments | |
1202 | `(#:tests? #f)) ; tests expect a running MySQL | |
1203 | (home-page "https://github.com/PyMySQL/PyMySQL/") | |
1204 | (synopsis "Pure-Python MySQL driver") | |
1205 | (description | |
1206 | "PyMySQL is a pure-Python MySQL client library, based on PEP 249. | |
1207 | Most public APIs are compatible with @command{mysqlclient} and MySQLdb.") | |
1208 | (license license:expat))) | |
1209 | ||
1210 | (define-public python2-pymysql | |
1211 | (package-with-python2 python-pymysql)) | |
1212 | ||
259a94e9 TD |
1213 | (define-public qdbm |
1214 | (package | |
1215 | (name "qdbm") | |
1216 | (version "1.8.78") | |
1217 | (source | |
1218 | (origin | |
1219 | (method url-fetch) | |
1220 | (uri (string-append "http://fallabs.com/" name "/" | |
1221 | name "-" version ".tar.gz")) | |
1222 | (sha256 | |
1223 | (base32 | |
1224 | "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml")))) | |
1225 | (build-system gnu-build-system) | |
1226 | (arguments | |
7dc0f1d5 TD |
1227 | `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" |
1228 | (assoc-ref %outputs "out") | |
1229 | "/lib")) | |
1230 | #:make-flags (list "CFLAGS=-fPIC"))) | |
d74647b0 | 1231 | (home-page "https://fallabs.com/qdbm/") |
259a94e9 TD |
1232 | (synopsis "Key-value database") |
1233 | (description "QDBM is a library of routines for managing a | |
1234 | database. The database is a simple data file containing key-value | |
1235 | pairs. Every key and value is serial bytes with variable length. | |
1236 | Binary data as well as character strings can be used as a key or a | |
1237 | value. There is no concept of data tables or data types. Records are | |
1238 | organized in a hash table or B+ tree.") | |
1239 | (license license:lgpl2.1+))) | |
1240 | ||
5f96f303 LC |
1241 | (define-public recutils |
1242 | (package | |
1243 | (name "recutils") | |
c007e35d | 1244 | (version "1.8") |
5f96f303 LC |
1245 | (source (origin |
1246 | (method url-fetch) | |
1247 | (uri (string-append "mirror://gnu/recutils/recutils-" | |
1248 | version ".tar.gz")) | |
1249 | (sha256 | |
1250 | (base32 | |
c007e35d | 1251 | "14xiln4immfsw8isnvwvq0h23f6z0wilpgsc4qzabnrzb5lsx3nz")))) |
5f96f303 LC |
1252 | (build-system gnu-build-system) |
1253 | ||
c007e35d | 1254 | (arguments '(#:configure-flags |
b747a9db LF |
1255 | (list (string-append "--with-bash-headers=" |
1256 | (assoc-ref %build-inputs "bash:include") | |
c007e35d | 1257 | "/include/bash")))) |
5f96f303 | 1258 | |
535a69e9 | 1259 | (native-inputs `(("bc" ,bc) |
b747a9db | 1260 | ("bash:include" ,bash "include") |
e1409c76 | 1261 | ("check" ,check-0.14) |
c007e35d | 1262 | ("pkg-config" ,pkg-config))) |
5f96f303 LC |
1263 | |
1264 | ;; TODO: Add more optional inputs. | |
5f96f303 | 1265 | (inputs `(("curl" ,curl) |
23526b67 JS |
1266 | ("libgcrypt" ,libgcrypt) |
1267 | ("libuuid" ,util-linux "lib"))) | |
5f96f303 LC |
1268 | (synopsis "Manipulate plain text files as databases") |
1269 | (description | |
1270 | "GNU Recutils is a set of tools and libraries for creating and | |
1271 | manipulating text-based, human-editable databases. Despite being text-based, | |
1272 | databases created with Recutils carry all of the expected features such as | |
c5779c93 LC |
1273 | unique fields, primary keys, time stamps and more. Many different field |
1274 | types are supported, as is encryption.") | |
ba8b9f8d | 1275 | (license license:gpl3+) |
6fd52309 | 1276 | (home-page "https://www.gnu.org/software/recutils/"))) |
5f96f303 | 1277 | |
9df78675 JH |
1278 | (define-public emacs-recutils |
1279 | (package | |
1280 | (inherit recutils) | |
1281 | (name "emacs-recutils") | |
1282 | (build-system emacs-build-system) | |
1283 | (arguments | |
1284 | '(#:phases | |
1285 | (modify-phases %standard-phases | |
1286 | (add-after 'unpack 'change-directory | |
1287 | (lambda _ | |
1288 | (chdir "etc") | |
1289 | #t))))) | |
1290 | (native-inputs '()) | |
1291 | (inputs '()) | |
1292 | (synopsis "Emacs mode for working with recutils database files") | |
1293 | (description "This package provides an Emacs major mode @code{rec-mode} | |
1294 | for working with GNU Recutils text-based, human-editable databases. It | |
1295 | supports editing, navigation, and querying of recutils database files | |
1296 | including field and record folding."))) | |
1297 | ||
d3c6ad0a MB |
1298 | (define-public rocksdb |
1299 | (package | |
1300 | (name "rocksdb") | |
6a0f9c87 | 1301 | (version "6.11.4") |
d3c6ad0a | 1302 | (source (origin |
8dd36658 MB |
1303 | (method git-fetch) |
1304 | (uri (git-reference | |
1305 | (url "https://github.com/facebook/rocksdb") | |
1306 | (commit (string-append "v" version)))) | |
1307 | (file-name (git-file-name name version)) | |
d3c6ad0a MB |
1308 | (sha256 |
1309 | (base32 | |
6a0f9c87 | 1310 | "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl")) |
d3c6ad0a MB |
1311 | (modules '((guix build utils))) |
1312 | (snippet | |
1313 | '(begin | |
1314 | ;; TODO: unbundle gtest. | |
1315 | (delete-file "build_tools/gnu_parallel") | |
7fa9cca8 MB |
1316 | (substitute* "Makefile" |
1317 | (("build_tools/gnu_parallel") "parallel")) | |
d3c6ad0a MB |
1318 | #t)))) |
1319 | (build-system gnu-build-system) | |
1320 | (arguments | |
7fa9cca8 MB |
1321 | `(#:make-flags (list "CC=gcc" "V=1" |
1322 | ;; Ceph requires that RTTI is enabled. | |
1323 | "USE_RTTI=1" | |
115cd74d | 1324 | "date=1970-01-01" ; build reproducibly |
d3c6ad0a | 1325 | (string-append "INSTALL_PATH=" |
7fa9cca8 MB |
1326 | (assoc-ref %outputs "out")) |
1327 | ||
1328 | ;; Running the full test suite takes hours and require | |
1329 | ;; a lot of disk space. Instead we only run a subset | |
1330 | ;; (see .travis.yml and Makefile). | |
1331 | "ROCKSDBTESTS_END=db_tailing_iter_test") | |
1332 | #:test-target "check_some" | |
d7b344c5 MB |
1333 | ;; Many tests fail on 32-bit platforms. There are multiple reports about |
1334 | ;; this upstream, but it's not going to be supported any time soon. | |
1335 | #:tests? (let ((system ,(or (%current-target-system) | |
1336 | (%current-system)))) | |
1337 | (or (string-prefix? "x86_64-linux" system) | |
1338 | (string-prefix? "aarch64-linux" system))) | |
d3c6ad0a MB |
1339 | #:phases |
1340 | (modify-phases %standard-phases | |
1341 | (add-after 'unpack 'patch-Makefile | |
1342 | (lambda _ | |
1343 | (substitute* "Makefile" | |
f91c677c MB |
1344 | ;; Don't depend on the static library when installing. |
1345 | (("install: install-static") | |
1346 | "install: install-shared") | |
d3c6ad0a MB |
1347 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
1348 | #t)) | |
1349 | (delete 'configure) | |
d7b344c5 MB |
1350 | ;; The default target is only needed for tests and built on demand. |
1351 | (delete 'build) | |
1352 | (add-before 'check 'disable-optimizations | |
1353 | (lambda _ | |
1354 | ;; Prevent the build from passing '-march=native' to the compiler. | |
1355 | (setenv "PORTABLE" "1") | |
1356 | #t)) | |
d3c6ad0a MB |
1357 | (add-before 'check 'disable-failing-tests |
1358 | (lambda _ | |
1359 | (substitute* "Makefile" | |
1360 | ;; These tests reliably fail due to "Too many open files". | |
1361 | (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\") | |
1362 | (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\")) | |
1363 | #t)) | |
7fa9cca8 | 1364 | (add-after 'check 'build |
f91c677c | 1365 | ;; The default build target is a debug build for tests. The |
7fa9cca8 MB |
1366 | ;; install target depends on the "shared_lib" release target |
1367 | ;; so we build it here for clarity. | |
1368 | (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys) | |
1369 | (apply invoke "make" "shared_lib" | |
1370 | `(,@(if parallel-build? | |
1371 | `("-j" ,(number->string (parallel-job-count))) | |
1372 | '()) | |
1373 | ,@make-flags))))))) | |
d3c6ad0a MB |
1374 | (native-inputs |
1375 | `(("parallel" ,parallel) | |
1376 | ("perl" ,perl) | |
1377 | ("procps" ,procps) | |
77e52190 MB |
1378 | ("python" ,python-2) |
1379 | ("which" ,which))) | |
d3c6ad0a MB |
1380 | (inputs |
1381 | `(("bzip2" ,bzip2) | |
1382 | ("gflags" ,gflags) | |
1383 | ("jemalloc" ,jemalloc) | |
1384 | ("lz4" ,lz4) | |
1385 | ("snappy" ,snappy) | |
1386 | ("zlib" ,zlib))) | |
0087a250 | 1387 | (home-page "https://rocksdb.org/") |
d3c6ad0a MB |
1388 | (synopsis "Persistent key-value store for fast storage") |
1389 | (description | |
1390 | "RocksDB is a library that forms the core building block for a fast | |
1391 | key-value server, especially suited for storing data on flash drives. It | |
1392 | has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs | |
1393 | between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor} | |
1394 | (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded | |
1395 | compactions, making it specially suitable for storing multiple terabytes of | |
1396 | data in a single database. RocksDB is partially based on @code{LevelDB}.") | |
7fa9cca8 MB |
1397 | ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header |
1398 | ;; files carry the 3-clause BSD license. | |
1399 | (license (list license:gpl2 license:asl2.0 license:bsd-3)))) | |
d3c6ad0a | 1400 | |
b92d02d9 RJ |
1401 | (define-public sparql-query |
1402 | (package | |
1403 | (name "sparql-query") | |
1404 | (version "1.1") | |
1405 | (source (origin | |
ce64b9d1 EF |
1406 | (method git-fetch) |
1407 | (uri (git-reference | |
1408 | (url "https://github.com/tialaramex/sparql-query") | |
1409 | (commit version))) | |
b92d02d9 | 1410 | (sha256 |
ce64b9d1 EF |
1411 | (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk")) |
1412 | (file-name (git-file-name name version)))) | |
b92d02d9 RJ |
1413 | (build-system gnu-build-system) |
1414 | (inputs | |
6914eea0 | 1415 | `(("curl" ,curl) |
b92d02d9 RJ |
1416 | ("glib" ,glib) |
1417 | ("libxml2" ,libxml2) | |
6914eea0 EF |
1418 | ("ncurses" ,ncurses) |
1419 | ("readline" ,readline))) | |
b92d02d9 RJ |
1420 | (native-inputs |
1421 | `(("pkg-config" ,pkg-config))) | |
1422 | (arguments | |
1423 | `(#:make-flags '("CC=gcc") | |
1424 | #:phases | |
1425 | (modify-phases %standard-phases | |
1426 | (delete 'configure) | |
1427 | ;; The Makefile uses git to obtain versioning information. This phase | |
1428 | ;; substitutes the git invocation with the package version. | |
1429 | (add-after 'unpack 'remove-git-dependency | |
1430 | (lambda _ | |
1431 | (substitute* "Makefile" | |
1432 | (("^gitrev :=.*$") | |
96272e28 MW |
1433 | (string-append "gitrev = \"v" ,version "\""))) |
1434 | #t)) | |
b92d02d9 RJ |
1435 | ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin. |
1436 | ;; This replacement does the same thing, except for using $PREFIX/bin | |
1437 | ;; instead. | |
1438 | (replace 'install | |
1439 | (lambda* (#:key outputs #:allow-other-keys) | |
1440 | (let* ((out (assoc-ref outputs "out")) | |
1441 | (bin (string-append out "/bin"))) | |
1442 | (install-file "sparql-query" bin) | |
96272e28 MW |
1443 | (symlink (string-append bin "/sparql-query") |
1444 | (string-append bin "/sparql-update"))) | |
1445 | #t)) | |
b92d02d9 RJ |
1446 | (replace 'check |
1447 | (lambda* (#:key make-flags #:allow-other-keys) | |
96272e28 MW |
1448 | (apply invoke "make" `(,@make-flags "scan-test")) |
1449 | (invoke "./scan-test")))))) | |
b92d02d9 RJ |
1450 | (home-page "https://github.com/tialaramex/sparql-query/") |
1451 | (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP") | |
1452 | (description "Sparql-query is a command-line tool for accessing SPARQL | |
36a4366d | 1453 | endpoints over HTTP. It has been intentionally designed to @code{feel} similar to |
b92d02d9 RJ |
1454 | tools for interrogating SQL databases. For example, you can enter a query over |
1455 | several lines, using a semi-colon at the end of a line to indicate the end of | |
1456 | your query. It also supports readline so that you can more easily recall and | |
1457 | edit previous queries, even across sessions. It can be used non-interactively, | |
1458 | for example from a shell script.") | |
1459 | ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while | |
1460 | ;; others (like sparql-query.c) contain a GPLv2+ license header. | |
ba8b9f8d | 1461 | (license (list license:gpl3+)))) |
b92d02d9 | 1462 | |
cabe8f18 CB |
1463 | (define-public sqitch |
1464 | (package | |
1465 | (name "sqitch") | |
adcad547 | 1466 | (version "1.1.0") |
cabe8f18 CB |
1467 | (source |
1468 | (origin | |
1469 | (method url-fetch) | |
1470 | (uri (string-append | |
f64cd5d1 TGR |
1471 | "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v" |
1472 | version ".tar.gz")) | |
cabe8f18 | 1473 | (sha256 |
adcad547 | 1474 | (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f")))) |
cabe8f18 CB |
1475 | (build-system perl-build-system) |
1476 | (arguments | |
1477 | '(#:phases | |
1478 | (modify-phases %standard-phases | |
1479 | (add-before 'check 'set-check-environment | |
1480 | (lambda _ | |
1481 | (setenv "TZ" "UTC") | |
1482 | (setenv "HOME" "/tmp") | |
1483 | #t)) | |
1484 | (add-after 'install 'wrap-program | |
1485 | (lambda* (#:key outputs #:allow-other-keys) | |
1486 | (let* ((out (assoc-ref outputs "out")) | |
1487 | (path (getenv "PERL5LIB"))) | |
1488 | (wrap-program (string-append out "/bin/sqitch") | |
1489 | `("PERL5LIB" ":" prefix | |
1490 | (,(string-append out "/lib/perl5/site_perl" | |
1491 | ":" | |
1492 | path))))) | |
1493 | #t))))) | |
1494 | (native-inputs | |
1495 | `(("perl-capture-tiny" ,perl-capture-tiny) | |
1496 | ("perl-io-pager" ,perl-io-pager) | |
1497 | ("perl-module-build" ,perl-module-build) | |
1498 | ("perl-module-runtime" ,perl-module-runtime) | |
1499 | ("perl-path-class" ,perl-path-class) | |
1500 | ("perl-test-deep" ,perl-test-deep) | |
1501 | ("perl-test-dir" ,perl-test-dir) | |
1502 | ("perl-test-exception" ,perl-test-exception) | |
1503 | ("perl-test-file" ,perl-test-file) | |
1504 | ("perl-test-file-contents" ,perl-test-file-contents) | |
1505 | ("perl-test-mockmodule" ,perl-test-mockmodule) | |
adcad547 | 1506 | ("perl-test-mockobject" ,perl-test-mockobject) |
cabe8f18 CB |
1507 | ("perl-test-nowarnings" ,perl-test-nowarnings) |
1508 | ("perl-test-warn" ,perl-test-warn))) | |
1509 | (inputs | |
1510 | `(("perl-class-xsaccessor" ,perl-class-xsaccessor) | |
1511 | ("perl-clone" ,perl-clone) | |
1512 | ("perl-config-gitlike" ,perl-config-gitlike) | |
1513 | ("perl-datetime" ,perl-datetime) | |
1514 | ("perl-datetime-timezone" ,perl-datetime-timezone) | |
6a1c3a90 | 1515 | ("perl-dbd-mysql" ,perl-dbd-mysql) |
cabe8f18 | 1516 | ("perl-dbd-pg" ,perl-dbd-pg) |
6a1c3a90 | 1517 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) |
cabe8f18 CB |
1518 | ("perl-dbi" ,perl-dbi) |
1519 | ("perl-devel-stacktrace" ,perl-devel-stacktrace) | |
1520 | ("perl-encode-locale" ,perl-encode-locale) | |
cabe8f18 CB |
1521 | ("perl-hash-merge" ,perl-hash-merge) |
1522 | ("perl-ipc-run3" ,perl-ipc-run3) | |
1523 | ("perl-ipc-system-simple" ,perl-ipc-system-simple) | |
1524 | ("perl-libintl-perl" ,perl-libintl-perl) | |
1525 | ("perl-list-moreutils" ,perl-list-moreutils) | |
1526 | ("perl-moo" ,perl-moo) | |
1527 | ("perl-mysql-config" ,perl-mysql-config) | |
1528 | ("perl-namespace-autoclean" ,perl-namespace-autoclean) | |
1529 | ("perl-path-class" ,perl-path-class) | |
1530 | ("perl-perlio-utf8_strict" ,perl-perlio-utf8_strict) | |
1531 | ("perl-string-formatter" ,perl-string-formatter) | |
1532 | ("perl-string-shellquote" ,perl-string-shellquote) | |
1533 | ("perl-sub-exporter" ,perl-sub-exporter) | |
1534 | ("perl-template-tiny" ,perl-template-tiny) | |
1535 | ("perl-template-toolkit" ,perl-template-toolkit) | |
1536 | ("perl-throwable" ,perl-throwable) | |
1537 | ("perl-try-tiny" ,perl-try-tiny) | |
1538 | ("perl-type-tiny" ,perl-type-tiny) | |
1539 | ("perl-type-tiny-xs" ,perl-type-tiny-xs) | |
1540 | ("perl-uri" ,perl-uri) | |
1541 | ("perl-uri-db" ,perl-uri-db))) | |
1542 | (home-page "https://sqitch.org/") | |
1543 | (synopsis "Database change management tool") | |
1544 | (description | |
1545 | "Sqitch is a standalone change management system for database schemas, | |
1546 | which uses SQL to describe changes.") | |
1547 | (license license:x11))) | |
1548 | ||
311f06c9 TGR |
1549 | (define-public sqlcrush |
1550 | ;; Unfortunately, there is no proper upstream release and may never be. | |
1551 | (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a") | |
1552 | (revision "1")) | |
1553 | (package | |
1554 | (name "sqlcrush") | |
1555 | (version (git-version "0.1.5" revision commit)) | |
1556 | (source (origin | |
1557 | (method git-fetch) | |
1558 | (uri (git-reference | |
b0e7b699 | 1559 | (url "https://github.com/coffeeandscripts/sqlcrush") |
311f06c9 TGR |
1560 | (commit commit))) |
1561 | (file-name (git-file-name name version)) | |
1562 | (sha256 | |
1563 | (base32 | |
1564 | "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8")))) | |
1565 | (build-system python-build-system) | |
1566 | (inputs | |
1567 | `(("python-cryptography" ,python-cryptography) | |
1568 | ("python-psycopg2" ,python-psycopg2) | |
1569 | ("python-pymysql" ,python-pymysql) | |
1570 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
1571 | (home-page "https://github.com/coffeeandscripts/sqlcrush") | |
1572 | (synopsis "Text console-based database viewer and editor") | |
1573 | (description | |
1574 | "SQLcrush lets you view and edit a database directly from the text | |
1575 | console through an ncurses interface. You can explore each table's structure, | |
1576 | browse and edit the contents, add and delete entries, all while tracking your | |
1577 | changes.") | |
1578 | (license license:gpl3+)))) ; no headers, see README.md | |
1579 | ||
db60b1d9 LC |
1580 | (define-public tdb |
1581 | (package | |
1582 | (name "tdb") | |
10f004f0 | 1583 | (version "1.4.3") |
db60b1d9 LC |
1584 | (source (origin |
1585 | (method url-fetch) | |
ca473fc2 | 1586 | (uri (string-append "https://www.samba.org/ftp/tdb/tdb-" |
db60b1d9 LC |
1587 | version ".tar.gz")) |
1588 | (sha256 | |
1589 | (base32 | |
10f004f0 | 1590 | "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8")))) |
db60b1d9 LC |
1591 | (build-system gnu-build-system) |
1592 | (arguments | |
6ccb7814 EF |
1593 | '(#:phases |
1594 | (modify-phases %standard-phases | |
1595 | (replace 'configure | |
1596 | (lambda* (#:key outputs #:allow-other-keys) | |
1597 | (let ((out (assoc-ref outputs "out"))) | |
1598 | ;; The 'configure' script is a wrapper for Waf and | |
1599 | ;; doesn't recognize things like '--enable-fast-install'. | |
96272e28 MW |
1600 | (invoke "./configure" |
1601 | (string-append "--prefix=" out)))))))) | |
db60b1d9 LC |
1602 | (native-inputs |
1603 | `(;; TODO: Build the documentation. | |
1604 | ;; ("docbook-xsl" ,docbook-xsl) | |
1605 | ;; ("libxml2" ,libxml2) | |
1606 | ;; ("libxslt" ,libxslt) | |
97dcedbd MB |
1607 | ("python" ,python) ;for the Waf build system |
1608 | ("which" ,which))) | |
1abd0904 | 1609 | (home-page "https://tdb.samba.org/") |
35b9e423 | 1610 | (synopsis "Trivial database") |
db60b1d9 LC |
1611 | (description |
1612 | "TDB is a Trivial Database. In concept, it is very much like GDBM, | |
1613 | and BSD's DB except that it allows multiple simultaneous writers and uses | |
1614 | locking internally to keep writers from trampling on each other. TDB is also | |
1615 | extremely small.") | |
ba8b9f8d | 1616 | (license license:lgpl3+))) |
274da61d LC |
1617 | |
1618 | (define-public perl-dbi | |
1619 | (package | |
1620 | (name "perl-dbi") | |
d0ed680b | 1621 | (version "1.643") |
274da61d LC |
1622 | (source (origin |
1623 | (method url-fetch) | |
1624 | (uri (string-append | |
1625 | "mirror://cpan/authors/id/T/TI/TIMB/DBI-" | |
1626 | version ".tar.gz")) | |
1627 | (sha256 | |
1628 | (base32 | |
d0ed680b | 1629 | "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa")))) |
274da61d LC |
1630 | (build-system perl-build-system) |
1631 | (synopsis "Database independent interface for Perl") | |
1632 | (description "This package provides an database interface for Perl.") | |
9aba9b12 | 1633 | (home-page "https://metacpan.org/release/DBI") |
2f3108ad | 1634 | (license license:perl-license))) |
274da61d | 1635 | |
feae3395 EB |
1636 | (define-public perl-dbix-class |
1637 | (package | |
1638 | (name "perl-dbix-class") | |
23ec2a0e | 1639 | (version "0.082842") |
feae3395 EB |
1640 | (source |
1641 | (origin | |
1642 | (method url-fetch) | |
1643 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
1644 | "DBIx-Class-" version ".tar.gz")) | |
1645 | (sha256 | |
23ec2a0e | 1646 | (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh")))) |
feae3395 EB |
1647 | (build-system perl-build-system) |
1648 | (native-inputs | |
1649 | `(("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
1650 | ("perl-file-temp" ,perl-file-temp) | |
2f837cf7 | 1651 | ("perl-module-install" ,perl-module-install) |
feae3395 EB |
1652 | ("perl-package-stash" ,perl-package-stash) |
1653 | ("perl-test-deep" ,perl-test-deep) | |
1654 | ("perl-test-exception" ,perl-test-exception) | |
1655 | ("perl-test-warn" ,perl-test-warn))) | |
1656 | (propagated-inputs | |
1657 | `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
1658 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
1659 | ("perl-class-inspector" ,perl-class-inspector) | |
1660 | ("perl-config-any" ,perl-config-any) | |
1661 | ("perl-context-preserve" ,perl-context-preserve) | |
1662 | ("perl-data-dumper-concise" ,perl-data-dumper-concise) | |
1663 | ("perl-data-page" ,perl-data-page) | |
1664 | ("perl-dbi" ,perl-dbi) | |
1665 | ("perl-devel-globaldestruction" ,perl-devel-globaldestruction) | |
1666 | ("perl-hash-merge" ,perl-hash-merge) | |
1667 | ("perl-module-find" ,perl-module-find) | |
1668 | ("perl-moo" ,perl-moo) | |
1669 | ("perl-mro-compat" ,perl-mro-compat) | |
1670 | ("perl-namespace-clean" ,perl-namespace-clean) | |
1671 | ("perl-path-class" ,perl-path-class) | |
1672 | ("perl-scalar-list-utils" ,perl-scalar-list-utils) | |
1673 | ("perl-scope-guard" ,perl-scope-guard) | |
23ec2a0e | 1674 | ("perl-sql-abstract-classic" ,perl-sql-abstract-classic) |
feae3395 EB |
1675 | ("perl-sub-name" ,perl-sub-name) |
1676 | ("perl-text-balanced" ,perl-text-balanced) | |
1677 | ("perl-try-tiny" ,perl-try-tiny))) | |
9aba9b12 | 1678 | (home-page "https://metacpan.org/release/DBIx-Class") |
feae3395 EB |
1679 | (synopsis "Extensible and flexible object <-> relational mapper") |
1680 | (description "An SQL to OO mapper with an object API inspired by | |
1681 | Class::DBI (with a compatibility layer as a springboard for porting) and a | |
1682 | resultset API that allows abstract encapsulation of database operations. It | |
1683 | aims to make representing queries in your code as perl-ish as possible while | |
1684 | still providing access to as many of the capabilities of the database as | |
1685 | possible, including retrieving related records from multiple tables in a | |
1686 | single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\", | |
1687 | \"ORDER BY\" and \"HAVING\" support.") | |
2f3108ad | 1688 | (license license:perl-license))) |
e61fd0f0 | 1689 | |
4e4039e5 EB |
1690 | (define-public perl-dbix-class-cursor-cached |
1691 | (package | |
1692 | (name "perl-dbix-class-cursor-cached") | |
180cb81b | 1693 | (version "1.001004") |
4e4039e5 EB |
1694 | (source |
1695 | (origin | |
1696 | (method url-fetch) | |
1697 | (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/" | |
1698 | "DBIx-Class-Cursor-Cached-" version ".tar.gz")) | |
1699 | (sha256 | |
1700 | (base32 | |
180cb81b | 1701 | "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p")))) |
4e4039e5 EB |
1702 | (build-system perl-build-system) |
1703 | (native-inputs | |
1704 | `(("perl-cache-cache" ,perl-cache-cache) | |
2f837cf7 MB |
1705 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) |
1706 | ("perl-module-install" ,perl-module-install))) | |
4e4039e5 EB |
1707 | (propagated-inputs |
1708 | `(("perl-carp-clan" ,perl-carp-clan) | |
1709 | ("perl-dbix-class" ,perl-dbix-class))) | |
9aba9b12 | 1710 | (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached") |
4e4039e5 EB |
1711 | (synopsis "Cursor with built-in caching support") |
1712 | (description "DBIx::Class::Cursor::Cached provides a cursor class with | |
1713 | built-in caching support.") | |
2f3108ad | 1714 | (license license:perl-license))) |
4e4039e5 | 1715 | |
e61fd0f0 EB |
1716 | (define-public perl-dbix-class-introspectablem2m |
1717 | (package | |
1718 | (name "perl-dbix-class-introspectablem2m") | |
7a462b80 | 1719 | (version "0.001002") |
e61fd0f0 EB |
1720 | (source |
1721 | (origin | |
1722 | (method url-fetch) | |
68a9d6df | 1723 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" |
e61fd0f0 EB |
1724 | "DBIx-Class-IntrospectableM2M-" version ".tar.gz")) |
1725 | (sha256 | |
1726 | (base32 | |
7a462b80 | 1727 | "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6")))) |
e61fd0f0 | 1728 | (build-system perl-build-system) |
2f837cf7 MB |
1729 | (native-inputs |
1730 | `(("perl-module-install" ,perl-module-install))) | |
e61fd0f0 EB |
1731 | (propagated-inputs |
1732 | `(("perl-dbix-class" ,perl-dbix-class))) | |
9aba9b12 | 1733 | (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M") |
e61fd0f0 EB |
1734 | (synopsis "Introspect many-to-many relationships") |
1735 | (description "Because the many-to-many relationships are not real | |
1736 | relationships, they can not be introspected with DBIx::Class. Many-to-many | |
1737 | relationships are actually just a collection of convenience methods installed | |
1738 | to bridge two relationships. This DBIx::Class component can be used to store | |
1739 | all relevant information about these non-relationships so they can later be | |
1740 | introspected and examined.") | |
2f3108ad | 1741 | (license license:perl-license))) |
708155df EB |
1742 | |
1743 | (define-public perl-dbix-class-schema-loader | |
1744 | (package | |
1745 | (name "perl-dbix-class-schema-loader") | |
1672e7e7 | 1746 | (version "0.07049") |
708155df EB |
1747 | (source |
1748 | (origin | |
1749 | (method url-fetch) | |
1750 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" | |
1751 | "DBIx-Class-Schema-Loader-" version ".tar.gz")) | |
1752 | (sha256 | |
1753 | (base32 | |
1672e7e7 | 1754 | "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8")))) |
708155df EB |
1755 | (build-system perl-build-system) |
1756 | (native-inputs | |
1757 | `(("perl-config-any" ,perl-config-any) | |
1758 | ("perl-config-general" ,perl-config-general) | |
1759 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
1760 | ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m) | |
2f837cf7 | 1761 | ("perl-module-install" ,perl-module-install) |
708155df EB |
1762 | ("perl-moose" ,perl-moose) |
1763 | ("perl-moosex-markasmethods" ,perl-moosex-markasmethods) | |
1764 | ("perl-moosex-nonmoose" ,perl-moosex-nonmoose) | |
1765 | ("perl-namespace-autoclean" ,perl-namespace-autoclean) | |
1766 | ("perl-test-deep" ,perl-test-deep) | |
1767 | ("perl-test-differences" ,perl-test-differences) | |
1768 | ("perl-test-exception" ,perl-test-exception) | |
1769 | ("perl-test-pod" ,perl-test-pod) | |
1770 | ("perl-test-warn" ,perl-test-warn))) | |
1771 | (propagated-inputs | |
1772 | `(("perl-class-unload" ,perl-class-unload) | |
1773 | ("perl-class-inspector" ,perl-class-inspector) | |
1774 | ("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
1775 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
1776 | ("perl-carp-clan" ,perl-carp-clan) | |
1777 | ("perl-data-dump" ,perl-data-dump) | |
1778 | ("perl-dbix-class" ,perl-dbix-class) | |
1779 | ("perl-hash-merge" ,perl-hash-merge) | |
1780 | ("perl-list-moreutils" ,perl-list-moreutils) | |
1781 | ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase) | |
1782 | ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number) | |
1783 | ("perl-lingua-en-tagger" ,perl-lingua-en-tagger) | |
1784 | ("perl-namespace-clean" ,perl-namespace-clean) | |
1785 | ("perl-mro-compat" ,perl-mro-compat) | |
1786 | ("perl-scope-guard" ,perl-scope-guard) | |
1787 | ("perl-string-camelcase" ,perl-string-camelcase) | |
1788 | ("perl-string-toidentifier-en" ,perl-string-toidentifier-en) | |
1789 | ("perl-sub-name" ,perl-sub-name) | |
1790 | ("perl-try-tiny" ,perl-try-tiny))) | |
1791 | (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails | |
9aba9b12 | 1792 | (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader") |
708155df EB |
1793 | (synopsis "Create a DBIx::Class::Schema based on a database") |
1794 | (description "DBIx::Class::Schema::Loader automates the definition of a | |
1795 | DBIx::Class::Schema by scanning database table definitions and setting up the | |
1796 | columns, primary keys, unique constraints and relationships.") | |
2f3108ad | 1797 | (license license:perl-license))) |
274da61d | 1798 | |
186eb132 EB |
1799 | (define-public perl-dbd-pg |
1800 | (package | |
1801 | (name "perl-dbd-pg") | |
8c078dde | 1802 | (version "3.7.4") |
186eb132 EB |
1803 | (source |
1804 | (origin | |
1805 | (method url-fetch) | |
1806 | (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/" | |
1807 | "DBD-Pg-" version ".tar.gz")) | |
1808 | (sha256 | |
1809 | (base32 | |
8c078dde | 1810 | "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz")))) |
186eb132 EB |
1811 | (build-system perl-build-system) |
1812 | (native-inputs | |
1813 | `(("perl-dbi" ,perl-dbi))) | |
1814 | (propagated-inputs | |
1815 | `(("perl-dbi" ,perl-dbi) | |
1816 | ("postgresql" ,postgresql))) | |
9aba9b12 | 1817 | (home-page "https://metacpan.org/release/DBD-Pg") |
186eb132 | 1818 | (synopsis "DBI PostgreSQL interface") |
f33e71fc LC |
1819 | (description "This package provides a PostgreSQL driver for the Perl5 |
1820 | @dfn{Database Interface} (DBI).") | |
2f3108ad | 1821 | (license license:perl-license))) |
186eb132 | 1822 | |
4b7857a4 RW |
1823 | (define-public perl-dbd-mysql |
1824 | (package | |
1825 | (name "perl-dbd-mysql") | |
49596a54 | 1826 | (version "4.050") |
4b7857a4 RW |
1827 | (source |
1828 | (origin | |
1829 | (method url-fetch) | |
49596a54 | 1830 | (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/" |
4b7857a4 RW |
1831 | "DBD-mysql-" version ".tar.gz")) |
1832 | (sha256 | |
49596a54 | 1833 | (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g")))) |
4b7857a4 | 1834 | (build-system perl-build-system) |
702a87f2 TGR |
1835 | (arguments |
1836 | `(#:phases | |
1837 | (modify-phases %standard-phases | |
1838 | (add-before 'configure 'skip-library-detection | |
1839 | ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They | |
1840 | ;; are really only needed for the test suite; their absence does not | |
1841 | ;; affect the build or the end result. | |
1842 | (lambda _ | |
1843 | (substitute* "Makefile.PL" | |
1844 | (("use Devel::CheckLib;" match) | |
1845 | (string-append "# " match)) | |
1846 | (("assert_lib") | |
1847 | "print")) | |
1848 | #t))) | |
1849 | ;; Tests require running MySQL server. | |
1850 | #:tests? #f)) | |
4b7857a4 RW |
1851 | (propagated-inputs |
1852 | `(("perl-dbi" ,perl-dbi) | |
2b8491fb JL |
1853 | ("mysql" ,mariadb "lib") |
1854 | ("mysql-dev" ,mariadb "dev"))) | |
9aba9b12 | 1855 | (home-page "https://metacpan.org/release/DBD-mysql") |
4b7857a4 RW |
1856 | (synopsis "DBI MySQL interface") |
1857 | (description "This package provides a MySQL driver for the Perl5 | |
1858 | @dfn{Database Interface} (DBI).") | |
2f3108ad | 1859 | (license license:perl-license))) |
4b7857a4 | 1860 | |
274da61d LC |
1861 | (define-public perl-dbd-sqlite |
1862 | (package | |
1863 | (name "perl-dbd-sqlite") | |
25fb1e30 | 1864 | (version "1.66") |
274da61d LC |
1865 | (source (origin |
1866 | (method url-fetch) | |
1867 | (uri (string-append | |
1868 | "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-" | |
1869 | version ".tar.gz")) | |
1870 | (sha256 | |
1871 | (base32 | |
25fb1e30 | 1872 | "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9")))) |
274da61d LC |
1873 | (build-system perl-build-system) |
1874 | (inputs `(("sqlite" ,sqlite))) | |
1875 | (propagated-inputs `(("perl-dbi" ,perl-dbi))) | |
1876 | (synopsis "SQlite interface for Perl") | |
1877 | (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes | |
1878 | the entire thing in the distribution. So in order to get a fast transaction | |
1879 | capable RDBMS working for your Perl project you simply have to install this | |
1880 | module, and nothing else.") | |
2f3108ad | 1881 | (license license:perl-license) |
9aba9b12 | 1882 | (home-page "https://metacpan.org/release/DBD-SQLite"))) |
14e84b2d | 1883 | |
55916fa2 CB |
1884 | (define-public perl-mysql-config |
1885 | (package | |
1886 | (name "perl-mysql-config") | |
1887 | (version "1.04") | |
1888 | (source | |
1889 | (origin | |
1890 | (method url-fetch) | |
1891 | (uri (string-append | |
1892 | "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-" | |
1893 | version | |
1894 | ".tar.gz")) | |
1895 | (sha256 | |
1896 | (base32 | |
1897 | "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr")))) | |
1898 | (build-system perl-build-system) | |
1899 | (home-page "https://metacpan.org/release/MySQL-Config") | |
1900 | (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files") | |
1901 | (description | |
1902 | "@code{MySQL::Config} emulates the @code{load_defaults} function from | |
7230f6d5 | 1903 | libmysqlclient. It will fill an array with long options, ready to be parsed by |
55916fa2 CB |
1904 | @code{Getopt::Long}.") |
1905 | (license license:perl-license))) | |
1906 | ||
dd90952e EB |
1907 | (define-public perl-sql-abstract |
1908 | (package | |
1909 | (name "perl-sql-abstract") | |
7a358c78 | 1910 | (version "1.87") |
dd90952e EB |
1911 | (source |
1912 | (origin | |
1913 | (method url-fetch) | |
439980b7 | 1914 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" |
dd90952e EB |
1915 | "SQL-Abstract-" version ".tar.gz")) |
1916 | (sha256 | |
7a358c78 | 1917 | (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9")))) |
dd90952e EB |
1918 | (build-system perl-build-system) |
1919 | (native-inputs | |
9dab5017 MB |
1920 | `(("perl-module-install" ,perl-module-install) |
1921 | ("perl-test-deep" ,perl-test-deep) | |
dd90952e EB |
1922 | ("perl-test-exception" ,perl-test-exception) |
1923 | ("perl-test-warn" ,perl-test-warn))) | |
1924 | (propagated-inputs | |
1925 | `(("perl-hash-merge" ,perl-hash-merge) | |
1926 | ("perl-moo" ,perl-moo) | |
1927 | ("perl-mro-compat" ,perl-mro-compat) | |
1928 | ("perl-text-balanced" ,perl-text-balanced))) | |
9aba9b12 | 1929 | (home-page "https://metacpan.org/release/SQL-Abstract") |
dd90952e EB |
1930 | (synopsis "Generate SQL from Perl data structures") |
1931 | (description "This module was inspired by the excellent DBIx::Abstract. | |
1932 | While based on the concepts used by DBIx::Abstract, the concepts used have | |
1933 | been modified to make the SQL easier to generate from Perl data structures. | |
1934 | The underlying idea is for this module to do what you mean, based on the data | |
1935 | structures you provide it, so that you don't have to modify your code every | |
e881752c | 1936 | time your data changes.") |
2f3108ad | 1937 | (license license:perl-license))) |
14e84b2d | 1938 | |
5d01aeba TGR |
1939 | (define-public perl-sql-abstract-classic |
1940 | (package | |
1941 | (name "perl-sql-abstract-classic") | |
1942 | (version "1.91") | |
1943 | (source | |
1944 | (origin | |
1945 | (method url-fetch) | |
1946 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
1947 | "SQL-Abstract-Classic-" version ".tar.gz")) | |
1948 | (sha256 | |
1949 | (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf")))) | |
1950 | (build-system perl-build-system) | |
1951 | (native-inputs | |
1952 | `(("perl-test-deep" ,perl-test-deep) | |
1953 | ("perl-test-exception" ,perl-test-exception) | |
1954 | ("perl-test-warn" ,perl-test-warn))) | |
1955 | (propagated-inputs | |
1956 | `(("perl-mro-compat" ,perl-mro-compat) | |
1957 | ("perl-sql-abstract" ,perl-sql-abstract))) | |
1958 | (home-page "https://metacpan.org/release/SQL-Abstract-Classic") | |
1959 | (synopsis "Generate SQL from Perl data structures") | |
1960 | (description | |
1961 | "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists | |
1962 | to preserve the ability of users to opt into the new way of doing things in | |
1963 | later versions according to their own schedules. | |
1964 | ||
1965 | It is an abstract SQL generation module based on the concepts used by | |
1966 | @code{DBIx::Abstract}, with several important differences, especially when it | |
1967 | comes to @code{WHERE} clauses. These concepts were modified to make the SQL | |
1968 | easier to generate from Perl data structures. | |
1969 | ||
1970 | The underlying idea is for this module to do what you mean, based on the data | |
1971 | structures you provide it. You shouldn't have to modify your code every time | |
1972 | your data changes, as this module figures it out.") | |
1973 | (license license:perl-license))) | |
1974 | ||
b4dcb026 EB |
1975 | (define-public perl-sql-splitstatement |
1976 | (package | |
1977 | (name "perl-sql-splitstatement") | |
1978 | (version "1.00020") | |
1979 | (source | |
1980 | (origin | |
1981 | (method url-fetch) | |
1982 | (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/" | |
1983 | "SQL-SplitStatement-" version ".tar.gz")) | |
1984 | (sha256 | |
1985 | (base32 | |
1986 | "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p")))) | |
1987 | (build-system perl-build-system) | |
1988 | (native-inputs | |
1989 | `(("perl-test-exception" ,perl-test-exception))) | |
1990 | (propagated-inputs | |
1991 | `(("perl-class-accessor" ,perl-class-accessor) | |
1992 | ("perl-list-moreutils" ,perl-list-moreutils) | |
1993 | ("perl-regexp-common" ,perl-regexp-common) | |
1994 | ("perl-sql-tokenizer" ,perl-sql-tokenizer))) | |
9aba9b12 | 1995 | (home-page "https://metacpan.org/release/SQL-SplitStatement") |
b4dcb026 EB |
1996 | (synopsis "Split SQL code into atomic statements") |
1997 | (description "This module tries to split any SQL code, even including | |
1998 | non-standard extensions, into the atomic statements it is composed of.") | |
2f3108ad | 1999 | (license license:perl-license))) |
b4dcb026 | 2000 | |
718c89c1 EB |
2001 | (define-public perl-sql-tokenizer |
2002 | (package | |
2003 | (name "perl-sql-tokenizer") | |
2004 | (version "0.24") | |
2005 | (source | |
2006 | (origin | |
2007 | (method url-fetch) | |
2008 | (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/" | |
2009 | "SQL-Tokenizer-" version ".tar.gz")) | |
2010 | (sha256 | |
2011 | (base32 | |
2012 | "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s")))) | |
2013 | (build-system perl-build-system) | |
9aba9b12 | 2014 | (home-page "https://metacpan.org/release/SQL-Tokenizer") |
718c89c1 EB |
2015 | (synopsis "SQL tokenizer") |
2016 | (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not | |
2017 | claim to be a parser or query verifier. It just creates sane tokens from a | |
2018 | valid SQL query.") | |
2f3108ad | 2019 | (license license:perl-license))) |
718c89c1 | 2020 | |
14e84b2d JD |
2021 | (define-public unixodbc |
2022 | (package | |
2023 | (name "unixodbc") | |
4712fdd8 | 2024 | (version "2.3.9") |
14e84b2d JD |
2025 | (source (origin |
2026 | (method url-fetch) | |
e881752c | 2027 | (uri |
14e84b2d | 2028 | (string-append |
3fef0a2f EF |
2029 | "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" |
2030 | version ".tar.gz")) | |
14e84b2d | 2031 | (sha256 |
4712fdd8 | 2032 | (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj")))) |
14e84b2d JD |
2033 | (build-system gnu-build-system) |
2034 | (synopsis "Data source abstraction library") | |
2035 | (description "Unixodbc is a library providing an API with which to access | |
2036 | data sources. Data sources include SQL Servers and any software with an ODBC | |
2037 | Driver.") | |
ba8b9f8d | 2038 | (license license:lgpl2.1+) |
14e84b2d JD |
2039 | ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" |
2040 | (home-page "http://www.unixodbc.org"))) | |
b4a9c924 EB |
2041 | |
2042 | (define-public unqlite | |
2043 | (package | |
2044 | (name "unqlite") | |
2045 | (version "1.1.6") | |
2046 | (source (origin | |
2047 | (method url-fetch) | |
2048 | ;; Contains bug fixes against the official release, and has an | |
2049 | ;; autotooled build system. | |
2050 | (uri (string-append "https://github.com/aidin36/tocc/releases/" | |
2051 | "download/v1.0.0/" | |
2052 | "unqlite-unofficial-" version ".tar.gz")) | |
2053 | (sha256 | |
2054 | (base32 | |
2055 | "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s")))) | |
2056 | (build-system gnu-build-system) | |
2057 | (arguments `(#:tests? #f)) ;No check target | |
f50ef349 | 2058 | (home-page "https://www.unqlite.org") |
b4a9c924 EB |
2059 | (synopsis "In-memory key/value and document store") |
2060 | (description | |
2061 | "UnQLite is an in-process software library which implements a | |
2062 | self-contained, serverless, zero-configuration, transactional NoSQL | |
2063 | database engine. UnQLite is a document store database similar to | |
2064 | MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store | |
69b4ffcf | 2065 | similar to BerkeleyDB, LevelDB, etc.") |
ba8b9f8d | 2066 | (license license:bsd-2))) |
463f6766 DT |
2067 | |
2068 | (define-public redis | |
2069 | (package | |
2070 | (name "redis") | |
6a67f443 | 2071 | (version "6.0.11") |
463f6766 DT |
2072 | (source (origin |
2073 | (method url-fetch) | |
2074 | (uri (string-append "http://download.redis.io/releases/redis-" | |
2075 | version".tar.gz")) | |
2076 | (sha256 | |
2077 | (base32 | |
6a67f443 | 2078 | "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9")) |
3a1cb921 VL |
2079 | (modules '((guix build utils))) |
2080 | (snippet | |
2081 | ;; Delete bundled jemalloc, as the package will use the libc one | |
2082 | '(begin (delete-file-recursively "deps/jemalloc") | |
2083 | #t)))) | |
463f6766 | 2084 | (build-system gnu-build-system) |
3a1cb921 VL |
2085 | (native-inputs |
2086 | `(("procps" ,procps) ; for tests | |
2087 | ("tcl" ,tcl))) ; for tests | |
463f6766 | 2088 | (arguments |
3a1cb921 VL |
2089 | '(#:phases |
2090 | (modify-phases %standard-phases | |
2091 | (delete 'configure) | |
2092 | (add-after 'unpack 'use-correct-tclsh | |
2093 | (lambda* (#:key inputs #:allow-other-keys) | |
2094 | (substitute* "runtest" | |
2095 | (("^TCLSH=.*") | |
2096 | (string-append "TCLSH=" | |
2097 | (assoc-ref inputs "tcl") | |
2098 | "/bin/tclsh"))) | |
2099 | #t)) | |
2100 | (add-after 'unpack 'adjust-tests | |
2101 | (lambda _ | |
2102 | ;; Disable failing tests | |
2103 | (substitute* "tests/test_helper.tcl" | |
2104 | ((" integration/replication[^-]") "") | |
2105 | ((" integration/replication-4") "") | |
2106 | ((" integration/replication-psync") "")) | |
2107 | #t))) | |
463f6766 DT |
2108 | #:make-flags `("CC=gcc" |
2109 | "MALLOC=libc" | |
b25f060f | 2110 | "LDFLAGS=-ldl" |
463f6766 DT |
2111 | ,(string-append "PREFIX=" |
2112 | (assoc-ref %outputs "out"))))) | |
2113 | (synopsis "Key-value cache and store") | |
2114 | (description "Redis is an advanced key-value cache and store. Redis | |
2115 | supports many data structures including strings, hashes, lists, sets, sorted | |
2116 | sets, bitmaps and hyperloglogs.") | |
5a3cbfce | 2117 | (home-page "https://redis.io/") |
ba8b9f8d | 2118 | (license license:bsd-3))) |
a65e2a02 | 2119 | |
2120 | (define-public kyotocabinet | |
2121 | (package | |
2122 | (name "kyotocabinet") | |
2a0a6f8f | 2123 | (version "1.2.79") |
a65e2a02 | 2124 | (source (origin |
2125 | (method url-fetch) | |
7fc2ba2a TGR |
2126 | (uri (string-append "https://fallabs.com/kyotocabinet/pkg/" |
2127 | "kyotocabinet-" version ".tar.gz")) | |
a65e2a02 | 2128 | (sha256 |
2129 | (base32 | |
2a0a6f8f | 2130 | "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7")))) |
a65e2a02 | 2131 | (build-system gnu-build-system) |
2132 | (arguments | |
2133 | `(#:configure-flags | |
2134 | (list | |
9d59023e | 2135 | "--disable-opt" ;"-march=native". XXX this also turns off -O0. |
a65e2a02 | 2136 | (string-append "LDFLAGS=-Wl,-rpath=" |
2137 | (assoc-ref %outputs "out") "/lib")))) | |
2138 | (inputs `(("zlib" ,zlib))) | |
7fc2ba2a | 2139 | (home-page "https://fallabs.com/kyotocabinet/") |
a65e2a02 | 2140 | (synopsis |
2141 | "Kyoto Cabinet is a modern implementation of the DBM database") | |
2142 | (description | |
2143 | "Kyoto Cabinet is a standalone file-based database that supports Hash | |
2144 | and B+ Tree data storage models. It is a fast key-value lightweight | |
2145 | database and supports many programming languages. It is a NoSQL database.") | |
ba8b9f8d | 2146 | (license license:gpl3+))) |
6242b314 | 2147 | |
bdc11dc4 | 2148 | (define-public tokyocabinet |
2149 | (package | |
2150 | (name "tokyocabinet") | |
2151 | (version "1.4.48") | |
2152 | (source | |
2153 | (origin | |
2154 | (method url-fetch) | |
2155 | (uri (string-append "http://fallabs.com/tokyocabinet/" | |
2156 | name "-" version ".tar.gz")) | |
2157 | (sha256 | |
2158 | (base32 | |
2159 | "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0")))) | |
2160 | (build-system gnu-build-system) | |
2161 | (arguments | |
2162 | `(#:configure-flags | |
2163 | (list "--enable-pthread" "--enable-off64" "--enable-fastest" | |
2164 | (string-append "LDFLAGS=-Wl,-rpath=" | |
2165 | (assoc-ref %outputs "out") "/lib")))) | |
2166 | (inputs | |
2167 | `(("zlib" ,zlib))) | |
2168 | (home-page "http://fallabs.com/tokyocabinet/") | |
2169 | (synopsis "Tokyo Cabinet is a modern implementation of the DBM database") | |
2170 | (description | |
2171 | "Tokyo Cabinet is a library of routines for managing a database. | |
2172 | The database is a simple data file containing records, each is a pair of a | |
2173 | key and a value. Every key and value is serial bytes with variable length. | |
2174 | Both binary data and character string can be used as a key and a value. | |
2175 | There is neither concept of data tables nor data types. Records are | |
2176 | organized in hash table, B+ tree, or fixed-length array.") | |
2177 | (license license:lgpl2.1+))) | |
2178 | ||
6242b314 SB |
2179 | (define-public wiredtiger |
2180 | (package | |
2181 | (name "wiredtiger") | |
81e95821 | 2182 | (version "2.9.1") |
6242b314 SB |
2183 | (source (origin |
2184 | (method url-fetch) | |
2185 | (uri (string-append | |
2186 | "http://source.wiredtiger.com/releases/wiredtiger-" | |
2187 | version ".tar.bz2")) | |
2188 | (sha256 | |
2189 | (base32 | |
81e95821 | 2190 | "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s")))) |
6242b314 SB |
2191 | (build-system gnu-build-system) |
2192 | (arguments | |
a469c695 | 2193 | '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib") |
6242b314 SB |
2194 | #:phases |
2195 | (modify-phases %standard-phases | |
2196 | (add-before 'check 'disable-test/fops | |
2197 | (lambda _ | |
2198 | ;; XXX: timed out after 3600 seconds of silence | |
2199 | (substitute* "Makefile" | |
2200 | (("test/fops") "")) | |
2201 | #t))))) | |
2202 | (inputs | |
2203 | `(("lz4" ,lz4) | |
3faa422d CB |
2204 | ("zlib" ,zlib) |
2205 | ("snappy" ,snappy))) | |
6242b314 SB |
2206 | (home-page "http://source.wiredtiger.com/") |
2207 | (synopsis "NoSQL data engine") | |
2208 | (description | |
2209 | "WiredTiger is an extensible platform for data management. It supports | |
2210 | row-oriented storage (where all columns of a row are stored together), | |
2211 | column-oriented storage (where columns are stored in groups, allowing for | |
2212 | more efficient access and storage of column subsets) and log-structured merge | |
2213 | trees (LSM), for sustained throughput under random insert workloads.") | |
ba8b9f8d | 2214 | (license license:gpl3) ; or GPL-2 |
6242b314 | 2215 | ;; configure.ac: WiredTiger requires a 64-bit build. |
092b7b3e | 2216 | (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")))) |
90c2ee88 | 2217 | |
4680fef7 AB |
2218 | (define-public wiredtiger-3 |
2219 | (package | |
2220 | (inherit wiredtiger) | |
2221 | (name "wiredtiger") | |
2222 | (version "3.1.0") | |
2223 | (source (origin | |
2224 | (method url-fetch) | |
2225 | (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-" | |
2226 | version ".tar.bz2")) | |
2227 | (sha256 | |
2228 | (base32 | |
2229 | "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx")))))) | |
2230 | ||
16973071 KB |
2231 | (define-public guile-wiredtiger |
2232 | (package | |
2233 | (name "guile-wiredtiger") | |
b1e6b938 | 2234 | (version "0.7.0") |
16973071 KB |
2235 | (source (origin |
2236 | (method git-fetch) | |
2237 | (uri (git-reference | |
2238 | (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git") | |
b1e6b938 | 2239 | (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b"))) |
16973071 KB |
2240 | (file-name (string-append name "-" version "-checkout")) |
2241 | (sha256 | |
2242 | (base32 | |
b1e6b938 | 2243 | "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595")))) |
16973071 KB |
2244 | (build-system gnu-build-system) |
2245 | (arguments | |
3926a099 | 2246 | '(#:parallel-tests? #f ;; tests can't be run in parallel, yet. |
16973071 KB |
2247 | #:configure-flags |
2248 | (list (string-append "--with-libwiredtiger-prefix=" | |
2249 | (assoc-ref %build-inputs "wiredtiger"))) | |
189be331 | 2250 | #:make-flags '("GUILE_AUTO_COMPILE=0"))) |
16973071 KB |
2251 | (native-inputs |
2252 | `(("autoconf" ,autoconf) | |
2253 | ("automake" ,automake) | |
2254 | ("pkg-config" ,pkg-config))) | |
2255 | (inputs | |
b1e6b938 | 2256 | `(("wiredtiger" ,wiredtiger-3) |
16973071 KB |
2257 | ("guile" ,guile-2.2))) |
2258 | (propagated-inputs | |
b1e6b938 | 2259 | `(("guile-bytestructures" ,guile-bytestructures))) |
3926a099 | 2260 | (synopsis "WiredTiger bindings for GNU Guile") |
16973071 KB |
2261 | (description |
2262 | "This package provides Guile bindings to the WiredTiger ``NoSQL'' | |
b1e6b938 | 2263 | database.") |
16973071 KB |
2264 | (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger") |
2265 | (license license:gpl3+))) | |
2266 | ||
90c2ee88 DM |
2267 | (define-public perl-db-file |
2268 | (package | |
2269 | (name "perl-db-file") | |
24dd78a3 | 2270 | (version "1.855") |
90c2ee88 DM |
2271 | (source |
2272 | (origin | |
2273 | (method url-fetch) | |
76899e92 TGR |
2274 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-" |
2275 | version ".tar.gz")) | |
90c2ee88 | 2276 | (sha256 |
24dd78a3 | 2277 | (base32 "0q599h7g4jkzks5dxf1zifx9k7l9vif26r2dlgkzxkg6bfif5zyr")))) |
90c2ee88 DM |
2278 | (build-system perl-build-system) |
2279 | (inputs `(("bdb" ,bdb))) | |
2280 | (native-inputs `(("perl-test-pod" ,perl-test-pod))) | |
2281 | (arguments | |
2282 | `(#:phases (modify-phases %standard-phases | |
2283 | (add-before | |
2284 | 'configure 'modify-config.in | |
2285 | (lambda* (#:key inputs #:allow-other-keys) | |
2286 | (substitute* "config.in" | |
2287 | (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb"))) | |
2288 | #t))))) | |
9aba9b12 | 2289 | (home-page "https://metacpan.org/release/DB_File") |
ce054e84 | 2290 | (synopsis "Perl5 access to Berkeley DB version 1.x") |
90c2ee88 DM |
2291 | (description |
2292 | "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.") | |
2f3108ad | 2293 | (license license:perl-license))) |
0e1b262e DC |
2294 | |
2295 | (define-public lmdb | |
2296 | (package | |
2297 | (name "lmdb") | |
5f299b4a | 2298 | (version "0.9.28") |
f167b432 TGR |
2299 | (source |
2300 | (origin | |
2301 | (method git-fetch) | |
2302 | (uri (git-reference | |
8fc6059b | 2303 | (url "https://git.openldap.org/openldap/openldap.git") |
f167b432 TGR |
2304 | (commit (string-append "LMDB_" version)))) |
2305 | (file-name (git-file-name name version)) | |
2306 | (sha256 | |
5f299b4a | 2307 | (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as")))) |
0e1b262e DC |
2308 | (build-system gnu-build-system) |
2309 | (arguments | |
2310 | `(#:test-target "test" | |
2311 | #:phases | |
2312 | (modify-phases %standard-phases | |
2313 | (replace 'configure | |
2314 | (lambda* (#:key outputs #:allow-other-keys) | |
f167b432 | 2315 | (chdir "libraries/liblmdb") |
0e1b262e DC |
2316 | (substitute* "Makefile" |
2317 | (("/usr/local") (assoc-ref outputs "out"))) | |
46c2cf69 EF |
2318 | #t)) |
2319 | (add-after 'install 'create-pkg-config-file | |
2320 | (lambda* (#:key outputs #:allow-other-keys) | |
2321 | (let ((out (assoc-ref outputs "out"))) | |
2322 | (mkdir-p (string-append out "/lib/pkgconfig")) | |
2323 | (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc") | |
2324 | (lambda _ | |
2325 | (format #t "prefix=~a~@ | |
2326 | exec_prefix=~a~@ | |
2327 | libdir=~a/lib~@ | |
2328 | includedir=~a/include~@ | |
2329 | ~@ | |
2330 | Name: liblmdb~@ | |
2331 | Version: ~a~@ | |
2332 | Description: Lightning Memory-Mapped Database library~@ | |
2333 | Libs: -L${libdir} -llmdb~@ | |
2334 | Cflags: -I${includedir}~%" | |
2335 | out out out out ,version))) | |
2336 | #t)))))) | |
669fde53 | 2337 | (home-page "https://symas.com/lmdb/") |
fda852ff TGR |
2338 | (synopsis "Lightning Memory-Mapped Database library") |
2339 | (description | |
2340 | "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance | |
2341 | transactional database. Unlike more complex relational databases, LMDB handles | |
2342 | only key-value pairs (stored as arbitrary byte arrays) and relies on the | |
2343 | underlying operating system for caching and locking, keeping the code small and | |
2344 | simple. | |
2345 | The use of ‘zero-copy’ memory-mapped files combines the persistence of classic | |
2346 | disk-based databases with high read performance that scales linearly over | |
2347 | multiple cores. The size of each database is limited only by the size of the | |
2348 | virtual address space — not physical RAM.") | |
0e1b262e | 2349 | (license license:openldap2.8))) |
fe71eee0 | 2350 | |
659bc436 | 2351 | (define-public lmdbxx |
2352 | (package | |
2353 | (name "lmdbxx") | |
2354 | (version "0.9.14.0") | |
2355 | (source | |
2356 | (origin | |
2357 | (method git-fetch) | |
2358 | (uri (git-reference | |
b0e7b699 | 2359 | (url "https://github.com/drycpp/lmdbxx") |
659bc436 | 2360 | (commit version))) |
2361 | (file-name (git-file-name name version)) | |
2362 | (sha256 | |
2363 | (base32 "1jmb9wg2iqag6ps3z71bh72ymbcjrb6clwlkgrqf1sy80qwvlsn6")))) | |
2364 | (arguments | |
2365 | `(#:make-flags | |
2366 | (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
2367 | #:phases | |
2368 | (modify-phases %standard-phases | |
2369 | (delete 'configure)))) | |
2370 | (build-system gnu-build-system) | |
2371 | (inputs `(("lmdb" ,lmdb))) | |
2372 | (home-page "http://lmdbxx.sourceforge.net") | |
2373 | (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library") | |
2374 | (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the | |
2375 | @code{LMDB} embedded database library, offering both an error-checked | |
2376 | procedural interface and an object-oriented resource interface with RAII | |
2377 | semantics.") | |
2378 | (license license:unlicense))) | |
2379 | ||
fe71eee0 JN |
2380 | (define-public libpqxx |
2381 | (package | |
2382 | (name "libpqxx") | |
2383 | (version "4.0.1") | |
2384 | (source (origin | |
2385 | (method url-fetch) | |
2386 | (uri (string-append | |
2387 | "http://pqxx.org/download/software/libpqxx/" | |
2388 | name "-" version ".tar.gz")) | |
2389 | (sha256 | |
2390 | (base32 | |
2391 | "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09")))) | |
2392 | (build-system gnu-build-system) | |
2393 | (native-inputs | |
2394 | `(("python" ,python-2))) | |
2395 | (inputs `(("postgresql" ,postgresql))) | |
2396 | (arguments | |
5ac097e2 MB |
2397 | `(#:tests? #f ; # FAIL: 1 |
2398 | #:phases | |
2399 | (modify-phases %standard-phases | |
2400 | (add-before 'configure 'fix-sed-command | |
2401 | (lambda _ | |
2402 | ;; Newer sed versions error out if double brackets are not used. | |
2403 | (substitute* "configure" | |
2404 | (("\\[:space:\\]") "[[:space:]]")) | |
2405 | #t))))) | |
fe71eee0 JN |
2406 | (synopsis "C++ connector for PostgreSQL") |
2407 | (description | |
2408 | "Libpqxx is a C++ library to enable user programs to communicate with the | |
2409 | PostgreSQL database back-end. The database back-end can be local or it may be | |
2410 | on another machine, accessed via TCP/IP.") | |
2411 | (home-page "http://pqxx.org/") | |
2412 | (license license:bsd-3))) | |
4d98bfaf EF |
2413 | |
2414 | (define-public python-peewee | |
2415 | (package | |
2416 | (name "python-peewee") | |
0fecc6ce | 2417 | (version "3.14.0") |
831f1ff9 MR |
2418 | (source |
2419 | (origin | |
2420 | (method url-fetch) | |
2421 | (uri (pypi-uri "peewee" version)) | |
2422 | (sha256 | |
0fecc6ce | 2423 | (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar")))) |
4d98bfaf EF |
2424 | (build-system python-build-system) |
2425 | (arguments | |
0fecc6ce | 2426 | `(#:tests? #f)) ; fails to import test data |
831f1ff9 MR |
2427 | (inputs |
2428 | `(("sqlite" ,sqlite))) | |
4d98bfaf EF |
2429 | (native-inputs |
2430 | `(("python-cython" ,python-cython))) | |
2431 | (home-page "https://github.com/coleifer/peewee/") | |
2432 | (synopsis "Small object-relational mapping utility") | |
2433 | (description | |
2434 | "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee | |
2435 | handles converting between pythonic values and those used by databases, so you | |
2436 | can use Python types in your code without having to worry. It has built-in | |
2437 | support for sqlite, mysql and postgresql. If you already have a database, you | |
2438 | can autogenerate peewee models using @code{pwiz}, a model generator.") | |
2439 | (license license:expat))) | |
2440 | ||
2441 | (define-public python2-peewee | |
2442 | (package-with-python2 python-peewee)) | |
62ea44fc | 2443 | |
1110a421 LDB |
2444 | (define-public python-tortoise-orm |
2445 | (package | |
2446 | (name "python-tortoise-orm") | |
e7a3ae1e | 2447 | (version "0.16.21") |
1110a421 LDB |
2448 | (source |
2449 | (origin | |
2450 | (method url-fetch) | |
2451 | (uri (pypi-uri "tortoise-orm" version)) | |
2452 | (sha256 | |
2453 | (base32 | |
e7a3ae1e | 2454 | "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp")))) |
1110a421 | 2455 | (build-system python-build-system) |
e7a3ae1e LDB |
2456 | (arguments |
2457 | `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on | |
2458 | ; poetry. | |
2459 | #:phases (modify-phases %standard-phases | |
2460 | (add-after 'unpack 'relax-version-requirements | |
2461 | (lambda _ | |
2462 | (substitute* "setup.py" | |
2463 | (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika") | |
2464 | (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite")) | |
2465 | #t))))) | |
1110a421 | 2466 | (native-inputs |
b9d96ed7 | 2467 | `(("python-asynctest" ,python-asynctest) |
1110a421 LDB |
2468 | ("python-nose2" ,python-nose2))) |
2469 | (propagated-inputs | |
2470 | `(("python-aiosqlite" ,python-aiosqlite) | |
2471 | ("python-pypika" ,python-pypika) | |
b9d96ed7 | 2472 | ("python-ciso8601" ,python-ciso8601) |
1110a421 LDB |
2473 | ("python-typing-extensions" |
2474 | ,python-typing-extensions))) | |
2475 | (home-page | |
2476 | "https://github.com/tortoise/tortoise-orm") | |
2477 | (synopsis | |
2478 | "Easy async ORM for python, built with relations in mind") | |
2479 | (description | |
2480 | "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper) | |
2481 | inspired by Django. Tortoise ORM was build with relations in mind and | |
2482 | admiration for the excellent and popular Django ORM. It’s engraved in its | |
2483 | design that you are working not with just tables, you work with relational | |
2484 | data.") | |
2485 | (license license:asl2.0))) | |
2486 | ||
62ea44fc AP |
2487 | (define-public sqlcipher |
2488 | (package | |
2489 | (name "sqlcipher") | |
682c2918 | 2490 | (version "3.4.2") |
62ea44fc AP |
2491 | (source |
2492 | (origin | |
2493 | (method url-fetch) | |
2494 | (uri (string-append "https://github.com/sqlcipher/" name | |
2495 | "/archive/v" version ".tar.gz")) | |
2496 | (sha256 | |
682c2918 | 2497 | (base32 "1nxarwbci8jx99f1d0y1ivxcv25s78l1p7q6qy28lkpkcx8pm2b9")) |
62ea44fc AP |
2498 | (file-name (string-append name "-" version ".tar.gz")))) |
2499 | (build-system gnu-build-system) | |
2500 | (inputs | |
2501 | `(("libcrypto" ,openssl) | |
2502 | ("libtcl8.6" ,tcl))) ; required for running the tests | |
2503 | (native-inputs | |
2504 | `(("tcl" ,tcl))) | |
2505 | (arguments | |
2506 | '(#:configure-flags | |
2507 | '("--enable-tempstore=yes" | |
2508 | "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3" | |
2509 | "LDFLAGS=-lcrypto -ltcl8.6" | |
2510 | "--disable-tcl") | |
2511 | ;; tests cannot be run from the Makefile | |
2512 | ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172> | |
2513 | #:test-target "testfixture" | |
2514 | #:phases | |
2515 | (modify-phases %standard-phases | |
2516 | (add-before 'check 'build-test-runner | |
2517 | (assoc-ref %standard-phases 'check)) | |
2518 | (replace 'check | |
2519 | (lambda _ | |
96272e28 | 2520 | (invoke "./testfixture" "test/crypto.test")))))) |
62ea44fc AP |
2521 | (home-page "https://www.zetetic.net/sqlcipher/") |
2522 | (synopsis | |
2523 | "Library providing transparent encryption of SQLite database files") | |
2524 | (description "SQLCipher is an implementation of SQLite, extended to | |
2525 | provide transparent 256-bit AES encryption of database files. Pages are | |
2526 | encrypted before being written to disk and are decrypted when read back. It’s | |
2527 | well suited for protecting embedded application databases and for mobile | |
2528 | development.") | |
2529 | ;; The source files | |
2530 | ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c}, | |
2531 | ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl, | |
2532 | ;; test/crypto.test are licensed under a 3-clause BSD license. All other | |
2533 | ;; source files are in the public domain. | |
2534 | (license (list license:public-domain license:bsd-3)))) | |
98d403bb DM |
2535 | |
2536 | (define-public python-pyodbc-c | |
2537 | (package | |
2538 | (name "python-pyodbc-c") | |
c6b6a74e | 2539 | (version "3.1.4") |
98d403bb DM |
2540 | (source |
2541 | (origin | |
2542 | (method url-fetch) | |
2543 | (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/" | |
2544 | "archive.tar.gz?ref=v" version)) | |
2545 | (sha256 | |
2546 | (base32 | |
c6b6a74e | 2547 | "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9")) |
98d403bb DM |
2548 | (file-name (string-append name "-" version ".tar.gz")))) |
2549 | (build-system python-build-system) | |
2550 | (inputs | |
2551 | `(("unixodbc" ,unixodbc))) | |
2552 | (arguments | |
2553 | `(;; No unit tests exist. | |
2554 | #:tests? #f)) | |
2555 | (home-page "https://github.com/mkleehammer/pyodbc") | |
2556 | (synopsis "Python ODBC Library") | |
2557 | (description "@code{python-pyodbc-c} provides a Python DB-API driver | |
2558 | for ODBC.") | |
2559 | (license (license:x11-style "file://LICENSE.TXT")))) | |
2560 | ||
2561 | (define-public python2-pyodbc-c | |
2562 | (package-with-python2 python-pyodbc-c)) | |
d39a84e8 | 2563 | |
41916bea DM |
2564 | (define-public python-pyodbc |
2565 | (package | |
2566 | (name "python-pyodbc") | |
dbc8a6e7 | 2567 | (version "4.0.30") |
41916bea DM |
2568 | (source |
2569 | (origin | |
2570 | (method url-fetch) | |
2571 | (uri (pypi-uri "pyodbc" version)) | |
2572 | (sha256 | |
dbc8a6e7 | 2573 | (base32 "0skjpraar6hcwsy82612bpj8nw016ncyvvq88j5syrikxgp5saw5")) |
41916bea DM |
2574 | (file-name (string-append name "-" version ".tar.gz")))) |
2575 | (build-system python-build-system) | |
2576 | (inputs | |
2577 | `(("unixodbc" ,unixodbc))) | |
2578 | (arguments | |
d5be746a | 2579 | `(#:tests? #f)) ; no unit tests exist |
41916bea DM |
2580 | (home-page "https://github.com/mkleehammer/pyodbc") |
2581 | (synopsis "Python ODBC Library") | |
2582 | (description "@code{python-pyodbc} provides a Python DB-API driver | |
2583 | for ODBC.") | |
2584 | (license (license:x11-style "file:///LICENSE.TXT")))) | |
2585 | ||
2586 | (define-public python2-pyodbc | |
2587 | (package-with-python2 python-pyodbc)) | |
2588 | ||
d39a84e8 AI |
2589 | (define-public mdbtools |
2590 | (package | |
2591 | (name "mdbtools") | |
2592 | (version "0.7.1") | |
2593 | (source | |
2594 | (origin | |
f1f1cebd RW |
2595 | (method git-fetch) |
2596 | (uri (git-reference | |
b0e7b699 | 2597 | (url "https://github.com/brianb/mdbtools") |
f1f1cebd RW |
2598 | (commit version))) |
2599 | (file-name (git-file-name name version)) | |
d39a84e8 AI |
2600 | (sha256 |
2601 | (base32 | |
f1f1cebd | 2602 | "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l")))) |
d39a84e8 AI |
2603 | (build-system gnu-build-system) |
2604 | (inputs | |
2605 | `(("glib" ,glib))) | |
2606 | (native-inputs | |
2607 | `(("autoconf" ,autoconf) | |
2608 | ("automake" ,automake) | |
2609 | ("libtool" ,libtool) | |
2610 | ("pkg-config" ,pkg-config) | |
2611 | ("txt2man" ,txt2man) | |
2612 | ("which" ,which))) | |
d39a84e8 AI |
2613 | (home-page "http://mdbtools.sourceforge.net/") |
2614 | (synopsis "Read Microsoft Access databases") | |
2615 | (description "MDB Tools is a set of tools and applications to read the | |
2616 | proprietary MDB file format used in Microsoft's Access database package. This | |
2617 | includes programs to export schema and data from Microsoft's Access database | |
2618 | file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL, | |
2619 | etc., and an SQL engine for performing simple SQL queries.") | |
2620 | (license (list license:lgpl2.0 | |
2621 | license:gpl2+)))) | |
07041d95 TGR |
2622 | |
2623 | (define-public python-lmdb | |
2624 | (package | |
2625 | (name "python-lmdb") | |
771c266b | 2626 | (version "1.0.0") |
07041d95 TGR |
2627 | (source (origin |
2628 | (method url-fetch) | |
2629 | (uri (pypi-uri "lmdb" version)) | |
2630 | (sha256 | |
2631 | (base32 | |
771c266b | 2632 | "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1")) |
07041d95 TGR |
2633 | (modules '((guix build utils))) |
2634 | (snippet | |
2635 | ;; Delete bundled lmdb source files. | |
6cbee49d MW |
2636 | '(begin |
2637 | (for-each delete-file (list "lib/lmdb.h" | |
2638 | "lib/mdb.c" | |
2639 | "lib/midl.c" | |
2640 | "lib/midl.h")) | |
2641 | #t)))) | |
07041d95 TGR |
2642 | (build-system python-build-system) |
2643 | (inputs | |
2644 | `(("lmdb" ,lmdb))) | |
2645 | (arguments | |
2646 | `(#:phases | |
2647 | (modify-phases %standard-phases | |
2648 | (add-before 'build 'use-system-lmdb | |
2649 | (lambda* (#:key inputs #:allow-other-keys) | |
2650 | (let ((lmdb (assoc-ref inputs "lmdb"))) | |
771c266b | 2651 | (setenv "LMDB_PURE" "set") ; don't apply env-copy-txn.patch |
07041d95 TGR |
2652 | (setenv "LMDB_FORCE_SYSTEM" "set") |
2653 | (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include")) | |
2654 | (setenv "LMDB_LIBDIR" (string-append lmdb "/lib")) | |
2655 | #t)))) | |
2656 | ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’. | |
2657 | #:tests? #f)) | |
2658 | (home-page "https://github.com/dw/py-lmdb") | |
2659 | (synopsis "Python binding for the ‘Lightning’ database (LMDB)") | |
2660 | (description | |
2661 | "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning | |
2662 | Memory-Mapped Database} (LMDB), a high-performance key-value store.") | |
2663 | (license | |
2664 | (list license:openldap2.8 | |
2665 | ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3, | |
2666 | ;; but not actually needed on platforms currently supported by Guix. | |
2667 | license:bsd-3)))) | |
2668 | ||
da1f7a9e BW |
2669 | (define-public python-orator |
2670 | (package | |
2671 | (name "python-orator") | |
51d42caa | 2672 | (version "0.9.9") |
da1f7a9e BW |
2673 | (source (origin |
2674 | (method url-fetch) | |
2675 | (uri (pypi-uri "orator" version)) | |
2676 | (sha256 | |
2677 | (base32 | |
51d42caa | 2678 | "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg")))) |
da1f7a9e | 2679 | (build-system python-build-system) |
51d42caa MB |
2680 | ;; FIXME: Tests are not distributed with PyPI, and the repository |
2681 | ;; does not contain setup.py. How to test? | |
2682 | (arguments '(#:tests? #f)) | |
da1f7a9e BW |
2683 | (propagated-inputs |
2684 | `(("python-backpack" ,python-backpack) | |
2685 | ("python-blinker" ,python-blinker) | |
2686 | ("python-cleo" ,python-cleo) | |
2687 | ("python-faker" ,python-faker) | |
2688 | ("python-inflection" ,python-inflection) | |
2689 | ("python-lazy-object-proxy" ,python-lazy-object-proxy) | |
2690 | ("python-pendulum" ,python-pendulum) | |
2691 | ("python-pyaml" ,python-pyaml) | |
2692 | ("python-pygments" ,python-pygments) | |
51d42caa | 2693 | ("python-pyyaml" ,python-pyyaml) |
da1f7a9e BW |
2694 | ("python-simplejson" ,python-simplejson) |
2695 | ("python-six" ,python-six) | |
2696 | ("python-wrapt" ,python-wrapt))) | |
2697 | (home-page "https://orator-orm.com/") | |
2698 | (synopsis "ActiveRecord ORM for Python") | |
2699 | (description | |
2700 | "Orator provides a simple ActiveRecord-like Object Relational Mapping | |
2701 | implementation for Python.") | |
2702 | (license license:expat) | |
2703 | (properties `((python2-variant . ,(delay python2-orator)))))) | |
2704 | ||
2705 | (define-public python2-orator | |
2706 | (package-with-python2 (strip-python2-variant python-orator))) | |
61ce0998 RJ |
2707 | |
2708 | (define-public virtuoso-ose | |
2709 | (package | |
2710 | (name "virtuoso-ose") | |
e63da346 | 2711 | (version "7.2.5") |
61ce0998 RJ |
2712 | (source |
2713 | (origin | |
2714 | (method url-fetch) | |
2715 | (uri (string-append | |
2716 | "https://github.com/openlink/virtuoso-opensource/releases/" | |
2717 | "download/v" version "/virtuoso-opensource-" version ".tar.gz")) | |
2718 | (sha256 | |
e63da346 | 2719 | (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42")))) |
61ce0998 RJ |
2720 | (build-system gnu-build-system) |
2721 | (arguments | |
6d09a7b5 RJ |
2722 | `(#:tests? #f ; Tests require a network connection. |
2723 | ;; TODO: Removing the libsrc/zlib source directory breaks the build. | |
2724 | ;; This indicates that the internal zlib code may still be used. | |
2725 | #:configure-flags '("--without-internal-zlib" | |
d26bf529 RJ |
2726 | "--with-readline" |
2727 | "--enable-static=no") | |
2728 | #:phases | |
2729 | (modify-phases %standard-phases | |
2730 | ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in | |
2731 | ;; the build output. The following phase removes it. | |
2732 | (add-after 'install 'remove-static-libs | |
2733 | (lambda* (#:key outputs #:allow-other-keys) | |
2734 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
2735 | (for-each (lambda (file) | |
2736 | (delete-file (string-append lib "/" file))) | |
2737 | '("libvirtuoso-t.a" | |
2738 | "libvirtuoso-t.la")))))))) | |
61ce0998 | 2739 | (inputs |
95c633e0 | 2740 | `(("openssl" ,openssl-1.0) |
6d09a7b5 RJ |
2741 | ("net-tools" ,net-tools) |
2742 | ("readline" ,readline) | |
2743 | ("zlib" ,zlib))) | |
61ce0998 RJ |
2744 | (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/") |
2745 | (synopsis "Multi-model database system") | |
2746 | (description "Virtuoso is a scalable cross-platform server that combines | |
2747 | relational, graph, and document data management with web application server | |
2748 | and web services platform functionality.") | |
48b68c61 EF |
2749 | ;; configure: error: ... can only be build on 64bit platforms |
2750 | (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")) | |
61ce0998 | 2751 | (license license:gpl2))) |
74248d22 | 2752 | |
a8714bf6 RW |
2753 | (define-public python-ccm |
2754 | (package | |
2755 | (name "python-ccm") | |
2756 | (version "2.1.6") | |
2757 | (source | |
2758 | (origin | |
2759 | (method url-fetch) | |
2760 | (uri (pypi-uri "ccm" version)) | |
2761 | (sha256 | |
2762 | (base32 | |
2763 | "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n")))) | |
2764 | (build-system python-build-system) | |
2765 | (propagated-inputs | |
2766 | `(("python-pyyaml" ,python-pyyaml) | |
2767 | ;; Not listed in setup.py, but used in ccmlib/node.py for full | |
2768 | ;; functionality | |
2769 | ("python-psutil" ,python-psutil) | |
2770 | ("python-six" ,python-six))) | |
2771 | (home-page "https://github.com/pcmanus/ccm") | |
2772 | (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on | |
2773 | localhost") | |
2774 | (description "Cassandra Cluster Manager is a development tool for testing | |
2775 | local Cassandra clusters. It creates, launches and removes Cassandra clusters | |
2776 | on localhost.") | |
2777 | (license license:asl2.0))) | |
2778 | ||
2779 | (define-public python2-ccm | |
2780 | (package-with-python2 python-ccm)) | |
2781 | ||
2782 | (define-public python2-pysqlite | |
2783 | (package | |
2784 | (name "python2-pysqlite") | |
2785 | (version "2.8.3") | |
2786 | (source | |
2787 | (origin | |
2788 | (method url-fetch) | |
2789 | (uri (pypi-uri "pysqlite" version)) | |
2790 | (sha256 | |
2791 | (base32 | |
2792 | "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp")))) | |
2793 | (build-system python-build-system) | |
2794 | (inputs | |
2795 | `(("sqlite" ,sqlite))) | |
2796 | (arguments | |
2797 | `(#:python ,python-2 ; incompatible with Python 3 | |
2798 | #:tests? #f)) ; no test target | |
2799 | (home-page "https://github.com/ghaering/pysqlite") | |
2800 | (synopsis "SQLite bindings for Python") | |
2801 | (description | |
2802 | "Pysqlite provides SQLite bindings for Python that comply to the | |
2803 | Database API 2.0T.") | |
2804 | (license license:zlib))) | |
2805 | ||
2806 | (define-public python-sqlalchemy | |
2807 | (package | |
2808 | (name "python-sqlalchemy") | |
7969a6ad | 2809 | (version "1.3.20") |
a8714bf6 RW |
2810 | (source |
2811 | (origin | |
2812 | (method url-fetch) | |
aeec4a8f | 2813 | (uri (pypi-uri "SQLAlchemy" version)) |
a8714bf6 | 2814 | (sha256 |
7969a6ad | 2815 | (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj")))) |
a8714bf6 RW |
2816 | (build-system python-build-system) |
2817 | (native-inputs | |
6d04f694 | 2818 | `(("python-cython" ,python-cython) ; for C extensions |
a8714bf6 | 2819 | ("python-pytest" ,python-pytest) |
6d04f694 | 2820 | ("python-mock" ,python-mock))) ; for tests |
a8714bf6 RW |
2821 | (arguments |
2822 | `(#:phases | |
2823 | (modify-phases %standard-phases | |
2824 | (replace 'check | |
9871a896 | 2825 | (lambda _ (invoke "py.test")))))) |
5cfe650b | 2826 | (home-page "https://www.sqlalchemy.org") |
a8714bf6 RW |
2827 | (synopsis "Database abstraction library") |
2828 | (description | |
2829 | "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that | |
2830 | gives application developers the full power and flexibility of SQL. It | |
2831 | provides a full suite of well known enterprise-level persistence patterns, | |
2832 | designed for efficient and high-performing database access, adapted into a | |
2833 | simple and Pythonic domain language.") | |
2834 | (license license:x11))) | |
2835 | ||
2836 | (define-public python2-sqlalchemy | |
2837 | (package-with-python2 python-sqlalchemy)) | |
2838 | ||
2839 | (define-public python-sqlalchemy-utils | |
2840 | (package | |
2841 | (name "python-sqlalchemy-utils") | |
53ae35e4 | 2842 | (version "0.32.21") |
a8714bf6 RW |
2843 | (source |
2844 | (origin | |
2845 | (method url-fetch) | |
2846 | (uri (pypi-uri "SQLAlchemy-Utils" version)) | |
2847 | (sha256 | |
2848 | (base32 | |
53ae35e4 | 2849 | "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73")))) |
a8714bf6 RW |
2850 | (build-system python-build-system) |
2851 | (arguments | |
2852 | '(#:tests? #f)) ; FIXME: Many tests require a running database server. | |
2853 | ;; #:phases | |
2854 | ;; (modify-phases %standard-phases | |
2855 | ;; (replace 'check | |
2856 | ;; (lambda _ | |
2857 | ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests"))))) | |
2858 | (propagated-inputs | |
2859 | `(("python-six" ,python-six) | |
2860 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
2861 | (native-inputs | |
2862 | `(("python-dateutil" ,python-dateutil) | |
2863 | ("python-flexmock" ,python-flexmock) | |
2864 | ("python-psycopg2" ,python-psycopg2) | |
2865 | ("python-pytest" ,python-pytest) | |
2866 | ("python-pytz" ,python-pytz))) | |
2867 | (home-page "https://github.com/kvesteri/sqlalchemy-utils") | |
2868 | (synopsis "Various utility functions for SQLAlchemy") | |
2869 | (description | |
2870 | "SQLAlchemy-utils provides various utility functions and custom data types | |
2871 | for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python. | |
2872 | ||
2873 | You might also want to install the following optional dependencies: | |
2874 | @enumerate | |
2875 | @item @code{python-passlib} | |
2876 | @item @code{python-babel} | |
2877 | @item @code{python-cryptography} | |
2878 | @item @code{python-pytz} | |
2879 | @item @code{python-psycopg2} | |
2880 | @item @code{python-furl} | |
2881 | @item @code{python-flask-babel} | |
2882 | @end enumerate | |
2883 | ") | |
2884 | (license license:bsd-3))) | |
2885 | ||
2886 | (define-public python2-sqlalchemy-utils | |
2887 | (package-with-python2 python-sqlalchemy-utils)) | |
2888 | ||
de84d3b1 MB |
2889 | (define-public python-alchemy-mock |
2890 | (package | |
2891 | (name "python-alchemy-mock") | |
2892 | (version "0.4.3") | |
2893 | (home-page "https://github.com/miki725/alchemy-mock") | |
2894 | (source (origin | |
2895 | (method url-fetch) | |
2896 | (uri (pypi-uri "alchemy-mock" version)) | |
2897 | (sha256 | |
2898 | (base32 | |
2899 | "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r")))) | |
2900 | (build-system python-build-system) | |
2901 | (arguments | |
2902 | '(#:phases (modify-phases %standard-phases | |
2903 | (replace 'check | |
2904 | (lambda _ | |
2905 | ;; Create pytest.ini that adds doctest options to | |
2906 | ;; prevent test failure. Taken from tox.ini. | |
2907 | (call-with-output-file "pytest.ini" | |
2908 | (lambda (port) | |
2909 | (format port "[pytest] | |
2910 | doctest_optionflags=IGNORE_EXCEPTION_DETAIL | |
2911 | "))) | |
2912 | (invoke "pytest" "-vv" "--doctest-modules" | |
2913 | "alchemy_mock/")))))) | |
2914 | (native-inputs | |
2915 | `(("python-mock" ,python-mock) | |
2916 | ("python-pytest" ,python-pytest))) | |
2917 | (propagated-inputs | |
2918 | `(("python-six" ,python-six) | |
2919 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
2920 | (synopsis "Mock helpers for SQLAlchemy") | |
2921 | (description | |
2922 | "This package provides mock helpers for SQLAlchemy that makes it easy | |
2923 | to mock an SQLAlchemy session while preserving the ability to do asserts. | |
2924 | ||
2925 | Normally Normally SQLAlchemy's expressions cannot be easily compared as | |
2926 | comparison on binary expression produces yet another binary expression, but | |
2927 | this library provides functions to facilitate such comparisons.") | |
2928 | (license license:expat))) | |
2929 | ||
a8714bf6 RW |
2930 | (define-public python-alembic |
2931 | (package | |
2932 | (name "python-alembic") | |
63d37b3c | 2933 | (version "1.4.3") |
a8714bf6 RW |
2934 | (source |
2935 | (origin | |
2936 | (method url-fetch) | |
2937 | (uri (pypi-uri "alembic" version)) | |
2938 | (sha256 | |
63d37b3c | 2939 | (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k")))) |
a8714bf6 | 2940 | (build-system python-build-system) |
45ebd90c MB |
2941 | (arguments |
2942 | '(#:phases (modify-phases %standard-phases | |
2943 | (replace 'check | |
2944 | (lambda _ | |
2945 | (invoke "pytest" "-vv")))))) | |
a8714bf6 RW |
2946 | (native-inputs |
2947 | `(("python-mock" ,python-mock) | |
2948 | ("python-pytest-cov" ,python-pytest-cov))) | |
2949 | (propagated-inputs | |
2950 | `(("python-dateutil" ,python-dateutil) | |
2951 | ("python-sqlalchemy" ,python-sqlalchemy) | |
2952 | ("python-mako" ,python-mako) | |
2953 | ("python-editor" ,python-editor))) | |
a7f27da7 | 2954 | (home-page "https://bitbucket.org/zzzeek/alembic") |
6743080c | 2955 | (synopsis "Database migration tool for SQLAlchemy") |
a8714bf6 RW |
2956 | (description |
2957 | "Alembic is a lightweight database migration tool for usage with the | |
2958 | SQLAlchemy Database Toolkit for Python.") | |
2959 | (license license:expat))) | |
2960 | ||
2961 | (define-public python2-alembic | |
2962 | (package-with-python2 python-alembic)) | |
2963 | ||
2964 | (define-public python-pickleshare | |
2965 | (package | |
2966 | (name "python-pickleshare") | |
f825faa5 | 2967 | (version "0.7.5") |
a8714bf6 RW |
2968 | (source |
2969 | (origin | |
2970 | (method url-fetch) | |
ed519b3c | 2971 | (uri (pypi-uri "pickleshare" version)) |
a8714bf6 | 2972 | (sha256 |
f825faa5 | 2973 | (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47")))) |
a8714bf6 | 2974 | (build-system python-build-system) |
ff856cfd MB |
2975 | (arguments |
2976 | `(#:phases (modify-phases %standard-phases | |
2977 | (replace 'check | |
2978 | (lambda _ | |
2979 | (invoke "pytest")))))) | |
2980 | (native-inputs | |
2981 | `(("python-pytest" ,python-pytest))) | |
a8714bf6 RW |
2982 | (home-page "https://github.com/vivainio/pickleshare") |
2983 | (synopsis "Tiny key value database with concurrency support") | |
2984 | (description | |
2985 | "PickleShare is a small ‘shelve’-like datastore with concurrency support. | |
2986 | Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike | |
2987 | shelve, many processes can access the database simultaneously. Changing a | |
2988 | value in database is immediately visible to other processes accessing the same | |
2989 | database. Concurrency is possible because the values are stored in separate | |
2990 | files. Hence the “database” is a directory where all files are governed by | |
2991 | PickleShare.") | |
ed519b3c | 2992 | (properties `((python2-variant . ,(delay python2-pickleshare)))) |
a8714bf6 RW |
2993 | (license license:expat))) |
2994 | ||
2995 | (define-public python2-pickleshare | |
ed519b3c MB |
2996 | (let ((pickleshare (package-with-python2 |
2997 | (strip-python2-variant python-pickleshare)))) | |
2998 | (package (inherit pickleshare) | |
2999 | (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2) | |
3000 | ,@(package-propagated-inputs pickleshare)))))) | |
a8714bf6 RW |
3001 | |
3002 | (define-public python-apsw | |
3003 | (package | |
3004 | (name "python-apsw") | |
d05e3b08 | 3005 | (version "3.31.1-r1") |
a8714bf6 RW |
3006 | (source |
3007 | (origin | |
3008 | (method url-fetch) | |
9930beb8 EF |
3009 | (uri (string-append "https://github.com/rogerbinns/apsw/releases" |
3010 | "/download/" version "/apsw-" version ".zip")) | |
a8714bf6 RW |
3011 | (sha256 |
3012 | (base32 | |
d05e3b08 | 3013 | "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx")))) |
a8714bf6 | 3014 | (build-system python-build-system) |
9930beb8 EF |
3015 | (native-inputs |
3016 | `(("unzip" ,unzip))) | |
a8714bf6 | 3017 | (inputs |
c553b08b | 3018 | `(("sqlite" ,sqlite))) |
a8714bf6 RW |
3019 | (arguments |
3020 | `(#:phases | |
3021 | (modify-phases %standard-phases | |
3022 | (replace 'build | |
3023 | (lambda _ | |
c553b08b EF |
3024 | (invoke "python" "setup.py" "build" "--enable-all-extensions") |
3025 | #t)) | |
a8714bf6 RW |
3026 | (add-after 'build 'build-test-helper |
3027 | (lambda _ | |
c553b08b EF |
3028 | (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext" |
3029 | "-I." "-Isqlite3" "src/testextension.c") | |
3030 | #t)) | |
53a9970e | 3031 | (replace 'check |
a8714bf6 RW |
3032 | (lambda* (#:key inputs outputs #:allow-other-keys) |
3033 | (add-installed-pythonpath inputs outputs) | |
c553b08b EF |
3034 | (invoke "python" "setup.py" "test") |
3035 | #t))))) | |
a8714bf6 RW |
3036 | (home-page "https://github.com/rogerbinns/apsw/") |
3037 | (synopsis "Another Python SQLite Wrapper") | |
3038 | (description "APSW is a Python wrapper for the SQLite | |
3039 | embedded relational database engine. In contrast to other wrappers such as | |
3040 | pysqlite it focuses on being a minimal layer over SQLite attempting just to | |
3041 | translate the complete SQLite API into Python.") | |
3042 | (license license:zlib))) | |
3043 | ||
3044 | (define-public python2-apsw | |
3045 | (package-with-python2 python-apsw)) | |
3046 | ||
ba0b249d LDB |
3047 | (define-public python-aiosqlite |
3048 | (package | |
3049 | (name "python-aiosqlite") | |
281fd9ad | 3050 | (version "0.17.0") |
ba0b249d LDB |
3051 | (source |
3052 | (origin | |
3053 | (method url-fetch) | |
3054 | (uri (pypi-uri "aiosqlite" version)) | |
3055 | (sha256 | |
3056 | (base32 | |
281fd9ad | 3057 | "0lgfpbkcd730hbgj3zlrbx2y8fzvdns2zj3s4r4l31n49g1arrph")))) |
ba0b249d | 3058 | (build-system python-build-system) |
281fd9ad LDB |
3059 | (arguments |
3060 | '(#:phases (modify-phases %standard-phases | |
3061 | (replace 'check | |
3062 | (lambda* (#:key tests? #:allow-other-keys) | |
3063 | (if tests? | |
3064 | (invoke "python" "-m" "unittest" "aiosqlite.tests") | |
3065 | (format #t "test suite not run~%")) | |
3066 | #t))))) | |
3067 | (propagated-inputs | |
3068 | `(("python-typing-extensions" ,python-typing-extensions))) | |
ba0b249d LDB |
3069 | (native-inputs |
3070 | `(("python-aiounittest" ,python-aiounittest))) | |
3071 | (home-page "https://github.com/jreese/aiosqlite") | |
3072 | (synopsis | |
3073 | "Asyncio bridge for sqlite3") | |
3074 | (description | |
3075 | "The package aiosqlite replicates the standard sqlite3 module, but with | |
3076 | async versions of all the standard connection and cursor methods, and context | |
3077 | managers for automatically closing connections.") | |
3078 | (license license:expat))) | |
3079 | ||
a8714bf6 RW |
3080 | (define-public python2-neo4j-driver |
3081 | (package | |
3082 | (name "python2-neo4j-driver") | |
3083 | ;; NOTE: When upgrading to 1.5.0, please add a python3 variant. | |
3084 | (version "1.4.0") | |
3085 | (source (origin | |
3086 | (method url-fetch) | |
3087 | (uri (pypi-uri "neo4j-driver" version)) | |
3088 | (sha256 | |
3089 | (base32 | |
3090 | "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98")))) | |
3091 | (build-system python-build-system) | |
3092 | (arguments | |
3093 | `(#:python ,python-2)) | |
3094 | (home-page "https://neo4j.com/developer/python/") | |
3095 | (synopsis "Neo4j driver code written in Python") | |
3096 | (description "This package provides the Neo4j Python driver that connects | |
3097 | to the database using Neo4j's binary protocol. It aims to be minimal, while | |
3098 | being idiomatic to Python.") | |
3099 | (license license:asl2.0))) | |
3100 | ||
3101 | (define-public python2-py2neo | |
3102 | (package | |
3103 | (name "python2-py2neo") | |
3104 | (version "3.1.2") | |
3105 | (source (origin | |
3106 | (method url-fetch) | |
3107 | (uri (pypi-uri "py2neo" version)) | |
3108 | (sha256 | |
3109 | (base32 | |
3110 | "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1")))) | |
3111 | (build-system python-build-system) | |
3112 | (arguments | |
3113 | `(#:python ,python-2)) | |
1084e86b | 3114 | (home-page "https://py2neo.org") |
a8714bf6 RW |
3115 | (synopsis "Library and toolkit for working with Neo4j in Python") |
3116 | (description "This package provides a client library and toolkit for | |
3117 | working with Neo4j from within Python applications and from the command | |
3118 | line. The core library has no external dependencies and has been carefully | |
3119 | designed to be easy and intuitive to use.") | |
3120 | (license license:asl2.0))) | |
3121 | ||
3122 | (define-public python-psycopg2 | |
3123 | (package | |
3124 | (name "python-psycopg2") | |
dc2f0e70 | 3125 | (version "2.8.6") |
a8714bf6 RW |
3126 | (source |
3127 | (origin | |
3128 | (method url-fetch) | |
3129 | (uri (pypi-uri "psycopg2" version)) | |
3130 | (sha256 | |
dc2f0e70 | 3131 | (base32 "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv")))) |
a8714bf6 RW |
3132 | (build-system python-build-system) |
3133 | (arguments | |
3134 | ;; Tests would require a postgresql database "psycopg2_test" | |
3135 | ;; and a running postgresql database management service. | |
3136 | `(#:tests? #f)) ; TODO re-enable after providing a test-db. | |
3137 | (inputs | |
3138 | `(("postgresql" ,postgresql))) ; libpq | |
3139 | (home-page "http://initd.org/psycopg/") | |
3140 | (synopsis "Python PostgreSQL adapter") | |
3141 | (description | |
19601e89 BW |
3142 | "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API |
3143 | 2.0.") | |
a8714bf6 RW |
3144 | (license license:lgpl3+))) |
3145 | ||
3146 | (define-public python2-psycopg2 | |
3147 | (package-with-python2 python-psycopg2)) | |
3148 | ||
3149 | (define-public python-sadisplay | |
3150 | (package | |
3151 | (name "python-sadisplay") | |
bcdc5cae | 3152 | (version "0.4.8") |
a8714bf6 RW |
3153 | (source |
3154 | (origin | |
3155 | (method url-fetch) | |
3156 | (uri (pypi-uri "sadisplay" version)) | |
3157 | (sha256 | |
3158 | (base32 | |
bcdc5cae | 3159 | "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4")))) |
a8714bf6 RW |
3160 | (build-system python-build-system) |
3161 | (propagated-inputs | |
3162 | `(("python-sqlalchemy" ,python-sqlalchemy))) | |
3163 | (native-inputs | |
bcdc5cae | 3164 | ;; For tests. |
a8714bf6 RW |
3165 | `(("python-nose" ,python-nose))) |
3166 | (home-page "https://bitbucket.org/estin/sadisplay") | |
3167 | (synopsis "SQLAlchemy schema displayer") | |
3168 | (description "This package provides a program to build Entity | |
3169 | Relationship diagrams from a SQLAlchemy model (or directly from the | |
3170 | database).") | |
3171 | (license license:bsd-3))) | |
3172 | ||
3173 | (define-public python2-sadisplay | |
3174 | (package-with-python2 python-sadisplay)) | |
3175 | ||
945ec6c3 VM |
3176 | (define-public yoyo-migrations |
3177 | (package | |
3178 | (name "yoyo-migrations") | |
3179 | (version "7.2.0") | |
3180 | (source | |
3181 | (origin | |
3182 | ;; We use the upstream repository, as the tests are not included in the | |
3183 | ;; PyPI releases. | |
3184 | (method hg-fetch) | |
3185 | (uri (hg-reference | |
3186 | (url "https://hg.sr.ht/~olly/yoyo") | |
3187 | (changeset (string-append "v" version "-release")))) | |
3188 | (file-name (string-append name "-" version "-checkout")) | |
3189 | (sha256 | |
3190 | (base32 "0q2z9bgdj3wyix7yvqsayfs21grp5av8ilh411lgmjhigszkvhcq")))) | |
3191 | (build-system python-build-system) | |
3192 | (arguments | |
3193 | ;; XXX: Tests require a connection to some pgsql database and psycopg | |
3194 | ;; fails to connect to it. | |
3195 | '(#:tests? #f)) | |
3196 | (propagated-inputs | |
3197 | `(("python-sqlparse" ,python-sqlparse) | |
3198 | ("python-tabulate" ,python-tabulate))) | |
3199 | (home-page "https://ollycope.com/software/yoyo/latest/") | |
3200 | (synopsis "Database migrations with SQL") | |
3201 | (description | |
3202 | "Yoyo is a database schema migration tool. Migrations are written as SQL | |
3203 | files or Python scripts that define a list of migration steps.") | |
3204 | (license license:asl2.0))) | |
3205 | ||
a8714bf6 RW |
3206 | (define-public python-mysqlclient |
3207 | (package | |
3208 | (name "python-mysqlclient") | |
5ec1feca | 3209 | (version "2.0.1") |
a8714bf6 RW |
3210 | (source |
3211 | (origin | |
3212 | (method url-fetch) | |
3213 | (uri (pypi-uri "mysqlclient" version)) | |
3214 | (sha256 | |
3215 | (base32 | |
5ec1feca | 3216 | "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv")))) |
a8714bf6 | 3217 | (build-system python-build-system) |
eec6a694 | 3218 | (arguments '(#:tests? #f)) ;XXX: requires a live database |
a8714bf6 | 3219 | (inputs |
997abda9 | 3220 | `(("mysql-dev" ,mariadb "dev"))) |
a8714bf6 RW |
3221 | (home-page "https://github.com/PyMySQL/mysqlclient-python") |
3222 | (synopsis "MySQLdb is an interface to the popular MySQL database server for Python") | |
3223 | (description "MySQLdb is an interface to the popular MySQL database server | |
3224 | for Python. The design goals are: | |
3225 | @enumerate | |
3226 | @item Compliance with Python database API version 2.0 [PEP-0249], | |
3227 | @item Thread-safety, | |
3228 | @item Thread-friendliness (threads will not block each other). | |
3229 | @end enumerate") | |
3230 | (license license:gpl2))) | |
3231 | ||
a8714bf6 RW |
3232 | (define-public python-hiredis |
3233 | (package | |
3234 | (name "python-hiredis") | |
3235 | (version "0.2.0") | |
3236 | (source | |
3237 | (origin | |
3238 | (method url-fetch) | |
3239 | (uri (pypi-uri "hiredis" version)) | |
3240 | (sha256 | |
3241 | (base32 | |
3242 | "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa")))) | |
3243 | (build-system python-build-system) | |
3244 | (arguments | |
3245 | ;; no tests | |
3246 | `(#:tests? #f)) | |
3247 | (home-page "https://github.com/redis/hiredis-py") | |
3248 | (synopsis "Python extension that wraps protocol parsing code in hiredis") | |
3249 | (description "Python-hiredis is a python extension that wraps protocol | |
3250 | parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.") | |
3251 | (license license:bsd-3))) | |
3252 | ||
3253 | (define-public python2-hiredis | |
3254 | (package-with-python2 python-hiredis)) | |
3255 | ||
3256 | (define-public python-fakeredis | |
3257 | (package | |
3258 | (name "python-fakeredis") | |
1655e7be | 3259 | (version "1.2.1") |
a8714bf6 RW |
3260 | (source |
3261 | (origin | |
3262 | (method url-fetch) | |
3263 | (uri (pypi-uri "fakeredis" version)) | |
3264 | (sha256 | |
3265 | (base32 | |
1655e7be | 3266 | "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc")))) |
a8714bf6 RW |
3267 | (build-system python-build-system) |
3268 | (arguments | |
3269 | ;; no tests | |
3270 | `(#:tests? #f)) | |
1655e7be TLC |
3271 | (propagated-inputs |
3272 | `(("python-sortedcontainers" ,python-sortedcontainers))) | |
a8714bf6 RW |
3273 | (home-page "https://github.com/jamesls/fakeredis") |
3274 | (synopsis "Fake implementation of redis API for testing purposes") | |
a4764ff0 TGR |
3275 | (description |
3276 | "Fakeredis is a pure-Python implementation of the redis-py Python client | |
3277 | that simulates talking to a redis server. It was created for a single purpose: | |
3278 | to write unit tests. | |
3279 | ||
3280 | Setting up redis is not hard, but one often wants to write unit tests that don't | |
3281 | talk to an external server such as redis. This module can be used as a | |
3282 | reasonable substitute.") | |
a8714bf6 RW |
3283 | (license license:bsd-3))) |
3284 | ||
3285 | (define-public python2-fakeredis | |
3286 | (package-with-python2 python-fakeredis)) | |
3287 | ||
3288 | (define-public python-redis | |
3289 | (package | |
3290 | (name "python-redis") | |
d87252e6 | 3291 | (version "3.5.3") |
a8714bf6 RW |
3292 | (source |
3293 | (origin | |
3294 | (method url-fetch) | |
3295 | (uri (pypi-uri "redis" version)) | |
3296 | (sha256 | |
d87252e6 | 3297 | (base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf")))) |
a8714bf6 | 3298 | (build-system python-build-system) |
a263a976 | 3299 | ;; Tests require a running Redis server. |
a8714bf6 RW |
3300 | (arguments '(#:tests? #f)) |
3301 | ;; As long as we are not running test, we do not need this input :-) | |
3302 | ;;(native-inputs | |
3303 | ;; `(("python-pytest" ,python-pytest))) | |
3304 | (home-page "https://github.com/andymccurdy/redis-py") | |
3305 | (synopsis "Redis Python client") | |
3306 | (description | |
3307 | "This package provides a Python interface to the Redis key-value store.") | |
3308 | (license license:expat))) | |
3309 | ||
3310 | (define-public python2-redis | |
3311 | (package-with-python2 python-redis)) | |
3312 | ||
3313 | (define-public python-rq | |
3314 | (package | |
3315 | (name "python-rq") | |
4436a27c | 3316 | (version "1.5.2") |
a8714bf6 RW |
3317 | (source |
3318 | (origin | |
b462caaf MB |
3319 | (method git-fetch) |
3320 | (uri (git-reference | |
3321 | (url "https://github.com/rq/rq") | |
3322 | (commit (string-append "v" version)))) | |
3323 | (file-name (git-file-name name version)) | |
a8714bf6 | 3324 | (sha256 |
4436a27c | 3325 | (base32 "0ikqmpq0g1qiqwd7ar1286l4hqjb6aj2wr844gihhb8ijzwhp8va")))) |
a8714bf6 | 3326 | (build-system python-build-system) |
b462caaf MB |
3327 | (arguments |
3328 | '(#:phases (modify-phases %standard-phases | |
3329 | (add-before 'check 'start-redis | |
3330 | (lambda _ | |
3331 | (invoke "redis-server" "--daemonize" "yes"))) | |
3332 | (replace 'check | |
3333 | (lambda* (#:key outputs #:allow-other-keys) | |
3334 | (let ((out (assoc-ref outputs "out"))) | |
3335 | ;; Drop test that needs the SDK for Sentry.io. | |
3336 | (delete-file "tests/test_sentry.py") | |
3337 | ;; Ensure 'rq' and 'rqworker' ends up on PATH. | |
3338 | (setenv "PATH" (string-append out "/bin:" | |
3339 | (getenv "PATH"))) | |
3340 | (invoke "pytest" "-vv"))))))) | |
3341 | (native-inputs | |
3342 | `(("python-mock" ,python-mock) | |
3343 | ("python-pytest" ,python-pytest) | |
3344 | ("redis" ,redis))) | |
a8714bf6 RW |
3345 | (propagated-inputs |
3346 | `(("python-click" ,python-click) | |
3347 | ("python-redis" ,python-redis))) | |
4e5ad79e | 3348 | (home-page "https://python-rq.org/") |
a8714bf6 RW |
3349 | (synopsis "Simple job queues for Python") |
3350 | (description | |
3351 | "RQ (Redis Queue) is a simple Python library for queueing jobs and | |
3352 | processing them in the background with workers. It is backed by Redis and it | |
3353 | is designed to have a low barrier to entry.") | |
3354 | (license license:bsd-2))) | |
3355 | ||
3356 | (define-public python2-rq | |
3357 | (package-with-python2 python-rq)) | |
3358 | ||
8a88efce MB |
3359 | (define-public python-rq-scheduler |
3360 | (package | |
3361 | (name "python-rq-scheduler") | |
3362 | (version "0.10.0") | |
3363 | (home-page "https://github.com/rq/rq-scheduler") | |
3364 | (source (origin | |
3365 | (method git-fetch) | |
3366 | (uri (git-reference | |
3367 | (url home-page) | |
3368 | (commit (string-append "v" version)))) | |
3369 | (file-name (git-file-name name version)) | |
3370 | (sha256 | |
3371 | (base32 | |
3372 | "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk")))) | |
3373 | (build-system python-build-system) | |
3374 | (arguments | |
3375 | '(#:phases (modify-phases %standard-phases | |
3376 | (add-before 'check 'start-redis | |
3377 | (lambda _ | |
3378 | (invoke "redis-server" "--daemonize" "yes"))) | |
3379 | (replace 'check | |
3380 | (lambda _ | |
3381 | (substitute* "run_tests.py" | |
3382 | (("/usr/bin/env") | |
3383 | (which "env"))) | |
3384 | (invoke "./run_tests.py")))))) | |
3385 | (native-inputs | |
3386 | `(("redis" ,redis) | |
3387 | ("which" ,which))) | |
3388 | (propagated-inputs | |
3389 | `(("python-croniter" ,python-croniter) | |
3390 | ("python-rq" ,python-rq))) | |
3391 | (synopsis "Job scheduling capabilities for RQ (Redis Queue)") | |
3392 | (description | |
3393 | "This package provides job scheduling capabilities to @code{python-rq} | |
3394 | (Redis Queue).") | |
3395 | (license license:expat))) | |
3396 | ||
a8714bf6 RW |
3397 | (define-public python-trollius-redis |
3398 | (package | |
3399 | (name "python-trollius-redis") | |
3400 | (version "0.1.4") | |
3401 | (source | |
3402 | (origin | |
3403 | (method url-fetch) | |
3404 | (uri (pypi-uri "trollius_redis" version)) | |
3405 | (sha256 | |
3406 | (base32 | |
3407 | "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy")))) | |
3408 | (build-system python-build-system) | |
3409 | ;; TODO: Tests require packaging 'hiredis'. | |
3410 | (arguments '(#:tests? #f)) | |
3411 | (home-page "https://github.com/benjolitz/trollius-redis") | |
3412 | (synopsis "Port of asyncio-redis to trollius") | |
3413 | (description "@code{trollius-redis} is a Redis client for Python | |
d087a3a6 | 3414 | trollius. It is an asynchronous IO (PEP 3156) implementation of the |
a8714bf6 RW |
3415 | Redis protocol.") |
3416 | (license license:bsd-2))) | |
3417 | ||
3418 | (define-public python2-trollius-redis | |
3419 | (package-with-python2 python-trollius-redis)) | |
3420 | ||
3421 | (define-public python-sqlparse | |
3422 | (package | |
3423 | (name "python-sqlparse") | |
d343e0fe | 3424 | (version "0.3.1") |
a8714bf6 RW |
3425 | (source (origin |
3426 | (method url-fetch) | |
3427 | (uri (pypi-uri "sqlparse" version)) | |
3428 | (sha256 | |
3429 | (base32 | |
d343e0fe | 3430 | "0j652a6z7bdf6c77aczfn8m8b2nsr1bcqq48wzghf8vi6wvj0qp1")))) |
a8714bf6 RW |
3431 | (build-system python-build-system) |
3432 | (arguments | |
3433 | `(#:phases | |
3434 | (modify-phases %standard-phases | |
3435 | (replace 'check | |
96272e28 | 3436 | (lambda _ (invoke "py.test")))))) |
a8714bf6 RW |
3437 | (native-inputs |
3438 | `(("python-pytest" ,python-pytest))) | |
3439 | (home-page "https://github.com/andialbrecht/sqlparse") | |
3440 | (synopsis "Non-validating SQL parser") | |
3441 | (description "Sqlparse is a non-validating SQL parser for Python. It | |
3442 | provides support for parsing, splitting and formatting SQL statements.") | |
3443 | (license license:bsd-3))) | |
3444 | ||
3445 | (define-public python2-sqlparse | |
3446 | (package-with-python2 python-sqlparse)) | |
3447 | ||
3448 | (define-public python-sql | |
3449 | (package | |
3450 | (name "python-sql") | |
909404b5 | 3451 | (version "1.0.0") |
a8714bf6 RW |
3452 | (source |
3453 | (origin | |
3454 | (method url-fetch) | |
3455 | (uri (pypi-uri "python-sql" version)) | |
3456 | (sha256 | |
909404b5 | 3457 | (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb")))) |
a8714bf6 RW |
3458 | (build-system python-build-system) |
3459 | (home-page "https://python-sql.tryton.org/") | |
3460 | (synopsis "Library to write SQL queries in a pythonic way") | |
3461 | (description "@code{python-sql} is a library to write SQL queries, that | |
3462 | transforms idiomatic python function calls to well-formed SQL queries.") | |
3463 | (license license:bsd-3))) | |
3464 | ||
3465 | (define-public python2-sql | |
3466 | (package-with-python2 python-sql)) | |
33c88fcb | 3467 | |
c8fdf86d LDB |
3468 | (define-public python-pypika |
3469 | (package | |
3470 | (name "python-pypika") | |
f73ee73d | 3471 | (version "0.47.6") |
c8fdf86d | 3472 | (source |
510472f8 LDB |
3473 | (origin (method git-fetch) |
3474 | (uri (git-reference | |
b0e7b699 | 3475 | (url "https://github.com/kayak/pypika") |
510472f8 LDB |
3476 | (commit (string-append "v" version)))) |
3477 | (file-name (git-file-name name version)) | |
3478 | (sha256 | |
3479 | (base32 | |
f73ee73d | 3480 | "001pg36sw9a36zdd1kccbymcxndphjcjbbrsy6ri7ng8h4dgz549")))) |
c8fdf86d LDB |
3481 | (build-system python-build-system) |
3482 | (native-inputs | |
3483 | `(("python-parameterized" ,python-parameterized))) | |
3484 | (home-page "https://github.com/kayak/pypika") | |
3485 | (synopsis "SQL query builder API for Python") | |
3486 | (description | |
3487 | "PyPika is a python SQL query builder that exposes the full richness of | |
3488 | the SQL language using a syntax that reflects the resulting query.") | |
3489 | (license license:asl2.0))) | |
3490 | ||
a50628bb KCB |
3491 | ;; There are many wrappers for this in other languages. When touching, please |
3492 | ;; be sure to ensure all dependencies continue to build. | |
dae7661a LF |
3493 | (define-public apache-arrow |
3494 | (package | |
3495 | (name "apache-arrow") | |
9757e546 | 3496 | (version "3.0.0") |
dae7661a | 3497 | (source |
a50628bb KCB |
3498 | (origin |
3499 | (method git-fetch) | |
3500 | (uri (git-reference | |
3501 | (url "https://github.com/apache/arrow") | |
3502 | (commit (string-append "apache-arrow-" version)))) | |
3503 | (file-name (git-file-name name version)) | |
3504 | (sha256 | |
3505 | (base32 | |
9757e546 | 3506 | "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0")))) |
dae7661a LF |
3507 | (build-system cmake-build-system) |
3508 | (arguments | |
3509 | `(#:tests? #f | |
3510 | #:phases | |
3511 | (modify-phases %standard-phases | |
3512 | (add-before 'configure 'enter-source-directory | |
3513 | (lambda _ (chdir "cpp") #t)) | |
3514 | (add-after 'unpack 'set-env | |
3515 | (lambda _ | |
3516 | (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost")) | |
3517 | (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli")) | |
3518 | (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers")) | |
dae7661a LF |
3519 | (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson")) |
3520 | #t))) | |
3def739d | 3521 | #:build-type "Release" |
dae7661a | 3522 | #:configure-flags |
3def739d | 3523 | (list "-DARROW_PYTHON=ON" |
a50628bb KCB |
3524 | "-DARROW_GLOG=ON" |
3525 | ;; Parquet options | |
3526 | "-DARROW_PARQUET=ON" | |
3527 | "-DPARQUET_BUILD_EXECUTABLES=ON" | |
3528 | ;; The maintainers disallow using system versions of | |
3529 | ;; jemalloc: | |
3530 | ;; https://issues.apache.org/jira/browse/ARROW-3507. This | |
3531 | ;; is unfortunate because jemalloc increases performance: | |
3532 | ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/. | |
3533 | "-DARROW_JEMALLOC=OFF" | |
3534 | ||
3535 | ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global | |
3536 | ;; option that instructs the build system how to resolve | |
3537 | ;; each dependency. SYSTEM = Finding the dependency in | |
3538 | ;; system paths using CMake's built-in find_package | |
3539 | ;; function, or using pkg-config for packages that do not | |
3540 | ;; have this feature | |
3541 | "-DARROW_DEPENDENCY_SOURCE=SYSTEM" | |
3542 | ||
3543 | ;; Split output into its component packages. | |
3544 | (string-append "-DCMAKE_INSTALL_PREFIX=" | |
3545 | (assoc-ref %outputs "lib")) | |
3546 | (string-append "-DCMAKE_INSTALL_RPATH=" | |
3547 | (assoc-ref %outputs "lib") | |
dae7661a | 3548 | "/lib") |
a50628bb KCB |
3549 | (string-append "-DCMAKE_INSTALL_BINDIR=" |
3550 | (assoc-ref %outputs "out") | |
3551 | "/bin") | |
3552 | (string-append "-DCMAKE_INSTALL_INCLUDEDIR=" | |
3553 | (assoc-ref %outputs "include") | |
3554 | "/share/include") | |
3555 | ||
3556 | ||
3557 | "-DARROW_WITH_SNAPPY=ON" | |
3558 | "-DARROW_WITH_ZLIB=ON" | |
3559 | "-DARROW_WITH_ZSTD=ON" | |
3560 | "-DARROW_WITH_LZ4=ON" | |
3561 | "-DARROW_COMPUTE=ON" | |
3562 | "-DARROW_CSV=ON" | |
3563 | "-DARROW_DATASET=ON" | |
3564 | "-DARROW_FILESYSTEM=ON" | |
3565 | "-DARROW_HDFS=ON" | |
3566 | "-DARROW_JSON=ON" | |
3567 | ;; Arrow Python C++ integration library (required for | |
3568 | ;; building pyarrow). This library must be built against | |
3569 | ;; the same Python version for which you are building | |
3570 | ;; pyarrow. NumPy must also be installed. Enabling this | |
3571 | ;; option also enables ARROW_COMPUTE, ARROW_CSV, | |
3572 | ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and | |
3573 | ;; ARROW_JSON. | |
3574 | "-DARROW_PYTHON=ON" | |
dae7661a LF |
3575 | |
3576 | ;; Building the tests forces on all the | |
3577 | ;; optional features and the use of static | |
3578 | ;; libraries. | |
3579 | "-DARROW_BUILD_TESTS=OFF" | |
a50628bb KCB |
3580 | "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF" |
3581 | ;;"-DBENCHMARK_ENABLE_TESTING=OFF" | |
dae7661a LF |
3582 | "-DARROW_BUILD_STATIC=OFF"))) |
3583 | (inputs | |
23af76f1 GH |
3584 | `(("apache-thrift" ,apache-thrift "lib") |
3585 | ("boost" ,boost) | |
dae7661a | 3586 | ("brotli" ,google-brotli) |
23af76f1 | 3587 | ("bzip2" ,bzip2) |
a50628bb | 3588 | ("double-conversion" ,double-conversion) |
a50628bb KCB |
3589 | ("gflags" ,gflags) |
3590 | ("glog" ,glog) | |
23af76f1 GH |
3591 | ("grpc" ,grpc) |
3592 | ("lz4" ,lz4) | |
a50628bb | 3593 | ("protobuf" ,protobuf) |
23af76f1 GH |
3594 | ("python-3" ,python) |
3595 | ("python-numpy" ,python-numpy) | |
a50628bb | 3596 | ("rapidjson" ,rapidjson) |
a50628bb | 3597 | ("re2" ,re2) |
23af76f1 | 3598 | ("snappy" ,snappy) |
9757e546 | 3599 | ("utf8proc" ,utf8proc) |
23af76f1 GH |
3600 | ("zlib" ,zlib) |
3601 | ("zstd" ,zstd "lib"))) | |
a50628bb KCB |
3602 | (native-inputs |
3603 | `(("pkg-config" ,pkg-config))) | |
3604 | (outputs '("out" "lib" "include")) | |
dae7661a LF |
3605 | (home-page "https://arrow.apache.org/") |
3606 | (synopsis "Columnar in-memory analytics") | |
3607 | (description "Apache Arrow is a columnar in-memory analytics layer | |
a50628bb | 3608 | designed to accelerate big data. It houses a set of canonical in-memory |
dae7661a | 3609 | representations of flat and hierarchical data along with multiple |
a50628bb | 3610 | language-bindings for structure manipulation. It also provides IPC and common |
dae7661a LF |
3611 | algorithm implementations.") |
3612 | (license license:asl2.0))) | |
5e5ac710 LF |
3613 | |
3614 | (define-public python-pyarrow | |
3615 | (package | |
a50628bb | 3616 | (inherit apache-arrow) |
5e5ac710 | 3617 | (name "python-pyarrow") |
5e5ac710 LF |
3618 | (build-system python-build-system) |
3619 | (arguments | |
a50628bb | 3620 | '(#:tests? #f ; XXX There are no tests in the "python" directory |
5e5ac710 LF |
3621 | #:phases |
3622 | (modify-phases %standard-phases | |
0fa926c2 | 3623 | (delete 'build) ; XXX the build is performed again during the install phase |
5e5ac710 LF |
3624 | (add-after 'unpack 'enter-source-directory |
3625 | (lambda _ (chdir "python") #t)) | |
a50628bb | 3626 | (add-after 'unpack 'make-git-checkout-writable |
5e5ac710 | 3627 | (lambda _ |
a50628bb | 3628 | (for-each make-file-writable (find-files ".")) |
5e5ac710 LF |
3629 | #t))))) |
3630 | (propagated-inputs | |
a50628bb | 3631 | `(("apache-arrow" ,apache-arrow "lib") |
5e5ac710 LF |
3632 | ("python-numpy" ,python-numpy) |
3633 | ("python-pandas" ,python-pandas) | |
3634 | ("python-six" ,python-six))) | |
3635 | (native-inputs | |
c69959f0 | 3636 | `(("cmake" ,cmake-minimal) |
a50628bb | 3637 | ("pkg-config" ,pkg-config) |
5e5ac710 LF |
3638 | ("python-cython" ,python-cython) |
3639 | ("python-pytest" ,python-pytest) | |
0fa926c2 | 3640 | ("python-pytest-runner" ,python-pytest-runner) |
5e5ac710 | 3641 | ("python-setuptools-scm" ,python-setuptools-scm))) |
a50628bb | 3642 | (outputs '("out")) |
5e5ac710 LF |
3643 | (home-page "https://arrow.apache.org/docs/python/") |
3644 | (synopsis "Python bindings for Apache Arrow") | |
a50628bb KCB |
3645 | (description |
3646 | "This library provides a Pythonic API wrapper for the reference Arrow C++ | |
3647 | implementation, along with tools for interoperability with pandas, NumPy, and | |
3648 | other traditional Python scientific computing packages.") | |
5e5ac710 LF |
3649 | (license license:asl2.0))) |
3650 | ||
450d5dc2 PL |
3651 | (define-public python-crate |
3652 | (package | |
3653 | (name "python-crate") | |
19181820 | 3654 | (version "0.23.2") |
450d5dc2 PL |
3655 | (source (origin |
3656 | (method url-fetch) | |
3657 | (uri (pypi-uri "crate" version)) | |
3658 | (sha256 | |
3659 | (base32 | |
19181820 | 3660 | "0ngmlvi320c5gsxab0s7qgq0ck4jdlcwvb6lbjhnfprafdp56vvx")))) |
450d5dc2 PL |
3661 | (build-system python-build-system) |
3662 | (propagated-inputs | |
3663 | `(("python-urllib3" ,python-urllib3))) | |
3664 | (home-page "https://github.com/crate/crate-python") | |
3665 | (synopsis "CrateDB Python client") | |
3666 | (description | |
3667 | "This package provides a Python client library for CrateDB. | |
3668 | It implements the Python DB API 2.0 specification and includes support for | |
3669 | SQLAlchemy.") | |
3670 | (license license:asl2.0))) | |
ae8a0184 GLV |
3671 | |
3672 | (define-public libdbi | |
3673 | (package | |
3674 | (name "libdbi") | |
3675 | (version "0.9.0") | |
3676 | (source (origin | |
3677 | (method url-fetch) | |
3678 | (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-" | |
3679 | version "/libdbi-" version ".tar.gz")) | |
3680 | (sha256 | |
3681 | (base32 | |
3682 | "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys")))) | |
3683 | (build-system gnu-build-system) | |
3684 | (synopsis "Database independent abstraction layer in C") | |
3685 | (description | |
3686 | "This library implements a database independent abstraction layer in C, | |
3687 | similar to the DBI/DBD layer in Perl. Writing one generic set of code, | |
3688 | programmers can leverage the power of multiple databases and multiple | |
3689 | simultaneous database connections by using this framework.") | |
3690 | (home-page "http://libdbi.sourceforge.net/") | |
3691 | (license license:lgpl2.1+))) | |
df81de86 GLV |
3692 | |
3693 | (define-public libdbi-drivers | |
3694 | (package | |
3695 | (name "libdbi-drivers") | |
3696 | (version "0.9.0") | |
3697 | (source (origin | |
3698 | (method url-fetch) | |
3699 | (uri (string-append "mirror://sourceforge/libdbi-drivers/" | |
3700 | "libdbi-drivers/libdbi-drivers-" version | |
3701 | "/libdbi-drivers-" version ".tar.gz")) | |
3702 | (sha256 | |
3703 | (base32 | |
3704 | "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3")))) | |
3705 | (build-system gnu-build-system) | |
3706 | (native-inputs | |
9077cf68 MB |
3707 | `(;; For tests. |
3708 | ("inetutils" ,inetutils) | |
3709 | ("glibc-locales" ,glibc-locales) | |
ca69163c | 3710 | ("mariadb" ,mariadb))) |
df81de86 GLV |
3711 | (inputs |
3712 | `(("libdbi" ,libdbi) | |
9077cf68 MB |
3713 | ("mariadb:dev" ,mariadb "dev") |
3714 | ("mariadb:lib" ,mariadb "lib") | |
df81de86 GLV |
3715 | ("postgresql" ,postgresql) |
3716 | ("sqlite" ,sqlite))) | |
3717 | (arguments | |
3718 | `(#:configure-flags | |
3719 | (let ((libdbi (assoc-ref %build-inputs "libdbi")) | |
9077cf68 MB |
3720 | (mysql:inc (assoc-ref %build-inputs "mariadb:dev")) |
3721 | (mysql:lib (assoc-ref %build-inputs "mariadb:lib")) | |
df81de86 GLV |
3722 | (postgresql (assoc-ref %build-inputs "postgresql")) |
3723 | (sqlite (assoc-ref %build-inputs "sqlite"))) | |
3724 | (list "--disable-docs" | |
3725 | (string-append "--with-dbi-incdir=" libdbi "/include") | |
3726 | (string-append "--with-dbi-libdir=" libdbi "/lib") | |
3727 | "--with-mysql" | |
9077cf68 MB |
3728 | (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql") |
3729 | (string-append "--with-mysql-libdir=" mysql:lib "/lib") | |
df81de86 GLV |
3730 | "--with-pgsql" |
3731 | (string-append "--with-pgsql-incdir=" postgresql "/include") | |
3732 | (string-append "--with-pgsql-libdir=" postgresql "/lib") | |
3733 | "--with-sqlite3" | |
3734 | (string-append "--with-sqlite-incdir=" sqlite "/include") | |
3735 | (string-append "--with-sqlite-libdir=" sqlite "/lib"))) | |
4e902da6 | 3736 | #:tests? #f ; FIXME: Find why the tests get stuck forever. |
df81de86 GLV |
3737 | #:phases |
3738 | (modify-phases %standard-phases | |
3739 | (add-after 'unpack 'fix-tests | |
3740 | (lambda* (#:key inputs #:allow-other-keys) | |
3741 | (substitute* "tests/test_mysql.sh" | |
3742 | (("^MYMYSQLD=.*") | |
3743 | (string-append "MYMYSQLD=" | |
9077cf68 | 3744 | (assoc-ref inputs "mariadb") |
df81de86 GLV |
3745 | "/bin/mysqld"))) |
3746 | #t)) | |
3747 | (add-after 'install 'remove-empty-directories | |
3748 | (lambda* (#:key outputs #:allow-other-keys) | |
3749 | (let ((var (string-append (assoc-ref outputs "out") "/var"))) | |
3750 | (delete-file-recursively var)) | |
3751 | #t))))) | |
3752 | (synopsis "Database drivers for the libdbi framework") | |
3753 | (description | |
3754 | "The @code{libdbi-drivers} library provides the database specific drivers | |
3755 | for the @code{libdbi} framework. | |
3756 | ||
3757 | The drivers officially supported by @code{libdbi} are: | |
3758 | @itemize | |
3759 | @item MySQL, | |
3760 | @item PostgreSQL, | |
3761 | @item SQLite. | |
3762 | @end itemize") | |
3763 | (home-page "http://libdbi-drivers.sourceforge.net/") | |
3764 | (license license:lgpl2.1+))) | |
6d26ee3b PN |
3765 | |
3766 | (define-public soci | |
3767 | (package | |
3768 | (name "soci") | |
d8fe4554 | 3769 | (version "4.0.1") |
6d26ee3b PN |
3770 | (source (origin |
3771 | (method git-fetch) | |
3772 | (uri (git-reference | |
3773 | (url "https://github.com/SOCI/soci/") | |
3774 | (commit version))) | |
3775 | (file-name (git-file-name name version)) | |
3776 | (sha256 | |
3777 | (base32 | |
d8fe4554 | 3778 | "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp")))) |
6d26ee3b PN |
3779 | (build-system cmake-build-system) |
3780 | (inputs | |
691c4185 TGR |
3781 | `(("firebird" ,firebird) |
3782 | ("postgresql" ,postgresql) | |
6d26ee3b PN |
3783 | ("sqlite" ,sqlite) |
3784 | ("odbc" ,unixodbc) | |
3785 | ("boost" ,boost) | |
997abda9 | 3786 | ("mariadb:dev" ,mariadb "dev"))) |
6d26ee3b | 3787 | (arguments |
d8fe4554 TGR |
3788 | `(#:configure-flags |
3789 | ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it. | |
28da3c19 TGR |
3790 | (list "-DCMAKE_CXX_STANDARD=17" |
3791 | "-DSOCI_LIBDIR=lib") | |
3792 | #:tests? #f)) ; may require running database management systems | |
6d26ee3b PN |
3793 | (synopsis "C++ Database Access Library") |
3794 | (description | |
3795 | "SOCI is an abstraction layer for several database backends, including | |
3796 | PostreSQL, SQLite, ODBC and MySQL.") | |
3797 | (home-page "http://soci.sourceforge.net/") | |
3798 | (license license:boost1.0))) | |
0c0a2831 SH |
3799 | |
3800 | (define-public freetds | |
3801 | (package | |
3802 | (name "freetds") | |
3803 | (version "1.2.18") | |
3804 | (source | |
3805 | (origin | |
3806 | (method url-fetch) | |
3807 | (uri (string-append "https://www.freetds.org/files/stable/" | |
3808 | "freetds-" version ".tar.gz")) | |
3809 | (sha256 | |
3810 | (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50")))) | |
3811 | (build-system gnu-build-system) | |
3812 | (arguments | |
3813 | ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection, | |
3814 | ;; disabled for now. | |
3815 | `(#:tests? #f)) | |
3816 | (home-page "https://www.freetds.org/") | |
3817 | (synopsis "Client libraries for MS SQL and Sybase servers") | |
3818 | (description | |
3819 | "FreeTDS is an implementation of the Tabular DataStream protocol, used for | |
3820 | connecting to MS SQL and Sybase servers over TCP/IP.") | |
3821 | (license license:lgpl2.0+))) |