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