Patchwork Add msgpack

login
register
mail settings
Submitter Lukas Gradl
Date May 30, 2016, 8:50 p.m.
Message ID <87wpmbuv6m.fsf@openmailbox.org>
Download mbox | patch
Permalink /patch/12637/
State New
Headers show

Comments

Lukas Gradl - May 30, 2016, 8:50 p.m.
Hello Guix,

Attached is a patch for the c/c++ version of msgpack.  This is a
dependency of the Ring.

Thank you!
Leo Famulari - May 31, 2016, 9:45 p.m.
On Mon, May 30, 2016 at 03:50:41PM -0500, Lukas Gradl wrote:
> * gnu/packages/serialization.scm (msgpack): New variable.

LGTM. Waiting on a response to some questions about the 'googletest'
dependency.
Efraim Flashner - June 1, 2016, 4:49 a.m.
On Mon, May 30, 2016 at 03:50:41PM -0500, Lukas Gradl wrote:
> 
> Hello Guix,
> 
> Attached is a patch for the c/c++ version of msgpack.  This is a
> dependency of the Ring.
> 
> Thank you!
> 

> From 25eef52146bc84e83d90e429a0a2a5ca607280bc Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Mon, 30 May 2016 15:46:29 -0500
> Subject: [PATCH] gnu: serialization: Add msgpack.
> 
> * gnu/packages/serialization.scm (msgpack): New variable.
> ---
>  gnu/packages/serialization.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
> index 8dfd21d..524754b 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,7 +22,11 @@
>    #: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 autotools)
> +  #:use-module (gnu packages check)
> +  #:use-module (gnu packages compression)
>    #:use-module (gnu packages documentation))
>  
>  (define-public cereal
> @@ -72,3 +77,29 @@
>  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-1.4.1/msgpack-" version ".tar.gz"))
                ^^^
            "cpp-" version "/msgpack-"

> +       (sha256
> +        (base32
> +         "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("googletest" ,googletest)))
> +    (inputs
> +     `(("zlib" ,zlib)))
> +    (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)))
> -- 
> 2.7.4
>
Leo Famulari - June 6, 2016, 2:07 p.m.
On Mon, May 30, 2016 at 03:50:41PM -0500, Lukas Gradl wrote:
> * gnu/packages/serialization.scm (msgpack): New variable.

> +    (inputs
> +     `(("zlib" ,zlib)))

I noticed that the output does not refer to zlib:

$ guix gc --references $(./pre-inst-env guix build msgpack)
/gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22
/gnu/store/jh52sklgbvq5f0z637wr99a64y25cx8r-msgpack-1.4.1
/gnu/store/v39bh3ln3ncnzhyw0kd12d46kww9747v-gcc-4.9.3-lib

However, the compilation fails without it.

We need to make sure that msgpack can find zlib at run time. Lukas, can
you check if there is a build-time configuration option to provide the
path to zlib?
Leo Famulari - June 11, 2016, 3:06 a.m.
On Mon, Jun 06, 2016 at 10:07:37AM -0400, Leo Famulari wrote:
> On Mon, May 30, 2016 at 03:50:41PM -0500, Lukas Gradl wrote:
> > * gnu/packages/serialization.scm (msgpack): New variable.
> 
> > +    (inputs
> > +     `(("zlib" ,zlib)))
> 
> I noticed that the output does not refer to zlib:
> 
> $ guix gc --references $(./pre-inst-env guix build msgpack)
> /gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22
> /gnu/store/jh52sklgbvq5f0z637wr99a64y25cx8r-msgpack-1.4.1
> /gnu/store/v39bh3ln3ncnzhyw0kd12d46kww9747v-gcc-4.9.3-lib
> 
> However, the compilation fails without it.
> 
> We need to make sure that msgpack can find zlib at run time. Lukas, can
> you check if there is a build-time configuration option to provide the
> path to zlib?

This is from the top of the msgpack source tree:
$ grep -rI zlib
include/msgpack/zbuffer.h:#include <zlib.h>
include/msgpack/zbuffer.hpp:#include <zlib.h>

Should we do string substitution to provide the abolute path to the zlib
headers?

Patch

From 25eef52146bc84e83d90e429a0a2a5ca607280bc Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Mon, 30 May 2016 15:46:29 -0500
Subject: [PATCH] gnu: serialization: Add msgpack.

* gnu/packages/serialization.scm (msgpack): New variable.
---
 gnu/packages/serialization.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 8dfd21d..524754b 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,7 +22,11 @@ 
   #: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 autotools)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation))
 
 (define-public cereal
@@ -72,3 +77,29 @@ 
 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-1.4.1/msgpack-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)))
+    (inputs
+     `(("zlib" ,zlib)))
+    (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)))
-- 
2.7.4