gnu: julius: Update to 1.7.0.
[jackhill/guix/guix.git] / gnu / packages / serialization.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
4 ;;; Copyright © 2016 David Craven <david@craven.ch>
5 ;;; Copyright © 2016, 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
6 ;;; Copyright © 2016, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
8 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
9 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
10 ;;; Copyright © 2017 Nikita <nikita@n0.is>
11 ;;; Copyright © 2017–2019, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
13 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
14 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
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 gexp)
35 #:use-module (guix download)
36 #:use-module (guix hg-download)
37 #:use-module (guix git-download)
38 #:use-module (guix utils)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system copy)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system python)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages cmake)
51 #:use-module (gnu packages cpp)
52 #:use-module (gnu packages databases)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages llvm)
56 #:use-module (gnu packages lua)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-science)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages perl))
62
63 (define-public avro-cpp-1.9
64 (package
65 (name "avro-cpp")
66 (version "1.9.2")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append
70 "https://archive.apache.org/dist/avro/avro-" version
71 "/avro-src-" version ".tar.gz"))
72 (sha256
73 (base32 "0i3fpm7r72yw397qc8yw9ybzk2mxjkv0yk5hnn00ylc1wbd0np73"))))
74 (build-system cmake-build-system)
75 (arguments
76 `(#:phases
77 (modify-phases %standard-phases
78 (add-after 'unpack 'chdir
79 (lambda _ (chdir "lang/c++"))))))
80 (inputs
81 (list boost snappy))
82 (home-page "https://avro.apache.org/")
83 (synopsis "Data serialization system")
84 (description "Apache Avro is a data serialization system. Avro provides:
85 @enumerate
86 @item Rich data structures;
87 @item a compact, fast, binary data format;
88 @item a container file, to store persistent data;
89 @item remote procedure call (RPC); and
90 @item simple integration with dynamic languages.
91 @end enumerate
92
93 Code generation is not required to read or write data files nor to use or
94 implement RPC protocols.")
95 (license license:asl2.0)))
96
97 (define-public avro-cpp-1.9-for-irods
98 (package
99 (inherit avro-cpp-1.9)
100 (properties `((hidden? . #true)))
101 (arguments
102 `(#:configure-flags
103 '("-DCMAKE_CXX_COMPILER=clang++"
104 "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
105 "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -lz")
106 #:phases
107 (modify-phases %standard-phases
108 (add-after 'unpack 'chdir
109 (lambda _ (chdir "lang/c++")))
110 (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
111 (lambda* (#:key inputs #:allow-other-keys)
112 (let ((gcc (assoc-ref inputs "gcc")))
113 (setenv "CPLUS_INCLUDE_PATH"
114 (string-join
115 (cons* (search-input-directory inputs "include/c++/v1")
116 ;; Hide GCC's C++ headers so that they do not interfere with
117 ;; the Clang headers.
118 (delete (string-append gcc "/include/c++")
119 (string-split (getenv "CPLUS_INCLUDE_PATH")
120 #\:)))
121 ":"))
122 (format #true
123 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
124 (getenv "CPLUS_INCLUDE_PATH"))))))))
125 (inputs
126 `(("boost" ,boost-for-irods)
127 ("clang" ,clang-toolchain-6)
128 ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
129 ("libcxxabi" ,libcxxabi-6)
130 ("snappy" ,snappy-with-clang6)
131 ("zlib" ,zlib)))))
132
133 (define-public cereal
134 (package
135 (name "cereal")
136 (version "1.3.2")
137 (source
138 (origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://github.com/USCiLab/cereal")
142 (commit (string-append "v" version))))
143 (file-name (git-file-name name version))
144 (sha256
145 (base32
146 "02sd90ynya7wg013zwzjr79fsv4bzqgfg9l2mapd4j38rv06gahx"))))
147 (build-system cmake-build-system)
148 (arguments
149 (list
150 #:configure-flags #~'("-DSKIP_PORTABILITY_TEST=ON"
151 ;; Don't bother building the sandbox examples.
152 "-DSKIP_PERFORMANCE_COMPARISON=ON"
153 "-DBUILD_SANDBOX=OFF")
154 #:phases
155 #~(modify-phases %standard-phases
156 (add-after 'install 'install-doc
157 (lambda _
158 (let ((doc (string-append #$output "/share/doc/html")))
159 (invoke "make" "doc")
160 (mkdir-p doc)
161 (copy-recursively "doc/html" doc)))))))
162 (native-inputs
163 (list doxygen))
164 (home-page "https://uscilab.github.io/cereal/")
165 (synopsis "C++11 library for serialization")
166 (description
167 "Cereal is a header-only C++11 serialization library. Cereal takes
168 arbitrary data types and reversibly turns them into different representations,
169 such as compact binary encodings, XML, or JSON.")
170 ;; Note: Cereal bundles forked versions of rapidxml and rapidjson
171 ;; (see include/cereal/external/), so list their licenses too.
172 (license (list license:bsd-3 ;Cereal itself
173 ;; The bundled RapidXML is dual Boost/Expat (users choice).
174 ;; RapidJSON is Expat licensed, and further bundles a
175 ;; stdint.h with BSD-3.
176 license:boost1.0 license:expat
177 ;; Finally, include/cereal/external/base64.hpp has a
178 ;; home-grown BSD-like license.
179 (license:non-copyleft
180 "file://include/cereal/external/LICENSE")))))
181
182 ;; Some packages fail with the latest version. Remove this variable
183 ;; when unused.
184 (define-public cereal-1.3.0
185 (package
186 (inherit cereal)
187 (version "1.3.0")
188 (source
189 (origin
190 (method git-fetch)
191 (uri (git-reference
192 (url "https://github.com/USCiLab/cereal")
193 (commit (string-append "v" version))))
194 (file-name (git-file-name "cereal" version))
195 (sha256
196 (base32
197 "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"))))
198 (arguments
199 (substitute-keyword-arguments (package-arguments cereal)
200 ((#:configure-flags flags #~'())
201 #~'("-DSKIP_PORTABILITY_TEST=ON"))
202 ((#:phases phases #~%standard-phases)
203 #~(modify-phases #$phases
204 (add-before 'configure 'skip-sandbox
205 (lambda _
206 (substitute* "CMakeLists.txt"
207 (("add_subdirectory\\(sandbox\\)") ""))))))))))
208
209 (define-public msgpack
210 (package
211 (name "msgpack")
212 (version "3.3.0")
213 (source
214 (origin
215 (method url-fetch)
216 (uri
217 (string-append
218 "https://github.com/msgpack/msgpack-c/releases/download/"
219 "cpp-" version "/msgpack-" version ".tar.gz"))
220 (snippet
221 '(let ((p (open-file "msgpack.pc.in" "a")))
222 (display
223 (string-append "Requires: " "zlib" "\n") p)
224 (close-output-port p)
225 #t))
226 (sha256
227 (base32 "0yzhq50ijvwrfkr97knhvn54lj3f4hr3zy39yq8wpf6xll94s4bf"))))
228 (build-system cmake-build-system)
229 (native-inputs
230 (list googletest-1.8 pkg-config))
231 (propagated-inputs
232 (list zlib)) ;; Msgpack installs two headers (zbuffer.h,
233 ;; zbuffer.hpp) which #include <zlib.h>. However, 'guix gc --references'
234 ;; does not detect a store reference to zlib since these headers are not
235 ;; compiled.
236 (home-page "https://www.msgpack.org")
237 (synopsis "Binary serialization library")
238 (description "Msgpack is a library for C/C++ that implements binary
239 serialization.")
240 (license license:boost1.0)))
241
242 (define-public libmpack
243 (package
244 (name "libmpack")
245 (version "1.0.5")
246 (source
247 (origin
248 (method git-fetch)
249 (uri (git-reference
250 (url "https://github.com/tarruda/libmpack")
251 (commit version)))
252 (file-name (git-file-name name version))
253 (sha256
254 (base32 "0rai5djdkjz7bsn025k5489in7r1amagw1pib0z4qns6b52kiar2"))))
255 (build-system gnu-build-system)
256 (arguments
257 `(#:test-target "test"
258 #:make-flags
259 (list "CC=gcc"
260 (string-append "PREFIX=" (assoc-ref %outputs "out")))
261 #:phases
262 (modify-phases %standard-phases
263 (delete 'configure))))
264 (native-inputs
265 (list libtool))
266 (home-page "https://github.com/tarruda/libmpack")
267 (synopsis "Small binary serialization library")
268 (description "Libmpack is a small binary serialization and RPC library
269 that implements both the msgpack and msgpack-rpc specifications.")
270 (license license:expat)))
271
272 (define-public lua-libmpack
273 (package (inherit libmpack)
274 (name "lua-libmpack")
275 (version "1.0.8")
276 (source
277 (origin
278 (method git-fetch)
279 (uri (git-reference
280 (url "https://github.com/libmpack/libmpack-lua")
281 (commit version)))
282 (file-name (git-file-name name version))
283 (sha256
284 (base32 "1ijvzgq5hvib03w5rghv31wi7byamwg7qdx5pawvhvnflaii8ivw"))))
285 (build-system gnu-build-system)
286 (arguments
287 `(;; FIXME: tests require "busted", which is not yet available in Guix.
288 #:tests? #f
289 #:test-target "test"
290 #:make-flags
291 (let* ((lua-version ,(package-version lua))
292 (lua-major+minor ,(version-major+minor (package-version lua))))
293 (list "CC=gcc"
294 "FETCH=echo" ; don't fetch anything from the web
295 "UNTGZ=echo" ; and don't try to unpack it
296 "USE_SYSTEM_LUA=yes"
297 (string-append "MPACK_LUA_VERSION=" lua-version)
298 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
299 (string-append "PREFIX="
300 (assoc-ref %outputs "out"))
301 (string-append "LUA_CMOD_INSTALLDIR="
302 (assoc-ref %outputs "out")
303 "/lib/lua/" lua-major+minor)))
304 #:phases
305 (modify-phases %standard-phases
306 (delete 'configure)
307 (add-after 'unpack 'unpack-mpack-sources
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; This is broken because mpack-src is not a file, but all
310 ;; prerequisites are added to the inputs of the gcc invocation.
311 (substitute* "Makefile"
312 (("\\$\\(MPACK\\): mpack-src") "$(MPACK): "))
313 (copy-recursively (assoc-ref inputs "libmpack")
314 "mpack-src")
315 #t)))))
316 (inputs
317 (list lua))
318 (native-inputs
319 `(("pkg-config" ,pkg-config)
320 ("libmpack" ,(package-source libmpack))))
321 (home-page "https://github.com/libmpack/libmpack-lua")
322 (synopsis "Lua bindings for the libmpack binary serialization library")))
323
324 (define-public lua5.1-libmpack
325 (package/inherit lua-libmpack
326 (name "lua5.1-libmpack")
327 (arguments
328 (substitute-keyword-arguments (package-arguments lua-libmpack)
329 ((#:make-flags flags)
330 `(let* ((lua-version ,(package-version lua-5.1))
331 (lua-major+minor ,(version-major+minor (package-version lua-5.1))))
332 (list "CC=gcc"
333 "USE_SYSTEM_LUA=yes"
334 (string-append "MPACK_LUA_VERSION=" lua-version)
335 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
336 (string-append "PREFIX="
337 (assoc-ref %outputs "out"))
338 (string-append "LUA_CMOD_INSTALLDIR="
339 (assoc-ref %outputs "out")
340 "/lib/lua/" lua-major+minor))))))
341 (inputs
342 `(("lua" ,lua-5.1)))))
343
344 (define-public lua5.2-libmpack
345 (package/inherit lua-libmpack
346 (name "lua5.2-libmpack")
347 (arguments
348 (substitute-keyword-arguments (package-arguments lua-libmpack)
349 ((#:make-flags flags)
350 `(let* ((lua-version ,(package-version lua-5.2))
351 (lua-major+minor ,(version-major+minor (package-version lua-5.2))))
352 (list "CC=gcc"
353 "USE_SYSTEM_LUA=yes"
354 (string-append "MPACK_LUA_VERSION=" lua-version)
355 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
356 (string-append "PREFIX="
357 (assoc-ref %outputs "out"))
358 (string-append "LUA_CMOD_INSTALLDIR="
359 (assoc-ref %outputs "out")
360 "/lib/lua/" lua-major+minor))))))
361 (inputs
362 `(("lua" ,lua-5.2)))))
363
364 (define-public libyaml
365 (package
366 (name "libyaml")
367 (version "0.2.5")
368 (source
369 (origin
370 (method url-fetch)
371 (uri (string-append "https://pyyaml.org/download/libyaml/yaml-"
372 version ".tar.gz"))
373 (sha256
374 (base32
375 "1x4fcw13r3lqy8ndydr3ili87wicplw2awbcv6r21qgyfndswhn6"))))
376 (build-system gnu-build-system)
377 (arguments
378 '(#:configure-flags '("--disable-static")))
379 (home-page "https://pyyaml.org/wiki/LibYAML")
380 (synopsis "YAML 1.1 parser and emitter written in C")
381 (description
382 "LibYAML is a YAML 1.1 parser and emitter written in C.")
383 (license license:expat)))
384
385 (define-public libyaml+static
386 (package
387 (inherit libyaml)
388 (name "libyaml+static")
389 (arguments
390 '(#:configure-flags '("--enable-static")))))
391
392 (define-public libcyaml
393 (package
394 (name "libcyaml")
395 (version "1.3.1")
396 (source
397 (origin
398 (method git-fetch)
399 (uri (git-reference
400 (url "https://github.com/tlsa/libcyaml")
401 (commit (string-append "v" version))))
402 (file-name (git-file-name name version))
403 (patches (search-patches "libcyaml-libyaml-compat.patch"))
404 (sha256
405 (base32 "0gvf3h8r8300wdwfjgxw3nzlj7w14q63m67p8wdm5fvpha017n4y"))))
406 (build-system gnu-build-system)
407 (arguments
408 `(#:test-target "test"
409 #:make-flags
410 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
411 (string-append "CC=" ,(cc-for-target)))
412 #:phases
413 (modify-phases %standard-phases
414 (delete 'configure)))) ; no configure script
415 (inputs
416 (list libyaml))
417 (native-inputs
418 (list pkg-config))
419 (synopsis "C library for reading and writing YAML")
420 (description
421 "LibCYAML is a C library written in ISO C11 for reading and writing
422 structured YAML documents. The fundamental idea behind CYAML is to allow
423 applications to construct schemas which describe both the permissible
424 structure of the YAML documents to read/write, and the C data structure(s)
425 in which the loaded data is arranged in memory.")
426 (home-page "https://github.com/tlsa/libcyaml")
427 (license license:isc)))
428
429 (define-public yaml-cpp
430 (package
431 (name "yaml-cpp")
432 (version "0.6.3")
433 (source
434 (origin
435 (method git-fetch)
436 (uri (git-reference
437 (url "https://github.com/jbeder/yaml-cpp")
438 (commit (string-append "yaml-cpp-" version))))
439 (file-name (git-file-name name version))
440 (sha256
441 (base32 "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s"))))
442 (build-system cmake-build-system)
443 (arguments
444 '(#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON")))
445 (native-inputs
446 (list python))
447 (home-page "https://github.com/jbeder/yaml-cpp")
448 (synopsis "YAML parser and emitter in C++")
449 (description "YAML parser and emitter in C++ matching the YAML 1.2 spec.")
450 (license license:bsd-3)))
451
452 (define-public jsoncpp
453 (package
454 (name "jsoncpp")
455 (version "1.9.4")
456 (home-page "https://github.com/open-source-parsers/jsoncpp")
457 (source (origin
458 (method git-fetch)
459 (uri (git-reference (url home-page) (commit version)))
460 (file-name (git-file-name name version))
461 (patches
462 (search-patches "jsoncpp-pkg-config-version.patch"))
463 (sha256
464 (base32
465 "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
466 (build-system cmake-build-system)
467 (arguments
468 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
469 ,@(if (%current-target-system)
470 `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF")
471 '()))
472 ,@(if (%current-target-system)
473 '()
474 `(#:cmake ,cmake-bootstrap))))
475 (synopsis "C++ library for interacting with JSON")
476 (description "JsonCpp is a C++ library that allows manipulating JSON values,
477 including serialization and deserialization to and from strings. It can also
478 preserve existing comment in unserialization/serialization steps, making
479 it a convenient format to store user input files.")
480 (license license:expat)))
481
482 ;; Tensorflow does not build with jsoncpp 1.8.x. It is built with commit
483 ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2
484 ;; and 1.7.3.
485 (define-public jsoncpp-for-tensorflow
486 (package (inherit jsoncpp)
487 (name "jsoncpp")
488 (version "1.7.3")
489 (source (origin
490 (method git-fetch)
491 (uri (git-reference
492 (url "https://github.com/open-source-parsers/jsoncpp")
493 (commit version)))
494 (file-name (git-file-name name version))
495 (sha256
496 (base32
497 "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))))
498
499 (define-public json.sh
500 (let ((commit "0d5e5c77365f63809bf6e77ef44a1f34b0e05840") ;no releases
501 (revision "1"))
502 (package
503 (name "json.sh")
504 (version (git-version "0.0.0" revision commit))
505 (source
506 (origin
507 (method git-fetch)
508 (uri (git-reference
509 (url "https://github.com/dominictarr/JSON.sh")
510 (commit commit)))
511 (file-name (git-file-name name version))
512 (sha256
513 (base32
514 "14lxvp5xbdk0dcwkjbdp098z1108j8z48zaibndh4i731kkcz43i"))))
515 (build-system copy-build-system)
516 (arguments
517 `(#:install-plan '(("JSON.sh" "bin/"))
518 #:phases
519 (modify-phases %standard-phases
520 (add-before 'install 'check
521 (lambda* (#:key tests? #:allow-other-keys)
522 (when tests? (invoke "./all-tests.sh"))
523 #t))
524 (add-after 'install 'wrap-program
525 (lambda* (#:key inputs outputs #:allow-other-keys)
526 (wrap-program (string-append (assoc-ref outputs "out") "/bin/JSON.sh")
527 `("PATH" ":" prefix
528 (,(string-join
529 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
530 '("grep" "sed"))
531 ":"))))
532 #t)))))
533 (inputs
534 (list bash-minimal grep sed))
535 (synopsis "Pipeable JSON parser written in shell")
536 (description
537 "This package provides a JSON parser written in shell, compatible with
538 ash, Bash, Dash and Zsh. Pipe JSON to it, and it traverses the JSON objects
539 and prints out the path to the current object (as a JSON array) and then the
540 object, without whitespace.")
541 (home-page "https://github.com/dominictarr/JSON.sh")
542 (license (list license:expat license:asl2.0))))) ;dual-licensed
543
544 (define-public capnproto
545 (package
546 (name "capnproto")
547 (version "0.8.0")
548 (source (origin
549 (method url-fetch)
550 (uri (string-append
551 "https://capnproto.org/capnproto-c++-"
552 version ".tar.gz"))
553 (sha256
554 (base32
555 "03f1862ljdshg7d0rg3j7jzgm3ip55kzd2y91q7p0racax3hxx6i"))))
556 (build-system gnu-build-system)
557 (arguments
558 `(#:phases
559 (modify-phases %standard-phases
560 (add-before 'check 'do-not-require-/etc/services
561 (lambda _
562 ;; Workaround for test that tries to resolve port name from
563 ;; /etc/services, which is not present in build environment.
564 (substitute* "src/kj/async-io-test.c++" ((":http") ":80"))
565 #t))
566 (add-before 'check 'use-tmp-for-temporary-files
567 (lambda _
568 ;; Use /tmp for temporary files, as the default /var/tmp directory
569 ;; doesn't exist.
570 (substitute* "src/kj/filesystem-disk-test.c++"
571 (("VAR\\_TMP \"/var/tmp\"")
572 "VAR_TMP \"/tmp\""))
573 #t)))))
574 (home-page "https://capnproto.org")
575 (synopsis "Capability-based RPC and serialization system")
576 (description
577 "Cap'n Proto is a very fast data interchange format and capability-based
578 RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.")
579 (license license:expat)))
580
581 (define-public libbson
582 (package
583 (name "libbson")
584 (version "1.6.2")
585 (source
586 (origin
587 (method url-fetch)
588 (uri (string-append "https://github.com/mongodb/libbson/releases/"
589 "download/" version "/libbson-" version ".tar.gz"))
590 (sha256
591 (base32
592 "1fj4554msq0rrz14snbj908dzqj46gh7jg9w9j0akn2b7q911m5a"))))
593 (build-system gnu-build-system)
594 (native-inputs (list perl))
595 (home-page "http://mongoc.org/libbson/current/index.html")
596 (synopsis "C BSON library")
597 (description "Libbson can create and parse BSON documents. It can also
598 convert JSON documents to BSON and the opposite. BSON stands for Binary JSON,
599 it is comparable to protobuf.")
600 (license license:asl2.0)))
601
602 (define-public python-ruamel.yaml
603 (package
604 (name "python-ruamel.yaml")
605 (version "0.16.13")
606 (source
607 (origin
608 (method url-fetch)
609 (uri (pypi-uri "ruamel.yaml" version))
610 (sha256
611 (base32
612 "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v"))))
613 (build-system python-build-system)
614 (native-inputs
615 (list python-pytest))
616 (propagated-inputs
617 (list python-ruamel.yaml.clib))
618 (arguments
619 `(;; TODO: Tests require packaging "ruamel.std.pathlib".
620 #:tests? #f))
621 (home-page "https://sourceforge.net/projects/ruamel-yaml/")
622 (synopsis "YAML 1.2 parser/emitter")
623 (description
624 "This package provides YAML parser/emitter that supports roundtrip
625 preservation of comments, seq/map flow style, and map key order. It
626 is a derivative of Kirill Simonov’s PyYAML 3.11. It supports YAML 1.2
627 and has round-trip loaders and dumpers. It supports comments. Block
628 style and key ordering are kept, so you can diff the source.")
629 (license license:expat)))
630
631 (define-public python-ruamel.yaml.clib
632 (package
633 (name "python-ruamel.yaml.clib")
634 (version "0.2.6")
635 (source
636 (origin
637 ;; pypi release code has cythonized code without corresponding source.
638 (method hg-fetch)
639 (uri (hg-reference
640 (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code")
641 (changeset version)))
642 (file-name (string-append name "-" version "-checkout"))
643 (sha256
644 (base32
645 "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs"))
646 (modules '((guix build utils)))
647 (snippet
648 '(begin
649 (delete-file "_ruamel_yaml.c")))))
650 (build-system python-build-system)
651 (arguments
652 `(#:tests? #f ; This package is split from python-ruamel.yaml and
653 ; depends on modules from it for the test suite.
654 #:phases
655 (modify-phases %standard-phases
656 (delete 'sanity-check) ; Depends on python-ruamel.yaml
657 (add-after 'unpack 'cythonize-code
658 (lambda _
659 (invoke "cython" "_ruamel_yaml.pyx"))))))
660 (native-inputs
661 (list python-cython))
662 (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree")
663 (synopsis "C version of reader, parser and emitter for ruamel.yaml")
664 (description
665 "This package provides a C version of the reader, parser and emitter for
666 @code{ruamel.yaml} derived from libyaml.")
667 (license license:expat)))
668
669 (define-public python-cbor
670 (package
671 (name "python-cbor")
672 (version "1.0.0")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "cbor" version))
677 (sha256
678 (base32
679 "1dmv163cnslyqccrybkxn0c9s1jk1mmafmgxv75iamnz5lk5l8hk"))))
680 (build-system python-build-system)
681 (home-page "https://bitbucket.org/bodhisnarkva/cbor")
682 (synopsis "Implementation of the Concise Binary Object Representation")
683 (description
684 "Python-cbor provides an implementation of the Concise Binary Object
685 Representation (@dfn{CBOR}). CBOR is comparable to JSON, has a superset of
686 JSON's ability, but serializes to a binary format which is smaller and faster
687 to generate and parse. The two primary functions are @code{cbor.loads} and
688 @code{cbor.dumps}.")
689 (license license:asl2.0)))
690
691 (define-public flatbuffers
692 (package
693 (name "flatbuffers")
694 (version "2.0.0")
695 (source
696 (origin
697 (method git-fetch)
698 (uri (git-reference
699 (url "https://github.com/google/flatbuffers")
700 (commit (string-append "v" version))))
701 (file-name (git-file-name name version))
702 (sha256
703 (base32
704 "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"))))
705 (build-system cmake-build-system)
706 (arguments
707 '(#:build-type "Release"
708 #:configure-flags
709 (list "-DFLATBUFFERS_BUILD_SHAREDLIB=ON"
710 (string-append "-DCMAKE_INSTALL_LIBDIR="
711 (assoc-ref %outputs "out") "/lib"))
712 #:phases
713 (modify-phases %standard-phases
714 (add-after 'unpack 'make-writable
715 (lambda _ (for-each make-file-writable (find-files ".")))))))
716 (home-page "https://google.github.io/flatbuffers/")
717 (synopsis "Memory-efficient serialization library")
718 (description "FlatBuffers is a cross-platform serialization library for C++,
719 C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created for
720 game development and other performance-critical applications.")
721 (license license:asl2.0)))
722
723 (define-public python-feather-format
724 (package
725 (name "python-feather-format")
726 (version "0.4.1")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "feather-format" version))
731 (sha256
732 (base32
733 "00w9hwz7sj3fkdjc378r066vdy6lpxmn6vfac3qx956k8lvpxxj5"))))
734 (build-system python-build-system)
735 (propagated-inputs
736 (list python-pandas python-pyarrow))
737 (home-page "https://github.com/wesm/feather")
738 (synopsis "Python wrapper to the Feather file format")
739 (description "This package provides a Python wrapper library to the
740 Apache Arrow-based Feather binary columnar serialization data frame format.")
741 (license license:asl2.0)))