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