gnu: Add emacs-slime.
[jackhill/guix/guix.git] / gnu / packages / serialization.scm
CommitLineData
0149354d
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages serialization)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system cmake)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages doxygen))
26
27(define-public cereal
28 (package
29 (name "cereal")
30 (version "1.1.2")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "https://github.com/USCiLab/cereal/archive/v"
34 version ".tar.gz"))
35 (file-name (string-append name "-" version ".tar.gz"))
36 (sha256
37 (base32
38 "13bvsfzvm7yyp97k20iznq2j14dj3qiczvpq7g8897njw46psq25"))))
39 (build-system cmake-build-system)
40 (arguments
41 `(;; The only included tests are portability tests requiring
42 ;; cross-compilation and boost. Since we are building cereal on more
43 ;; platforms anyway, there is no compelling reason to build the tests.
44 #:tests? #f
45 #:out-of-source? #f
46 #:phases
47 (modify-phases %standard-phases
48 (delete 'configure)
49 (replace 'build
50 (lambda _
51 (substitute* "doc/doxygen.in"
52 (("@CMAKE_CURRENT_SOURCE_DIR@") "."))
53 (zero? (system* "doxygen" "doc/doxygen.in"))))
54 ;; There is no "install" target, so we have to provide our own
55 ;; "install" phase.
56 (replace 'install
57 (lambda* (#:key outputs #:allow-other-keys)
58 (let* ((out (assoc-ref outputs "out"))
59 (doc (string-append out "/share/cereal/docs"))
60 (include (string-append out "/include/cereal")))
61 (mkdir-p doc)
62 (mkdir-p include)
63 (copy-recursively "include/cereal" include)
64 (copy-recursively "doc/html" doc))
65 #t)))))
66 (native-inputs
67 `(("doxygen" ,doxygen)))
68 (home-page "http://uscilab.github.io/cereal/")
69 (synopsis "C++11 library for serialization")
70 (description
71 "Cereal is a header-only C++11 serialization library. Cereal takes
72arbitrary data types and reversibly turns them into different representations,
73such as compact binary encodings, XML, or JSON.")
74 (license license:bsd-3)))