gnu: Add jsoncpp-with-pkg-version.
[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 gnu)
40 #:use-module (guix build-system python)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages boost)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages cmake)
47 #:use-module (gnu packages cpp)
48 #:use-module (gnu packages databases)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages llvm)
52 #:use-module (gnu packages lua)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages python-science)
56 #:use-module (gnu packages python-xyz)
57 #:use-module (gnu packages perl))
58
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
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
112 (cons* (search-input-directory inputs "include/c++/v1")
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
130 (define-public cereal
131 (package
132 (name "cereal")
133 (version "1.3.0")
134 (source
135 (origin
136 (method git-fetch)
137 (uri (git-reference
138 (url "https://github.com/USCiLab/cereal")
139 (commit (string-append "v" version))))
140 (file-name (git-file-name name version))
141 (sha256
142 (base32
143 "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"))))
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"
157 (("@CMAKE_CURRENT_BINARY_DIR@") ".")
158 (("@CMAKE_CURRENT_SOURCE_DIR@") "."))
159 (with-directory-excursion "doc"
160 (invoke "doxygen" "doxygen.in"))))
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)
171 (copy-recursively "doc/html" doc)))))))
172 (native-inputs
173 `(("doxygen" ,doxygen)))
174 (home-page "https://uscilab.github.io/cereal/")
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)))
181
182 (define-public msgpack
183 (package
184 (name "msgpack")
185 (version "3.3.0")
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")))
195 (display
196 (string-append "Requires: " "zlib" "\n") p)
197 (close-output-port p)
198 #t))
199 (sha256
200 (base32 "0yzhq50ijvwrfkr97knhvn54lj3f4hr3zy39yq8wpf6xll94s4bf"))))
201 (build-system cmake-build-system)
202 (native-inputs
203 `(("googletest" ,googletest-1.8)
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.
210 (home-page "https://www.msgpack.org")
211 (synopsis "Binary serialization library")
212 (description "Msgpack is a library for C/C++ that implements binary
213 serialization.")
214 (license license:boost1.0)))
215
216 (define-public libmpack
217 (package
218 (name "libmpack")
219 (version "1.0.5")
220 (source
221 (origin
222 (method git-fetch)
223 (uri (git-reference
224 (url "https://github.com/tarruda/libmpack")
225 (commit version)))
226 (file-name (git-file-name name version))
227 (sha256
228 (base32 "0rai5djdkjz7bsn025k5489in7r1amagw1pib0z4qns6b52kiar2"))))
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
246 (define-public lua-libmpack
247 (package (inherit libmpack)
248 (name "lua-libmpack")
249 (version "1.0.8")
250 (source
251 (origin
252 (method git-fetch)
253 (uri (git-reference
254 (url "https://github.com/libmpack/libmpack-lua")
255 (commit version)))
256 (file-name (git-file-name name version))
257 (sha256
258 (base32 "1ijvzgq5hvib03w5rghv31wi7byamwg7qdx5pawvhvnflaii8ivw"))))
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"
268 "FETCH=echo" ; don't fetch anything from the web
269 "UNTGZ=echo" ; and don't try to unpack it
270 "USE_SYSTEM_LUA=yes"
271 (string-append "MPACK_LUA_VERSION=" lua-version)
272 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
273 (string-append "PREFIX="
274 (assoc-ref %outputs "out"))
275 (string-append "LUA_CMOD_INSTALLDIR="
276 (assoc-ref %outputs "out")
277 "/lib/lua/" lua-major+minor)))
278 #:phases
279 (modify-phases %standard-phases
280 (delete 'configure)
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): "))
287 (copy-recursively (assoc-ref inputs "libmpack")
288 "mpack-src")
289 #t)))))
290 (inputs
291 `(("lua" ,lua)))
292 (native-inputs
293 `(("pkg-config" ,pkg-config)
294 ("libmpack" ,(package-source libmpack))))
295 (home-page "https://github.com/libmpack/libmpack-lua")
296 (synopsis "Lua bindings for the libmpack binary serialization library")))
297
298 (define-public lua5.1-libmpack
299 (package/inherit lua-libmpack
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
318 (define-public lua5.2-libmpack
319 (package/inherit lua-libmpack
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"
328 (string-append "MPACK_LUA_VERSION=" lua-version)
329 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
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
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
406 (define-public yaml-cpp
407 (package
408 (name "yaml-cpp")
409 (version "0.6.3")
410 (source
411 (origin
412 (method git-fetch)
413 (uri (git-reference
414 (url "https://github.com/jbeder/yaml-cpp")
415 (commit (string-append "yaml-cpp-" version))))
416 (file-name (git-file-name name version))
417 (sha256
418 (base32 "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s"))))
419 (build-system cmake-build-system)
420 (arguments
421 '(#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON")))
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)))
428
429 (define-public jsoncpp
430 (package
431 (name "jsoncpp")
432 (version "1.9.4")
433 (home-page "https://github.com/open-source-parsers/jsoncpp")
434 (source (origin
435 (method git-fetch)
436 (uri (git-reference (url home-page) (commit version)))
437 (file-name (git-file-name name version))
438 (sha256
439 (base32
440 "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
441 (build-system cmake-build-system)
442 (arguments
443 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
444 ,@(if (%current-target-system)
445 `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF")
446 '()))
447 ,@(if (%current-target-system)
448 '()
449 `(#:cmake ,cmake-bootstrap))))
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)))
456
457 ;; XXX: TODO(core-updates): Remove this package and apply the patch to the
458 ;; jsoncpp package. This patch fixes the package version declared in the
459 ;; pkg-config file.
460 (define-public jsoncpp-with-pkg-version
461 (package
462 (inherit jsoncpp)
463 (name "jsoncpp")
464 (version "1.9.4")
465 (home-page "https://github.com/open-source-parsers/jsoncpp")
466 (source (origin
467 (method git-fetch)
468 (uri (git-reference (url home-page) (commit version)))
469 (file-name (git-file-name name version))
470 (sha256
471 (base32
472 "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))
473 (patches
474 (search-patches "jsoncpp-pkg-config-version.patch"))))))
475
476 ;; Tensorflow does not build with jsoncpp 1.8.x. It is built with commit
477 ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2
478 ;; and 1.7.3.
479 (define-public jsoncpp-for-tensorflow
480 (package (inherit jsoncpp)
481 (name "jsoncpp")
482 (version "1.7.3")
483 (source (origin
484 (method git-fetch)
485 (uri (git-reference
486 (url "https://github.com/open-source-parsers/jsoncpp")
487 (commit version)))
488 (file-name (git-file-name name version))
489 (sha256
490 (base32
491 "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))))
492
493 (define-public capnproto
494 (package
495 (name "capnproto")
496 (version "0.8.0")
497 (source (origin
498 (method url-fetch)
499 (uri (string-append
500 "https://capnproto.org/capnproto-c++-"
501 version ".tar.gz"))
502 (sha256
503 (base32
504 "03f1862ljdshg7d0rg3j7jzgm3ip55kzd2y91q7p0racax3hxx6i"))))
505 (build-system gnu-build-system)
506 (arguments
507 `(#:phases
508 (modify-phases %standard-phases
509 (add-before 'check 'do-not-require-/etc/services
510 (lambda _
511 ;; Workaround for test that tries to resolve port name from
512 ;; /etc/services, which is not present in build environment.
513 (substitute* "src/kj/async-io-test.c++" ((":http") ":80"))
514 #t))
515 (add-before 'check 'use-tmp-for-temporary-files
516 (lambda _
517 ;; Use /tmp for temporary files, as the default /var/tmp directory
518 ;; doesn't exist.
519 (substitute* "src/kj/filesystem-disk-test.c++"
520 (("VAR\\_TMP \"/var/tmp\"")
521 "VAR_TMP \"/tmp\""))
522 #t)))))
523 (home-page "https://capnproto.org")
524 (synopsis "Capability-based RPC and serialization system")
525 (description
526 "Cap'n Proto is a very fast data interchange format and capability-based
527 RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.")
528 (license license:expat)))
529
530 (define-public libbson
531 (package
532 (name "libbson")
533 (version "1.6.2")
534 (source
535 (origin
536 (method url-fetch)
537 (uri (string-append "https://github.com/mongodb/libbson/releases/"
538 "download/" version "/libbson-" version ".tar.gz"))
539 (sha256
540 (base32
541 "1fj4554msq0rrz14snbj908dzqj46gh7jg9w9j0akn2b7q911m5a"))))
542 (build-system gnu-build-system)
543 (native-inputs `(("perl" ,perl)))
544 (home-page "http://mongoc.org/libbson/current/index.html")
545 (synopsis "C BSON library")
546 (description "Libbson can create and parse BSON documents. It can also
547 convert JSON documents to BSON and the opposite. BSON stands for Binary JSON,
548 it is comparable to protobuf.")
549 (license license:asl2.0)))
550
551 (define-public python-ruamel.yaml
552 (package
553 (name "python-ruamel.yaml")
554 (version "0.16.13")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (pypi-uri "ruamel.yaml" version))
559 (sha256
560 (base32
561 "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v"))))
562 (build-system python-build-system)
563 (native-inputs
564 `(("python-pytest" ,python-pytest)))
565 (propagated-inputs
566 `(("python-ruamel.yaml.clib" ,python-ruamel.yaml.clib)))
567 (arguments
568 `(;; TODO: Tests require packaging "ruamel.std.pathlib".
569 #:tests? #f))
570 (home-page "https://sourceforge.net/projects/ruamel-yaml/")
571 (synopsis "YAML 1.2 parser/emitter")
572 (description
573 "This package provides YAML parser/emitter that supports roundtrip
574 preservation of comments, seq/map flow style, and map key order. It
575 is a derivative of Kirill Simonov’s PyYAML 3.11. It supports YAML 1.2
576 and has round-trip loaders and dumpers. It supports comments. Block
577 style and key ordering are kept, so you can diff the source.")
578 (license license:expat)))
579
580 (define-public python-ruamel.yaml.clib
581 (package
582 (name "python-ruamel.yaml.clib")
583 (version "0.2.6")
584 (source
585 (origin
586 ;; pypi release code has cythonized code without corresponding source.
587 (method hg-fetch)
588 (uri (hg-reference
589 (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code")
590 (changeset version)))
591 (file-name (string-append name "-" version "-checkout"))
592 (sha256
593 (base32
594 "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs"))
595 (modules '((guix build utils)))
596 (snippet
597 '(begin
598 (delete-file "_ruamel_yaml.c")))))
599 (build-system python-build-system)
600 (arguments
601 `(#:tests? #f ; This package is split from python-ruamel.yaml and
602 ; depends on modules from it for the test suite.
603 #:phases
604 (modify-phases %standard-phases
605 (delete 'sanity-check) ; Depends on python-ruamel.yaml
606 (add-after 'unpack 'cythonize-code
607 (lambda _
608 (invoke "cython" "_ruamel_yaml.pyx"))))))
609 (native-inputs
610 `(("python-cython" ,python-cython)))
611 (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree")
612 (synopsis "C version of reader, parser and emitter for ruamel.yaml")
613 (description
614 "This package provides a C version of the reader, parser and emitter for
615 @code{ruamel.yaml} derived from libyaml.")
616 (license license:expat)))
617
618 (define-public python-cbor
619 (package
620 (name "python-cbor")
621 (version "1.0.0")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "cbor" version))
626 (sha256
627 (base32
628 "1dmv163cnslyqccrybkxn0c9s1jk1mmafmgxv75iamnz5lk5l8hk"))))
629 (build-system python-build-system)
630 (home-page "https://bitbucket.org/bodhisnarkva/cbor")
631 (synopsis "Implementation of the Concise Binary Object Representation")
632 (description
633 "Python-cbor provides an implementation of the Concise Binary Object
634 Representation (@dfn{CBOR}). CBOR is comparable to JSON, has a superset of
635 JSON's ability, but serializes to a binary format which is smaller and faster
636 to generate and parse. The two primary functions are @code{cbor.loads} and
637 @code{cbor.dumps}.")
638 (license license:asl2.0)))
639
640 (define-public flatbuffers
641 (package
642 (name "flatbuffers")
643 (version "2.0.0")
644 (source
645 (origin
646 (method git-fetch)
647 (uri (git-reference
648 (url "https://github.com/google/flatbuffers")
649 (commit (string-append "v" version))))
650 (file-name (git-file-name name version))
651 (sha256
652 (base32
653 "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"))))
654 (build-system cmake-build-system)
655 (arguments
656 '(#:build-type "Release"
657 #:configure-flags
658 (list "-DFLATBUFFERS_BUILD_SHAREDLIB=ON"
659 (string-append "-DCMAKE_INSTALL_LIBDIR="
660 (assoc-ref %outputs "out") "/lib"))
661 #:phases
662 (modify-phases %standard-phases
663 (add-after 'unpack 'make-writable
664 (lambda _ (for-each make-file-writable (find-files ".")))))))
665 (home-page "https://google.github.io/flatbuffers/")
666 (synopsis "Memory-efficient serialization library")
667 (description "FlatBuffers is a cross-platform serialization library for C++,
668 C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created for
669 game development and other performance-critical applications.")
670 (license license:asl2.0)))
671
672 (define-public python-feather-format
673 (package
674 (name "python-feather-format")
675 (version "0.4.1")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (pypi-uri "feather-format" version))
680 (sha256
681 (base32
682 "00w9hwz7sj3fkdjc378r066vdy6lpxmn6vfac3qx956k8lvpxxj5"))))
683 (build-system python-build-system)
684 (propagated-inputs
685 `(("python-pandas" ,python-pandas)
686 ("python-pyarrow" ,python-pyarrow)))
687 (home-page "https://github.com/wesm/feather")
688 (synopsis "Python wrapper to the Feather file format")
689 (description "This package provides a Python wrapper library to the
690 Apache Arrow-based Feather binary columnar serialization data frame format.")
691 (license license:asl2.0)))