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