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> | |
7f6a607e | 13 | ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
4a78fd46 | 14 | ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@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> |
7fa9cca8 | 20 | ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> |
a8714bf6 | 21 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
259a94e9 | 22 | ;;; Copyright © 2017 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> |
8c078dde | 26 | ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
f30ff28b | 27 | ;;; Copyright © 2017 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> |
ad016826 | 31 | ;;; Copyright © 2015, 2017, 2018 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> |
5f96f303 LC |
35 | ;;; |
36 | ;;; This file is part of GNU Guix. | |
37 | ;;; | |
38 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
39 | ;;; under the terms of the GNU General Public License as published by | |
40 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
41 | ;;; your option) any later version. | |
42 | ;;; | |
43 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
44 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
45 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
46 | ;;; GNU General Public License for more details. | |
47 | ;;; | |
48 | ;;; You should have received a copy of the GNU General Public License | |
49 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
50 | ||
51 | (define-module (gnu packages databases) | |
52 | #:use-module (gnu packages) | |
58071723 | 53 | #:use-module (gnu packages admin) |
06a035db | 54 | #:use-module (gnu packages algebra) |
4c6aa73b RJ |
55 | #:use-module (gnu packages autotools) |
56 | #:use-module (gnu packages avahi) | |
77e52190 | 57 | #:use-module (gnu packages base) |
b747a9db | 58 | #:use-module (gnu packages bash) |
06a035db | 59 | #:use-module (gnu packages bison) |
23bbd7dd | 60 | #:use-module (gnu packages boost) |
06a035db | 61 | #:use-module (gnu packages check) |
dae7661a | 62 | #:use-module (gnu packages cmake) |
06a035db | 63 | #:use-module (gnu packages compression) |
62ea44fc | 64 | #:use-module (gnu packages crypto) |
06a035db MB |
65 | #:use-module (gnu packages curl) |
66 | #:use-module (gnu packages cyrus-sasl) | |
67 | #:use-module (gnu packages emacs) | |
4c6aa73b RJ |
68 | #:use-module (gnu packages gettext) |
69 | #:use-module (gnu packages glib) | |
06a035db | 70 | #:use-module (gnu packages gnupg) |
16973071 | 71 | #:use-module (gnu packages guile) |
da1f7a9e | 72 | #:use-module (gnu packages time) |
33c88fcb | 73 | #:use-module (gnu packages golang) |
06a035db | 74 | #:use-module (gnu packages jemalloc) |
708155df | 75 | #:use-module (gnu packages language) |
686144e9 | 76 | #:use-module (gnu packages libevent) |
5f96f303 | 77 | #:use-module (gnu packages linux) |
d39a84e8 | 78 | #:use-module (gnu packages man) |
5f96f303 | 79 | #:use-module (gnu packages ncurses) |
d3c6ad0a | 80 | #:use-module (gnu packages parallel) |
77631745 | 81 | #:use-module (gnu packages pcre) |
06a035db | 82 | #:use-module (gnu packages perl) |
5ccde207 | 83 | #:use-module (gnu packages perl-check) |
4c6aa73b | 84 | #:use-module (gnu packages pkg-config) |
d3c6ad0a | 85 | #:use-module (gnu packages popt) |
06a035db | 86 | #:use-module (gnu packages python) |
9763102b | 87 | #:use-module (gnu packages python-crypto) |
4c6aa73b | 88 | #:use-module (gnu packages rdf) |
06a035db | 89 | #:use-module (gnu packages readline) |
afcbb020 | 90 | #:use-module (gnu packages ruby) |
6bbbca90 | 91 | #:use-module (gnu packages serialization) |
74248d22 | 92 | #:use-module (gnu packages statistics) |
06a035db | 93 | #:use-module (gnu packages tcl) |
33c88fcb CB |
94 | #:use-module (gnu packages terminals) |
95 | #:use-module (gnu packages textutils) | |
06a035db | 96 | #:use-module (gnu packages tls) |
6bbbca90 | 97 | #:use-module (gnu packages valgrind) |
dae7661a | 98 | #:use-module (gnu packages web) |
77631745 | 99 | #:use-module (gnu packages xml) |
0e1b262e | 100 | #:use-module ((guix licenses) #:prefix license:) |
5f96f303 LC |
101 | #:use-module (guix packages) |
102 | #:use-module (guix download) | |
16973071 | 103 | #:use-module (guix git-download) |
5f96f303 | 104 | #:use-module (guix build-system gnu) |
58071723 | 105 | #:use-module (guix build-system go) |
274da61d | 106 | #:use-module (guix build-system perl) |
4d98bfaf | 107 | #:use-module (guix build-system python) |
afcbb020 | 108 | #:use-module (guix build-system ruby) |
77631745 | 109 | #:use-module (guix build-system cmake) |
74248d22 | 110 | #:use-module (guix build-system r) |
6e385b76 | 111 | #:use-module (guix build-system scons) |
51b0f09e | 112 | #:use-module ((guix build utils) #:hide (which)) |
329d13b8 | 113 | #:use-module (guix utils) |
29cfbfca | 114 | #:use-module (srfi srfi-1) |
5f96f303 LC |
115 | #:use-module (srfi srfi-26) |
116 | #:use-module (ice-9 match)) | |
117 | ||
4c6aa73b RJ |
118 | (define-public 4store |
119 | (package | |
120 | (name "4store") | |
121 | (version "1.1.6") | |
122 | (source (origin | |
123 | (method url-fetch) | |
bbf9092b | 124 | (uri (string-append "https://github.com/4store/4store/archive/v" |
4c6aa73b RJ |
125 | version ".tar.gz")) |
126 | (file-name (string-append name "-" version ".tar.gz")) | |
127 | (sha256 | |
128 | (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50")) | |
ea09f99f RJ |
129 | (patches (search-patches "4store-unset-preprocessor-directive.patch" |
130 | "4store-fix-buildsystem.patch")))) | |
4c6aa73b RJ |
131 | (build-system gnu-build-system) |
132 | (native-inputs | |
133 | `(("perl" ,perl) | |
134 | ("python" ,python-2) | |
135 | ("autoconf" ,autoconf) | |
136 | ("automake" ,automake) | |
b94a6ca0 | 137 | ("gettext" ,gettext-minimal) |
4c6aa73b | 138 | ("libtool" ,libtool) |
74c8b174 | 139 | ("pcre" ,pcre "bin") ;for 'pcre-config' |
4c6aa73b RJ |
140 | ("pkg-config" ,pkg-config))) |
141 | (inputs | |
142 | `(("glib" ,glib) | |
143 | ("rasqal" ,rasqal) | |
144 | ("libxml2" ,libxml2) | |
145 | ("raptor2" ,raptor2) | |
146 | ("readline" ,readline) | |
147 | ("avahi" ,avahi) | |
4c6aa73b RJ |
148 | ("cyrus-sasl" ,cyrus-sasl) |
149 | ("openssl" ,openssl) | |
150 | ("util-linux" ,util-linux))) | |
151 | (arguments | |
152 | `(#:phases | |
153 | (modify-phases %standard-phases | |
d10092b8 | 154 | (add-after 'unpack 'generate-configure |
4c6aa73b | 155 | (lambda _ |
d10092b8 | 156 | (zero? (system* "sh" "autogen.sh"))))))) |
4c6aa73b | 157 | ;; http://www.4store.org has been down for a while now. |
bbf9092b | 158 | (home-page "https://github.com/4store/4store") |
4c6aa73b RJ |
159 | (synopsis "Clustered RDF storage and query engine") |
160 | (description "4store is a RDF/SPARQL store written in C, supporting | |
161 | either single machines or networked clusters.") | |
ba8b9f8d | 162 | (license license:gpl3+))) |
4c6aa73b | 163 | |
b416aadf LC |
164 | (define-public gdbm |
165 | (package | |
166 | (name "gdbm") | |
fdb22203 | 167 | (version "1.18") |
b416aadf LC |
168 | (source (origin |
169 | (method url-fetch) | |
170 | (uri (string-append "mirror://gnu/gdbm/gdbm-" | |
171 | version ".tar.gz")) | |
172 | (sha256 | |
173 | (base32 | |
fdb22203 | 174 | "1kimnv12bzjjhaqk4c8w2j6chdj9c6bg21lchaf7abcyfss2r0mq")))) |
b416aadf LC |
175 | (arguments `(#:configure-flags '("--enable-libgdbm-compat"))) |
176 | (build-system gnu-build-system) | |
6fd52309 | 177 | (home-page "http://www.gnu.org.ua/software/gdbm") |
b416aadf LC |
178 | (synopsis |
179 | "Hash library of database functions compatible with traditional dbm") | |
180 | (description | |
181 | "GDBM is a library for manipulating hashed databases. It is used to | |
182 | store key/value pairs in a file in a manner similar to the Unix dbm library | |
183 | and provides interfaces to the traditional file format.") | |
ba8b9f8d | 184 | (license license:gpl3+))) |
b416aadf | 185 | |
58071723 CB |
186 | (define-public go-gopkg.in-mgo.v2 |
187 | (package | |
188 | (name "go-gopkg.in-mgo.v2") | |
189 | (version "2016.08.01") | |
190 | (source (origin | |
191 | (method git-fetch) | |
192 | (uri (git-reference | |
193 | (url "https://github.com/go-mgo/mgo") | |
194 | (commit (string-append "r" version)))) | |
195 | (file-name (git-file-name name version)) | |
196 | (sha256 | |
197 | (base32 | |
198 | "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd")))) | |
199 | (build-system go-build-system) | |
200 | (arguments | |
201 | `(#:import-path "gopkg.in/mgo.v2" | |
202 | ;; TODO: The tests fail as MongoDB fails to start | |
203 | ;; Error parsing command line: unrecognised option '--chunkSize' | |
204 | #:tests? #f | |
205 | #:phases | |
206 | (modify-phases %standard-phases | |
207 | (delete 'reset-gzip-timestamps) | |
208 | (add-before 'check 'start-mongodb | |
209 | (lambda* (#:key tests? #:allow-other-keys) | |
210 | (or (not tests?) | |
211 | (with-directory-excursion "src/gopkg.in/mgo.v2" | |
212 | (invoke "make" "startdb"))))) | |
213 | (add-after 'check 'stop'mongodb | |
214 | (lambda* (#:key tests? #:allow-other-keys) | |
215 | (or (not tests?) | |
216 | (with-directory-excursion "src/gopkg.in/mgo.v2" | |
217 | (invoke "make" "stopdb")))))))) | |
218 | (native-inputs | |
219 | `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1) | |
220 | ("mongodb" ,mongodb) | |
221 | ("daemontools" ,daemontools))) | |
222 | (synopsis "@code{mgo} offers a rich MongoDB driver for Go.") | |
223 | (description | |
224 | "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language. | |
225 | It implements a rich selection of features under a simple API following | |
226 | standard Go idioms.") | |
227 | (home-page "http://labix.org/mgo") | |
228 | (license license:bsd-2))) | |
229 | ||
5f96f303 LC |
230 | (define-public bdb |
231 | (package | |
232 | (name "bdb") | |
595dcd48 | 233 | (version "6.2.32") |
5f96f303 LC |
234 | (source (origin |
235 | (method url-fetch) | |
18e681bf EF |
236 | (uri (string-append "http://download.oracle.com/berkeley-db/db-" |
237 | version ".tar.gz")) | |
238 | (sha256 | |
239 | (base32 | |
595dcd48 | 240 | "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")))) |
5f96f303 LC |
241 | (build-system gnu-build-system) |
242 | (outputs '("out" ; programs, libraries, headers | |
243 | "doc")) ; 94 MiB of HTML docs | |
244 | (arguments | |
245 | '(#:tests? #f ; no check target available | |
ff1f39e3 | 246 | #:disallowed-references ("doc") |
5bef7749 | 247 | #:phases |
dc1d3cde KK |
248 | (modify-phases %standard-phases |
249 | (replace 'configure | |
250 | (lambda* (#:key outputs #:allow-other-keys) | |
251 | (let ((out (assoc-ref outputs "out")) | |
252 | (doc (assoc-ref outputs "doc"))) | |
253 | ;; '--docdir' is not honored, so we need to patch. | |
254 | (substitute* "dist/Makefile.in" | |
255 | (("docdir[[:blank:]]*=.*") | |
256 | (string-append "docdir = " doc "/share/doc/bdb"))) | |
5f96f303 | 257 | |
5114c83a MW |
258 | (invoke "./dist/configure" |
259 | (string-append "--prefix=" out) | |
260 | (string-append "CONFIG_SHELL=" (which "bash")) | |
261 | (string-append "SHELL=" (which "bash")) | |
5f96f303 | 262 | |
5114c83a MW |
263 | ;; Remove 7 MiB of .a files. |
264 | "--disable-static" | |
0e50d521 | 265 | |
5114c83a MW |
266 | ;; The compatibility mode is needed by some packages, |
267 | ;; notably iproute2. | |
268 | "--enable-compat185" | |
b86c013c | 269 | |
5114c83a MW |
270 | ;; The following flag is needed so that the inclusion |
271 | ;; of db_cxx.h into C++ files works; it leads to | |
272 | ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. | |
273 | "--enable-cxx"))))))) | |
35b9e423 | 274 | (synopsis "Berkeley database") |
5f96f303 LC |
275 | (description |
276 | "Berkeley DB is an embeddable database allowing developers the choice of | |
277 | SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") | |
a24fda81 MB |
278 | ;; Starting with version 6, BDB is distributed under AGPL3. Many individual |
279 | ;; files are covered by the 3-clause BSD license. | |
ba8b9f8d | 280 | (license (list license:agpl3+ license:bsd-3)) |
5f96f303 LC |
281 | (home-page |
282 | "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html"))) | |
283 | ||
557fa39c EF |
284 | (define-public bdb-5.3 |
285 | (package (inherit bdb) | |
286 | (name "bdb") | |
287 | (version "5.3.28") | |
ba8b9f8d MB |
288 | (license (license:non-copyleft "file://LICENSE" |
289 | "See LICENSE in the distribution.")) | |
557fa39c EF |
290 | (source (origin |
291 | (method url-fetch) | |
292 | (uri (string-append "http://download.oracle.com/berkeley-db/db-" | |
293 | version ".tar.gz")) | |
294 | (sha256 | |
295 | (base32 | |
9a9d6d78 EF |
296 | "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0")))) |
297 | (arguments | |
298 | `(#:tests? #f ; no check target available | |
299 | #:disallowed-references ("doc") | |
300 | #:phases | |
dc1d3cde KK |
301 | (modify-phases %standard-phases |
302 | (replace 'configure | |
303 | (lambda* (#:key outputs #:allow-other-keys) | |
304 | (let ((out (assoc-ref outputs "out")) | |
305 | (doc (assoc-ref outputs "doc"))) | |
306 | ;; '--docdir' is not honored, so we need to patch. | |
307 | (substitute* "dist/Makefile.in" | |
308 | (("docdir[[:blank:]]*=.*") | |
309 | (string-append "docdir = " doc "/share/doc/bdb"))) | |
9a9d6d78 | 310 | |
5114c83a MW |
311 | (invoke "./dist/configure" |
312 | (string-append "--prefix=" out) | |
313 | (string-append "CONFIG_SHELL=" (which "bash")) | |
314 | (string-append "SHELL=" (which "bash")) | |
9a9d6d78 | 315 | |
5114c83a MW |
316 | ;; Bdb doesn't recognize aarch64 as an architecture. |
317 | ,@(if (string=? "aarch64-linux" (%current-system)) | |
318 | '("--build=aarch64-unknown-linux-gnu") | |
319 | '()) | |
9a9d6d78 | 320 | |
5114c83a MW |
321 | ;; Remove 7 MiB of .a files. |
322 | "--disable-static" | |
9a9d6d78 | 323 | |
5114c83a MW |
324 | ;; The compatibility mode is needed by some packages, |
325 | ;; notably iproute2. | |
326 | "--enable-compat185" | |
9a9d6d78 | 327 | |
5114c83a MW |
328 | ;; The following flag is needed so that the inclusion |
329 | ;; of db_cxx.h into C++ files works; it leads to | |
330 | ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. | |
331 | "--enable-cxx"))))))))) | |
557fa39c | 332 | |
afcbb020 CB |
333 | (define-public es-dump-restore |
334 | (package | |
335 | (name "es-dump-restore") | |
336 | (version "2.1.0") | |
337 | (source | |
338 | (origin | |
339 | (method url-fetch) | |
340 | (uri (rubygems-uri "es_dump_restore" version)) | |
341 | (sha256 | |
342 | (base32 | |
343 | "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim")))) | |
344 | (build-system ruby-build-system) | |
345 | (arguments | |
0076f5a9 | 346 | '(#:tests? #f)) ;; No testsuite. |
afcbb020 CB |
347 | (propagated-inputs |
348 | `(("ruby-httpclient" ,ruby-httpclient) | |
349 | ("ruby-multi-json" ,ruby-multi-json) | |
350 | ("ruby-progress_bar" ,ruby-progress_bar) | |
351 | ("ruby-rubyzip" ,ruby-rubyzip) | |
352 | ("ruby-thor" ,ruby-thor))) | |
353 | (synopsis "Utility for dumping and restoring ElasticSearch indexes") | |
354 | (description | |
355 | "This package provides a utility for dumping the contents of an | |
356 | ElasticSearch index to a compressed file and restoring the dumpfile back to an | |
357 | ElasticSearch server") | |
358 | (home-page "https://github.com/patientslikeme/es_dump_restore") | |
359 | (license license:expat))) | |
360 | ||
b9f771a7 MB |
361 | (define-public leveldb |
362 | (package | |
363 | (name "leveldb") | |
04c88363 | 364 | (version "1.20") |
b9f771a7 MB |
365 | (source (origin |
366 | (method url-fetch) | |
367 | (uri (string-append "https://github.com/google/leveldb" | |
368 | "/archive/v" version ".tar.gz")) | |
369 | (file-name (string-append name "-" version ".tar.gz")) | |
370 | (sha256 | |
371 | (base32 | |
04c88363 | 372 | "0r36bcrj6b2afsp4aw1gjai3jbs1c7734pxpc1jz7hh9nasyiazm")))) |
b9f771a7 MB |
373 | (build-system gnu-build-system) |
374 | (arguments | |
375 | '(#:make-flags (list "CC=gcc") | |
376 | #:phases | |
377 | (modify-phases %standard-phases | |
378 | (delete 'configure) | |
379 | (replace 'install | |
380 | ;; There is no install target, so we do it here. | |
381 | (lambda* (#:key outputs #:allow-other-keys) | |
382 | (let* ((out (assoc-ref outputs "out")) | |
383 | (lib (string-append out "/lib")) | |
384 | (include (string-append out "/include"))) | |
385 | (for-each (lambda (file) | |
386 | (install-file file lib)) | |
387 | (find-files "out-shared" "^libleveldb\\.so.*$")) | |
388 | (copy-recursively "include" include) | |
389 | #t)))))) | |
390 | (inputs | |
391 | `(("snappy" ,snappy))) | |
392 | (home-page "http://leveldb.org/") | |
393 | (synopsis "Fast key-value storage library") | |
394 | (description | |
395 | "LevelDB is a fast key-value storage library that provides an ordered | |
396 | mapping from string keys to string values.") | |
ba8b9f8d | 397 | (license license:bsd-3))) |
b9f771a7 | 398 | |
686144e9 CB |
399 | (define-public memcached |
400 | (package | |
401 | (name "memcached") | |
b432c052 | 402 | (version "1.5.10") |
686144e9 CB |
403 | (source |
404 | (origin | |
405 | (method url-fetch) | |
406 | (uri (string-append | |
407 | "https://memcached.org/files/memcached-" version ".tar.gz")) | |
408 | (sha256 | |
e9802319 | 409 | (base32 |
b432c052 | 410 | "0jqw3z0408yx0lzc6ykn4d29n02dk31kqnmq9b3ldmcnpl6hck29")))) |
686144e9 CB |
411 | (build-system gnu-build-system) |
412 | (inputs | |
413 | `(("libevent" ,libevent) | |
414 | ("cyrus-sasl" ,cyrus-sasl))) | |
415 | (home-page "https://memcached.org/") | |
61d996b9 TGR |
416 | (synopsis "In-memory caching service") |
417 | (description "Memcached is an in-memory key-value store. It has a small | |
686144e9 CB |
418 | and generic API, and was originally intended for use with dynamic web |
419 | applications.") | |
420 | (license license:bsd-3))) | |
421 | ||
6bbbca90 CB |
422 | (define-public mongodb |
423 | (package | |
424 | (name "mongodb") | |
f1c49e75 | 425 | (version "3.4.10") |
6bbbca90 CB |
426 | (source (origin |
427 | (method url-fetch) | |
428 | (uri (string-append "https://github.com/mongodb/mongo/archive/r" | |
429 | version ".tar.gz")) | |
430 | (file-name (string-append name "-" version ".tar.gz")) | |
431 | (sha256 | |
f1c49e75 | 432 | (base32 "0676lvkljj7a5hdhv78dbykqnqrj9lbn9799mi84b8vbnzsq961r")) |
51b0f09e EF |
433 | (modules '((guix build utils))) |
434 | (snippet | |
435 | '(begin | |
436 | (for-each (lambda (dir) | |
437 | (delete-file-recursively | |
438 | (string-append "src/third_party/" dir))) | |
439 | '("pcre-8.41" "scons-2.5.0" "snappy-1.1.3" | |
440 | "valgrind-3.11.0" "wiredtiger" | |
6cbee49d MW |
441 | "yaml-cpp-0.5.3" "zlib-1.2.8")) |
442 | #t)) | |
6bbbca90 CB |
443 | (patches |
444 | (list | |
445 | (search-patch "mongodb-support-unknown-linux-distributions.patch"))))) | |
6e385b76 | 446 | (build-system scons-build-system) |
6bbbca90 CB |
447 | (inputs |
448 | `(("openssl" ,openssl) | |
449 | ("pcre" ,pcre) | |
319b52c3 EF |
450 | ,@(match (%current-system) |
451 | ((or "x86_64-linux" "aarch64-linux" "mips64el-linux") | |
452 | `(("wiredtiger" ,wiredtiger))) | |
453 | (_ `())) | |
6bbbca90 CB |
454 | ("yaml-cpp" ,yaml-cpp) |
455 | ("zlib" ,zlib) | |
51b0f09e | 456 | ("snappy" ,snappy))) |
6bbbca90 | 457 | (native-inputs |
6e385b76 | 458 | `(("valgrind" ,valgrind) |
90205b62 CB |
459 | ("perl" ,perl) |
460 | ("python" ,python2-minimal) | |
461 | ("python2-pymongo" ,python2-pymongo) | |
462 | ("python2-pyyaml" ,python2-pyyaml) | |
463 | ("tzdata" ,tzdata))) | |
6bbbca90 | 464 | (arguments |
6e385b76 AI |
465 | `(#:scons ,scons-python2 |
466 | #:phases | |
6bbbca90 CB |
467 | (let ((common-options |
468 | `(;; "--use-system-tcmalloc" TODO: Missing gperftools | |
469 | "--use-system-pcre" | |
29cfbfca EF |
470 | ;; wiredtiger is 64-bit only |
471 | ,,(if (any (cute string-prefix? <> (or (%current-target-system) | |
472 | (%current-system))) | |
473 | '("i686-linux" "armhf-linux")) | |
474 | ``"--wiredtiger=off" | |
319b52c3 | 475 | ``"--use-system-wiredtiger") |
6bbbca90 CB |
476 | ;; TODO |
477 | ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1 | |
478 | ;; --use-system-boost | |
479 | "--use-system-snappy" | |
480 | "--use-system-zlib" | |
481 | "--use-system-valgrind" | |
482 | ;; "--use-system-stemmer" TODO: Missing relevant package | |
483 | "--use-system-yaml" | |
484 | "--disable-warnings-as-errors" | |
485 | ,(format #f "--jobs=~a" (parallel-job-count)) | |
486 | "--ssl"))) | |
487 | (modify-phases %standard-phases | |
6bbbca90 CB |
488 | (add-after 'unpack 'scons-propagate-environment |
489 | (lambda _ | |
490 | ;; Modify the SConstruct file to arrange for | |
491 | ;; environment variables to be propagated. | |
492 | (substitute* "SConstruct" | |
493 | (("^env = Environment\\(") | |
494 | "env = Environment(ENV=os.environ, ")) | |
495 | #t)) | |
496 | (add-after 'unpack 'create-version-file | |
497 | (lambda _ | |
498 | (call-with-output-file "version.json" | |
499 | (lambda (port) | |
500 | (display ,(simple-format #f "{ | |
501 | \"version\": \"~A\" | |
502 | }" version) port))) | |
503 | #t)) | |
504 | (replace 'build | |
505 | (lambda _ | |
d9bcdfce | 506 | (apply invoke `("scons" |
6bbbca90 | 507 | ,@common-options |
d9bcdfce | 508 | "mongod" "mongo" "mongos")))) |
6bbbca90 | 509 | (replace 'check |
90205b62 CB |
510 | (lambda* (#:key tests? inputs #:allow-other-keys) |
511 | (setenv "TZDIR" | |
512 | (string-append (assoc-ref inputs "tzdata") | |
513 | "/share/zoneinfo")) | |
6bbbca90 | 514 | (or (not tests?) |
90205b62 CB |
515 | ;; Note that with the tests, especially the unittests, the |
516 | ;; build can take up to ~45GB of space, as many tests are | |
517 | ;; individual executable files, with some being hundreds of | |
518 | ;; megabytes in size. | |
519 | (begin | |
8d7b476b EF |
520 | (apply |
521 | invoke `("scons" ,@common-options "dbtest" "unittests")) | |
90205b62 CB |
522 | (substitute* "build/unittests.txt" |
523 | ;; TODO: Don't run the async_stream_test, as it hangs | |
524 | (("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$") | |
525 | "") | |
526 | ;; TODO: This test fails | |
527 | ;; Expected 0UL != disks.size() (0 != 0) @src/mongo/util/procparser_test.cpp:476 | |
528 | (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$") | |
529 | "")) | |
8d7b476b EF |
530 | (invoke "python" "buildscripts/resmoke.py" |
531 | "--suites=dbtest,unittests" | |
90205b62 | 532 | (format #f "--jobs=~a" (parallel-job-count))))))) |
6bbbca90 CB |
533 | (replace 'install |
534 | (lambda _ | |
535 | (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))) | |
536 | (install-file "mongod" bin) | |
537 | (install-file "mongos" bin) | |
538 | (install-file "mongo" bin)) | |
539 | #t)))))) | |
540 | (home-page "https://www.mongodb.org/") | |
541 | (synopsis "High performance and high availability document database") | |
542 | (description | |
543 | "Mongo is a high-performance, high availability, schema-free | |
544 | document-oriented database. A key goal of MongoDB is to bridge the gap | |
545 | between key/value stores (which are fast and highly scalable) and traditional | |
546 | RDBMS systems (which are deep in functionality).") | |
547 | (license (list license:agpl3 | |
548 | ;; Some parts are licensed under the Apache License | |
549 | license:asl2.0)))) | |
550 | ||
7cbf06d8 TGR |
551 | ;; XXX When updating, check whether boost-for-mysql is still needed. |
552 | ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past. | |
5f96f303 LC |
553 | (define-public mysql |
554 | (package | |
555 | (name "mysql") | |
8ecf3f7e | 556 | (version "5.7.23") |
5f96f303 LC |
557 | (source (origin |
558 | (method url-fetch) | |
23bbd7dd | 559 | (uri (list (string-append |
7fe3a57a | 560 | "https://dev.mysql.com/get/Downloads/MySQL-" |
23bbd7dd EF |
561 | (version-major+minor version) "/" |
562 | name "-" version ".tar.gz") | |
563 | (string-append | |
7fe3a57a | 564 | "https://downloads.mysql.com/archives/get/file/" |
23bbd7dd | 565 | name "-" version ".tar.gz"))) |
5f96f303 LC |
566 | (sha256 |
567 | (base32 | |
8ecf3f7e | 568 | "0rbc3xsc11lq2dm0ip6gxa16c06hi74scb97x5cw7yhbabaz4c07")))) |
329d13b8 SB |
569 | (build-system cmake-build-system) |
570 | (arguments | |
69419655 | 571 | `(#:configure-flags |
329d13b8 SB |
572 | '("-DBUILD_CONFIG=mysql_release" |
573 | "-DWITH_SSL=system" | |
574 | "-DWITH_ZLIB=system" | |
575 | "-DDEFAULT_CHARSET=utf8" | |
576 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
577 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
578 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
579 | "-DINSTALL_INFODIR=share/mysql/docs" | |
580 | "-DINSTALL_MANDIR=share/man" | |
581 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" | |
582 | "-DINSTALL_SCRIPTDIR=bin" | |
583 | "-DINSTALL_INCLUDEDIR=include/mysql" | |
584 | "-DINSTALL_DOCREADMEDIR=share/mysql/docs" | |
585 | "-DINSTALL_SUPPORTFILESDIR=share/mysql" | |
586 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" | |
587 | "-DINSTALL_DOCDIR=share/mysql/docs" | |
588 | "-DINSTALL_SHAREDIR=share/mysql" | |
589 | ;; Get rid of test data. | |
590 | "-DINSTALL_MYSQLTESTDIR=" | |
3f289db6 LC |
591 | "-DINSTALL_SQLBENCHDIR=") |
592 | #:phases (modify-phases %standard-phases | |
6a52df50 LC |
593 | (add-after |
594 | 'install 'remove-extra-binaries | |
595 | (lambda* (#:key outputs #:allow-other-keys) | |
596 | (let ((out (assoc-ref outputs "out"))) | |
597 | ;; Remove the 3 *_embedded files, which weigh in at | |
598 | ;; 14 MiB each. | |
599 | (for-each delete-file | |
600 | (find-files (string-append out "/bin") | |
601 | "_embedded$")) | |
7d099cbe | 602 | #t)))))) |
329d13b8 SB |
603 | (native-inputs |
604 | `(("bison" ,bison) | |
605 | ("perl" ,perl))) | |
5f96f303 | 606 | (inputs |
7cbf06d8 | 607 | `(("boost" ,boost-for-mysql) |
23bbd7dd EF |
608 | ("libaio" ,libaio) |
609 | ("ncurses" ,ncurses) | |
5f96f303 | 610 | ("openssl" ,openssl) |
23bbd7dd | 611 | ("zlib" ,zlib))) |
7fe3a57a | 612 | (home-page "https://www.mysql.com/") |
9e771e3b | 613 | (synopsis "Fast, easy to use, and popular database") |
5f96f303 LC |
614 | (description |
615 | "MySQL is a fast, reliable, and easy to use relational database | |
616 | management system that supports the standardized Structured Query | |
617 | Language.") | |
ba8b9f8d | 618 | (license license:gpl2))) |
5f96f303 | 619 | |
77631745 SB |
620 | (define-public mariadb |
621 | (package | |
622 | (name "mariadb") | |
1d957c79 | 623 | (version "10.1.36") |
77631745 SB |
624 | (source (origin |
625 | (method url-fetch) | |
626 | (uri (string-append "https://downloads.mariadb.org/f/" | |
627 | name "-" version "/source/" | |
628 | name "-" version ".tar.gz")) | |
629 | (sha256 | |
630 | (base32 | |
1d957c79 | 631 | "0n5aj76mn9rxc21l2kjmfrg10bmsyy4cic68khjr94iby262wx5d")) |
fb76ef84 | 632 | (patches (search-patches "mariadb-client-test-32bit.patch")) |
2001d2da MB |
633 | (modules '((guix build utils))) |
634 | (snippet | |
635 | '(begin | |
636 | ;; Delete bundled snappy and xz. | |
637 | (delete-file-recursively "storage/tokudb/PerconaFT/third_party") | |
4333d48a MB |
638 | (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt" |
639 | ;; This file checks that the bundled sources are present and | |
640 | ;; declares build procedures for them. | |
641 | (("^include\\(TokuThirdParty\\)") "")) | |
642 | (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt" | |
643 | ;; Don't attempt to use the procedures we just removed. | |
644 | ((" build_lzma build_snappy") "")) | |
2001d2da MB |
645 | |
646 | ;; Preserve CMakeLists.txt for these. | |
647 | (for-each (lambda (file) | |
648 | (unless (string-suffix? "CMakeLists.txt" file) | |
649 | (delete-file file))) | |
650 | (append (find-files "extra/yassl") | |
651 | (find-files "pcre") (find-files "zlib"))) | |
652 | #t)))) | |
77631745 SB |
653 | (build-system cmake-build-system) |
654 | (arguments | |
5193ae64 | 655 | `(#:configure-flags |
77631745 | 656 | '("-DBUILD_CONFIG=mysql_release" |
6cf8e576 LF |
657 | ;; Linking with libarchive fails, like this: |
658 | ||
659 | ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o): | |
660 | ;; relocation R_X86_64_32 against `.bss' can not be used when | |
661 | ;; making a shared object; recompile with -fPIC | |
662 | ||
663 | ;; For now, disable the features that that use libarchive (xtrabackup). | |
664 | "-DWITH_LIBARCHIVE=OFF" | |
665 | ||
2001d2da MB |
666 | ;; Ensure the system libraries are used. |
667 | "-DWITH_JEMALLOC=yes" | |
668 | "-DWITH_PCRE=system" | |
669 | "-DWITH_SSL=system" | |
670 | "-DWITH_ZLIB=system" | |
671 | ||
77631745 SB |
672 | "-DDEFAULT_CHARSET=utf8" |
673 | "-DDEFAULT_COLLATION=utf8_general_ci" | |
674 | "-DMYSQL_DATADIR=/var/lib/mysql" | |
675 | "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | |
676 | "-DINSTALL_INFODIR=share/mysql/docs" | |
677 | "-DINSTALL_MANDIR=share/man" | |
678 | "-DINSTALL_PLUGINDIR=lib/mysql/plugin" | |
679 | "-DINSTALL_SCRIPTDIR=bin" | |
680 | "-DINSTALL_INCLUDEDIR=include/mysql" | |
681 | "-DINSTALL_DOCREADMEDIR=share/mysql/docs" | |
682 | "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files" | |
683 | "-DINSTALL_MYSQLSHAREDIR=share/mysql" | |
684 | "-DINSTALL_DOCDIR=share/mysql/docs" | |
4c27ea06 | 685 | "-DINSTALL_SHAREDIR=share") |
77631745 SB |
686 | #:phases |
687 | (modify-phases %standard-phases | |
4333d48a | 688 | (add-after 'unpack 'fix-pcre-detection |
2001d2da MB |
689 | (lambda _ |
690 | ;; The bundled PCRE in MariaDB has a patch that was upstreamed | |
691 | ;; in version 8.34. Unfortunately the upstream patch behaves | |
692 | ;; slightly differently and the build system fails to detect it. | |
693 | ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>. | |
694 | ;; XXX: Consider patching PCRE instead. | |
695 | (substitute* "cmake/pcre.cmake" | |
696 | ((" OR NOT PCRE_STACK_SIZE_OK") "")) | |
2001d2da | 697 | #t)) |
3869f39e MB |
698 | (add-after 'unpack 'adjust-tests |
699 | (lambda _ | |
700 | (let ((disabled-tests | |
701 | '(;; These fail because root@hostname == root@localhost in | |
702 | ;; the build environment, causing a user count mismatch. | |
703 | ;; See <https://jira.mariadb.org/browse/MDEV-7761>. | |
704 | "main.join_cache" | |
705 | "main.explain_non_select" | |
1d957c79 | 706 | "main.stat_tables_innodb" |
3418e43b MB |
707 | "roles.acl_statistics" |
708 | ||
709 | ;; FIXME: This test fails on i686: | |
710 | ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists") | |
711 | ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists) | |
712 | ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2" | |
713 | ;; (all three tables must exist and be identical) | |
714 | ;; in a loop it produces the same error around 1/240 times. | |
715 | ;; montywi on #maria suggested removing the real_end check in | |
716 | ;; "strings/my_vsnprintf.c" on line 503, yet it still does not | |
717 | ;; reach the ending quote occasionally. Disable it for now. | |
62694caa EF |
718 | "main.myisampack" |
719 | ;; FIXME: This test fails on armhf-linux: | |
720 | "mroonga/storage.index_read_multiple_double")) | |
3869f39e MB |
721 | |
722 | ;; This file contains a list of known-flaky tests for this | |
723 | ;; release. Append our own items. | |
724 | (unstable-tests (open-file "mysql-test/unstable-tests" "a"))) | |
725 | (for-each (lambda (test) | |
726 | (format unstable-tests "~a : ~a\n" | |
727 | test "Disabled in Guix")) | |
728 | disabled-tests) | |
729 | (close-port unstable-tests) | |
730 | ||
731 | (substitute* "mysql-test/mysql-test-run.pl" | |
732 | (("/bin/ls") (which "ls")) | |
733 | (("/bin/sh") (which "sh"))) | |
734 | #t))) | |
5b4d2e40 MB |
735 | (add-before 'configure 'disable-plugins |
736 | (lambda _ | |
737 | (let ((disable-plugin (lambda (name) | |
738 | (call-with-output-file | |
739 | (string-append "plugin/" name | |
740 | "/CMakeLists.txt") | |
741 | (lambda (port) | |
742 | (format port "\n"))))) | |
03335824 | 743 | (disabled-plugins '(;; XXX: Causes a test failure. |
3869f39e | 744 | "disks"))) |
5b4d2e40 MB |
745 | (for-each disable-plugin disabled-plugins) |
746 | #t))) | |
3869f39e MB |
747 | (replace 'check |
748 | (lambda* (#:key (tests? #t) #:allow-other-keys) | |
749 | (if tests? | |
750 | (with-directory-excursion "mysql-test" | |
751 | (invoke "./mtr" "--verbose" | |
3418e43b | 752 | "--retry=3" |
71179b35 MB |
753 | "--testcase-timeout=40" |
754 | "--suite-timeout=600" | |
3869f39e MB |
755 | "--parallel" (number->string (parallel-job-count)) |
756 | "--skip-test-list=unstable-tests")) | |
757 | (format #t "test suite not run~%")) | |
758 | #t)) | |
77631745 SB |
759 | (add-after |
760 | 'install 'post-install | |
761 | (lambda* (#:key outputs #:allow-other-keys) | |
762 | (let* ((out (assoc-ref outputs "out")) | |
763 | (test (assoc-ref outputs "test"))) | |
764 | (substitute* (string-append out "/bin/mysql_install_db") | |
765 | (("basedir=\"\"") | |
766 | (string-append "basedir=\"" out "\""))) | |
767 | ;; Remove unneeded files for testing. | |
768 | (with-directory-excursion out | |
769 | (for-each delete-file-recursively | |
770 | '("data" "mysql-test" "sql-bench" | |
963157f1 | 771 | "share/man/man1/mysql-test-run.pl.1")) |
43cec3fb MB |
772 | ;; Delete huge and unnecessary executables. |
773 | (for-each delete-file (find-files "bin" "(test|embedded)")) | |
963157f1 MB |
774 | ;; And static libraries. |
775 | (for-each delete-file (find-files "lib" "\\.a$"))) | |
841ee2a8 | 776 | #t)))))) |
77631745 SB |
777 | (native-inputs |
778 | `(("bison" ,bison) | |
03335824 | 779 | ("perl" ,perl))) |
77631745 SB |
780 | (inputs |
781 | `(("jemalloc" ,jemalloc) | |
782 | ("libaio" ,libaio) | |
783 | ("libxml2" ,libxml2) | |
784 | ("ncurses" ,ncurses) | |
77631745 | 785 | ("pcre" ,pcre) |
2001d2da MB |
786 | ("snappy" ,snappy) |
787 | ("xz" ,xz) | |
77631745 | 788 | ("zlib" ,zlib))) |
22f5c076 MB |
789 | (propagated-inputs |
790 | ;; mariadb.pc says -lssl -lcrypto, so propagate it. | |
791 | `(("openssl" ,openssl))) | |
3869f39e MB |
792 | ;; The test suite is very resource intensive and can take more than three |
793 | ;; hours on a x86_64 system. Give slow and busy machines some leeway. | |
794 | (properties '((timeout . 64800))) ;18 hours | |
77631745 SB |
795 | (home-page "https://mariadb.org/") |
796 | (synopsis "SQL database server") | |
797 | (description | |
798 | "MariaDB is a multi-user and multi-threaded SQL database server, designed | |
799 | as a drop-in replacement of MySQL.") | |
ba8b9f8d | 800 | (license license:gpl2))) |
77631745 | 801 | |
97dd1b15 | 802 | ;; Don't forget to update the other postgresql packages when upgrading this one. |
5f96f303 LC |
803 | (define-public postgresql |
804 | (package | |
805 | (name "postgresql") | |
ec350676 | 806 | (version "10.6") |
5f96f303 LC |
807 | (source (origin |
808 | (method url-fetch) | |
dbeaf8f2 | 809 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" |
9020890b | 810 | version "/postgresql-" version ".tar.bz2")) |
5f96f303 LC |
811 | (sha256 |
812 | (base32 | |
ec350676 | 813 | "0jv26y3f10svrjxzsgqxg956c86b664azyk2wppzpa5x11pjga38")))) |
5f96f303 | 814 | (build-system gnu-build-system) |
dd213082 | 815 | (arguments |
b7aa3f5d DM |
816 | `(#:configure-flags '("--with-uuid=e2fs") |
817 | #:phases | |
dd213082 JD |
818 | (modify-phases %standard-phases |
819 | (add-before 'configure 'patch-/bin/sh | |
820 | (lambda _ | |
821 | ;; Refer to the actual shell. | |
822 | (substitute* '("src/bin/pg_ctl/pg_ctl.c" | |
823 | "src/bin/psql/command.c") | |
824 | (("/bin/sh") (which "sh"))) | |
b7aa3f5d DM |
825 | #t)) |
826 | (add-after 'build 'build-contrib | |
827 | (lambda _ | |
2c48ed4e | 828 | (invoke "make" "-C" "contrib"))) |
b7aa3f5d DM |
829 | (add-after 'install 'install-contrib |
830 | (lambda _ | |
2c48ed4e | 831 | (invoke "make" "-C" "contrib" "install")))))) |
5f96f303 LC |
832 | (inputs |
833 | `(("readline" ,readline) | |
b7aa3f5d | 834 | ("libuuid" ,util-linux) |
5f96f303 | 835 | ("zlib" ,zlib))) |
d887f420 | 836 | (home-page "https://www.postgresql.org/") |
5f96f303 LC |
837 | (synopsis "Powerful object-relational database system") |
838 | (description | |
839 | "PostgreSQL is a powerful object-relational database system. It is fully | |
840 | ACID compliant, has full support for foreign keys, joins, views, triggers, and | |
841 | stored procedures (in multiple languages). It includes most SQL:2008 data | |
842 | types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and | |
843 | TIMESTAMP. It also supports storage of binary large objects, including | |
844 | pictures, sounds, or video.") | |
ba8b9f8d | 845 | (license (license:x11-style "file://COPYRIGHT")))) |
5f96f303 | 846 | |
7658d89b EF |
847 | (define-public postgresql-9.6 |
848 | (package | |
849 | (inherit postgresql) | |
850 | (name "postgresql") | |
41d2b7f5 | 851 | (version "9.6.11") |
7658d89b EF |
852 | (source (origin |
853 | (method url-fetch) | |
854 | (uri (string-append "https://ftp.postgresql.org/pub/source/v" | |
855 | version "/postgresql-" version ".tar.bz2")) | |
856 | (sha256 | |
857 | (base32 | |
41d2b7f5 | 858 | "0c55akrkzqd6p6a8hr0338wk246hl76r9j16p4zn3s51d7f0l99q")))))) |
7658d89b | 859 | |
9763102b TGR |
860 | (define-public python-pymysql |
861 | (package | |
862 | (name "python-pymysql") | |
863 | (version "0.9.2") | |
864 | (source | |
865 | (origin | |
866 | (method url-fetch) | |
867 | (uri (pypi-uri "PyMySQL" version)) | |
868 | (sha256 | |
869 | (base32 | |
870 | "0gvi63f1zq1bbd30x28kqyx351hal1yc323ckp0mihainb5n1iwy")))) | |
871 | (build-system python-build-system) | |
872 | (native-inputs | |
873 | `(("python-unittest2" ,python-unittest2))) | |
874 | (inputs | |
875 | `(("python-cryptography" ,python-cryptography))) | |
876 | (arguments | |
877 | `(#:tests? #f)) ; tests expect a running MySQL | |
878 | (home-page "https://github.com/PyMySQL/PyMySQL/") | |
879 | (synopsis "Pure-Python MySQL driver") | |
880 | (description | |
881 | "PyMySQL is a pure-Python MySQL client library, based on PEP 249. | |
882 | Most public APIs are compatible with @command{mysqlclient} and MySQLdb.") | |
883 | (license license:expat))) | |
884 | ||
885 | (define-public python2-pymysql | |
886 | (package-with-python2 python-pymysql)) | |
887 | ||
259a94e9 TD |
888 | (define-public qdbm |
889 | (package | |
890 | (name "qdbm") | |
891 | (version "1.8.78") | |
892 | (source | |
893 | (origin | |
894 | (method url-fetch) | |
895 | (uri (string-append "http://fallabs.com/" name "/" | |
896 | name "-" version ".tar.gz")) | |
897 | (sha256 | |
898 | (base32 | |
899 | "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml")))) | |
900 | (build-system gnu-build-system) | |
901 | (arguments | |
902 | `( #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
903 | (assoc-ref %outputs "out") | |
904 | "/lib")))) | |
905 | (home-page "http://fallabs.com/qdbm") | |
906 | (synopsis "Key-value database") | |
907 | (description "QDBM is a library of routines for managing a | |
908 | database. The database is a simple data file containing key-value | |
909 | pairs. Every key and value is serial bytes with variable length. | |
910 | Binary data as well as character strings can be used as a key or a | |
911 | value. There is no concept of data tables or data types. Records are | |
912 | organized in a hash table or B+ tree.") | |
913 | (license license:lgpl2.1+))) | |
914 | ||
5f96f303 LC |
915 | (define-public recutils |
916 | (package | |
917 | (name "recutils") | |
918 | (version "1.7") | |
919 | (source (origin | |
920 | (method url-fetch) | |
921 | (uri (string-append "mirror://gnu/recutils/recutils-" | |
922 | version ".tar.gz")) | |
923 | (sha256 | |
924 | (base32 | |
944a3a8b LC |
925 | "0cdwa4094x3yx7vn98xykvnlp9rngvd58d19vs3vh5hrvggccg93")) |
926 | (modules '((guix build utils))) | |
927 | (snippet | |
928 | '(begin | |
929 | ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g. | |
930 | ;; "m4-gnulib-libio.patch". This is a phase rather than patch | |
931 | ;; or snippet to work around <https://bugs.gnu.org/32347>. | |
932 | (substitute* (find-files "lib" "\\.c$") | |
933 | (("#if defined _IO_ftrylockfile") | |
934 | "#if defined _IO_EOF_SEEN")) | |
935 | (substitute* "lib/stdio-impl.h" | |
936 | (("^/\\* BSD stdio derived implementations") | |
937 | (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" | |
938 | "# define _IO_IN_BACKUP 0x100\n" | |
939 | "#endif\n\n" | |
940 | "/* BSD stdio derived implementations"))) | |
941 | #t)))) | |
5f96f303 LC |
942 | (build-system gnu-build-system) |
943 | ||
944 | ;; Running tests in parallel leads to test failures and crashes in | |
945 | ;; torture/utils. | |
b747a9db LF |
946 | (arguments '(#:parallel-tests? #f |
947 | #:configure-flags | |
948 | (list (string-append "--with-bash-headers=" | |
949 | (assoc-ref %build-inputs "bash:include") | |
c21af659 LC |
950 | "/include/bash")) |
951 | ||
952 | #:phases (modify-phases %standard-phases | |
953 | (add-before 'build 'set-bash4.4-header-location | |
954 | (lambda _ | |
955 | (substitute* "bash/Makefile.in" | |
956 | ;; Adjust the header search path for Bash | |
957 | ;; 4.4 in accordance with 'bash.pc'. | |
958 | (("AM_CPPFLAGS = (.*)$" _ rest) | |
959 | (string-append "AM_CPPFLAGS = " | |
960 | "-I$(BASH_HEADERS)/include " | |
961 | rest)) | |
962 | ||
963 | ;; Install to PREFIX/lib/bash to match Bash | |
964 | ;; 4.4's search path. | |
965 | (("^libdir = .*$") | |
966 | "libdir = @libdir@/bash\n")) | |
967 | #t))))) | |
5f96f303 | 968 | |
b8fc3622 | 969 | (native-inputs `(("emacs" ,emacs-minimal) |
7ae7ca0e | 970 | ("bc" ,bc) |
b747a9db | 971 | ("bash:include" ,bash "include") |
b3546174 | 972 | ("libuuid" ,util-linux))) |
5f96f303 LC |
973 | |
974 | ;; TODO: Add more optional inputs. | |
5f96f303 LC |
975 | (inputs `(("curl" ,curl) |
976 | ("libgcrypt" ,libgcrypt) | |
977 | ("check" ,check))) | |
978 | (synopsis "Manipulate plain text files as databases") | |
979 | (description | |
980 | "GNU Recutils is a set of tools and libraries for creating and | |
981 | manipulating text-based, human-editable databases. Despite being text-based, | |
982 | databases created with Recutils carry all of the expected features such as | |
c5779c93 LC |
983 | unique fields, primary keys, time stamps and more. Many different field |
984 | types are supported, as is encryption.") | |
ba8b9f8d | 985 | (license license:gpl3+) |
6fd52309 | 986 | (home-page "https://www.gnu.org/software/recutils/"))) |
5f96f303 | 987 | |
d3c6ad0a MB |
988 | (define-public rocksdb |
989 | (package | |
990 | (name "rocksdb") | |
e2568df7 | 991 | (version "5.15.10") |
d3c6ad0a | 992 | (source (origin |
8dd36658 MB |
993 | (method git-fetch) |
994 | (uri (git-reference | |
995 | (url "https://github.com/facebook/rocksdb") | |
996 | (commit (string-append "v" version)))) | |
997 | (file-name (git-file-name name version)) | |
d3c6ad0a MB |
998 | (sha256 |
999 | (base32 | |
e2568df7 | 1000 | "0q26frbj9pykarcfa0yxgwncxlvsqhjkby0jrbfs1a8srja688r4")) |
d3c6ad0a MB |
1001 | (modules '((guix build utils))) |
1002 | (snippet | |
1003 | '(begin | |
1004 | ;; TODO: unbundle gtest. | |
1005 | (delete-file "build_tools/gnu_parallel") | |
7fa9cca8 MB |
1006 | (substitute* "Makefile" |
1007 | (("build_tools/gnu_parallel") "parallel")) | |
d3c6ad0a MB |
1008 | #t)))) |
1009 | (build-system gnu-build-system) | |
1010 | (arguments | |
7fa9cca8 MB |
1011 | `(#:make-flags (list "CC=gcc" "V=1" |
1012 | ;; Ceph requires that RTTI is enabled. | |
1013 | "USE_RTTI=1" | |
d3c6ad0a | 1014 | (string-append "INSTALL_PATH=" |
7fa9cca8 MB |
1015 | (assoc-ref %outputs "out")) |
1016 | ||
1017 | ;; Running the full test suite takes hours and require | |
1018 | ;; a lot of disk space. Instead we only run a subset | |
1019 | ;; (see .travis.yml and Makefile). | |
1020 | "ROCKSDBTESTS_END=db_tailing_iter_test") | |
1021 | #:test-target "check_some" | |
d7b344c5 MB |
1022 | ;; Many tests fail on 32-bit platforms. There are multiple reports about |
1023 | ;; this upstream, but it's not going to be supported any time soon. | |
1024 | #:tests? (let ((system ,(or (%current-target-system) | |
1025 | (%current-system)))) | |
1026 | (or (string-prefix? "x86_64-linux" system) | |
1027 | (string-prefix? "aarch64-linux" system))) | |
d3c6ad0a MB |
1028 | #:phases |
1029 | (modify-phases %standard-phases | |
1030 | (add-after 'unpack 'patch-Makefile | |
1031 | (lambda _ | |
1032 | (substitute* "Makefile" | |
f91c677c MB |
1033 | ;; Don't depend on the static library when installing. |
1034 | (("install: install-static") | |
1035 | "install: install-shared") | |
d3c6ad0a MB |
1036 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
1037 | #t)) | |
1038 | (delete 'configure) | |
d7b344c5 MB |
1039 | ;; The default target is only needed for tests and built on demand. |
1040 | (delete 'build) | |
1041 | (add-before 'check 'disable-optimizations | |
1042 | (lambda _ | |
1043 | ;; Prevent the build from passing '-march=native' to the compiler. | |
1044 | (setenv "PORTABLE" "1") | |
1045 | #t)) | |
d3c6ad0a MB |
1046 | (add-before 'check 'disable-failing-tests |
1047 | (lambda _ | |
1048 | (substitute* "Makefile" | |
1049 | ;; These tests reliably fail due to "Too many open files". | |
1050 | (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\") | |
1051 | (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\")) | |
1052 | #t)) | |
7fa9cca8 | 1053 | (add-after 'check 'build |
f91c677c | 1054 | ;; The default build target is a debug build for tests. The |
7fa9cca8 MB |
1055 | ;; install target depends on the "shared_lib" release target |
1056 | ;; so we build it here for clarity. | |
1057 | (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys) | |
1058 | (apply invoke "make" "shared_lib" | |
1059 | `(,@(if parallel-build? | |
1060 | `("-j" ,(number->string (parallel-job-count))) | |
1061 | '()) | |
1062 | ,@make-flags))))))) | |
d3c6ad0a MB |
1063 | (native-inputs |
1064 | `(("parallel" ,parallel) | |
1065 | ("perl" ,perl) | |
1066 | ("procps" ,procps) | |
77e52190 MB |
1067 | ("python" ,python-2) |
1068 | ("which" ,which))) | |
d3c6ad0a MB |
1069 | (inputs |
1070 | `(("bzip2" ,bzip2) | |
1071 | ("gflags" ,gflags) | |
1072 | ("jemalloc" ,jemalloc) | |
1073 | ("lz4" ,lz4) | |
1074 | ("snappy" ,snappy) | |
1075 | ("zlib" ,zlib))) | |
1076 | (home-page "http://rocksdb.org/") | |
1077 | (synopsis "Persistent key-value store for fast storage") | |
1078 | (description | |
1079 | "RocksDB is a library that forms the core building block for a fast | |
1080 | key-value server, especially suited for storing data on flash drives. It | |
1081 | has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs | |
1082 | between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor} | |
1083 | (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded | |
1084 | compactions, making it specially suitable for storing multiple terabytes of | |
1085 | data in a single database. RocksDB is partially based on @code{LevelDB}.") | |
7fa9cca8 MB |
1086 | ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header |
1087 | ;; files carry the 3-clause BSD license. | |
1088 | (license (list license:gpl2 license:asl2.0 license:bsd-3)))) | |
d3c6ad0a | 1089 | |
b92d02d9 RJ |
1090 | (define-public sparql-query |
1091 | (package | |
1092 | (name "sparql-query") | |
1093 | (version "1.1") | |
1094 | (source (origin | |
1095 | (method url-fetch) | |
1096 | (uri (string-append "https://github.com/tialaramex/" | |
1097 | name "/archive/" version ".tar.gz")) | |
1098 | (sha256 | |
1099 | (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w")) | |
1100 | (file-name (string-append name "-" version ".tar.gz")))) | |
1101 | (build-system gnu-build-system) | |
1102 | (inputs | |
1103 | `(("readline" ,readline) | |
1104 | ("ncurses" ,ncurses) | |
1105 | ("glib" ,glib) | |
1106 | ("libxml2" ,libxml2) | |
1107 | ("curl" ,curl))) | |
1108 | (native-inputs | |
1109 | `(("pkg-config" ,pkg-config))) | |
1110 | (arguments | |
1111 | `(#:make-flags '("CC=gcc") | |
1112 | #:phases | |
1113 | (modify-phases %standard-phases | |
1114 | (delete 'configure) | |
1115 | ;; The Makefile uses git to obtain versioning information. This phase | |
1116 | ;; substitutes the git invocation with the package version. | |
1117 | (add-after 'unpack 'remove-git-dependency | |
1118 | (lambda _ | |
1119 | (substitute* "Makefile" | |
1120 | (("^gitrev :=.*$") | |
1121 | (string-append "gitrev = \"v" ,version "\""))))) | |
1122 | ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin. | |
1123 | ;; This replacement does the same thing, except for using $PREFIX/bin | |
1124 | ;; instead. | |
1125 | (replace 'install | |
1126 | (lambda* (#:key outputs #:allow-other-keys) | |
1127 | (let* ((out (assoc-ref outputs "out")) | |
1128 | (bin (string-append out "/bin"))) | |
1129 | (install-file "sparql-query" bin) | |
1130 | (system* "ln" "--symbolic" | |
1131 | (string-append bin "/sparql-query") | |
1132 | (string-append bin "/sparql-update"))))) | |
1133 | (replace 'check | |
1134 | (lambda* (#:key make-flags #:allow-other-keys) | |
1135 | (and | |
1136 | (zero? (apply system* "make" `(,@make-flags "scan-test"))) | |
1137 | (zero? (system "./scan-test")))))))) | |
1138 | (home-page "https://github.com/tialaramex/sparql-query/") | |
1139 | (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP") | |
1140 | (description "Sparql-query is a command-line tool for accessing SPARQL | |
1141 | endpoints over HTTP. It has been intentionally designed to 'feel' similar to | |
1142 | tools for interrogating SQL databases. For example, you can enter a query over | |
1143 | several lines, using a semi-colon at the end of a line to indicate the end of | |
1144 | your query. It also supports readline so that you can more easily recall and | |
1145 | edit previous queries, even across sessions. It can be used non-interactively, | |
1146 | for example from a shell script.") | |
1147 | ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while | |
1148 | ;; others (like sparql-query.c) contain a GPLv2+ license header. | |
ba8b9f8d | 1149 | (license (list license:gpl3+)))) |
b92d02d9 | 1150 | |
311f06c9 TGR |
1151 | (define-public sqlcrush |
1152 | ;; Unfortunately, there is no proper upstream release and may never be. | |
1153 | (let ((commit "b5f6868f189566a26eecc78d0f0659813c1aa98a") | |
1154 | (revision "1")) | |
1155 | (package | |
1156 | (name "sqlcrush") | |
1157 | (version (git-version "0.1.5" revision commit)) | |
1158 | (source (origin | |
1159 | (method git-fetch) | |
1160 | (uri (git-reference | |
1161 | (url "https://github.com/coffeeandscripts/sqlcrush.git") | |
1162 | (commit commit))) | |
1163 | (file-name (git-file-name name version)) | |
1164 | (sha256 | |
1165 | (base32 | |
1166 | "0x3wy40r93p0jv3nbwj9a77wa4ff697d13r0wffmm7q9h3mzsww8")))) | |
1167 | (build-system python-build-system) | |
1168 | (inputs | |
1169 | `(("python-cryptography" ,python-cryptography) | |
1170 | ("python-psycopg2" ,python-psycopg2) | |
1171 | ("python-pymysql" ,python-pymysql) | |
1172 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
1173 | (home-page "https://github.com/coffeeandscripts/sqlcrush") | |
1174 | (synopsis "Text console-based database viewer and editor") | |
1175 | (description | |
1176 | "SQLcrush lets you view and edit a database directly from the text | |
1177 | console through an ncurses interface. You can explore each table's structure, | |
1178 | browse and edit the contents, add and delete entries, all while tracking your | |
1179 | changes.") | |
1180 | (license license:gpl3+)))) ; no headers, see README.md | |
1181 | ||
5f96f303 LC |
1182 | (define-public sqlite |
1183 | (package | |
1184 | (name "sqlite") | |
d30e9e61 | 1185 | (version "3.24.0") |
5f96f303 LC |
1186 | (source (origin |
1187 | (method url-fetch) | |
5f96f303 LC |
1188 | (uri (let ((numeric-version |
1189 | (match (string-split version #\.) | |
1190 | ((first-digit other-digits ...) | |
1191 | (string-append first-digit | |
1192 | (string-pad-right | |
1193 | (string-concatenate | |
1194 | (map (cut string-pad <> 2 #\0) | |
1195 | other-digits)) | |
1196 | 6 #\0)))))) | |
cff07bde | 1197 | (string-append "https://sqlite.org/2018/sqlite-autoconf-" |
3ad8cb41 | 1198 | numeric-version ".tar.gz"))) |
5f96f303 LC |
1199 | (sha256 |
1200 | (base32 | |
d30e9e61 | 1201 | "0jmprv2vpggzhy7ma4ynmv1jzn3pfiwzkld0kkg6hvgvqs44xlfr")))) |
5f96f303 | 1202 | (build-system gnu-build-system) |
8f1d22b7 | 1203 | (inputs `(("readline" ,readline))) |
49689377 MW |
1204 | (arguments |
1205 | `(#:configure-flags | |
73dc727e DC |
1206 | ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and |
1207 | ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse | |
1208 | ;; to use the system SQLite unless these options are enabled. | |
1209 | (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " | |
1210 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY " | |
1211 | "-DSQLITE_ENABLE_DBSTAT_VTAB")))) | |
3ad8cb41 | 1212 | (home-page "https://www.sqlite.org/") |
5f96f303 LC |
1213 | (synopsis "The SQLite database management system") |
1214 | (description | |
1215 | "SQLite is a software library that implements a self-contained, serverless, | |
35b9e423 EB |
1216 | zero-configuration, transactional SQL database engine. SQLite is the most |
1217 | widely deployed SQL database engine in the world. The source code for SQLite | |
1218 | is in the public domain.") | |
ba8b9f8d | 1219 | (license license:public-domain))) |
db60b1d9 | 1220 | |
b9ed5ef3 MW |
1221 | ;; This is used by Tracker. |
1222 | (define-public sqlite-with-fts5 | |
1223 | (package (inherit sqlite) | |
1224 | (name "sqlite-with-fts5") | |
1225 | (arguments | |
1226 | (substitute-keyword-arguments (package-arguments sqlite) | |
1227 | ((#:configure-flags flags) | |
1228 | `(cons "--enable-fts5" ,flags)))))) | |
1229 | ||
d28af199 EF |
1230 | ;; This is used by Qt. |
1231 | (define-public sqlite-with-column-metadata | |
1232 | (package (inherit sqlite) | |
1233 | (name "sqlite-with-column-metadata") | |
1234 | (arguments | |
1235 | (substitute-keyword-arguments (package-arguments sqlite) | |
1236 | ((#:configure-flags flags) | |
1237 | `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " | |
1238 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY " | |
1239 | "-DSQLITE_ENABLE_DBSTAT_VTAB " | |
1240 | "-DSQLITE_ENABLE_COLUMN_METADATA"))))))) | |
1241 | ||
db60b1d9 LC |
1242 | (define-public tdb |
1243 | (package | |
1244 | (name "tdb") | |
b7a2d2d9 | 1245 | (version "1.3.16") |
db60b1d9 LC |
1246 | (source (origin |
1247 | (method url-fetch) | |
ca473fc2 | 1248 | (uri (string-append "https://www.samba.org/ftp/tdb/tdb-" |
db60b1d9 LC |
1249 | version ".tar.gz")) |
1250 | (sha256 | |
1251 | (base32 | |
b7a2d2d9 | 1252 | "1ibcz466xwk1x6xvzlgzd5va4lyrjzm3rnjak29kkwk7cmhw4gva")))) |
db60b1d9 LC |
1253 | (build-system gnu-build-system) |
1254 | (arguments | |
6ccb7814 EF |
1255 | '(#:phases |
1256 | (modify-phases %standard-phases | |
1257 | (replace 'configure | |
1258 | (lambda* (#:key outputs #:allow-other-keys) | |
1259 | (let ((out (assoc-ref outputs "out"))) | |
1260 | ;; The 'configure' script is a wrapper for Waf and | |
1261 | ;; doesn't recognize things like '--enable-fast-install'. | |
1262 | (zero? (system* "./configure" | |
1263 | (string-append "--prefix=" out))))))))) | |
db60b1d9 LC |
1264 | (native-inputs |
1265 | `(;; TODO: Build the documentation. | |
1266 | ;; ("docbook-xsl" ,docbook-xsl) | |
1267 | ;; ("libxml2" ,libxml2) | |
1268 | ;; ("libxslt" ,libxslt) | |
1269 | ("python" ,python-2))) ;for the Waf build system | |
1abd0904 | 1270 | (home-page "https://tdb.samba.org/") |
35b9e423 | 1271 | (synopsis "Trivial database") |
db60b1d9 LC |
1272 | (description |
1273 | "TDB is a Trivial Database. In concept, it is very much like GDBM, | |
1274 | and BSD's DB except that it allows multiple simultaneous writers and uses | |
1275 | locking internally to keep writers from trampling on each other. TDB is also | |
1276 | extremely small.") | |
ba8b9f8d | 1277 | (license license:lgpl3+))) |
274da61d LC |
1278 | |
1279 | (define-public perl-dbi | |
1280 | (package | |
1281 | (name "perl-dbi") | |
f7161964 | 1282 | (version "1.641") |
274da61d LC |
1283 | (source (origin |
1284 | (method url-fetch) | |
1285 | (uri (string-append | |
1286 | "mirror://cpan/authors/id/T/TI/TIMB/DBI-" | |
1287 | version ".tar.gz")) | |
1288 | (sha256 | |
1289 | (base32 | |
f7161964 | 1290 | "1hf2x29bnqf2x1v4bdhji802z7n2mbg7h1amv8gdkqyhrlrfa2am")))) |
274da61d LC |
1291 | (build-system perl-build-system) |
1292 | (synopsis "Database independent interface for Perl") | |
1293 | (description "This package provides an database interface for Perl.") | |
9aba9b12 | 1294 | (home-page "https://metacpan.org/release/DBI") |
2f3108ad | 1295 | (license license:perl-license))) |
274da61d | 1296 | |
feae3395 EB |
1297 | (define-public perl-dbix-class |
1298 | (package | |
1299 | (name "perl-dbix-class") | |
435897c0 | 1300 | (version "0.082841") |
feae3395 EB |
1301 | (source |
1302 | (origin | |
1303 | (method url-fetch) | |
1304 | (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" | |
1305 | "DBIx-Class-" version ".tar.gz")) | |
1306 | (sha256 | |
1307 | (base32 | |
435897c0 | 1308 | "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp")))) |
feae3395 EB |
1309 | (build-system perl-build-system) |
1310 | (native-inputs | |
1311 | `(("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
1312 | ("perl-file-temp" ,perl-file-temp) | |
2f837cf7 | 1313 | ("perl-module-install" ,perl-module-install) |
feae3395 EB |
1314 | ("perl-package-stash" ,perl-package-stash) |
1315 | ("perl-test-deep" ,perl-test-deep) | |
1316 | ("perl-test-exception" ,perl-test-exception) | |
1317 | ("perl-test-warn" ,perl-test-warn))) | |
1318 | (propagated-inputs | |
1319 | `(("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
1320 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
1321 | ("perl-class-inspector" ,perl-class-inspector) | |
1322 | ("perl-config-any" ,perl-config-any) | |
1323 | ("perl-context-preserve" ,perl-context-preserve) | |
1324 | ("perl-data-dumper-concise" ,perl-data-dumper-concise) | |
1325 | ("perl-data-page" ,perl-data-page) | |
1326 | ("perl-dbi" ,perl-dbi) | |
1327 | ("perl-devel-globaldestruction" ,perl-devel-globaldestruction) | |
1328 | ("perl-hash-merge" ,perl-hash-merge) | |
1329 | ("perl-module-find" ,perl-module-find) | |
1330 | ("perl-moo" ,perl-moo) | |
1331 | ("perl-mro-compat" ,perl-mro-compat) | |
1332 | ("perl-namespace-clean" ,perl-namespace-clean) | |
1333 | ("perl-path-class" ,perl-path-class) | |
1334 | ("perl-scalar-list-utils" ,perl-scalar-list-utils) | |
1335 | ("perl-scope-guard" ,perl-scope-guard) | |
1336 | ("perl-sql-abstract" ,perl-sql-abstract) | |
1337 | ("perl-sub-name" ,perl-sub-name) | |
1338 | ("perl-text-balanced" ,perl-text-balanced) | |
1339 | ("perl-try-tiny" ,perl-try-tiny))) | |
9aba9b12 | 1340 | (home-page "https://metacpan.org/release/DBIx-Class") |
feae3395 EB |
1341 | (synopsis "Extensible and flexible object <-> relational mapper") |
1342 | (description "An SQL to OO mapper with an object API inspired by | |
1343 | Class::DBI (with a compatibility layer as a springboard for porting) and a | |
1344 | resultset API that allows abstract encapsulation of database operations. It | |
1345 | aims to make representing queries in your code as perl-ish as possible while | |
1346 | still providing access to as many of the capabilities of the database as | |
1347 | possible, including retrieving related records from multiple tables in a | |
1348 | single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\", | |
1349 | \"ORDER BY\" and \"HAVING\" support.") | |
2f3108ad | 1350 | (license license:perl-license))) |
e61fd0f0 | 1351 | |
4e4039e5 EB |
1352 | (define-public perl-dbix-class-cursor-cached |
1353 | (package | |
1354 | (name "perl-dbix-class-cursor-cached") | |
180cb81b | 1355 | (version "1.001004") |
4e4039e5 EB |
1356 | (source |
1357 | (origin | |
1358 | (method url-fetch) | |
1359 | (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/" | |
1360 | "DBIx-Class-Cursor-Cached-" version ".tar.gz")) | |
1361 | (sha256 | |
1362 | (base32 | |
180cb81b | 1363 | "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p")))) |
4e4039e5 EB |
1364 | (build-system perl-build-system) |
1365 | (native-inputs | |
1366 | `(("perl-cache-cache" ,perl-cache-cache) | |
2f837cf7 MB |
1367 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) |
1368 | ("perl-module-install" ,perl-module-install))) | |
4e4039e5 EB |
1369 | (propagated-inputs |
1370 | `(("perl-carp-clan" ,perl-carp-clan) | |
1371 | ("perl-dbix-class" ,perl-dbix-class))) | |
9aba9b12 | 1372 | (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached") |
4e4039e5 EB |
1373 | (synopsis "Cursor with built-in caching support") |
1374 | (description "DBIx::Class::Cursor::Cached provides a cursor class with | |
1375 | built-in caching support.") | |
2f3108ad | 1376 | (license license:perl-license))) |
4e4039e5 | 1377 | |
e61fd0f0 EB |
1378 | (define-public perl-dbix-class-introspectablem2m |
1379 | (package | |
1380 | (name "perl-dbix-class-introspectablem2m") | |
7a462b80 | 1381 | (version "0.001002") |
e61fd0f0 EB |
1382 | (source |
1383 | (origin | |
1384 | (method url-fetch) | |
68a9d6df | 1385 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" |
e61fd0f0 EB |
1386 | "DBIx-Class-IntrospectableM2M-" version ".tar.gz")) |
1387 | (sha256 | |
1388 | (base32 | |
7a462b80 | 1389 | "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6")))) |
e61fd0f0 | 1390 | (build-system perl-build-system) |
2f837cf7 MB |
1391 | (native-inputs |
1392 | `(("perl-module-install" ,perl-module-install))) | |
e61fd0f0 EB |
1393 | (propagated-inputs |
1394 | `(("perl-dbix-class" ,perl-dbix-class))) | |
9aba9b12 | 1395 | (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M") |
e61fd0f0 EB |
1396 | (synopsis "Introspect many-to-many relationships") |
1397 | (description "Because the many-to-many relationships are not real | |
1398 | relationships, they can not be introspected with DBIx::Class. Many-to-many | |
1399 | relationships are actually just a collection of convenience methods installed | |
1400 | to bridge two relationships. This DBIx::Class component can be used to store | |
1401 | all relevant information about these non-relationships so they can later be | |
1402 | introspected and examined.") | |
2f3108ad | 1403 | (license license:perl-license))) |
708155df EB |
1404 | |
1405 | (define-public perl-dbix-class-schema-loader | |
1406 | (package | |
1407 | (name "perl-dbix-class-schema-loader") | |
1672e7e7 | 1408 | (version "0.07049") |
708155df EB |
1409 | (source |
1410 | (origin | |
1411 | (method url-fetch) | |
1412 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" | |
1413 | "DBIx-Class-Schema-Loader-" version ".tar.gz")) | |
1414 | (sha256 | |
1415 | (base32 | |
1672e7e7 | 1416 | "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8")))) |
708155df EB |
1417 | (build-system perl-build-system) |
1418 | (native-inputs | |
1419 | `(("perl-config-any" ,perl-config-any) | |
1420 | ("perl-config-general" ,perl-config-general) | |
1421 | ("perl-dbd-sqlite" ,perl-dbd-sqlite) | |
1422 | ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m) | |
2f837cf7 | 1423 | ("perl-module-install" ,perl-module-install) |
708155df EB |
1424 | ("perl-moose" ,perl-moose) |
1425 | ("perl-moosex-markasmethods" ,perl-moosex-markasmethods) | |
1426 | ("perl-moosex-nonmoose" ,perl-moosex-nonmoose) | |
1427 | ("perl-namespace-autoclean" ,perl-namespace-autoclean) | |
1428 | ("perl-test-deep" ,perl-test-deep) | |
1429 | ("perl-test-differences" ,perl-test-differences) | |
1430 | ("perl-test-exception" ,perl-test-exception) | |
1431 | ("perl-test-pod" ,perl-test-pod) | |
1432 | ("perl-test-warn" ,perl-test-warn))) | |
1433 | (propagated-inputs | |
1434 | `(("perl-class-unload" ,perl-class-unload) | |
1435 | ("perl-class-inspector" ,perl-class-inspector) | |
1436 | ("perl-class-accessor-grouped" ,perl-class-accessor-grouped) | |
1437 | ("perl-class-c3-componentised" ,perl-class-c3-componentised) | |
1438 | ("perl-carp-clan" ,perl-carp-clan) | |
1439 | ("perl-data-dump" ,perl-data-dump) | |
1440 | ("perl-dbix-class" ,perl-dbix-class) | |
1441 | ("perl-hash-merge" ,perl-hash-merge) | |
1442 | ("perl-list-moreutils" ,perl-list-moreutils) | |
1443 | ("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase) | |
1444 | ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number) | |
1445 | ("perl-lingua-en-tagger" ,perl-lingua-en-tagger) | |
1446 | ("perl-namespace-clean" ,perl-namespace-clean) | |
1447 | ("perl-mro-compat" ,perl-mro-compat) | |
1448 | ("perl-scope-guard" ,perl-scope-guard) | |
1449 | ("perl-string-camelcase" ,perl-string-camelcase) | |
1450 | ("perl-string-toidentifier-en" ,perl-string-toidentifier-en) | |
1451 | ("perl-sub-name" ,perl-sub-name) | |
1452 | ("perl-try-tiny" ,perl-try-tiny))) | |
1453 | (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails | |
9aba9b12 | 1454 | (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader") |
708155df EB |
1455 | (synopsis "Create a DBIx::Class::Schema based on a database") |
1456 | (description "DBIx::Class::Schema::Loader automates the definition of a | |
1457 | DBIx::Class::Schema by scanning database table definitions and setting up the | |
1458 | columns, primary keys, unique constraints and relationships.") | |
2f3108ad | 1459 | (license license:perl-license))) |
274da61d | 1460 | |
186eb132 EB |
1461 | (define-public perl-dbd-pg |
1462 | (package | |
1463 | (name "perl-dbd-pg") | |
8c078dde | 1464 | (version "3.7.4") |
186eb132 EB |
1465 | (source |
1466 | (origin | |
1467 | (method url-fetch) | |
1468 | (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/" | |
1469 | "DBD-Pg-" version ".tar.gz")) | |
1470 | (sha256 | |
1471 | (base32 | |
8c078dde | 1472 | "0gkqlvbmzbdm0g4k328nlkjdg3wrjm5i2n9jxj1i8sqxkm79rylz")))) |
186eb132 EB |
1473 | (build-system perl-build-system) |
1474 | (native-inputs | |
1475 | `(("perl-dbi" ,perl-dbi))) | |
1476 | (propagated-inputs | |
1477 | `(("perl-dbi" ,perl-dbi) | |
1478 | ("postgresql" ,postgresql))) | |
9aba9b12 | 1479 | (home-page "https://metacpan.org/release/DBD-Pg") |
186eb132 | 1480 | (synopsis "DBI PostgreSQL interface") |
f33e71fc LC |
1481 | (description "This package provides a PostgreSQL driver for the Perl5 |
1482 | @dfn{Database Interface} (DBI).") | |
2f3108ad | 1483 | (license license:perl-license))) |
186eb132 | 1484 | |
4b7857a4 RW |
1485 | (define-public perl-dbd-mysql |
1486 | (package | |
1487 | (name "perl-dbd-mysql") | |
eeecbe09 | 1488 | (version "4.048") |
4b7857a4 RW |
1489 | (source |
1490 | (origin | |
1491 | (method url-fetch) | |
eeecbe09 | 1492 | (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/" |
4b7857a4 RW |
1493 | "DBD-mysql-" version ".tar.gz")) |
1494 | (sha256 | |
1495 | (base32 | |
eeecbe09 | 1496 | "1zqmch6c9gq06z90mkmk1skajk2kaggriw19ym5w04l7wv5gydqp")))) |
4b7857a4 | 1497 | (build-system perl-build-system) |
702a87f2 TGR |
1498 | (arguments |
1499 | `(#:phases | |
1500 | (modify-phases %standard-phases | |
1501 | (add-before 'configure 'skip-library-detection | |
1502 | ;; Avoid depencies on perl-devel-checklib, openssl, and zlib. They | |
1503 | ;; are really only needed for the test suite; their absence does not | |
1504 | ;; affect the build or the end result. | |
1505 | (lambda _ | |
1506 | (substitute* "Makefile.PL" | |
1507 | (("use Devel::CheckLib;" match) | |
1508 | (string-append "# " match)) | |
1509 | (("assert_lib") | |
1510 | "print")) | |
1511 | #t))) | |
1512 | ;; Tests require running MySQL server. | |
1513 | #:tests? #f)) | |
4b7857a4 RW |
1514 | (propagated-inputs |
1515 | `(("perl-dbi" ,perl-dbi) | |
1516 | ("mysql" ,mysql))) | |
9aba9b12 | 1517 | (home-page "https://metacpan.org/release/DBD-mysql") |
4b7857a4 RW |
1518 | (synopsis "DBI MySQL interface") |
1519 | (description "This package provides a MySQL driver for the Perl5 | |
1520 | @dfn{Database Interface} (DBI).") | |
2f3108ad | 1521 | (license license:perl-license))) |
4b7857a4 | 1522 | |
274da61d LC |
1523 | (define-public perl-dbd-sqlite |
1524 | (package | |
1525 | (name "perl-dbd-sqlite") | |
db4e7641 | 1526 | (version "1.58") |
274da61d LC |
1527 | (source (origin |
1528 | (method url-fetch) | |
1529 | (uri (string-append | |
1530 | "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-" | |
1531 | version ".tar.gz")) | |
1532 | (sha256 | |
1533 | (base32 | |
db4e7641 | 1534 | "0fqx386jgs9mmrknr7smmzapf07izgivza7x08lfm39ks2cxs83i")))) |
274da61d LC |
1535 | (build-system perl-build-system) |
1536 | (inputs `(("sqlite" ,sqlite))) | |
1537 | (propagated-inputs `(("perl-dbi" ,perl-dbi))) | |
1538 | (synopsis "SQlite interface for Perl") | |
1539 | (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes | |
1540 | the entire thing in the distribution. So in order to get a fast transaction | |
1541 | capable RDBMS working for your Perl project you simply have to install this | |
1542 | module, and nothing else.") | |
2f3108ad | 1543 | (license license:perl-license) |
9aba9b12 | 1544 | (home-page "https://metacpan.org/release/DBD-SQLite"))) |
14e84b2d | 1545 | |
dd90952e EB |
1546 | (define-public perl-sql-abstract |
1547 | (package | |
1548 | (name "perl-sql-abstract") | |
93e8731d | 1549 | (version "1.85") |
dd90952e EB |
1550 | (source |
1551 | (origin | |
1552 | (method url-fetch) | |
439980b7 | 1553 | (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" |
dd90952e EB |
1554 | "SQL-Abstract-" version ".tar.gz")) |
1555 | (sha256 | |
1556 | (base32 | |
93e8731d | 1557 | "1aycggrvppy2zgkwwn85jkdz93n5gsx4dambrjk67k5067hayi4z")))) |
dd90952e EB |
1558 | (build-system perl-build-system) |
1559 | (native-inputs | |
9dab5017 MB |
1560 | `(("perl-module-install" ,perl-module-install) |
1561 | ("perl-test-deep" ,perl-test-deep) | |
dd90952e EB |
1562 | ("perl-test-exception" ,perl-test-exception) |
1563 | ("perl-test-warn" ,perl-test-warn))) | |
1564 | (propagated-inputs | |
1565 | `(("perl-hash-merge" ,perl-hash-merge) | |
1566 | ("perl-moo" ,perl-moo) | |
1567 | ("perl-mro-compat" ,perl-mro-compat) | |
1568 | ("perl-text-balanced" ,perl-text-balanced))) | |
9aba9b12 | 1569 | (home-page "https://metacpan.org/release/SQL-Abstract") |
dd90952e EB |
1570 | (synopsis "Generate SQL from Perl data structures") |
1571 | (description "This module was inspired by the excellent DBIx::Abstract. | |
1572 | While based on the concepts used by DBIx::Abstract, the concepts used have | |
1573 | been modified to make the SQL easier to generate from Perl data structures. | |
1574 | The underlying idea is for this module to do what you mean, based on the data | |
1575 | structures you provide it, so that you don't have to modify your code every | |
e881752c | 1576 | time your data changes.") |
2f3108ad | 1577 | (license license:perl-license))) |
14e84b2d | 1578 | |
b4dcb026 EB |
1579 | (define-public perl-sql-splitstatement |
1580 | (package | |
1581 | (name "perl-sql-splitstatement") | |
1582 | (version "1.00020") | |
1583 | (source | |
1584 | (origin | |
1585 | (method url-fetch) | |
1586 | (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/" | |
1587 | "SQL-SplitStatement-" version ".tar.gz")) | |
1588 | (sha256 | |
1589 | (base32 | |
1590 | "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p")))) | |
1591 | (build-system perl-build-system) | |
1592 | (native-inputs | |
1593 | `(("perl-test-exception" ,perl-test-exception))) | |
1594 | (propagated-inputs | |
1595 | `(("perl-class-accessor" ,perl-class-accessor) | |
1596 | ("perl-list-moreutils" ,perl-list-moreutils) | |
1597 | ("perl-regexp-common" ,perl-regexp-common) | |
1598 | ("perl-sql-tokenizer" ,perl-sql-tokenizer))) | |
9aba9b12 | 1599 | (home-page "https://metacpan.org/release/SQL-SplitStatement") |
b4dcb026 EB |
1600 | (synopsis "Split SQL code into atomic statements") |
1601 | (description "This module tries to split any SQL code, even including | |
1602 | non-standard extensions, into the atomic statements it is composed of.") | |
2f3108ad | 1603 | (license license:perl-license))) |
b4dcb026 | 1604 | |
718c89c1 EB |
1605 | (define-public perl-sql-tokenizer |
1606 | (package | |
1607 | (name "perl-sql-tokenizer") | |
1608 | (version "0.24") | |
1609 | (source | |
1610 | (origin | |
1611 | (method url-fetch) | |
1612 | (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/" | |
1613 | "SQL-Tokenizer-" version ".tar.gz")) | |
1614 | (sha256 | |
1615 | (base32 | |
1616 | "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s")))) | |
1617 | (build-system perl-build-system) | |
9aba9b12 | 1618 | (home-page "https://metacpan.org/release/SQL-Tokenizer") |
718c89c1 EB |
1619 | (synopsis "SQL tokenizer") |
1620 | (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not | |
1621 | claim to be a parser or query verifier. It just creates sane tokens from a | |
1622 | valid SQL query.") | |
2f3108ad | 1623 | (license license:perl-license))) |
718c89c1 | 1624 | |
14e84b2d JD |
1625 | (define-public unixodbc |
1626 | (package | |
1627 | (name "unixodbc") | |
8327ffcc | 1628 | (version "2.3.7") |
14e84b2d JD |
1629 | (source (origin |
1630 | (method url-fetch) | |
e881752c | 1631 | (uri |
14e84b2d | 1632 | (string-append |
3fef0a2f EF |
1633 | "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-" |
1634 | version ".tar.gz")) | |
14e84b2d | 1635 | (sha256 |
8327ffcc | 1636 | (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5")))) |
14e84b2d JD |
1637 | (build-system gnu-build-system) |
1638 | (synopsis "Data source abstraction library") | |
1639 | (description "Unixodbc is a library providing an API with which to access | |
1640 | data sources. Data sources include SQL Servers and any software with an ODBC | |
1641 | Driver.") | |
ba8b9f8d | 1642 | (license license:lgpl2.1+) |
14e84b2d JD |
1643 | ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" |
1644 | (home-page "http://www.unixodbc.org"))) | |
b4a9c924 EB |
1645 | |
1646 | (define-public unqlite | |
1647 | (package | |
1648 | (name "unqlite") | |
1649 | (version "1.1.6") | |
1650 | (source (origin | |
1651 | (method url-fetch) | |
1652 | ;; Contains bug fixes against the official release, and has an | |
1653 | ;; autotooled build system. | |
1654 | (uri (string-append "https://github.com/aidin36/tocc/releases/" | |
1655 | "download/v1.0.0/" | |
1656 | "unqlite-unofficial-" version ".tar.gz")) | |
1657 | (sha256 | |
1658 | (base32 | |
1659 | "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s")))) | |
1660 | (build-system gnu-build-system) | |
1661 | (arguments `(#:tests? #f)) ;No check target | |
1662 | (home-page "http://www.unqlite.org") | |
1663 | (synopsis "In-memory key/value and document store") | |
1664 | (description | |
1665 | "UnQLite is an in-process software library which implements a | |
1666 | self-contained, serverless, zero-configuration, transactional NoSQL | |
1667 | database engine. UnQLite is a document store database similar to | |
1668 | MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store | |
69b4ffcf | 1669 | similar to BerkeleyDB, LevelDB, etc.") |
ba8b9f8d | 1670 | (license license:bsd-2))) |
463f6766 DT |
1671 | |
1672 | (define-public redis | |
1673 | (package | |
1674 | (name "redis") | |
793a66e5 | 1675 | (version "4.0.10") |
463f6766 DT |
1676 | (source (origin |
1677 | (method url-fetch) | |
1678 | (uri (string-append "http://download.redis.io/releases/redis-" | |
1679 | version".tar.gz")) | |
1680 | (sha256 | |
1681 | (base32 | |
793a66e5 | 1682 | "194cydhv3hf4v95ifvjvsqrs4jn3ffrkg5lvxj5d3y04lwsp9dhx")))) |
463f6766 DT |
1683 | (build-system gnu-build-system) |
1684 | (arguments | |
1685 | '(#:tests? #f ; tests related to master/slave and replication fail | |
1686 | #:phases (modify-phases %standard-phases | |
1687 | (delete 'configure)) | |
1688 | #:make-flags `("CC=gcc" | |
1689 | "MALLOC=libc" | |
b25f060f | 1690 | "LDFLAGS=-ldl" |
463f6766 DT |
1691 | ,(string-append "PREFIX=" |
1692 | (assoc-ref %outputs "out"))))) | |
1693 | (synopsis "Key-value cache and store") | |
1694 | (description "Redis is an advanced key-value cache and store. Redis | |
1695 | supports many data structures including strings, hashes, lists, sets, sorted | |
1696 | sets, bitmaps and hyperloglogs.") | |
1697 | (home-page "http://redis.io/") | |
ba8b9f8d | 1698 | (license license:bsd-3))) |
a65e2a02 | 1699 | |
1700 | (define-public kyotocabinet | |
1701 | (package | |
1702 | (name "kyotocabinet") | |
1703 | (version "1.2.76") | |
1704 | (source (origin | |
1705 | (method url-fetch) | |
1706 | (uri (string-append "http://fallabs.com/kyotocabinet/pkg/" | |
1707 | name "-" version ".tar.gz")) | |
1708 | (sha256 | |
1709 | (base32 | |
1710 | "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1")))) | |
1711 | (build-system gnu-build-system) | |
1712 | (arguments | |
1713 | `(#:configure-flags | |
1714 | (list | |
9d59023e | 1715 | "--disable-opt" ;"-march=native". XXX this also turns off -O0. |
a65e2a02 | 1716 | (string-append "LDFLAGS=-Wl,-rpath=" |
1717 | (assoc-ref %outputs "out") "/lib")))) | |
1718 | (inputs `(("zlib" ,zlib))) | |
1719 | (home-page "http://fallabs.com/kyotocabinet/") | |
1720 | (synopsis | |
1721 | "Kyoto Cabinet is a modern implementation of the DBM database") | |
1722 | (description | |
1723 | "Kyoto Cabinet is a standalone file-based database that supports Hash | |
1724 | and B+ Tree data storage models. It is a fast key-value lightweight | |
1725 | database and supports many programming languages. It is a NoSQL database.") | |
ba8b9f8d | 1726 | (license license:gpl3+))) |
6242b314 | 1727 | |
bdc11dc4 | 1728 | (define-public tokyocabinet |
1729 | (package | |
1730 | (name "tokyocabinet") | |
1731 | (version "1.4.48") | |
1732 | (source | |
1733 | (origin | |
1734 | (method url-fetch) | |
1735 | (uri (string-append "http://fallabs.com/tokyocabinet/" | |
1736 | name "-" version ".tar.gz")) | |
1737 | (sha256 | |
1738 | (base32 | |
1739 | "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0")))) | |
1740 | (build-system gnu-build-system) | |
1741 | (arguments | |
1742 | `(#:configure-flags | |
1743 | (list "--enable-pthread" "--enable-off64" "--enable-fastest" | |
1744 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1745 | (assoc-ref %outputs "out") "/lib")))) | |
1746 | (inputs | |
1747 | `(("zlib" ,zlib))) | |
1748 | (home-page "http://fallabs.com/tokyocabinet/") | |
1749 | (synopsis "Tokyo Cabinet is a modern implementation of the DBM database") | |
1750 | (description | |
1751 | "Tokyo Cabinet is a library of routines for managing a database. | |
1752 | The database is a simple data file containing records, each is a pair of a | |
1753 | key and a value. Every key and value is serial bytes with variable length. | |
1754 | Both binary data and character string can be used as a key and a value. | |
1755 | There is neither concept of data tables nor data types. Records are | |
1756 | organized in hash table, B+ tree, or fixed-length array.") | |
1757 | (license license:lgpl2.1+))) | |
1758 | ||
6242b314 SB |
1759 | (define-public wiredtiger |
1760 | (package | |
1761 | (name "wiredtiger") | |
81e95821 | 1762 | (version "2.9.1") |
6242b314 SB |
1763 | (source (origin |
1764 | (method url-fetch) | |
1765 | (uri (string-append | |
1766 | "http://source.wiredtiger.com/releases/wiredtiger-" | |
1767 | version ".tar.bz2")) | |
1768 | (sha256 | |
1769 | (base32 | |
81e95821 | 1770 | "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s")))) |
6242b314 SB |
1771 | (build-system gnu-build-system) |
1772 | (arguments | |
a469c695 | 1773 | '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib") |
6242b314 SB |
1774 | #:phases |
1775 | (modify-phases %standard-phases | |
1776 | (add-before 'check 'disable-test/fops | |
1777 | (lambda _ | |
1778 | ;; XXX: timed out after 3600 seconds of silence | |
1779 | (substitute* "Makefile" | |
1780 | (("test/fops") "")) | |
1781 | #t))))) | |
1782 | (inputs | |
1783 | `(("lz4" ,lz4) | |
3faa422d CB |
1784 | ("zlib" ,zlib) |
1785 | ("snappy" ,snappy))) | |
6242b314 SB |
1786 | (home-page "http://source.wiredtiger.com/") |
1787 | (synopsis "NoSQL data engine") | |
1788 | (description | |
1789 | "WiredTiger is an extensible platform for data management. It supports | |
1790 | row-oriented storage (where all columns of a row are stored together), | |
1791 | column-oriented storage (where columns are stored in groups, allowing for | |
1792 | more efficient access and storage of column subsets) and log-structured merge | |
1793 | trees (LSM), for sustained throughput under random insert workloads.") | |
ba8b9f8d | 1794 | (license license:gpl3) ; or GPL-2 |
6242b314 | 1795 | ;; configure.ac: WiredTiger requires a 64-bit build. |
092b7b3e | 1796 | (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")))) |
90c2ee88 | 1797 | |
4680fef7 AB |
1798 | (define-public wiredtiger-3 |
1799 | (package | |
1800 | (inherit wiredtiger) | |
1801 | (name "wiredtiger") | |
1802 | (version "3.1.0") | |
1803 | (source (origin | |
1804 | (method url-fetch) | |
1805 | (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-" | |
1806 | version ".tar.bz2")) | |
1807 | (sha256 | |
1808 | (base32 | |
1809 | "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx")))))) | |
1810 | ||
16973071 KB |
1811 | (define-public guile-wiredtiger |
1812 | (package | |
1813 | (name "guile-wiredtiger") | |
b1e6b938 | 1814 | (version "0.7.0") |
16973071 KB |
1815 | (source (origin |
1816 | (method git-fetch) | |
1817 | (uri (git-reference | |
1818 | (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git") | |
b1e6b938 | 1819 | (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b"))) |
16973071 KB |
1820 | (file-name (string-append name "-" version "-checkout")) |
1821 | (sha256 | |
1822 | (base32 | |
b1e6b938 | 1823 | "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595")))) |
16973071 KB |
1824 | (build-system gnu-build-system) |
1825 | (arguments | |
3926a099 | 1826 | '(#:parallel-tests? #f ;; tests can't be run in parallel, yet. |
16973071 KB |
1827 | #:configure-flags |
1828 | (list (string-append "--with-libwiredtiger-prefix=" | |
1829 | (assoc-ref %build-inputs "wiredtiger"))) | |
189be331 | 1830 | #:make-flags '("GUILE_AUTO_COMPILE=0"))) |
16973071 KB |
1831 | (native-inputs |
1832 | `(("autoconf" ,autoconf) | |
1833 | ("automake" ,automake) | |
1834 | ("pkg-config" ,pkg-config))) | |
1835 | (inputs | |
b1e6b938 | 1836 | `(("wiredtiger" ,wiredtiger-3) |
16973071 KB |
1837 | ("guile" ,guile-2.2))) |
1838 | (propagated-inputs | |
b1e6b938 | 1839 | `(("guile-bytestructures" ,guile-bytestructures))) |
3926a099 | 1840 | (synopsis "WiredTiger bindings for GNU Guile") |
16973071 KB |
1841 | (description |
1842 | "This package provides Guile bindings to the WiredTiger ``NoSQL'' | |
b1e6b938 | 1843 | database.") |
16973071 KB |
1844 | (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger") |
1845 | (license license:gpl3+))) | |
1846 | ||
90c2ee88 DM |
1847 | (define-public perl-db-file |
1848 | (package | |
1849 | (name "perl-db-file") | |
34ba1b8f | 1850 | (version "1.842") |
90c2ee88 DM |
1851 | (source |
1852 | (origin | |
1853 | (method url-fetch) | |
1854 | (uri (string-append | |
1855 | "mirror://cpan/authors/id/P/PM/PMQS/DB_File-" | |
1856 | version | |
1857 | ".tar.gz")) | |
1858 | (sha256 | |
1859 | (base32 | |
34ba1b8f | 1860 | "0w2d99vs9qarng2f9fpg3gchfdzy6an13507jhclcl8wv183h5hg")))) |
90c2ee88 DM |
1861 | (build-system perl-build-system) |
1862 | (inputs `(("bdb" ,bdb))) | |
1863 | (native-inputs `(("perl-test-pod" ,perl-test-pod))) | |
1864 | (arguments | |
1865 | `(#:phases (modify-phases %standard-phases | |
1866 | (add-before | |
1867 | 'configure 'modify-config.in | |
1868 | (lambda* (#:key inputs #:allow-other-keys) | |
1869 | (substitute* "config.in" | |
1870 | (("/usr/local/BerkeleyDB") (assoc-ref inputs "bdb"))) | |
1871 | #t))))) | |
9aba9b12 | 1872 | (home-page "https://metacpan.org/release/DB_File") |
90c2ee88 DM |
1873 | (synopsis |
1874 | "Perl5 access to Berkeley DB version 1.x") | |
1875 | (description | |
1876 | "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.") | |
2f3108ad | 1877 | (license license:perl-license))) |
0e1b262e DC |
1878 | |
1879 | (define-public lmdb | |
1880 | (package | |
1881 | (name "lmdb") | |
f560acf8 | 1882 | (version "0.9.22") |
0e1b262e DC |
1883 | (source (origin |
1884 | (method url-fetch) | |
1885 | (uri (string-append "https://github.com/LMDB/lmdb/archive/" | |
1886 | "LMDB_" version ".tar.gz")) | |
1887 | (sha256 | |
1888 | (base32 | |
f560acf8 | 1889 | "0a7a8535csrvw71mrgx680m5d17bnxmmhcccij30idifi1cpi4pk")))) |
0e1b262e DC |
1890 | (build-system gnu-build-system) |
1891 | (arguments | |
1892 | `(#:test-target "test" | |
1893 | #:phases | |
1894 | (modify-phases %standard-phases | |
1895 | (replace 'configure | |
1896 | (lambda* (#:key outputs #:allow-other-keys) | |
1897 | (chdir (string-append | |
1898 | (getenv "PWD") "/lmdb-LMDB_" ,version "/libraries/liblmdb")) | |
1899 | (substitute* "Makefile" | |
1900 | (("/usr/local") (assoc-ref outputs "out"))) | |
1901 | #t))))) | |
1902 | (home-page "https://symas.com/products/lightning-memory-mapped-database") | |
fda852ff TGR |
1903 | (synopsis "Lightning Memory-Mapped Database library") |
1904 | (description | |
1905 | "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance | |
1906 | transactional database. Unlike more complex relational databases, LMDB handles | |
1907 | only key-value pairs (stored as arbitrary byte arrays) and relies on the | |
1908 | underlying operating system for caching and locking, keeping the code small and | |
1909 | simple. | |
1910 | The use of ‘zero-copy’ memory-mapped files combines the persistence of classic | |
1911 | disk-based databases with high read performance that scales linearly over | |
1912 | multiple cores. The size of each database is limited only by the size of the | |
1913 | virtual address space — not physical RAM.") | |
0e1b262e | 1914 | (license license:openldap2.8))) |
fe71eee0 JN |
1915 | |
1916 | (define-public libpqxx | |
1917 | (package | |
1918 | (name "libpqxx") | |
1919 | (version "4.0.1") | |
1920 | (source (origin | |
1921 | (method url-fetch) | |
1922 | (uri (string-append | |
1923 | "http://pqxx.org/download/software/libpqxx/" | |
1924 | name "-" version ".tar.gz")) | |
1925 | (sha256 | |
1926 | (base32 | |
1927 | "0f6wxspp6rx12fkasanb0z2g2gc8dhcfwnxagx8wwqbpg6ifsz09")))) | |
1928 | (build-system gnu-build-system) | |
1929 | (native-inputs | |
1930 | `(("python" ,python-2))) | |
1931 | (inputs `(("postgresql" ,postgresql))) | |
1932 | (arguments | |
5ac097e2 MB |
1933 | `(#:tests? #f ; # FAIL: 1 |
1934 | #:phases | |
1935 | (modify-phases %standard-phases | |
1936 | (add-before 'configure 'fix-sed-command | |
1937 | (lambda _ | |
1938 | ;; Newer sed versions error out if double brackets are not used. | |
1939 | (substitute* "configure" | |
1940 | (("\\[:space:\\]") "[[:space:]]")) | |
1941 | #t))))) | |
fe71eee0 JN |
1942 | (synopsis "C++ connector for PostgreSQL") |
1943 | (description | |
1944 | "Libpqxx is a C++ library to enable user programs to communicate with the | |
1945 | PostgreSQL database back-end. The database back-end can be local or it may be | |
1946 | on another machine, accessed via TCP/IP.") | |
1947 | (home-page "http://pqxx.org/") | |
1948 | (license license:bsd-3))) | |
4d98bfaf EF |
1949 | |
1950 | (define-public python-peewee | |
1951 | (package | |
1952 | (name "python-peewee") | |
afd84536 | 1953 | (version "2.10.2") |
4d98bfaf EF |
1954 | (source |
1955 | (origin | |
1956 | (method url-fetch) | |
1957 | (uri (pypi-uri "peewee" version)) | |
1958 | (sha256 | |
1959 | (base32 | |
afd84536 | 1960 | "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3")))) |
4d98bfaf EF |
1961 | (build-system python-build-system) |
1962 | (arguments | |
1963 | `(#:tests? #f)) ; Fails to import test data | |
1964 | (native-inputs | |
1965 | `(("python-cython" ,python-cython))) | |
1966 | (home-page "https://github.com/coleifer/peewee/") | |
1967 | (synopsis "Small object-relational mapping utility") | |
1968 | (description | |
1969 | "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee | |
1970 | handles converting between pythonic values and those used by databases, so you | |
1971 | can use Python types in your code without having to worry. It has built-in | |
1972 | support for sqlite, mysql and postgresql. If you already have a database, you | |
1973 | can autogenerate peewee models using @code{pwiz}, a model generator.") | |
1974 | (license license:expat))) | |
1975 | ||
1976 | (define-public python2-peewee | |
1977 | (package-with-python2 python-peewee)) | |
62ea44fc AP |
1978 | |
1979 | (define-public sqlcipher | |
1980 | (package | |
1981 | (name "sqlcipher") | |
1982 | (version "3.3.1") | |
1983 | (source | |
1984 | (origin | |
1985 | (method url-fetch) | |
1986 | (uri (string-append "https://github.com/sqlcipher/" name | |
1987 | "/archive/v" version ".tar.gz")) | |
1988 | (sha256 | |
1989 | (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff")) | |
1990 | (file-name (string-append name "-" version ".tar.gz")))) | |
1991 | (build-system gnu-build-system) | |
1992 | (inputs | |
1993 | `(("libcrypto" ,openssl) | |
1994 | ("libtcl8.6" ,tcl))) ; required for running the tests | |
1995 | (native-inputs | |
1996 | `(("tcl" ,tcl))) | |
1997 | (arguments | |
1998 | '(#:configure-flags | |
1999 | '("--enable-tempstore=yes" | |
2000 | "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3" | |
2001 | "LDFLAGS=-lcrypto -ltcl8.6" | |
2002 | "--disable-tcl") | |
2003 | ;; tests cannot be run from the Makefile | |
2004 | ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172> | |
2005 | #:test-target "testfixture" | |
2006 | #:phases | |
2007 | (modify-phases %standard-phases | |
2008 | (add-before 'check 'build-test-runner | |
2009 | (assoc-ref %standard-phases 'check)) | |
2010 | (replace 'check | |
2011 | (lambda _ | |
2012 | (zero? | |
2013 | (system* "./testfixture" "test/crypto.test"))))))) | |
2014 | (home-page "https://www.zetetic.net/sqlcipher/") | |
2015 | (synopsis | |
2016 | "Library providing transparent encryption of SQLite database files") | |
2017 | (description "SQLCipher is an implementation of SQLite, extended to | |
2018 | provide transparent 256-bit AES encryption of database files. Pages are | |
2019 | encrypted before being written to disk and are decrypted when read back. It’s | |
2020 | well suited for protecting embedded application databases and for mobile | |
2021 | development.") | |
2022 | ;; The source files | |
2023 | ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c}, | |
2024 | ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl, | |
2025 | ;; test/crypto.test are licensed under a 3-clause BSD license. All other | |
2026 | ;; source files are in the public domain. | |
2027 | (license (list license:public-domain license:bsd-3)))) | |
98d403bb DM |
2028 | |
2029 | (define-public python-pyodbc-c | |
2030 | (package | |
2031 | (name "python-pyodbc-c") | |
c6b6a74e | 2032 | (version "3.1.4") |
98d403bb DM |
2033 | (source |
2034 | (origin | |
2035 | (method url-fetch) | |
2036 | (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/" | |
2037 | "archive.tar.gz?ref=v" version)) | |
2038 | (sha256 | |
2039 | (base32 | |
c6b6a74e | 2040 | "05aq2297k779xidmxcwkrrxjvj1bh2q7d9a1rcjv6zr15y764ga9")) |
98d403bb DM |
2041 | (file-name (string-append name "-" version ".tar.gz")))) |
2042 | (build-system python-build-system) | |
2043 | (inputs | |
2044 | `(("unixodbc" ,unixodbc))) | |
2045 | (arguments | |
2046 | `(;; No unit tests exist. | |
2047 | #:tests? #f)) | |
2048 | (home-page "https://github.com/mkleehammer/pyodbc") | |
2049 | (synopsis "Python ODBC Library") | |
2050 | (description "@code{python-pyodbc-c} provides a Python DB-API driver | |
2051 | for ODBC.") | |
2052 | (license (license:x11-style "file://LICENSE.TXT")))) | |
2053 | ||
2054 | (define-public python2-pyodbc-c | |
2055 | (package-with-python2 python-pyodbc-c)) | |
d39a84e8 | 2056 | |
41916bea DM |
2057 | (define-public python-pyodbc |
2058 | (package | |
2059 | (name "python-pyodbc") | |
725449bd | 2060 | (version "4.0.24") |
41916bea DM |
2061 | (source |
2062 | (origin | |
2063 | (method url-fetch) | |
2064 | (uri (pypi-uri "pyodbc" version)) | |
2065 | (sha256 | |
2066 | (base32 | |
725449bd | 2067 | "1m311vi7vpay1j7rkq71fpsk0gb7454k4lldk5b63hyy6yvsn9j3")) |
41916bea DM |
2068 | (file-name (string-append name "-" version ".tar.gz")))) |
2069 | (build-system python-build-system) | |
2070 | (inputs | |
2071 | `(("unixodbc" ,unixodbc))) | |
2072 | (arguments | |
2073 | `(;; No unit tests exist. | |
2074 | #:tests? #f)) | |
2075 | (home-page "https://github.com/mkleehammer/pyodbc") | |
2076 | (synopsis "Python ODBC Library") | |
2077 | (description "@code{python-pyodbc} provides a Python DB-API driver | |
2078 | for ODBC.") | |
2079 | (license (license:x11-style "file:///LICENSE.TXT")))) | |
2080 | ||
2081 | (define-public python2-pyodbc | |
2082 | (package-with-python2 python-pyodbc)) | |
2083 | ||
d39a84e8 AI |
2084 | (define-public mdbtools |
2085 | (package | |
2086 | (name "mdbtools") | |
2087 | (version "0.7.1") | |
2088 | (source | |
2089 | (origin | |
f1f1cebd RW |
2090 | (method git-fetch) |
2091 | (uri (git-reference | |
2092 | (url "https://github.com/brianb/mdbtools.git") | |
2093 | (commit version))) | |
2094 | (file-name (git-file-name name version)) | |
d39a84e8 AI |
2095 | (sha256 |
2096 | (base32 | |
f1f1cebd | 2097 | "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l")))) |
d39a84e8 AI |
2098 | (build-system gnu-build-system) |
2099 | (inputs | |
2100 | `(("glib" ,glib))) | |
2101 | (native-inputs | |
2102 | `(("autoconf" ,autoconf) | |
2103 | ("automake" ,automake) | |
2104 | ("libtool" ,libtool) | |
2105 | ("pkg-config" ,pkg-config) | |
2106 | ("txt2man" ,txt2man) | |
2107 | ("which" ,which))) | |
d39a84e8 AI |
2108 | (home-page "http://mdbtools.sourceforge.net/") |
2109 | (synopsis "Read Microsoft Access databases") | |
2110 | (description "MDB Tools is a set of tools and applications to read the | |
2111 | proprietary MDB file format used in Microsoft's Access database package. This | |
2112 | includes programs to export schema and data from Microsoft's Access database | |
2113 | file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL, | |
2114 | etc., and an SQL engine for performing simple SQL queries.") | |
2115 | (license (list license:lgpl2.0 | |
2116 | license:gpl2+)))) | |
07041d95 TGR |
2117 | |
2118 | (define-public python-lmdb | |
2119 | (package | |
2120 | (name "python-lmdb") | |
3b295d3f | 2121 | (version "0.94") |
07041d95 TGR |
2122 | (source (origin |
2123 | (method url-fetch) | |
2124 | (uri (pypi-uri "lmdb" version)) | |
2125 | (sha256 | |
2126 | (base32 | |
3b295d3f | 2127 | "1zh38gvkqw1jm5105if6rr7ccbgyxr7k2rm5ygb9ab3bq82pyaww")) |
07041d95 TGR |
2128 | (modules '((guix build utils))) |
2129 | (snippet | |
2130 | ;; Delete bundled lmdb source files. | |
6cbee49d MW |
2131 | '(begin |
2132 | (for-each delete-file (list "lib/lmdb.h" | |
2133 | "lib/mdb.c" | |
2134 | "lib/midl.c" | |
2135 | "lib/midl.h")) | |
2136 | #t)))) | |
07041d95 TGR |
2137 | (build-system python-build-system) |
2138 | (inputs | |
2139 | `(("lmdb" ,lmdb))) | |
2140 | (arguments | |
2141 | `(#:phases | |
2142 | (modify-phases %standard-phases | |
2143 | (add-before 'build 'use-system-lmdb | |
2144 | (lambda* (#:key inputs #:allow-other-keys) | |
2145 | (let ((lmdb (assoc-ref inputs "lmdb"))) | |
2146 | (setenv "LMDB_FORCE_SYSTEM" "set") | |
2147 | (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include")) | |
2148 | (setenv "LMDB_LIBDIR" (string-append lmdb "/lib")) | |
2149 | #t)))) | |
2150 | ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’. | |
2151 | #:tests? #f)) | |
2152 | (home-page "https://github.com/dw/py-lmdb") | |
2153 | (synopsis "Python binding for the ‘Lightning’ database (LMDB)") | |
2154 | (description | |
2155 | "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning | |
2156 | Memory-Mapped Database} (LMDB), a high-performance key-value store.") | |
2157 | (license | |
2158 | (list license:openldap2.8 | |
2159 | ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3, | |
2160 | ;; but not actually needed on platforms currently supported by Guix. | |
2161 | license:bsd-3)))) | |
2162 | ||
2163 | (define-public python2-lmdb | |
2164 | (package-with-python2 python-lmdb)) | |
da1f7a9e BW |
2165 | |
2166 | (define-public python-orator | |
2167 | (package | |
2168 | (name "python-orator") | |
2169 | (version "0.9.7") | |
2170 | (source (origin | |
2171 | (method url-fetch) | |
2172 | (uri (pypi-uri "orator" version)) | |
2173 | (sha256 | |
2174 | (base32 | |
2175 | "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c")))) | |
2176 | (build-system python-build-system) | |
2177 | (arguments | |
2178 | `(#:phases | |
2179 | (modify-phases %standard-phases | |
2180 | (add-after 'unpack 'loosen-dependencies | |
2181 | ;; Tests are not actually run since they are not included with the | |
2182 | ;; distributed package, but dependencies are checked. | |
2183 | (lambda _ | |
2184 | (substitute* "setup.py" | |
2185 | ((",<.*'") "'") | |
2186 | (("flexmock==0.9.7") "flexmock") | |
2187 | ;; The pytest-mock package is out of date, so we remove minimum | |
2188 | ;; version requirement. | |
2189 | (("pytest-mock.*'") "pytest-mock'")) | |
2190 | #t))))) | |
2191 | (native-inputs | |
2192 | `(("python-pytest-mock" ,python-pytest-mock) | |
928da609 | 2193 | ("python-pytest" ,python-pytest) |
da1f7a9e BW |
2194 | ("python-flexmock" ,python-flexmock))) |
2195 | (propagated-inputs | |
2196 | `(("python-backpack" ,python-backpack) | |
2197 | ("python-blinker" ,python-blinker) | |
2198 | ("python-cleo" ,python-cleo) | |
2199 | ("python-faker" ,python-faker) | |
2200 | ("python-inflection" ,python-inflection) | |
2201 | ("python-lazy-object-proxy" ,python-lazy-object-proxy) | |
2202 | ("python-pendulum" ,python-pendulum) | |
2203 | ("python-pyaml" ,python-pyaml) | |
2204 | ("python-pygments" ,python-pygments) | |
2205 | ("python-simplejson" ,python-simplejson) | |
2206 | ("python-six" ,python-six) | |
2207 | ("python-wrapt" ,python-wrapt))) | |
2208 | (home-page "https://orator-orm.com/") | |
2209 | (synopsis "ActiveRecord ORM for Python") | |
2210 | (description | |
2211 | "Orator provides a simple ActiveRecord-like Object Relational Mapping | |
2212 | implementation for Python.") | |
2213 | (license license:expat) | |
2214 | (properties `((python2-variant . ,(delay python2-orator)))))) | |
2215 | ||
2216 | (define-public python2-orator | |
2217 | (package-with-python2 (strip-python2-variant python-orator))) | |
61ce0998 RJ |
2218 | |
2219 | (define-public virtuoso-ose | |
2220 | (package | |
2221 | (name "virtuoso-ose") | |
e63da346 | 2222 | (version "7.2.5") |
61ce0998 RJ |
2223 | (source |
2224 | (origin | |
2225 | (method url-fetch) | |
2226 | (uri (string-append | |
2227 | "https://github.com/openlink/virtuoso-opensource/releases/" | |
2228 | "download/v" version "/virtuoso-opensource-" version ".tar.gz")) | |
2229 | (sha256 | |
e63da346 | 2230 | (base32 "0r1xakclkfi69pzh8z2k16z3x0m49pxp764icj0ad4w4bb97fr42")))) |
61ce0998 RJ |
2231 | (build-system gnu-build-system) |
2232 | (arguments | |
6d09a7b5 RJ |
2233 | `(#:tests? #f ; Tests require a network connection. |
2234 | ;; TODO: Removing the libsrc/zlib source directory breaks the build. | |
2235 | ;; This indicates that the internal zlib code may still be used. | |
2236 | #:configure-flags '("--without-internal-zlib" | |
2237 | "--with-readline"))) | |
61ce0998 RJ |
2238 | (inputs |
2239 | `(("openssl" ,openssl) | |
6d09a7b5 RJ |
2240 | ("net-tools" ,net-tools) |
2241 | ("readline" ,readline) | |
2242 | ("zlib" ,zlib))) | |
61ce0998 RJ |
2243 | (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/") |
2244 | (synopsis "Multi-model database system") | |
2245 | (description "Virtuoso is a scalable cross-platform server that combines | |
2246 | relational, graph, and document data management with web application server | |
2247 | and web services platform functionality.") | |
48b68c61 EF |
2248 | ;; configure: error: ... can only be build on 64bit platforms |
2249 | (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")) | |
61ce0998 | 2250 | (license license:gpl2))) |
74248d22 RW |
2251 | |
2252 | (define-public r-rmysql | |
2253 | (package | |
2254 | (name "r-rmysql") | |
ad016826 | 2255 | (version "0.10.15") |
74248d22 RW |
2256 | (source |
2257 | (origin | |
2258 | (method url-fetch) | |
2259 | (uri (cran-uri "RMySQL" version)) | |
2260 | (sha256 | |
2261 | (base32 | |
ad016826 | 2262 | "0bmc7w5fnkjaf333sgc0hskiy332m9gmfaxg0yzkjxscpizdw43n")))) |
74248d22 RW |
2263 | (properties `((upstream-name . "RMySQL"))) |
2264 | (build-system r-build-system) | |
2265 | (native-inputs | |
2266 | `(("pkg-config" ,pkg-config))) | |
2267 | (inputs | |
2268 | `(("mariadb" ,mariadb) | |
2269 | ("zlib" ,zlib))) | |
2270 | (propagated-inputs | |
2271 | `(("r-dbi" ,r-dbi))) | |
2272 | (home-page "https://github.com/r-dbi/RMySQL") | |
2273 | (synopsis "Database interface and MySQL driver for R") | |
2274 | (description | |
2275 | "This package provides a DBI interface to MySQL / MariaDB. The RMySQL | |
2276 | package contains an old implementation based on legacy code from S-PLUS which | |
2277 | is being phased out. A modern MySQL client based on Rcpp is available from | |
2278 | the RMariaDB package.") | |
2279 | (license license:gpl2))) | |
a8714bf6 RW |
2280 | |
2281 | (define-public python-ccm | |
2282 | (package | |
2283 | (name "python-ccm") | |
2284 | (version "2.1.6") | |
2285 | (source | |
2286 | (origin | |
2287 | (method url-fetch) | |
2288 | (uri (pypi-uri "ccm" version)) | |
2289 | (sha256 | |
2290 | (base32 | |
2291 | "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n")))) | |
2292 | (build-system python-build-system) | |
2293 | (propagated-inputs | |
2294 | `(("python-pyyaml" ,python-pyyaml) | |
2295 | ;; Not listed in setup.py, but used in ccmlib/node.py for full | |
2296 | ;; functionality | |
2297 | ("python-psutil" ,python-psutil) | |
2298 | ("python-six" ,python-six))) | |
2299 | (home-page "https://github.com/pcmanus/ccm") | |
2300 | (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on | |
2301 | localhost") | |
2302 | (description "Cassandra Cluster Manager is a development tool for testing | |
2303 | local Cassandra clusters. It creates, launches and removes Cassandra clusters | |
2304 | on localhost.") | |
2305 | (license license:asl2.0))) | |
2306 | ||
2307 | (define-public python2-ccm | |
2308 | (package-with-python2 python-ccm)) | |
2309 | ||
2310 | (define-public python2-pysqlite | |
2311 | (package | |
2312 | (name "python2-pysqlite") | |
2313 | (version "2.8.3") | |
2314 | (source | |
2315 | (origin | |
2316 | (method url-fetch) | |
2317 | (uri (pypi-uri "pysqlite" version)) | |
2318 | (sha256 | |
2319 | (base32 | |
2320 | "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp")))) | |
2321 | (build-system python-build-system) | |
2322 | (inputs | |
2323 | `(("sqlite" ,sqlite))) | |
2324 | (arguments | |
2325 | `(#:python ,python-2 ; incompatible with Python 3 | |
2326 | #:tests? #f)) ; no test target | |
2327 | (home-page "https://github.com/ghaering/pysqlite") | |
2328 | (synopsis "SQLite bindings for Python") | |
2329 | (description | |
2330 | "Pysqlite provides SQLite bindings for Python that comply to the | |
2331 | Database API 2.0T.") | |
2332 | (license license:zlib))) | |
2333 | ||
2334 | (define-public python-sqlalchemy | |
2335 | (package | |
2336 | (name "python-sqlalchemy") | |
2be1b754 | 2337 | (version "1.2.11") |
a8714bf6 RW |
2338 | (source |
2339 | (origin | |
2340 | (method url-fetch) | |
2341 | (uri (string-append "https://pypi.python.org/packages/source/S/" | |
2342 | "SQLAlchemy/SQLAlchemy-" version ".tar.gz")) | |
2343 | (sha256 | |
2344 | (base32 | |
2be1b754 | 2345 | "094mmbs4igrxplfyqd59j90jb83ixpbbzqc0w49yw81m82nnjrgg")))) |
a8714bf6 RW |
2346 | (build-system python-build-system) |
2347 | (native-inputs | |
2348 | `(("python-cython" ,python-cython) ;for c extensions | |
2349 | ("python-pytest" ,python-pytest) | |
2350 | ("python-mock" ,python-mock))) ;for tests | |
2351 | (arguments | |
2352 | `(#:phases | |
2353 | (modify-phases %standard-phases | |
2354 | (replace 'check | |
9871a896 | 2355 | (lambda _ (invoke "py.test")))))) |
a8714bf6 RW |
2356 | (home-page "http://www.sqlalchemy.org") |
2357 | (synopsis "Database abstraction library") | |
2358 | (description | |
2359 | "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that | |
2360 | gives application developers the full power and flexibility of SQL. It | |
2361 | provides a full suite of well known enterprise-level persistence patterns, | |
2362 | designed for efficient and high-performing database access, adapted into a | |
2363 | simple and Pythonic domain language.") | |
2364 | (license license:x11))) | |
2365 | ||
2366 | (define-public python2-sqlalchemy | |
2367 | (package-with-python2 python-sqlalchemy)) | |
2368 | ||
2369 | (define-public python-sqlalchemy-utils | |
2370 | (package | |
2371 | (name "python-sqlalchemy-utils") | |
53ae35e4 | 2372 | (version "0.32.21") |
a8714bf6 RW |
2373 | (source |
2374 | (origin | |
2375 | (method url-fetch) | |
2376 | (uri (pypi-uri "SQLAlchemy-Utils" version)) | |
2377 | (sha256 | |
2378 | (base32 | |
53ae35e4 | 2379 | "1myn71dn8j74xglyh46f12sh8ywb7j0j732rzwq70kvwwnq32m73")))) |
a8714bf6 RW |
2380 | (build-system python-build-system) |
2381 | (arguments | |
2382 | '(#:tests? #f)) ; FIXME: Many tests require a running database server. | |
2383 | ;; #:phases | |
2384 | ;; (modify-phases %standard-phases | |
2385 | ;; (replace 'check | |
2386 | ;; (lambda _ | |
2387 | ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests"))))) | |
2388 | (propagated-inputs | |
2389 | `(("python-six" ,python-six) | |
2390 | ("python-sqlalchemy" ,python-sqlalchemy))) | |
2391 | (native-inputs | |
2392 | `(("python-dateutil" ,python-dateutil) | |
2393 | ("python-flexmock" ,python-flexmock) | |
2394 | ("python-psycopg2" ,python-psycopg2) | |
2395 | ("python-pytest" ,python-pytest) | |
2396 | ("python-pytz" ,python-pytz))) | |
2397 | (home-page "https://github.com/kvesteri/sqlalchemy-utils") | |
2398 | (synopsis "Various utility functions for SQLAlchemy") | |
2399 | (description | |
2400 | "SQLAlchemy-utils provides various utility functions and custom data types | |
2401 | for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python. | |
2402 | ||
2403 | You might also want to install the following optional dependencies: | |
2404 | @enumerate | |
2405 | @item @code{python-passlib} | |
2406 | @item @code{python-babel} | |
2407 | @item @code{python-cryptography} | |
2408 | @item @code{python-pytz} | |
2409 | @item @code{python-psycopg2} | |
2410 | @item @code{python-furl} | |
2411 | @item @code{python-flask-babel} | |
2412 | @end enumerate | |
2413 | ") | |
2414 | (license license:bsd-3))) | |
2415 | ||
2416 | (define-public python2-sqlalchemy-utils | |
2417 | (package-with-python2 python-sqlalchemy-utils)) | |
2418 | ||
2419 | (define-public python-alembic | |
2420 | (package | |
2421 | (name "python-alembic") | |
c92d056a | 2422 | (version "1.0.2") |
a8714bf6 RW |
2423 | (source |
2424 | (origin | |
2425 | (method url-fetch) | |
2426 | (uri (pypi-uri "alembic" version)) | |
2427 | (sha256 | |
2428 | (base32 | |
c92d056a | 2429 | "0asqz9mwc4w8bsar1icv3ik9jslxrj3gv3yxgmhc6nc6r9qbkg04")))) |
a8714bf6 RW |
2430 | (build-system python-build-system) |
2431 | (native-inputs | |
2432 | `(("python-mock" ,python-mock) | |
2433 | ("python-pytest-cov" ,python-pytest-cov))) | |
2434 | (propagated-inputs | |
2435 | `(("python-dateutil" ,python-dateutil) | |
2436 | ("python-sqlalchemy" ,python-sqlalchemy) | |
2437 | ("python-mako" ,python-mako) | |
2438 | ("python-editor" ,python-editor))) | |
a7f27da7 | 2439 | (home-page "https://bitbucket.org/zzzeek/alembic") |
a8714bf6 RW |
2440 | (synopsis |
2441 | "Database migration tool for SQLAlchemy") | |
2442 | (description | |
2443 | "Alembic is a lightweight database migration tool for usage with the | |
2444 | SQLAlchemy Database Toolkit for Python.") | |
2445 | (license license:expat))) | |
2446 | ||
2447 | (define-public python2-alembic | |
2448 | (package-with-python2 python-alembic)) | |
2449 | ||
2450 | (define-public python-pickleshare | |
2451 | (package | |
2452 | (name "python-pickleshare") | |
f825faa5 | 2453 | (version "0.7.5") |
a8714bf6 RW |
2454 | (source |
2455 | (origin | |
2456 | (method url-fetch) | |
ed519b3c | 2457 | (uri (pypi-uri "pickleshare" version)) |
a8714bf6 | 2458 | (sha256 |
f825faa5 | 2459 | (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47")))) |
a8714bf6 | 2460 | (build-system python-build-system) |
ff856cfd MB |
2461 | (arguments |
2462 | `(#:phases (modify-phases %standard-phases | |
2463 | (replace 'check | |
2464 | (lambda _ | |
2465 | (invoke "pytest")))))) | |
2466 | (native-inputs | |
2467 | `(("python-pytest" ,python-pytest))) | |
a8714bf6 RW |
2468 | (home-page "https://github.com/vivainio/pickleshare") |
2469 | (synopsis "Tiny key value database with concurrency support") | |
2470 | (description | |
2471 | "PickleShare is a small ‘shelve’-like datastore with concurrency support. | |
2472 | Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike | |
2473 | shelve, many processes can access the database simultaneously. Changing a | |
2474 | value in database is immediately visible to other processes accessing the same | |
2475 | database. Concurrency is possible because the values are stored in separate | |
2476 | files. Hence the “database” is a directory where all files are governed by | |
2477 | PickleShare.") | |
ed519b3c | 2478 | (properties `((python2-variant . ,(delay python2-pickleshare)))) |
a8714bf6 RW |
2479 | (license license:expat))) |
2480 | ||
2481 | (define-public python2-pickleshare | |
ed519b3c MB |
2482 | (let ((pickleshare (package-with-python2 |
2483 | (strip-python2-variant python-pickleshare)))) | |
2484 | (package (inherit pickleshare) | |
2485 | (propagated-inputs `(("python2-pathlib2" ,python2-pathlib2) | |
2486 | ,@(package-propagated-inputs pickleshare)))))) | |
a8714bf6 RW |
2487 | |
2488 | (define-public python-apsw | |
2489 | (package | |
2490 | (name "python-apsw") | |
2dd12924 | 2491 | (version "3.20.1-r1") |
a8714bf6 RW |
2492 | (source |
2493 | (origin | |
2494 | (method url-fetch) | |
2dd12924 MB |
2495 | (uri (string-append "https://github.com/rogerbinns/apsw/archive/" |
2496 | version ".tar.gz")) | |
f5c847eb | 2497 | (file-name (string-append "apsw-" version ".tar.gz")) |
a8714bf6 RW |
2498 | (sha256 |
2499 | (base32 | |
2dd12924 | 2500 | "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2")))) |
a8714bf6 RW |
2501 | (build-system python-build-system) |
2502 | (inputs | |
c553b08b | 2503 | `(("sqlite" ,sqlite))) |
a8714bf6 RW |
2504 | (arguments |
2505 | `(#:phases | |
2506 | (modify-phases %standard-phases | |
2507 | (replace 'build | |
2508 | (lambda _ | |
c553b08b EF |
2509 | (invoke "python" "setup.py" "build" "--enable-all-extensions") |
2510 | #t)) | |
a8714bf6 RW |
2511 | (add-after 'build 'build-test-helper |
2512 | (lambda _ | |
c553b08b EF |
2513 | (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext" |
2514 | "-I." "-Isqlite3" "src/testextension.c") | |
2515 | #t)) | |
a8714bf6 RW |
2516 | (delete 'check) |
2517 | (add-after 'install 'check | |
2518 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2519 | (add-installed-pythonpath inputs outputs) | |
c553b08b EF |
2520 | (invoke "python" "setup.py" "test") |
2521 | #t))))) | |
a8714bf6 RW |
2522 | (home-page "https://github.com/rogerbinns/apsw/") |
2523 | (synopsis "Another Python SQLite Wrapper") | |
2524 | (description "APSW is a Python wrapper for the SQLite | |
2525 | embedded relational database engine. In contrast to other wrappers such as | |
2526 | pysqlite it focuses on being a minimal layer over SQLite attempting just to | |
2527 | translate the complete SQLite API into Python.") | |
2528 | (license license:zlib))) | |
2529 | ||
2530 | (define-public python2-apsw | |
2531 | (package-with-python2 python-apsw)) | |
2532 | ||
2533 | (define-public python2-neo4j-driver | |
2534 | (package | |
2535 | (name "python2-neo4j-driver") | |
2536 | ;; NOTE: When upgrading to 1.5.0, please add a python3 variant. | |
2537 | (version "1.4.0") | |
2538 | (source (origin | |
2539 | (method url-fetch) | |
2540 | (uri (pypi-uri "neo4j-driver" version)) | |
2541 | (sha256 | |
2542 | (base32 | |
2543 | "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98")))) | |
2544 | (build-system python-build-system) | |
2545 | (arguments | |
2546 | `(#:python ,python-2)) | |
2547 | (home-page "https://neo4j.com/developer/python/") | |
2548 | (synopsis "Neo4j driver code written in Python") | |
2549 | (description "This package provides the Neo4j Python driver that connects | |
2550 | to the database using Neo4j's binary protocol. It aims to be minimal, while | |
2551 | being idiomatic to Python.") | |
2552 | (license license:asl2.0))) | |
2553 | ||
2554 | (define-public python2-py2neo | |
2555 | (package | |
2556 | (name "python2-py2neo") | |
2557 | (version "3.1.2") | |
2558 | (source (origin | |
2559 | (method url-fetch) | |
2560 | (uri (pypi-uri "py2neo" version)) | |
2561 | (sha256 | |
2562 | (base32 | |
2563 | "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1")))) | |
2564 | (build-system python-build-system) | |
2565 | (arguments | |
2566 | `(#:python ,python-2)) | |
2567 | (home-page "http://py2neo.org") | |
2568 | (synopsis "Library and toolkit for working with Neo4j in Python") | |
2569 | (description "This package provides a client library and toolkit for | |
2570 | working with Neo4j from within Python applications and from the command | |
2571 | line. The core library has no external dependencies and has been carefully | |
2572 | designed to be easy and intuitive to use.") | |
2573 | (license license:asl2.0))) | |
2574 | ||
2575 | (define-public python-psycopg2 | |
2576 | (package | |
2577 | (name "python-psycopg2") | |
19601e89 | 2578 | (version "2.7.5") |
a8714bf6 RW |
2579 | (source |
2580 | (origin | |
2581 | (method url-fetch) | |
2582 | (uri (pypi-uri "psycopg2" version)) | |
2583 | (sha256 | |
2584 | (base32 | |
19601e89 | 2585 | "17klx964gw8z0znl0raz3by8vdc7cq5gxj4pdcrfcina84nrdkzc")))) |
a8714bf6 RW |
2586 | (build-system python-build-system) |
2587 | (arguments | |
2588 | ;; Tests would require a postgresql database "psycopg2_test" | |
2589 | ;; and a running postgresql database management service. | |
2590 | `(#:tests? #f)) ; TODO re-enable after providing a test-db. | |
2591 | (inputs | |
2592 | `(("postgresql" ,postgresql))) ; libpq | |
2593 | (home-page "http://initd.org/psycopg/") | |
2594 | (synopsis "Python PostgreSQL adapter") | |
2595 | (description | |
19601e89 BW |
2596 | "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API |
2597 | 2.0.") | |
a8714bf6 RW |
2598 | (license license:lgpl3+))) |
2599 | ||
2600 | (define-public python2-psycopg2 | |
2601 | (package-with-python2 python-psycopg2)) | |
2602 | ||
2603 | (define-public python-sadisplay | |
2604 | (package | |
2605 | (name "python-sadisplay") | |
bcdc5cae | 2606 | (version "0.4.8") |
a8714bf6 RW |
2607 | (source |
2608 | (origin | |
2609 | (method url-fetch) | |
2610 | (uri (pypi-uri "sadisplay" version)) | |
2611 | (sha256 | |
2612 | (base32 | |
bcdc5cae | 2613 | "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4")))) |
a8714bf6 RW |
2614 | (build-system python-build-system) |
2615 | (propagated-inputs | |
2616 | `(("python-sqlalchemy" ,python-sqlalchemy))) | |
2617 | (native-inputs | |
bcdc5cae | 2618 | ;; For tests. |
a8714bf6 RW |
2619 | `(("python-nose" ,python-nose))) |
2620 | (home-page "https://bitbucket.org/estin/sadisplay") | |
2621 | (synopsis "SQLAlchemy schema displayer") | |
2622 | (description "This package provides a program to build Entity | |
2623 | Relationship diagrams from a SQLAlchemy model (or directly from the | |
2624 | database).") | |
2625 | (license license:bsd-3))) | |
2626 | ||
2627 | (define-public python2-sadisplay | |
2628 | (package-with-python2 python-sadisplay)) | |
2629 | ||
2630 | (define-public python-mysqlclient | |
2631 | (package | |
2632 | (name "python-mysqlclient") | |
28635e52 | 2633 | (version "1.3.13") |
a8714bf6 RW |
2634 | (source |
2635 | (origin | |
2636 | (method url-fetch) | |
2637 | (uri (pypi-uri "mysqlclient" version)) | |
2638 | (sha256 | |
2639 | (base32 | |
28635e52 | 2640 | "0kv4a1icwdav8jpl7qvnr931lw5h3v22ids6lwq6qpi1hjzf33pz")))) |
a8714bf6 RW |
2641 | (build-system python-build-system) |
2642 | (native-inputs | |
2643 | `(("mariadb" ,mariadb) | |
2644 | ("nose" ,python-nose) | |
2645 | ("mock" ,python-mock) | |
2646 | ("py.test" ,python-pytest))) | |
2647 | (inputs | |
2648 | `(("mysql" ,mysql) | |
2649 | ("libz" ,zlib) | |
2650 | ("openssl" ,openssl))) | |
2651 | (home-page "https://github.com/PyMySQL/mysqlclient-python") | |
2652 | (synopsis "MySQLdb is an interface to the popular MySQL database server for Python") | |
2653 | (description "MySQLdb is an interface to the popular MySQL database server | |
2654 | for Python. The design goals are: | |
2655 | @enumerate | |
2656 | @item Compliance with Python database API version 2.0 [PEP-0249], | |
2657 | @item Thread-safety, | |
2658 | @item Thread-friendliness (threads will not block each other). | |
2659 | @end enumerate") | |
2660 | (license license:gpl2))) | |
2661 | ||
2662 | (define-public python2-mysqlclient | |
2663 | (package-with-python2 python-mysqlclient)) | |
2664 | ||
2665 | (define-public python-hiredis | |
2666 | (package | |
2667 | (name "python-hiredis") | |
2668 | (version "0.2.0") | |
2669 | (source | |
2670 | (origin | |
2671 | (method url-fetch) | |
2672 | (uri (pypi-uri "hiredis" version)) | |
2673 | (sha256 | |
2674 | (base32 | |
2675 | "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa")))) | |
2676 | (build-system python-build-system) | |
2677 | (arguments | |
2678 | ;; no tests | |
2679 | `(#:tests? #f)) | |
2680 | (home-page "https://github.com/redis/hiredis-py") | |
2681 | (synopsis "Python extension that wraps protocol parsing code in hiredis") | |
2682 | (description "Python-hiredis is a python extension that wraps protocol | |
2683 | parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.") | |
2684 | (license license:bsd-3))) | |
2685 | ||
2686 | (define-public python2-hiredis | |
2687 | (package-with-python2 python-hiredis)) | |
2688 | ||
2689 | (define-public python-fakeredis | |
2690 | (package | |
2691 | (name "python-fakeredis") | |
2692 | (version "0.8.2") | |
2693 | (source | |
2694 | (origin | |
2695 | (method url-fetch) | |
2696 | (uri (pypi-uri "fakeredis" version)) | |
2697 | (sha256 | |
2698 | (base32 | |
2699 | "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r")))) | |
2700 | (build-system python-build-system) | |
2701 | (arguments | |
2702 | ;; no tests | |
2703 | `(#:tests? #f)) | |
2704 | (home-page "https://github.com/jamesls/fakeredis") | |
2705 | (synopsis "Fake implementation of redis API for testing purposes") | |
a4764ff0 TGR |
2706 | (description |
2707 | "Fakeredis is a pure-Python implementation of the redis-py Python client | |
2708 | that simulates talking to a redis server. It was created for a single purpose: | |
2709 | to write unit tests. | |
2710 | ||
2711 | Setting up redis is not hard, but one often wants to write unit tests that don't | |
2712 | talk to an external server such as redis. This module can be used as a | |
2713 | reasonable substitute.") | |
a8714bf6 RW |
2714 | (license license:bsd-3))) |
2715 | ||
2716 | (define-public python2-fakeredis | |
2717 | (package-with-python2 python-fakeredis)) | |
2718 | ||
2719 | (define-public python-redis | |
2720 | (package | |
2721 | (name "python-redis") | |
08455a34 | 2722 | (version "2.10.6") |
a8714bf6 RW |
2723 | (source |
2724 | (origin | |
2725 | (method url-fetch) | |
2726 | (uri (pypi-uri "redis" version)) | |
2727 | (sha256 | |
08455a34 | 2728 | (base32 "03vcgklykny0g0wpvqmy8p6azi2s078317wgb2xjv5m2rs9sjb52")))) |
a8714bf6 RW |
2729 | (build-system python-build-system) |
2730 | ;; Tests require a running Redis server | |
2731 | (arguments '(#:tests? #f)) | |
2732 | ;; As long as we are not running test, we do not need this input :-) | |
2733 | ;;(native-inputs | |
2734 | ;; `(("python-pytest" ,python-pytest))) | |
2735 | (home-page "https://github.com/andymccurdy/redis-py") | |
2736 | (synopsis "Redis Python client") | |
2737 | (description | |
2738 | "This package provides a Python interface to the Redis key-value store.") | |
2739 | (license license:expat))) | |
2740 | ||
2741 | (define-public python2-redis | |
2742 | (package-with-python2 python-redis)) | |
2743 | ||
2744 | (define-public python-rq | |
2745 | (package | |
2746 | (name "python-rq") | |
22d04ced | 2747 | (version "0.12.0") |
a8714bf6 RW |
2748 | (source |
2749 | (origin | |
2750 | (method url-fetch) | |
2751 | (uri (pypi-uri "rq" version)) | |
2752 | (sha256 | |
22d04ced | 2753 | (base32 "16d8kni57xlnah2hawy4xgw21xrv3f64j5q5shyp3zxx4yd9iibs")))) |
a8714bf6 RW |
2754 | (build-system python-build-system) |
2755 | (propagated-inputs | |
2756 | `(("python-click" ,python-click) | |
2757 | ("python-redis" ,python-redis))) | |
2758 | (home-page "http://python-rq.org/") | |
2759 | (synopsis "Simple job queues for Python") | |
2760 | (description | |
2761 | "RQ (Redis Queue) is a simple Python library for queueing jobs and | |
2762 | processing them in the background with workers. It is backed by Redis and it | |
2763 | is designed to have a low barrier to entry.") | |
2764 | (license license:bsd-2))) | |
2765 | ||
2766 | (define-public python2-rq | |
2767 | (package-with-python2 python-rq)) | |
2768 | ||
2769 | (define-public python-trollius-redis | |
2770 | (package | |
2771 | (name "python-trollius-redis") | |
2772 | (version "0.1.4") | |
2773 | (source | |
2774 | (origin | |
2775 | (method url-fetch) | |
2776 | (uri (pypi-uri "trollius_redis" version)) | |
2777 | (sha256 | |
2778 | (base32 | |
2779 | "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy")))) | |
2780 | (build-system python-build-system) | |
2781 | ;; TODO: Tests require packaging 'hiredis'. | |
2782 | (arguments '(#:tests? #f)) | |
2783 | (home-page "https://github.com/benjolitz/trollius-redis") | |
2784 | (synopsis "Port of asyncio-redis to trollius") | |
2785 | (description "@code{trollius-redis} is a Redis client for Python | |
2786 | trollius. It is an asynchronious IO (PEP 3156) implementation of the | |
2787 | Redis protocol.") | |
2788 | (license license:bsd-2))) | |
2789 | ||
2790 | (define-public python2-trollius-redis | |
2791 | (package-with-python2 python-trollius-redis)) | |
2792 | ||
2793 | (define-public python-sqlparse | |
2794 | (package | |
2795 | (name "python-sqlparse") | |
2796 | (version "0.2.4") | |
2797 | (source (origin | |
2798 | (method url-fetch) | |
2799 | (uri (pypi-uri "sqlparse" version)) | |
2800 | (sha256 | |
2801 | (base32 | |
2802 | "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf")))) | |
2803 | (build-system python-build-system) | |
2804 | (arguments | |
2805 | `(#:phases | |
2806 | (modify-phases %standard-phases | |
2807 | (replace 'check | |
2808 | (lambda _ (zero? (system* "py.test"))))))) | |
2809 | (native-inputs | |
2810 | `(("python-pytest" ,python-pytest))) | |
2811 | (home-page "https://github.com/andialbrecht/sqlparse") | |
2812 | (synopsis "Non-validating SQL parser") | |
2813 | (description "Sqlparse is a non-validating SQL parser for Python. It | |
2814 | provides support for parsing, splitting and formatting SQL statements.") | |
2815 | (license license:bsd-3))) | |
2816 | ||
2817 | (define-public python2-sqlparse | |
2818 | (package-with-python2 python-sqlparse)) | |
2819 | ||
2820 | (define-public python-sql | |
2821 | (package | |
2822 | (name "python-sql") | |
2823 | (version "0.9") | |
2824 | (source | |
2825 | (origin | |
2826 | (method url-fetch) | |
2827 | (uri (pypi-uri "python-sql" version)) | |
2828 | (sha256 | |
2829 | (base32 | |
2830 | "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87")))) | |
2831 | (build-system python-build-system) | |
2832 | (home-page "https://python-sql.tryton.org/") | |
2833 | (synopsis "Library to write SQL queries in a pythonic way") | |
2834 | (description "@code{python-sql} is a library to write SQL queries, that | |
2835 | transforms idiomatic python function calls to well-formed SQL queries.") | |
2836 | (license license:bsd-3))) | |
2837 | ||
2838 | (define-public python2-sql | |
2839 | (package-with-python2 python-sql)) | |
33c88fcb CB |
2840 | |
2841 | (define-public mongo-tools | |
2842 | (package | |
2843 | (name "mongo-tools") | |
2844 | (version "3.4.0") | |
2845 | (source | |
2846 | (origin (method git-fetch) | |
2847 | (uri (git-reference | |
2848 | (url "https://github.com/mongodb/mongo-tools") | |
2849 | (commit (string-append "r" version)))) | |
2850 | (file-name (git-file-name name version)) | |
2851 | (sha256 | |
2852 | (base32 | |
9b32bf6e | 2853 | "1bcsz5cvj39a7nsxsfqmz9igrw33j6yli9kffigqyscs52amw7x1")))) |
33c88fcb CB |
2854 | (build-system go-build-system) |
2855 | (arguments | |
9b32bf6e CB |
2856 | `(#:import-path "github.com/mongodb/mongo-tools" |
2857 | #:modules ((srfi srfi-1) | |
2858 | (guix build go-build-system) | |
2859 | (guix build utils)) | |
33c88fcb | 2860 | #:phases |
9b32bf6e CB |
2861 | (let ((all-tools |
2862 | '("bsondump" "mongodump" "mongoexport" "mongofiles" | |
2863 | "mongoimport" "mongooplog" "mongorestore" | |
2864 | "mongostat" "mongotop"))) | |
2865 | (modify-phases %standard-phases | |
2866 | (add-after 'unpack 'delete-bundled-source-code | |
2867 | (lambda _ | |
2868 | (delete-file-recursively | |
2869 | "src/github.com/mongodb/mongo-tools/vendor") | |
2870 | #t)) | |
2871 | ;; We don't need to install the source code for end-user applications | |
2872 | (delete 'install-source) | |
2873 | (replace 'build | |
2874 | (lambda _ | |
2875 | (every (lambda (tool) | |
2876 | (let ((command | |
2877 | `("go" "build" | |
2878 | ;; This is where the tests expect to find the | |
2879 | ;; executables | |
2880 | "-o" ,(string-append | |
2881 | "src/github.com/mongodb/mongo-tools/bin/" | |
2882 | tool) | |
2883 | "-v" | |
33c88fcb CB |
2884 | "-tags=\"ssl sasl\"" |
2885 | "-ldflags" | |
2886 | "-extldflags=-Wl,-z,now,-z,relro" | |
2887 | ,(string-append | |
2888 | "src/github.com/mongodb/mongo-tools/" | |
2889 | tool "/main/" tool ".go")))) | |
9b32bf6e CB |
2890 | (simple-format #t "build: running ~A\n" |
2891 | (string-join command)) | |
2892 | (apply invoke command))) | |
2893 | all-tools))) | |
2894 | (replace 'check | |
2895 | (lambda _ | |
2896 | (with-directory-excursion "src" | |
2897 | (every (lambda (tool) | |
2898 | (invoke | |
2899 | "go" "test" "-v" | |
2900 | (string-append "github.com/mongodb/mongo-tools/" tool))) | |
2901 | all-tools)))) | |
2902 | (replace 'install | |
2903 | (lambda* (#:key outputs #:allow-other-keys) | |
2904 | (for-each (lambda (tool) | |
2905 | (install-file | |
2906 | (string-append "src/github.com/mongodb/mongo-tools/bin/" tool) | |
2907 | (string-append (assoc-ref outputs "out") | |
2908 | "/bin"))) | |
2909 | all-tools))))))) | |
33c88fcb CB |
2910 | (native-inputs |
2911 | `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass) | |
2912 | ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags) | |
2913 | ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal) | |
2914 | ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2) | |
2915 | ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2) | |
9b32bf6e CB |
2916 | ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go) |
2917 | ("go-github.com-smartystreets-goconvey" ,go-github.com-smartystreets-goconvey))) | |
33c88fcb CB |
2918 | (home-page "https://github.com/mongodb/mongo-tools") |
2919 | (synopsis "Various tools for interacting with MongoDB and BSON") | |
2920 | (description | |
2921 | "This package includes a collection of tools related to MongoDB. | |
2922 | @table @code | |
2923 | @item bsondump | |
2924 | Display BSON files in a human-readable format | |
2925 | @item mongoimport | |
2926 | Convert data from JSON, TSV or CSV and insert them into a collection | |
2927 | @item mongoexport | |
2928 | Write an existing collection to CSV or JSON format | |
2929 | @item mongodump/mongorestore | |
2930 | Dump MongoDB backups to disk in the BSON format | |
2931 | @item mongorestore | |
2932 | Read MongoDB backups in the BSON format, and restore them to a live database | |
2933 | @item mongostat | |
2934 | Monitor live MongoDB servers, replica sets, or sharded clusters | |
2935 | @item mongofiles | |
2936 | Read, write, delete, or update files in GridFS | |
2937 | @item mongooplog | |
2938 | Replay oplog entries between MongoDB servers | |
2939 | @item mongotop | |
2940 | Monitor read/write activity on a mongo server | |
2941 | @end table") | |
2942 | (license license:asl2.0))) | |
dae7661a LF |
2943 | |
2944 | (define-public apache-arrow | |
2945 | (package | |
2946 | (name "apache-arrow") | |
2947 | (version "0.7.0") | |
2948 | (source | |
2949 | (origin | |
2950 | (method git-fetch) | |
2951 | (uri (git-reference | |
2952 | (url "https://github.com/apache/arrow") | |
2953 | (commit (string-append "apache-arrow-" version)))) | |
2954 | (file-name (git-file-name name version)) | |
2955 | (sha256 | |
2956 | (base32 | |
2957 | "1x7sdd8lbs3nfqjql1pcgbkjc19bls56zmgjayshkmablvlc4dy3")))) | |
2958 | (build-system cmake-build-system) | |
2959 | (arguments | |
2960 | `(#:tests? #f | |
2961 | #:phases | |
2962 | (modify-phases %standard-phases | |
2963 | (add-before 'configure 'enter-source-directory | |
2964 | (lambda _ (chdir "cpp") #t)) | |
2965 | (add-after 'unpack 'set-env | |
2966 | (lambda _ | |
2967 | (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost")) | |
2968 | (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli")) | |
2969 | (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers")) | |
2970 | (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc")) | |
2971 | (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson")) | |
2972 | #t))) | |
3def739d | 2973 | #:build-type "Release" |
dae7661a | 2974 | #:configure-flags |
3def739d | 2975 | (list "-DARROW_PYTHON=ON" |
dae7661a LF |
2976 | |
2977 | ;; Install to PREFIX/lib (the default is | |
2978 | ;; PREFIX/lib64). | |
2979 | (string-append "-DCMAKE_INSTALL_LIBDIR=" | |
2980 | (assoc-ref %outputs "out") | |
2981 | "/lib") | |
2982 | ||
2983 | ;; XXX These Guix package offer static | |
2984 | ;; libraries that are not position independent, | |
2985 | ;; and ld fails to link them into the arrow .so | |
2986 | "-DARROW_WITH_SNAPPY=OFF" | |
2987 | "-DARROW_WITH_ZLIB=OFF" | |
2988 | "-DARROW_WITH_ZSTD=OFF" | |
2989 | "-DARROW_WITH_LZ4=OFF" | |
2990 | ||
2991 | ;; Building the tests forces on all the | |
2992 | ;; optional features and the use of static | |
2993 | ;; libraries. | |
2994 | "-DARROW_BUILD_TESTS=OFF" | |
2995 | "-DARROW_BUILD_STATIC=OFF"))) | |
2996 | (inputs | |
2997 | `(("boost" ,boost) | |
2998 | ("rapidjson" ,rapidjson) | |
2999 | ("brotli" ,google-brotli) | |
3000 | ("flatbuffers" ,flatbuffers) | |
3001 | ;; Arrow is not yet compatible with jemalloc >= 5: | |
3002 | ;; https://issues.apache.org/jira/browse/ARROW-1141 | |
3003 | ("jemalloc" ,jemalloc-4.5.0) | |
3004 | ("python-3" ,python) | |
3005 | ("python-numpy" ,python-numpy))) | |
3006 | (home-page "https://arrow.apache.org/") | |
3007 | (synopsis "Columnar in-memory analytics") | |
3008 | (description "Apache Arrow is a columnar in-memory analytics layer | |
3009 | designed to accelerate big data. It houses a set of canonical in-memory | |
3010 | representations of flat and hierarchical data along with multiple | |
3011 | language-bindings for structure manipulation. It also provides IPC and common | |
3012 | algorithm implementations.") | |
3013 | (license license:asl2.0))) | |
5e5ac710 LF |
3014 | |
3015 | (define-public python-pyarrow | |
3016 | (package | |
3017 | (name "python-pyarrow") | |
3018 | (version "0.7.0") | |
3019 | (source | |
3020 | (origin | |
3021 | (method git-fetch) | |
3022 | (uri (git-reference | |
3023 | (url "https://github.com/apache/arrow") | |
3024 | (commit (string-append "apache-arrow-" version)))) | |
3025 | (file-name (git-file-name name version)) | |
3026 | (sha256 | |
3027 | (base32 | |
3028 | "1x7sdd8lbs3nfqjql1pcgbkjc19bls56zmgjayshkmablvlc4dy3")))) | |
3029 | (build-system python-build-system) | |
3030 | (arguments | |
3031 | '(#:tests? #f ; XXX Test failures related to missing libhdfs, libhdfs3, | |
3032 | ; and "Unsupported numpy type 22". | |
3033 | #:phases | |
3034 | (modify-phases %standard-phases | |
3035 | (add-after 'unpack 'enter-source-directory | |
3036 | (lambda _ (chdir "python") #t)) | |
3037 | (add-after 'unpack 'set-env | |
3038 | (lambda _ | |
3039 | (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow")) | |
3040 | #t))))) | |
3041 | (propagated-inputs | |
3042 | `(("apache-arrow" ,apache-arrow) | |
3043 | ("python-numpy" ,python-numpy) | |
3044 | ("python-pandas" ,python-pandas) | |
3045 | ("python-six" ,python-six))) | |
3046 | (native-inputs | |
3047 | `(("cmake" ,cmake) | |
3048 | ("python-cython" ,python-cython) | |
3049 | ("python-pytest" ,python-pytest) | |
3050 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
3051 | (home-page "https://arrow.apache.org/docs/python/") | |
3052 | (synopsis "Python bindings for Apache Arrow") | |
3053 | (description "This library provides a Pythonic API wrapper for the reference | |
3054 | Arrow C++ implementation, along with tools for interoperability with pandas, | |
3055 | NumPy, and other traditional Python scientific computing packages.") | |
3056 | (license license:asl2.0))) | |
3057 | ||
3058 | (define-public python2-pyarrow | |
3059 | (package-with-python2 python-pyarrow)) |