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