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