Commit | Line | Data |
---|---|---|
0149354d RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> | |
d1ef573d | 3 | ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> |
f50f4ae4 | 4 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
557d3328 | 5 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
43593f5b | 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
0149354d RW |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages serialization) | |
24 | #:use-module ((guix licenses) #:prefix license:) | |
25 | #:use-module (guix packages) | |
26 | #:use-module (guix download) | |
27 | #:use-module (guix build-system cmake) | |
d1ef573d | 28 | #:use-module (guix build-system gnu) |
0149354d | 29 | #:use-module (gnu packages) |
d1ef573d | 30 | #:use-module (gnu packages autotools) |
f50f4ae4 | 31 | #:use-module (gnu packages boost) |
d1ef573d LG |
32 | #:use-module (gnu packages check) |
33 | #:use-module (gnu packages compression) | |
34 | #:use-module (gnu packages documentation) | |
f47dc8dd LF |
35 | #:use-module (gnu packages pkg-config) |
36 | #:use-module (gnu packages python)) | |
0149354d RW |
37 | |
38 | (define-public cereal | |
39 | (package | |
40 | (name "cereal") | |
43593f5b | 41 | (version "1.2.1") |
0149354d RW |
42 | (source (origin |
43 | (method url-fetch) | |
44 | (uri (string-append "https://github.com/USCiLab/cereal/archive/v" | |
45 | version ".tar.gz")) | |
46 | (file-name (string-append name "-" version ".tar.gz")) | |
47 | (sha256 | |
48 | (base32 | |
43593f5b | 49 | "0kj32h3j2128anig0g9gzw82kfyd5xqfkwq6vdyv900jx8i1qckx")))) |
0149354d RW |
50 | (build-system cmake-build-system) |
51 | (arguments | |
52 | `(;; The only included tests are portability tests requiring | |
53 | ;; cross-compilation and boost. Since we are building cereal on more | |
54 | ;; platforms anyway, there is no compelling reason to build the tests. | |
55 | #:tests? #f | |
56 | #:out-of-source? #f | |
57 | #:phases | |
58 | (modify-phases %standard-phases | |
59 | (delete 'configure) | |
60 | (replace 'build | |
61 | (lambda _ | |
62 | (substitute* "doc/doxygen.in" | |
63 | (("@CMAKE_CURRENT_SOURCE_DIR@") ".")) | |
64 | (zero? (system* "doxygen" "doc/doxygen.in")))) | |
65 | ;; There is no "install" target, so we have to provide our own | |
66 | ;; "install" phase. | |
67 | (replace 'install | |
68 | (lambda* (#:key outputs #:allow-other-keys) | |
69 | (let* ((out (assoc-ref outputs "out")) | |
70 | (doc (string-append out "/share/cereal/docs")) | |
71 | (include (string-append out "/include/cereal"))) | |
72 | (mkdir-p doc) | |
73 | (mkdir-p include) | |
74 | (copy-recursively "include/cereal" include) | |
75 | (copy-recursively "doc/html" doc)) | |
76 | #t))))) | |
77 | (native-inputs | |
78 | `(("doxygen" ,doxygen))) | |
79 | (home-page "http://uscilab.github.io/cereal/") | |
80 | (synopsis "C++11 library for serialization") | |
81 | (description | |
82 | "Cereal is a header-only C++11 serialization library. Cereal takes | |
83 | arbitrary data types and reversibly turns them into different representations, | |
84 | such as compact binary encodings, XML, or JSON.") | |
85 | (license license:bsd-3))) | |
d1ef573d LG |
86 | |
87 | ||
88 | (define-public msgpack | |
89 | (package | |
90 | (name "msgpack") | |
91 | (version "1.4.1") | |
92 | (source | |
93 | (origin | |
94 | (method url-fetch) | |
95 | (uri | |
96 | (string-append | |
97 | "https://github.com/msgpack/msgpack-c/releases/download/" | |
98 | "cpp-" version "/msgpack-" version ".tar.gz")) | |
99 | (snippet | |
100 | '(let ((p (open-file "msgpack.pc.in" "a"))) | |
101 | (begin | |
102 | (display | |
103 | (string-append "Requires: " "zlib" "\n") p) | |
104 | (close-output-port p)))) | |
105 | (sha256 | |
106 | (base32 | |
107 | "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica")))) | |
108 | (build-system gnu-build-system) | |
109 | (native-inputs | |
110 | `(("googletest" ,googletest) | |
111 | ("autoconf" ,autoconf) | |
112 | ("automake" ,automake) | |
113 | ("libtool" ,libtool) | |
114 | ("pkg-config" ,pkg-config))) | |
115 | (propagated-inputs | |
116 | `(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h, | |
117 | ;; zbuffer.hpp) which #include <zlib.h>. However, 'guix gc --references' | |
118 | ;; does not detect a store reference to zlib since these headers are not | |
119 | ;; compiled. | |
120 | (arguments | |
121 | `(#:phases | |
122 | (modify-phases %standard-phases | |
123 | (add-before 'configure 'autoconf | |
124 | (lambda _ | |
125 | (system* "autoreconf" "-vfi")))))) | |
126 | (home-page "http://www.msgpack.org") | |
127 | (synopsis "Binary serialization library") | |
128 | (description "Msgpack is a library for C/C++ that implements binary | |
129 | serialization.") | |
130 | (license license:boost1.0))) | |
f50f4ae4 DC |
131 | |
132 | (define-public yaml-cpp | |
133 | (package | |
134 | (name "yaml-cpp") | |
135 | (version "0.5.3") | |
136 | (source (origin | |
137 | (method url-fetch) | |
138 | (uri (string-append | |
139 | "https://github.com/jbeder/yaml-cpp/archive/" | |
140 | "yaml-cpp-" version ".tar.gz")) | |
141 | (sha256 | |
142 | (base32 | |
143 | "1vk6pjh0f5k6jwk2sszb9z5169whmiha9ainbdpa1arxlkq7v3b6")))) | |
144 | (build-system cmake-build-system) | |
145 | (inputs | |
146 | `(("boost" ,boost))) | |
147 | (native-inputs | |
148 | `(("python" ,python))) | |
149 | (home-page "https://github.com/jbeder/yaml-cpp") | |
150 | (synopsis "YAML parser and emitter in C++") | |
151 | (description "YAML parser and emitter in C++ matching the YAML 1.2 spec.") | |
152 | (license license:bsd-3))) | |
cd131a76 DC |
153 | |
154 | (define-public jsoncpp | |
155 | (package | |
156 | (name "jsoncpp") | |
608bf1d3 | 157 | (version "1.7.7") |
cd131a76 DC |
158 | (source (origin |
159 | (method url-fetch) | |
160 | (uri (string-append | |
161 | "https://github.com/open-source-parsers/jsoncpp/archive/" | |
162 | version ".tar.gz")) | |
163 | (file-name (string-append name "-" version ".tar.gz")) | |
164 | (sha256 | |
165 | (base32 | |
608bf1d3 | 166 | "15wg14480lrbrhc2myk9rwpwb2gzix9bk80p4y7gxg3zrzml0xh8")))) |
cd131a76 DC |
167 | (build-system cmake-build-system) |
168 | (home-page "https://github.com/open-source-parsers/jsoncpp") | |
996f5ece EB |
169 | (arguments |
170 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"))) | |
cd131a76 DC |
171 | (synopsis "C++ library for interacting with JSON") |
172 | (description "JsonCpp is a C++ library that allows manipulating JSON values, | |
173 | including serialization and deserialization to and from strings. It can also | |
174 | preserve existing comment in unserialization/serialization steps, making | |
175 | it a convenient format to store user input files.") | |
176 | (license license:expat))) | |
557d3328 MB |
177 | |
178 | (define-public capnproto | |
179 | (package | |
180 | (name "capnproto") | |
181 | (version "0.5.3") | |
182 | (source (origin | |
183 | (method url-fetch) | |
184 | (uri (string-append | |
185 | "https://capnproto.org/capnproto-c++-" | |
186 | version ".tar.gz")) | |
187 | (sha256 | |
188 | (base32 | |
189 | "1yvaadhgakskqq5wpv53hd6fc3pp17mrdldw4i5cvgck4iwprcfd")))) | |
190 | (build-system gnu-build-system) | |
191 | (arguments | |
192 | `(#:phases | |
193 | (modify-phases %standard-phases | |
194 | (add-before 'check 'do-not-require-/etc/services | |
195 | (lambda _ | |
196 | ;; Workaround for test that tries to resolve port name from | |
197 | ;; /etc/services, which is not present in build environment. | |
198 | (substitute* "src/kj/async-io-test.c++" ((":http") ":80")) | |
199 | #t))))) | |
200 | (home-page "https://capnproto.org") | |
201 | (synopsis "Capability-based RPC and serialization system") | |
202 | (description | |
203 | "Cap'n Proto is a very fast data interchange format and capability-based | |
204 | RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.") | |
205 | (license license:expat))) |