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