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