Commit | Line | Data |
---|---|---|
0149354d | 1 | ;;; GNU Guix --- Functional package management for GNU |
e8122816 | 2 | ;;; Copyright © 2015, 2017, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> |
d1ef573d | 3 | ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> |
f50f4ae4 | 4 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
4d676597 | 5 | ;;; Copyright © 2016, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
a852a6d1 | 6 | ;;; Copyright © 2016, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il> |
9d625512 | 7 | ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr> |
bf7c3699 | 8 | ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> |
f38d54f0 | 9 | ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com> |
3c986a7d | 10 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
d7885bbf | 11 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
04953dca | 12 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
6925c7ec | 13 | ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> |
e8122816 | 14 | ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org> |
0149354d RW |
15 | ;;; |
16 | ;;; This file is part of GNU Guix. | |
17 | ;;; | |
18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
19 | ;;; under the terms of the GNU General Public License as published by | |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
23 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
30 | ||
31 | (define-module (gnu packages serialization) | |
32 | #:use-module ((guix licenses) #:prefix license:) | |
33 | #:use-module (guix packages) | |
34 | #:use-module (guix download) | |
a852a6d1 | 35 | #:use-module (guix hg-download) |
42ef29c8 | 36 | #:use-module (guix git-download) |
8e664e7e | 37 | #:use-module (guix utils) |
0149354d | 38 | #:use-module (guix build-system cmake) |
d1ef573d | 39 | #:use-module (guix build-system gnu) |
9f1c0e03 | 40 | #:use-module (guix build-system python) |
0149354d | 41 | #:use-module (gnu packages) |
d1ef573d | 42 | #:use-module (gnu packages autotools) |
f50f4ae4 | 43 | #:use-module (gnu packages boost) |
d1ef573d LG |
44 | #:use-module (gnu packages check) |
45 | #:use-module (gnu packages compression) | |
b5fc075d | 46 | #:use-module (gnu packages cmake) |
936aa052 | 47 | #:use-module (gnu packages cpp) |
8d4f34d6 | 48 | #:use-module (gnu packages databases) |
d1ef573d | 49 | #:use-module (gnu packages documentation) |
af632c6b | 50 | #:use-module (gnu packages gcc) |
6ad4c7e0 | 51 | #:use-module (gnu packages llvm) |
8e664e7e | 52 | #:use-module (gnu packages lua) |
f47dc8dd | 53 | #:use-module (gnu packages pkg-config) |
9d625512 | 54 | #:use-module (gnu packages python) |
312ec128 | 55 | #:use-module (gnu packages python-science) |
44d10b1f | 56 | #:use-module (gnu packages python-xyz) |
60a166c6 | 57 | #:use-module (gnu packages perl)) |
0149354d | 58 | |
0e21cf7d RW |
59 | (define-public avro-cpp-1.9 |
60 | (package | |
61 | (name "avro-cpp") | |
62 | (version "1.9.2") | |
63 | (source (origin | |
64 | (method url-fetch) | |
65 | (uri (string-append | |
66 | "https://archive.apache.org/dist/avro/avro-" version | |
67 | "/avro-src-" version ".tar.gz")) | |
68 | (sha256 | |
69 | (base32 "0i3fpm7r72yw397qc8yw9ybzk2mxjkv0yk5hnn00ylc1wbd0np73")))) | |
70 | (build-system cmake-build-system) | |
71 | (arguments | |
72 | `(#:phases | |
73 | (modify-phases %standard-phases | |
74 | (add-after 'unpack 'chdir | |
75 | (lambda _ (chdir "lang/c++")))))) | |
76 | (inputs | |
77 | `(("boost" ,boost) | |
78 | ("snappy" ,snappy))) | |
79 | (home-page "https://avro.apache.org/") | |
80 | (synopsis "Data serialization system") | |
81 | (description "Apache Avro is a data serialization system. Avro provides: | |
82 | @enumerate | |
83 | @item Rich data structures; | |
84 | @item a compact, fast, binary data format; | |
85 | @item a container file, to store persistent data; | |
86 | @item remote procedure call (RPC); and | |
87 | @item simple integration with dynamic languages. | |
88 | @end enumerate | |
89 | ||
90 | Code generation is not required to read or write data files nor to use or | |
91 | implement RPC protocols.") | |
92 | (license license:asl2.0))) | |
93 | ||
6ad4c7e0 RW |
94 | (define-public avro-cpp-1.9-for-irods |
95 | (package | |
96 | (inherit avro-cpp-1.9) | |
97 | (properties `((hidden? . #true))) | |
98 | (arguments | |
99 | `(#:configure-flags | |
100 | '("-DCMAKE_CXX_COMPILER=clang++" | |
101 | "-DCMAKE_CXX_FLAGS=-stdlib=libc++" | |
102 | "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -lz") | |
103 | #:phases | |
104 | (modify-phases %standard-phases | |
105 | (add-after 'unpack 'chdir | |
106 | (lambda _ (chdir "lang/c++"))) | |
107 | (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH | |
108 | (lambda* (#:key inputs #:allow-other-keys) | |
109 | (let ((gcc (assoc-ref inputs "gcc"))) | |
110 | (setenv "CPLUS_INCLUDE_PATH" | |
111 | (string-join | |
425ccde6 | 112 | (cons* (search-input-directory inputs "include/c++/v1") |
6ad4c7e0 RW |
113 | ;; Hide GCC's C++ headers so that they do not interfere with |
114 | ;; the Clang headers. | |
115 | (delete (string-append gcc "/include/c++") | |
116 | (string-split (getenv "CPLUS_INCLUDE_PATH") | |
117 | #\:))) | |
118 | ":")) | |
119 | (format #true | |
120 | "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" | |
121 | (getenv "CPLUS_INCLUDE_PATH")))))))) | |
122 | (inputs | |
123 | `(("boost" ,boost-for-irods) | |
124 | ("clang" ,clang-toolchain-6) | |
125 | ("libcxx+libcxxabi" ,libcxx+libcxxabi-6) | |
126 | ("libcxxabi" ,libcxxabi-6) | |
127 | ("snappy" ,snappy-with-clang6) | |
128 | ("zlib" ,zlib))))) | |
129 | ||
0149354d RW |
130 | (define-public cereal |
131 | (package | |
132 | (name "cereal") | |
483cdf36 | 133 | (version "1.3.0") |
0300085c TGR |
134 | (source |
135 | (origin | |
136 | (method git-fetch) | |
137 | (uri (git-reference | |
b0e7b699 | 138 | (url "https://github.com/USCiLab/cereal") |
0300085c TGR |
139 | (commit (string-append "v" version)))) |
140 | (file-name (git-file-name name version)) | |
141 | (sha256 | |
483cdf36 RW |
142 | (base32 |
143 | "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p")))) | |
0149354d RW |
144 | (build-system cmake-build-system) |
145 | (arguments | |
146 | `(;; The only included tests are portability tests requiring | |
147 | ;; cross-compilation and boost. Since we are building cereal on more | |
148 | ;; platforms anyway, there is no compelling reason to build the tests. | |
149 | #:tests? #f | |
150 | #:out-of-source? #f | |
151 | #:phases | |
152 | (modify-phases %standard-phases | |
153 | (delete 'configure) | |
154 | (replace 'build | |
155 | (lambda _ | |
156 | (substitute* "doc/doxygen.in" | |
483cdf36 | 157 | (("@CMAKE_CURRENT_BINARY_DIR@") ".") |
0149354d | 158 | (("@CMAKE_CURRENT_SOURCE_DIR@") ".")) |
483cdf36 RW |
159 | (with-directory-excursion "doc" |
160 | (invoke "doxygen" "doxygen.in")))) | |
0149354d RW |
161 | ;; There is no "install" target, so we have to provide our own |
162 | ;; "install" phase. | |
163 | (replace 'install | |
164 | (lambda* (#:key outputs #:allow-other-keys) | |
165 | (let* ((out (assoc-ref outputs "out")) | |
166 | (doc (string-append out "/share/cereal/docs")) | |
167 | (include (string-append out "/include/cereal"))) | |
168 | (mkdir-p doc) | |
169 | (mkdir-p include) | |
170 | (copy-recursively "include/cereal" include) | |
483cdf36 | 171 | (copy-recursively "doc/html" doc))))))) |
0149354d RW |
172 | (native-inputs |
173 | `(("doxygen" ,doxygen))) | |
eb38239d | 174 | (home-page "https://uscilab.github.io/cereal/") |
0149354d RW |
175 | (synopsis "C++11 library for serialization") |
176 | (description | |
177 | "Cereal is a header-only C++11 serialization library. Cereal takes | |
178 | arbitrary data types and reversibly turns them into different representations, | |
179 | such as compact binary encodings, XML, or JSON.") | |
180 | (license license:bsd-3))) | |
d1ef573d | 181 | |
d1ef573d LG |
182 | (define-public msgpack |
183 | (package | |
184 | (name "msgpack") | |
7fd2c9a0 | 185 | (version "3.3.0") |
d1ef573d LG |
186 | (source |
187 | (origin | |
188 | (method url-fetch) | |
189 | (uri | |
190 | (string-append | |
191 | "https://github.com/msgpack/msgpack-c/releases/download/" | |
192 | "cpp-" version "/msgpack-" version ".tar.gz")) | |
193 | (snippet | |
194 | '(let ((p (open-file "msgpack.pc.in" "a"))) | |
6cbee49d MW |
195 | (display |
196 | (string-append "Requires: " "zlib" "\n") p) | |
197 | (close-output-port p) | |
198 | #t)) | |
d1ef573d | 199 | (sha256 |
7fd2c9a0 | 200 | (base32 "0yzhq50ijvwrfkr97knhvn54lj3f4hr3zy39yq8wpf6xll94s4bf")))) |
cdc07e68 | 201 | (build-system cmake-build-system) |
d1ef573d | 202 | (native-inputs |
3293fad2 | 203 | `(("googletest" ,googletest-1.8) |
d1ef573d LG |
204 | ("pkg-config" ,pkg-config))) |
205 | (propagated-inputs | |
206 | `(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h, | |
207 | ;; zbuffer.hpp) which #include <zlib.h>. However, 'guix gc --references' | |
208 | ;; does not detect a store reference to zlib since these headers are not | |
209 | ;; compiled. | |
fe0523d4 | 210 | (home-page "https://www.msgpack.org") |
d1ef573d LG |
211 | (synopsis "Binary serialization library") |
212 | (description "Msgpack is a library for C/C++ that implements binary | |
213 | serialization.") | |
214 | (license license:boost1.0))) | |
f50f4ae4 | 215 | |
c57e5fd0 RW |
216 | (define-public libmpack |
217 | (package | |
218 | (name "libmpack") | |
b5236121 | 219 | (version "1.0.5") |
d7885bbf TGR |
220 | (source |
221 | (origin | |
222 | (method git-fetch) | |
223 | (uri (git-reference | |
b0e7b699 | 224 | (url "https://github.com/tarruda/libmpack") |
d7885bbf TGR |
225 | (commit version))) |
226 | (file-name (git-file-name name version)) | |
227 | (sha256 | |
228 | (base32 "0rai5djdkjz7bsn025k5489in7r1amagw1pib0z4qns6b52kiar2")))) | |
c57e5fd0 RW |
229 | (build-system gnu-build-system) |
230 | (arguments | |
231 | `(#:test-target "test" | |
232 | #:make-flags | |
233 | (list "CC=gcc" | |
234 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
235 | #:phases | |
236 | (modify-phases %standard-phases | |
237 | (delete 'configure)))) | |
238 | (native-inputs | |
239 | `(("libtool" ,libtool))) | |
240 | (home-page "https://github.com/tarruda/libmpack") | |
241 | (synopsis "Small binary serialization library") | |
242 | (description "Libmpack is a small binary serialization and RPC library | |
243 | that implements both the msgpack and msgpack-rpc specifications.") | |
244 | (license license:expat))) | |
245 | ||
8e664e7e RW |
246 | (define-public lua-libmpack |
247 | (package (inherit libmpack) | |
248 | (name "lua-libmpack") | |
adad147b | 249 | (version "1.0.8") |
9fde2268 TGR |
250 | (source |
251 | (origin | |
252 | (method git-fetch) | |
253 | (uri (git-reference | |
b0e7b699 | 254 | (url "https://github.com/libmpack/libmpack-lua") |
3acd85ac TGR |
255 | (commit version))) |
256 | (file-name (git-file-name name version)) | |
9fde2268 | 257 | (sha256 |
3acd85ac | 258 | (base32 "1ijvzgq5hvib03w5rghv31wi7byamwg7qdx5pawvhvnflaii8ivw")))) |
8e664e7e RW |
259 | (build-system gnu-build-system) |
260 | (arguments | |
261 | `(;; FIXME: tests require "busted", which is not yet available in Guix. | |
262 | #:tests? #f | |
263 | #:test-target "test" | |
264 | #:make-flags | |
265 | (let* ((lua-version ,(package-version lua)) | |
266 | (lua-major+minor ,(version-major+minor (package-version lua)))) | |
267 | (list "CC=gcc" | |
7ec309af RW |
268 | "FETCH=echo" ; don't fetch anything from the web |
269 | "UNTGZ=echo" ; and don't try to unpack it | |
8e664e7e | 270 | "USE_SYSTEM_LUA=yes" |
7ec309af RW |
271 | (string-append "MPACK_LUA_VERSION=" lua-version) |
272 | (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor) | |
8e664e7e RW |
273 | (string-append "PREFIX=" |
274 | (assoc-ref %outputs "out")) | |
275 | (string-append "LUA_CMOD_INSTALLDIR=" | |
276 | (assoc-ref %outputs "out") | |
7ec309af | 277 | "/lib/lua/" lua-major+minor))) |
8e664e7e RW |
278 | #:phases |
279 | (modify-phases %standard-phases | |
280 | (delete 'configure) | |
7ec309af RW |
281 | (add-after 'unpack 'unpack-mpack-sources |
282 | (lambda* (#:key inputs #:allow-other-keys) | |
283 | ;; This is broken because mpack-src is not a file, but all | |
284 | ;; prerequisites are added to the inputs of the gcc invocation. | |
285 | (substitute* "Makefile" | |
286 | (("\\$\\(MPACK\\): mpack-src") "$(MPACK): ")) | |
d7885bbf TGR |
287 | (copy-recursively (assoc-ref inputs "libmpack") |
288 | "mpack-src") | |
289 | #t))))) | |
8e664e7e RW |
290 | (inputs |
291 | `(("lua" ,lua))) | |
292 | (native-inputs | |
7ec309af RW |
293 | `(("pkg-config" ,pkg-config) |
294 | ("libmpack" ,(package-source libmpack)))) | |
295 | (home-page "https://github.com/libmpack/libmpack-lua") | |
8e664e7e RW |
296 | (synopsis "Lua bindings for the libmpack binary serialization library"))) |
297 | ||
01a0a0c4 | 298 | (define-public lua5.1-libmpack |
1a265842 | 299 | (package/inherit lua-libmpack |
01a0a0c4 H |
300 | (name "lua5.1-libmpack") |
301 | (arguments | |
302 | (substitute-keyword-arguments (package-arguments lua-libmpack) | |
303 | ((#:make-flags flags) | |
304 | `(let* ((lua-version ,(package-version lua-5.1)) | |
305 | (lua-major+minor ,(version-major+minor (package-version lua-5.1)))) | |
306 | (list "CC=gcc" | |
307 | "USE_SYSTEM_LUA=yes" | |
308 | (string-append "MPACK_LUA_VERSION=" lua-version) | |
309 | (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor) | |
310 | (string-append "PREFIX=" | |
311 | (assoc-ref %outputs "out")) | |
312 | (string-append "LUA_CMOD_INSTALLDIR=" | |
313 | (assoc-ref %outputs "out") | |
314 | "/lib/lua/" lua-major+minor)))))) | |
315 | (inputs | |
316 | `(("lua" ,lua-5.1))))) | |
317 | ||
369ee96b | 318 | (define-public lua5.2-libmpack |
1a265842 | 319 | (package/inherit lua-libmpack |
369ee96b RW |
320 | (name "lua5.2-libmpack") |
321 | (arguments | |
322 | (substitute-keyword-arguments (package-arguments lua-libmpack) | |
323 | ((#:make-flags flags) | |
324 | `(let* ((lua-version ,(package-version lua-5.2)) | |
325 | (lua-major+minor ,(version-major+minor (package-version lua-5.2)))) | |
326 | (list "CC=gcc" | |
327 | "USE_SYSTEM_LUA=yes" | |
0cdc3343 RW |
328 | (string-append "MPACK_LUA_VERSION=" lua-version) |
329 | (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor) | |
369ee96b RW |
330 | (string-append "PREFIX=" |
331 | (assoc-ref %outputs "out")) | |
332 | (string-append "LUA_CMOD_INSTALLDIR=" | |
333 | (assoc-ref %outputs "out") | |
334 | "/lib/lua/" lua-major+minor)))))) | |
335 | (inputs | |
336 | `(("lua" ,lua-5.2))))) | |
337 | ||
e8122816 MC |
338 | (define-public libyaml |
339 | (package | |
340 | (name "libyaml") | |
341 | (version "0.2.5") | |
342 | (source | |
343 | (origin | |
344 | (method url-fetch) | |
345 | (uri (string-append "https://pyyaml.org/download/libyaml/yaml-" | |
346 | version ".tar.gz")) | |
347 | (sha256 | |
348 | (base32 | |
349 | "1x4fcw13r3lqy8ndydr3ili87wicplw2awbcv6r21qgyfndswhn6")))) | |
350 | (build-system gnu-build-system) | |
351 | (arguments | |
352 | '(#:configure-flags '("--disable-static"))) | |
353 | (home-page "https://pyyaml.org/wiki/LibYAML") | |
354 | (synopsis "YAML 1.1 parser and emitter written in C") | |
355 | (description | |
356 | "LibYAML is a YAML 1.1 parser and emitter written in C.") | |
357 | (license license:expat))) | |
358 | ||
359 | (define-public libyaml+static | |
360 | (package | |
361 | (inherit libyaml) | |
362 | (name "libyaml+static") | |
363 | (arguments | |
364 | '(#:configure-flags '("--enable-static"))))) | |
365 | ||
366 | (define-public libcyaml | |
367 | (package | |
368 | (name "libcyaml") | |
369 | (version "1.1.0") | |
370 | (source | |
371 | (origin | |
372 | (method git-fetch) | |
373 | (uri (git-reference | |
374 | (url "https://github.com/tlsa/libcyaml") | |
375 | (commit (string-append "v" version)))) | |
376 | (file-name (git-file-name name version)) | |
377 | (patches (search-patches "libcyaml-libyaml-compat.patch")) | |
378 | (sha256 | |
379 | (base32 "0428p0rwq71nhh5nzcbapsbrjxa0x5l6h6ns32nxv7j624f0zd93")))) | |
380 | (build-system gnu-build-system) | |
381 | (arguments | |
382 | `(#:make-flags | |
383 | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
384 | (string-append "CC=gcc")) | |
385 | #:phases | |
386 | (modify-phases %standard-phases | |
387 | (delete 'configure) ; no configure script | |
388 | (replace 'check | |
389 | (lambda _ | |
390 | (setenv "CC" "gcc") | |
391 | (invoke "make" "test")))))) | |
392 | (inputs | |
393 | `(("libyaml" ,libyaml))) | |
394 | (native-inputs | |
395 | `(("pkg-config" ,pkg-config))) | |
396 | (synopsis "C library for reading and writing YAML") | |
397 | (description | |
398 | "LibCYAML is a C library written in ISO C11 for reading and writing | |
399 | structured YAML documents. The fundamental idea behind CYAML is to allow | |
400 | applications to construct schemas which describe both the permissible | |
401 | structure of the YAML documents to read/write, and the C data structure(s) | |
402 | in which the loaded data is arranged in memory.") | |
403 | (home-page "https://github.com/tlsa/libcyaml") | |
404 | (license license:isc))) | |
405 | ||
f50f4ae4 DC |
406 | (define-public yaml-cpp |
407 | (package | |
408 | (name "yaml-cpp") | |
2acbc174 | 409 | (version "0.6.3") |
417b07ab TGR |
410 | (source |
411 | (origin | |
412 | (method git-fetch) | |
413 | (uri (git-reference | |
b0e7b699 | 414 | (url "https://github.com/jbeder/yaml-cpp") |
417b07ab TGR |
415 | (commit (string-append "yaml-cpp-" version)))) |
416 | (file-name (git-file-name name version)) | |
417 | (sha256 | |
418 | (base32 "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s")))) | |
f50f4ae4 | 419 | (build-system cmake-build-system) |
0577a3fd | 420 | (arguments |
2acbc174 | 421 | '(#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON"))) |
f50f4ae4 DC |
422 | (native-inputs |
423 | `(("python" ,python))) | |
424 | (home-page "https://github.com/jbeder/yaml-cpp") | |
425 | (synopsis "YAML parser and emitter in C++") | |
426 | (description "YAML parser and emitter in C++ matching the YAML 1.2 spec.") | |
427 | (license license:bsd-3))) | |
cd131a76 DC |
428 | |
429 | (define-public jsoncpp | |
430 | (package | |
431 | (name "jsoncpp") | |
6925c7ec | 432 | (version "1.9.4") |
f1818f96 | 433 | (home-page "https://github.com/open-source-parsers/jsoncpp") |
cd131a76 | 434 | (source (origin |
f1818f96 MB |
435 | (method git-fetch) |
436 | (uri (git-reference (url home-page) (commit version))) | |
437 | (file-name (git-file-name name version)) | |
cd131a76 DC |
438 | (sha256 |
439 | (base32 | |
6925c7ec | 440 | "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv")))) |
cd131a76 | 441 | (build-system cmake-build-system) |
996f5ece | 442 | (arguments |
4d676597 MB |
443 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" |
444 | ,@(if (%current-target-system) | |
445 | `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF") | |
446 | '())) | |
b5fc075d MB |
447 | ,@(if (%current-target-system) |
448 | '() | |
449 | `(#:cmake ,cmake-bootstrap)))) | |
cd131a76 DC |
450 | (synopsis "C++ library for interacting with JSON") |
451 | (description "JsonCpp is a C++ library that allows manipulating JSON values, | |
452 | including serialization and deserialization to and from strings. It can also | |
453 | preserve existing comment in unserialization/serialization steps, making | |
454 | it a convenient format to store user input files.") | |
455 | (license license:expat))) | |
557d3328 | 456 | |
42ef29c8 RW |
457 | ;; Tensorflow does not build with jsoncpp 1.8.x. It is built with commit |
458 | ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2 | |
459 | ;; and 1.7.3. | |
460 | (define-public jsoncpp-for-tensorflow | |
461 | (package (inherit jsoncpp) | |
462 | (name "jsoncpp") | |
463 | (version "1.7.3") | |
464 | (source (origin | |
465 | (method git-fetch) | |
466 | (uri (git-reference | |
b0e7b699 | 467 | (url "https://github.com/open-source-parsers/jsoncpp") |
42ef29c8 RW |
468 | (commit version))) |
469 | (file-name (git-file-name name version)) | |
470 | (sha256 | |
471 | (base32 | |
472 | "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z")))))) | |
473 | ||
557d3328 MB |
474 | (define-public capnproto |
475 | (package | |
476 | (name "capnproto") | |
56c8b524 | 477 | (version "0.8.0") |
557d3328 MB |
478 | (source (origin |
479 | (method url-fetch) | |
480 | (uri (string-append | |
481 | "https://capnproto.org/capnproto-c++-" | |
482 | version ".tar.gz")) | |
483 | (sha256 | |
484 | (base32 | |
56c8b524 | 485 | "03f1862ljdshg7d0rg3j7jzgm3ip55kzd2y91q7p0racax3hxx6i")))) |
557d3328 MB |
486 | (build-system gnu-build-system) |
487 | (arguments | |
488 | `(#:phases | |
489 | (modify-phases %standard-phases | |
490 | (add-before 'check 'do-not-require-/etc/services | |
491 | (lambda _ | |
492 | ;; Workaround for test that tries to resolve port name from | |
493 | ;; /etc/services, which is not present in build environment. | |
494 | (substitute* "src/kj/async-io-test.c++" ((":http") ":80")) | |
9c5f4b82 | 495 | #t)) |
885d05ac | 496 | (add-before 'check 'use-tmp-for-temporary-files |
9c5f4b82 | 497 | (lambda _ |
885d05ac | 498 | ;; Use /tmp for temporary files, as the default /var/tmp directory |
9c5f4b82 CB |
499 | ;; doesn't exist. |
500 | (substitute* "src/kj/filesystem-disk-test.c++" | |
501 | (("VAR\\_TMP \"/var/tmp\"") | |
502 | "VAR_TMP \"/tmp\"")) | |
557d3328 MB |
503 | #t))))) |
504 | (home-page "https://capnproto.org") | |
505 | (synopsis "Capability-based RPC and serialization system") | |
506 | (description | |
507 | "Cap'n Proto is a very fast data interchange format and capability-based | |
508 | RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.") | |
509 | (license license:expat))) | |
9d625512 CB |
510 | |
511 | (define-public libbson | |
512 | (package | |
513 | (name "libbson") | |
514 | (version "1.6.2") | |
515 | (source | |
516 | (origin | |
517 | (method url-fetch) | |
518 | (uri (string-append "https://github.com/mongodb/libbson/releases/" | |
519 | "download/" version "/libbson-" version ".tar.gz")) | |
520 | (sha256 | |
521 | (base32 | |
522 | "1fj4554msq0rrz14snbj908dzqj46gh7jg9w9j0akn2b7q911m5a")))) | |
523 | (build-system gnu-build-system) | |
524 | (native-inputs `(("perl" ,perl))) | |
525 | (home-page "http://mongoc.org/libbson/current/index.html") | |
526 | (synopsis "C BSON library") | |
527 | (description "Libbson can create and parse BSON documents. It can also | |
528 | convert JSON documents to BSON and the opposite. BSON stands for Binary JSON, | |
529 | it is comparable to protobuf.") | |
530 | (license license:asl2.0))) | |
bf7c3699 | 531 | |
f38d54f0 MFM |
532 | (define-public python-ruamel.yaml |
533 | (package | |
534 | (name "python-ruamel.yaml") | |
f20cfa06 | 535 | (version "0.15.83") |
f38d54f0 MFM |
536 | (source |
537 | (origin | |
538 | (method url-fetch) | |
539 | (uri (pypi-uri "ruamel.yaml" version)) | |
540 | (sha256 | |
541 | (base32 | |
f20cfa06 | 542 | "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw")))) |
f38d54f0 MFM |
543 | (build-system python-build-system) |
544 | (native-inputs | |
545 | `(("python-pytest" ,python-pytest))) | |
546 | (arguments | |
547 | `(;; TODO: Tests require packaging "ruamel.std.pathlib". | |
548 | #:tests? #f)) | |
549 | (home-page "https://bitbucket.org/ruamel/yaml") | |
550 | (synopsis "YAML 1.2 parser/emitter") | |
551 | (description | |
552 | "This package provides YAML parser/emitter that supports roundtrip | |
553 | preservation of comments, seq/map flow style, and map key order. It | |
554 | is a derivative of Kirill Simonov’s PyYAML 3.11. It supports YAML 1.2 | |
555 | and has round-trip loaders and dumpers. It supports comments. Block | |
556 | style and key ordering are kept, so you can diff the source.") | |
557 | (license license:expat))) | |
558 | ||
559 | (define-public python2-ruamel.yaml | |
560 | (package-with-python2 python-ruamel.yaml)) | |
7ae282fb | 561 | |
a852a6d1 EF |
562 | (define-public python-ruamel.yaml.clib |
563 | (package | |
564 | (name "python-ruamel.yaml.clib") | |
565 | (version "0.2.6") | |
566 | (source | |
567 | (origin | |
568 | ;; pypi release code has cythonized code without corresponding source. | |
569 | (method hg-fetch) | |
570 | (uri (hg-reference | |
571 | (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code") | |
572 | (changeset version))) | |
573 | (file-name (string-append name "-" version "-checkout")) | |
574 | (sha256 | |
575 | (base32 | |
576 | "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs")) | |
577 | (modules '((guix build utils))) | |
578 | (snippet | |
579 | '(begin | |
580 | (delete-file "_ruamel_yaml.c"))))) | |
581 | (build-system python-build-system) | |
582 | (arguments | |
583 | `(#:tests? #f ; This package is split from python-ruamel.yaml and | |
584 | ; depends on modules from it for the test suite. | |
585 | #:phases | |
586 | (modify-phases %standard-phases | |
587 | (delete 'sanity-check) ; Depends on python-ruamel.yaml | |
588 | (add-after 'unpack 'cythonize-code | |
589 | (lambda _ | |
590 | (invoke "cython" "_ruamel_yaml.pyx")))))) | |
591 | (native-inputs | |
592 | `(("python-cython" ,python-cython))) | |
593 | (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree") | |
594 | (synopsis "C version of reader, parser and emitter for ruamel.yaml") | |
595 | (description | |
596 | "This package provides a C version of the reader, parser and emitter for | |
597 | @code{ruamel.yaml} derived from libyaml.") | |
598 | (license license:expat))) | |
599 | ||
7ae282fb | 600 | (define-public python-cbor |
601 | (package | |
602 | (name "python-cbor") | |
603 | (version "1.0.0") | |
604 | (source | |
605 | (origin | |
606 | (method url-fetch) | |
607 | (uri (pypi-uri "cbor" version)) | |
608 | (sha256 | |
609 | (base32 | |
610 | "1dmv163cnslyqccrybkxn0c9s1jk1mmafmgxv75iamnz5lk5l8hk")))) | |
611 | (build-system python-build-system) | |
612 | (home-page "https://bitbucket.org/bodhisnarkva/cbor") | |
613 | (synopsis "Implementation of the Concise Binary Object Representation") | |
614 | (description | |
615 | "Python-cbor provides an implementation of the Concise Binary Object | |
31af847b TGR |
616 | Representation (@dfn{CBOR}). CBOR is comparable to JSON, has a superset of |
617 | JSON's ability, but serializes to a binary format which is smaller and faster | |
618 | to generate and parse. The two primary functions are @code{cbor.loads} and | |
7ae282fb | 619 | @code{cbor.dumps}.") |
620 | (license license:asl2.0))) | |
04953dca LF |
621 | |
622 | (define-public flatbuffers | |
623 | (package | |
624 | (name "flatbuffers") | |
429a332b | 625 | (version "1.10.0") |
04953dca LF |
626 | (source |
627 | (origin | |
628 | (method url-fetch) | |
629 | (uri (string-append "https://github.com/google/flatbuffers/archive/v" | |
630 | version ".tar.gz")) | |
f5d4c46c | 631 | (file-name (string-append name "-" version ".tar.gz")) |
04953dca LF |
632 | (sha256 |
633 | (base32 | |
429a332b | 634 | "0z4swldxs0s31hnkqdhsbfmc8vx3p7zsvmqaw4l31r2iikdy651p")))) |
04953dca LF |
635 | (build-system cmake-build-system) |
636 | (arguments | |
3def739d TGR |
637 | '(#:build-type "Release" |
638 | #:configure-flags | |
04953dca | 639 | (list (string-append "-DCMAKE_INSTALL_LIBDIR=" |
3def739d | 640 | (assoc-ref %outputs "out") "/lib")))) |
04953dca LF |
641 | (home-page "https://google.github.io/flatbuffers/") |
642 | (synopsis "Memory-efficient serialization library") | |
a8b12397 | 643 | (description "FlatBuffers is a cross-platform serialization library for C++, |
04953dca LF |
644 | C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created for |
645 | game development and other performance-critical applications.") | |
646 | (license license:asl2.0))) | |
9f1c0e03 | 647 | |
8d4f34d6 LF |
648 | (define-public python-feather-format |
649 | (package | |
650 | (name "python-feather-format") | |
a50628bb | 651 | (version "0.4.1") |
8d4f34d6 LF |
652 | (source |
653 | (origin | |
654 | (method url-fetch) | |
655 | (uri (pypi-uri "feather-format" version)) | |
656 | (sha256 | |
657 | (base32 | |
a50628bb | 658 | "00w9hwz7sj3fkdjc378r066vdy6lpxmn6vfac3qx956k8lvpxxj5")))) |
8d4f34d6 LF |
659 | (build-system python-build-system) |
660 | (propagated-inputs | |
661 | `(("python-pandas" ,python-pandas) | |
662 | ("python-pyarrow" ,python-pyarrow))) | |
663 | (home-page "https://github.com/wesm/feather") | |
664 | (synopsis "Python wrapper to the Feather file format") | |
665 | (description "This package provides a Python wrapper library to the | |
666 | Apache Arrow-based Feather binary columnar serialization data frame format.") | |
667 | (license license:asl2.0))) |