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