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