Merge remote-tracking branch 'origin/master' into core-updates-frozen
[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 Marius Bakke <mbakke@fastmail.com>
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, 2018, 2019 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 download)
35 #:use-module (guix hg-download)
36 #:use-module (guix git-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system copy)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system python)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages cmake)
50 #:use-module (gnu packages cpp)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages llvm)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-science)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages perl))
61
62 (define-public avro-cpp-1.9
63 (package
64 (name "avro-cpp")
65 (version "1.9.2")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append
69 "https://archive.apache.org/dist/avro/avro-" version
70 "/avro-src-" version ".tar.gz"))
71 (sha256
72 (base32 "0i3fpm7r72yw397qc8yw9ybzk2mxjkv0yk5hnn00ylc1wbd0np73"))))
73 (build-system cmake-build-system)
74 (arguments
75 `(#:phases
76 (modify-phases %standard-phases
77 (add-after 'unpack 'chdir
78 (lambda _ (chdir "lang/c++"))))))
79 (inputs
80 `(("boost" ,boost)
81 ("snappy" ,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.0")
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 "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"))))
147 (build-system cmake-build-system)
148 (arguments
149 `(#:configure-flags '("-DSKIP_PORTABILITY_TEST=ON")
150 #:phases
151 (modify-phases %standard-phases
152 (add-before 'configure 'skip-sandbox
153 (lambda _
154 (substitute* "CMakeLists.txt"
155 (("add_subdirectory\\(sandbox\\)") ""))))
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 `(("doxygen" ,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 (license license:bsd-3)))
171
172 (define-public msgpack
173 (package
174 (name "msgpack")
175 (version "3.3.0")
176 (source
177 (origin
178 (method url-fetch)
179 (uri
180 (string-append
181 "https://github.com/msgpack/msgpack-c/releases/download/"
182 "cpp-" version "/msgpack-" version ".tar.gz"))
183 (snippet
184 '(let ((p (open-file "msgpack.pc.in" "a")))
185 (display
186 (string-append "Requires: " "zlib" "\n") p)
187 (close-output-port p)
188 #t))
189 (sha256
190 (base32 "0yzhq50ijvwrfkr97knhvn54lj3f4hr3zy39yq8wpf6xll94s4bf"))))
191 (build-system cmake-build-system)
192 (native-inputs
193 `(("googletest" ,googletest-1.8)
194 ("pkg-config" ,pkg-config)))
195 (propagated-inputs
196 `(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h,
197 ;; zbuffer.hpp) which #include <zlib.h>. However, 'guix gc --references'
198 ;; does not detect a store reference to zlib since these headers are not
199 ;; compiled.
200 (home-page "https://www.msgpack.org")
201 (synopsis "Binary serialization library")
202 (description "Msgpack is a library for C/C++ that implements binary
203 serialization.")
204 (license license:boost1.0)))
205
206 (define-public libmpack
207 (package
208 (name "libmpack")
209 (version "1.0.5")
210 (source
211 (origin
212 (method git-fetch)
213 (uri (git-reference
214 (url "https://github.com/tarruda/libmpack")
215 (commit version)))
216 (file-name (git-file-name name version))
217 (sha256
218 (base32 "0rai5djdkjz7bsn025k5489in7r1amagw1pib0z4qns6b52kiar2"))))
219 (build-system gnu-build-system)
220 (arguments
221 `(#:test-target "test"
222 #:make-flags
223 (list "CC=gcc"
224 (string-append "PREFIX=" (assoc-ref %outputs "out")))
225 #:phases
226 (modify-phases %standard-phases
227 (delete 'configure))))
228 (native-inputs
229 `(("libtool" ,libtool)))
230 (home-page "https://github.com/tarruda/libmpack")
231 (synopsis "Small binary serialization library")
232 (description "Libmpack is a small binary serialization and RPC library
233 that implements both the msgpack and msgpack-rpc specifications.")
234 (license license:expat)))
235
236 (define-public lua-libmpack
237 (package (inherit libmpack)
238 (name "lua-libmpack")
239 (version "1.0.8")
240 (source
241 (origin
242 (method git-fetch)
243 (uri (git-reference
244 (url "https://github.com/libmpack/libmpack-lua")
245 (commit version)))
246 (file-name (git-file-name name version))
247 (sha256
248 (base32 "1ijvzgq5hvib03w5rghv31wi7byamwg7qdx5pawvhvnflaii8ivw"))))
249 (build-system gnu-build-system)
250 (arguments
251 `(;; FIXME: tests require "busted", which is not yet available in Guix.
252 #:tests? #f
253 #:test-target "test"
254 #:make-flags
255 (let* ((lua-version ,(package-version lua))
256 (lua-major+minor ,(version-major+minor (package-version lua))))
257 (list "CC=gcc"
258 "FETCH=echo" ; don't fetch anything from the web
259 "UNTGZ=echo" ; and don't try to unpack it
260 "USE_SYSTEM_LUA=yes"
261 (string-append "MPACK_LUA_VERSION=" lua-version)
262 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
263 (string-append "PREFIX="
264 (assoc-ref %outputs "out"))
265 (string-append "LUA_CMOD_INSTALLDIR="
266 (assoc-ref %outputs "out")
267 "/lib/lua/" lua-major+minor)))
268 #:phases
269 (modify-phases %standard-phases
270 (delete 'configure)
271 (add-after 'unpack 'unpack-mpack-sources
272 (lambda* (#:key inputs #:allow-other-keys)
273 ;; This is broken because mpack-src is not a file, but all
274 ;; prerequisites are added to the inputs of the gcc invocation.
275 (substitute* "Makefile"
276 (("\\$\\(MPACK\\): mpack-src") "$(MPACK): "))
277 (copy-recursively (assoc-ref inputs "libmpack")
278 "mpack-src")
279 #t)))))
280 (inputs
281 `(("lua" ,lua)))
282 (native-inputs
283 `(("pkg-config" ,pkg-config)
284 ("libmpack" ,(package-source libmpack))))
285 (home-page "https://github.com/libmpack/libmpack-lua")
286 (synopsis "Lua bindings for the libmpack binary serialization library")))
287
288 (define-public lua5.1-libmpack
289 (package/inherit lua-libmpack
290 (name "lua5.1-libmpack")
291 (arguments
292 (substitute-keyword-arguments (package-arguments lua-libmpack)
293 ((#:make-flags flags)
294 `(let* ((lua-version ,(package-version lua-5.1))
295 (lua-major+minor ,(version-major+minor (package-version lua-5.1))))
296 (list "CC=gcc"
297 "USE_SYSTEM_LUA=yes"
298 (string-append "MPACK_LUA_VERSION=" lua-version)
299 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
300 (string-append "PREFIX="
301 (assoc-ref %outputs "out"))
302 (string-append "LUA_CMOD_INSTALLDIR="
303 (assoc-ref %outputs "out")
304 "/lib/lua/" lua-major+minor))))))
305 (inputs
306 `(("lua" ,lua-5.1)))))
307
308 (define-public lua5.2-libmpack
309 (package/inherit lua-libmpack
310 (name "lua5.2-libmpack")
311 (arguments
312 (substitute-keyword-arguments (package-arguments lua-libmpack)
313 ((#:make-flags flags)
314 `(let* ((lua-version ,(package-version lua-5.2))
315 (lua-major+minor ,(version-major+minor (package-version lua-5.2))))
316 (list "CC=gcc"
317 "USE_SYSTEM_LUA=yes"
318 (string-append "MPACK_LUA_VERSION=" lua-version)
319 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
320 (string-append "PREFIX="
321 (assoc-ref %outputs "out"))
322 (string-append "LUA_CMOD_INSTALLDIR="
323 (assoc-ref %outputs "out")
324 "/lib/lua/" lua-major+minor))))))
325 (inputs
326 `(("lua" ,lua-5.2)))))
327
328 (define-public libyaml
329 (package
330 (name "libyaml")
331 (version "0.2.5")
332 (source
333 (origin
334 (method url-fetch)
335 (uri (string-append "https://pyyaml.org/download/libyaml/yaml-"
336 version ".tar.gz"))
337 (sha256
338 (base32
339 "1x4fcw13r3lqy8ndydr3ili87wicplw2awbcv6r21qgyfndswhn6"))))
340 (build-system gnu-build-system)
341 (arguments
342 '(#:configure-flags '("--disable-static")))
343 (home-page "https://pyyaml.org/wiki/LibYAML")
344 (synopsis "YAML 1.1 parser and emitter written in C")
345 (description
346 "LibYAML is a YAML 1.1 parser and emitter written in C.")
347 (license license:expat)))
348
349 (define-public libyaml+static
350 (package
351 (inherit libyaml)
352 (name "libyaml+static")
353 (arguments
354 '(#:configure-flags '("--enable-static")))))
355
356 (define-public libcyaml
357 (package
358 (name "libcyaml")
359 (version "1.1.0")
360 (source
361 (origin
362 (method git-fetch)
363 (uri (git-reference
364 (url "https://github.com/tlsa/libcyaml")
365 (commit (string-append "v" version))))
366 (file-name (git-file-name name version))
367 (patches (search-patches "libcyaml-libyaml-compat.patch"))
368 (sha256
369 (base32 "0428p0rwq71nhh5nzcbapsbrjxa0x5l6h6ns32nxv7j624f0zd93"))))
370 (build-system gnu-build-system)
371 (arguments
372 `(#:make-flags
373 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
374 (string-append "CC=gcc"))
375 #:phases
376 (modify-phases %standard-phases
377 (delete 'configure) ; no configure script
378 (replace 'check
379 (lambda _
380 (setenv "CC" "gcc")
381 (invoke "make" "test"))))))
382 (inputs
383 `(("libyaml" ,libyaml)))
384 (native-inputs
385 `(("pkg-config" ,pkg-config)))
386 (synopsis "C library for reading and writing YAML")
387 (description
388 "LibCYAML is a C library written in ISO C11 for reading and writing
389 structured YAML documents. The fundamental idea behind CYAML is to allow
390 applications to construct schemas which describe both the permissible
391 structure of the YAML documents to read/write, and the C data structure(s)
392 in which the loaded data is arranged in memory.")
393 (home-page "https://github.com/tlsa/libcyaml")
394 (license license:isc)))
395
396 (define-public yaml-cpp
397 (package
398 (name "yaml-cpp")
399 (version "0.6.3")
400 (source
401 (origin
402 (method git-fetch)
403 (uri (git-reference
404 (url "https://github.com/jbeder/yaml-cpp")
405 (commit (string-append "yaml-cpp-" version))))
406 (file-name (git-file-name name version))
407 (sha256
408 (base32 "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s"))))
409 (build-system cmake-build-system)
410 (arguments
411 '(#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON")))
412 (native-inputs
413 `(("python" ,python)))
414 (home-page "https://github.com/jbeder/yaml-cpp")
415 (synopsis "YAML parser and emitter in C++")
416 (description "YAML parser and emitter in C++ matching the YAML 1.2 spec.")
417 (license license:bsd-3)))
418
419 (define-public jsoncpp
420 (package
421 (name "jsoncpp")
422 (version "1.9.4")
423 (home-page "https://github.com/open-source-parsers/jsoncpp")
424 (source (origin
425 (method git-fetch)
426 (uri (git-reference (url home-page) (commit version)))
427 (file-name (git-file-name name version))
428 (sha256
429 (base32
430 "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
431 (build-system cmake-build-system)
432 (arguments
433 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
434 ,@(if (%current-target-system)
435 `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF")
436 '()))
437 ,@(if (%current-target-system)
438 '()
439 `(#:cmake ,cmake-bootstrap))))
440 (synopsis "C++ library for interacting with JSON")
441 (description "JsonCpp is a C++ library that allows manipulating JSON values,
442 including serialization and deserialization to and from strings. It can also
443 preserve existing comment in unserialization/serialization steps, making
444 it a convenient format to store user input files.")
445 (license license:expat)))
446
447 ;; XXX: TODO(core-updates): Remove this package and apply the patch to the
448 ;; jsoncpp package. This patch fixes the package version declared in the
449 ;; pkg-config file.
450 (define-public jsoncpp-with-pkg-version
451 (package
452 (inherit jsoncpp)
453 (name "jsoncpp")
454 (version "1.9.4")
455 (home-page "https://github.com/open-source-parsers/jsoncpp")
456 (source (origin
457 (method git-fetch)
458 (uri (git-reference (url home-page) (commit version)))
459 (file-name (git-file-name name version))
460 (sha256
461 (base32
462 "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))
463 (patches
464 (search-patches "jsoncpp-pkg-config-version.patch"))))))
465
466 ;; Tensorflow does not build with jsoncpp 1.8.x. It is built with commit
467 ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2
468 ;; and 1.7.3.
469 (define-public jsoncpp-for-tensorflow
470 (package (inherit jsoncpp)
471 (name "jsoncpp")
472 (version "1.7.3")
473 (source (origin
474 (method git-fetch)
475 (uri (git-reference
476 (url "https://github.com/open-source-parsers/jsoncpp")
477 (commit version)))
478 (file-name (git-file-name name version))
479 (sha256
480 (base32
481 "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))))
482
483 (define-public json.sh
484 (let ((commit "0d5e5c77365f63809bf6e77ef44a1f34b0e05840") ;no releases
485 (revision "1"))
486 (package
487 (name "json.sh")
488 (version (git-version "0.0.0" revision commit))
489 (source
490 (origin
491 (method git-fetch)
492 (uri (git-reference
493 (url "https://github.com/dominictarr/JSON.sh")
494 (commit commit)))
495 (file-name (git-file-name name version))
496 (sha256
497 (base32
498 "14lxvp5xbdk0dcwkjbdp098z1108j8z48zaibndh4i731kkcz43i"))))
499 (build-system copy-build-system)
500 (arguments
501 `(#:install-plan '(("JSON.sh" "bin/"))
502 #:phases
503 (modify-phases %standard-phases
504 (add-before 'install 'check
505 (lambda* (#:key tests? #:allow-other-keys)
506 (when tests? (invoke "./all-tests.sh"))
507 #t))
508 (add-after 'install 'wrap-program
509 (lambda* (#:key inputs outputs #:allow-other-keys)
510 (wrap-program (string-append (assoc-ref outputs "out") "/bin/JSON.sh")
511 `("PATH" ":" prefix
512 (,(string-join
513 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
514 '("grep" "sed"))
515 ":"))))
516 #t)))))
517 (inputs
518 `(("bash-minimal" ,bash-minimal)
519 ("grep" ,grep)
520 ("sed" ,sed)))
521 (synopsis "Pipeable JSON parser written in shell")
522 (description
523 "This package provides a JSON parser written in shell, compatible with
524 ash, Bash, Dash and Zsh. Pipe JSON to it, and it traverses the JSON objects
525 and prints out the path to the current object (as a JSON array) and then the
526 object, without whitespace.")
527 (home-page "https://github.com/dominictarr/JSON.sh")
528 (license (list license:expat license:asl2.0))))) ;dual-licensed
529
530 (define-public capnproto
531 (package
532 (name "capnproto")
533 (version "0.8.0")
534 (source (origin
535 (method url-fetch)
536 (uri (string-append
537 "https://capnproto.org/capnproto-c++-"
538 version ".tar.gz"))
539 (sha256
540 (base32
541 "03f1862ljdshg7d0rg3j7jzgm3ip55kzd2y91q7p0racax3hxx6i"))))
542 (build-system gnu-build-system)
543 (arguments
544 `(#:phases
545 (modify-phases %standard-phases
546 (add-before 'check 'do-not-require-/etc/services
547 (lambda _
548 ;; Workaround for test that tries to resolve port name from
549 ;; /etc/services, which is not present in build environment.
550 (substitute* "src/kj/async-io-test.c++" ((":http") ":80"))
551 #t))
552 (add-before 'check 'use-tmp-for-temporary-files
553 (lambda _
554 ;; Use /tmp for temporary files, as the default /var/tmp directory
555 ;; doesn't exist.
556 (substitute* "src/kj/filesystem-disk-test.c++"
557 (("VAR\\_TMP \"/var/tmp\"")
558 "VAR_TMP \"/tmp\""))
559 #t)))))
560 (home-page "https://capnproto.org")
561 (synopsis "Capability-based RPC and serialization system")
562 (description
563 "Cap'n Proto is a very fast data interchange format and capability-based
564 RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.")
565 (license license:expat)))
566
567 (define-public libbson
568 (package
569 (name "libbson")
570 (version "1.6.2")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (string-append "https://github.com/mongodb/libbson/releases/"
575 "download/" version "/libbson-" version ".tar.gz"))
576 (sha256
577 (base32
578 "1fj4554msq0rrz14snbj908dzqj46gh7jg9w9j0akn2b7q911m5a"))))
579 (build-system gnu-build-system)
580 (native-inputs `(("perl" ,perl)))
581 (home-page "http://mongoc.org/libbson/current/index.html")
582 (synopsis "C BSON library")
583 (description "Libbson can create and parse BSON documents. It can also
584 convert JSON documents to BSON and the opposite. BSON stands for Binary JSON,
585 it is comparable to protobuf.")
586 (license license:asl2.0)))
587
588 (define-public python-ruamel.yaml
589 (package
590 (name "python-ruamel.yaml")
591 (version "0.16.13")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "ruamel.yaml" version))
596 (sha256
597 (base32
598 "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v"))))
599 (build-system python-build-system)
600 (native-inputs
601 `(("python-pytest" ,python-pytest)))
602 (propagated-inputs
603 `(("python-ruamel.yaml.clib" ,python-ruamel.yaml.clib)))
604 (arguments
605 `(;; TODO: Tests require packaging "ruamel.std.pathlib".
606 #:tests? #f))
607 (home-page "https://sourceforge.net/projects/ruamel-yaml/")
608 (synopsis "YAML 1.2 parser/emitter")
609 (description
610 "This package provides YAML parser/emitter that supports roundtrip
611 preservation of comments, seq/map flow style, and map key order. It
612 is a derivative of Kirill Simonov’s PyYAML 3.11. It supports YAML 1.2
613 and has round-trip loaders and dumpers. It supports comments. Block
614 style and key ordering are kept, so you can diff the source.")
615 (license license:expat)))
616
617 (define-public python-ruamel.yaml.clib
618 (package
619 (name "python-ruamel.yaml.clib")
620 (version "0.2.6")
621 (source
622 (origin
623 ;; pypi release code has cythonized code without corresponding source.
624 (method hg-fetch)
625 (uri (hg-reference
626 (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code")
627 (changeset version)))
628 (file-name (string-append name "-" version "-checkout"))
629 (sha256
630 (base32
631 "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs"))
632 (modules '((guix build utils)))
633 (snippet
634 '(begin
635 (delete-file "_ruamel_yaml.c")))))
636 (build-system python-build-system)
637 (arguments
638 `(#:tests? #f ; This package is split from python-ruamel.yaml and
639 ; depends on modules from it for the test suite.
640 #:phases
641 (modify-phases %standard-phases
642 (delete 'sanity-check) ; Depends on python-ruamel.yaml
643 (add-after 'unpack 'cythonize-code
644 (lambda _
645 (invoke "cython" "_ruamel_yaml.pyx"))))))
646 (native-inputs
647 `(("python-cython" ,python-cython)))
648 (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree")
649 (synopsis "C version of reader, parser and emitter for ruamel.yaml")
650 (description
651 "This package provides a C version of the reader, parser and emitter for
652 @code{ruamel.yaml} derived from libyaml.")
653 (license license:expat)))
654
655 (define-public python-cbor
656 (package
657 (name "python-cbor")
658 (version "1.0.0")
659 (source
660 (origin
661 (method url-fetch)
662 (uri (pypi-uri "cbor" version))
663 (sha256
664 (base32
665 "1dmv163cnslyqccrybkxn0c9s1jk1mmafmgxv75iamnz5lk5l8hk"))))
666 (build-system python-build-system)
667 (home-page "https://bitbucket.org/bodhisnarkva/cbor")
668 (synopsis "Implementation of the Concise Binary Object Representation")
669 (description
670 "Python-cbor provides an implementation of the Concise Binary Object
671 Representation (@dfn{CBOR}). CBOR is comparable to JSON, has a superset of
672 JSON's ability, but serializes to a binary format which is smaller and faster
673 to generate and parse. The two primary functions are @code{cbor.loads} and
674 @code{cbor.dumps}.")
675 (license license:asl2.0)))
676
677 (define-public flatbuffers
678 (package
679 (name "flatbuffers")
680 (version "2.0.0")
681 (source
682 (origin
683 (method git-fetch)
684 (uri (git-reference
685 (url "https://github.com/google/flatbuffers")
686 (commit (string-append "v" version))))
687 (file-name (git-file-name name version))
688 (sha256
689 (base32
690 "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"))))
691 (build-system cmake-build-system)
692 (arguments
693 '(#:build-type "Release"
694 #:configure-flags
695 (list "-DFLATBUFFERS_BUILD_SHAREDLIB=ON"
696 (string-append "-DCMAKE_INSTALL_LIBDIR="
697 (assoc-ref %outputs "out") "/lib"))
698 #:phases
699 (modify-phases %standard-phases
700 (add-after 'unpack 'make-writable
701 (lambda _ (for-each make-file-writable (find-files ".")))))))
702 (home-page "https://google.github.io/flatbuffers/")
703 (synopsis "Memory-efficient serialization library")
704 (description "FlatBuffers is a cross-platform serialization library for C++,
705 C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created for
706 game development and other performance-critical applications.")
707 (license license:asl2.0)))
708
709 (define-public python-feather-format
710 (package
711 (name "python-feather-format")
712 (version "0.4.1")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (pypi-uri "feather-format" version))
717 (sha256
718 (base32
719 "00w9hwz7sj3fkdjc378r066vdy6lpxmn6vfac3qx956k8lvpxxj5"))))
720 (build-system python-build-system)
721 (propagated-inputs
722 `(("python-pandas" ,python-pandas)
723 ("python-pyarrow" ,python-pyarrow)))
724 (home-page "https://github.com/wesm/feather")
725 (synopsis "Python wrapper to the Feather file format")
726 (description "This package provides a Python wrapper library to the
727 Apache Arrow-based Feather binary columnar serialization data frame format.")
728 (license license:asl2.0)))