summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLukas Gradl <lgradl@openmailbox.org>2016-06-21 08:46:15 -0500
committerLeo Famulari <leo@famulari.name>2016-06-25 11:28:53 -0400
commitd1ef573dec8fbe837c381675c5d043da7f74374c (patch)
tree5db54cb52869a6c036e506b22f00ad00c157da61 /gnu
parent5a7441910d264ec4a04f623267bd6aa0a58755f8 (diff)
downloadguix-d1ef573dec8fbe837c381675c5d043da7f74374c.tar.gz
gnu: Add msgpack.
* gnu/packages/serialization.scm (msgpack): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/serialization.scm53
1 files changed, 52 insertions, 1 deletions
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 8dfd21d6a5..42bb2b8f92 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,8 +22,13 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages documentation))
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages pkg-config))
 
 (define-public cereal
   (package
@@ -72,3 +78,48 @@
 arbitrary data types and reversibly turns them into different representations,
 such as compact binary encodings, XML, or JSON.")
     (license license:bsd-3)))
+
+
+(define-public msgpack
+  (package
+    (name "msgpack")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://github.com/msgpack/msgpack-c/releases/download/"
+         "cpp-" version "/msgpack-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "msgpack.pc.in" "a")))
+           (begin
+             (display
+              (string-append "Requires: " "zlib" "\n") p)
+             (close-output-port p))))
+       (sha256
+        (base32
+         "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h,
+    ;; zbuffer.hpp) which #include <zlib.h>.  However, 'guix gc --references'
+    ;; does not detect a store reference to zlib since these headers are not
+    ;; compiled.
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoconf
+           (lambda _
+             (system* "autoreconf" "-vfi"))))))
+    (home-page "http://www.msgpack.org")
+    (synopsis "Binary serialization library")
+    (description "Msgpack is a library for C/C++ that implements binary
+serialization.")
+    (license license:boost1.0)))