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