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