From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: [PATCH 86/96] gnu: Add ocaml-cstruct Date: Tue, 3 Jan 2017 20:12:07 +0100 Message-ID: <20170103191217.6431-87-julien@lepiller.eu> References: <20170103191217.6431-1-julien@lepiller.eu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOUa0-00036v-G8 for guix-devel@gnu.org; Tue, 03 Jan 2017 14:17:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOUZz-0006fS-4w for guix-devel@gnu.org; Tue, 03 Jan 2017 14:17:04 -0500 Received: from dau94-h03-89-91-205-84.dsl.sta.abo.bbox.fr ([89.91.205.84]:35548 helo=skaro.lepiller.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOUZy-0006dn-Rp for guix-devel@gnu.org; Tue, 03 Jan 2017 14:17:03 -0500 Received: from localhost (localhost [127.0.0.1]) by skaro.lepiller.eu (Postfix) with ESMTP id 9146C7F81F for ; Tue, 3 Jan 2017 20:17:00 +0100 (CET) Received: from skaro.lepiller.eu ([127.0.0.1]) by localhost (lepiller.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id thKnf1m-Wo-p for ; Tue, 3 Jan 2017 20:16:56 +0100 (CET) Received: from localhost.localdomain (128-79-116-134.hfc.dyn.abo.bbox.fr [128.79.116.134]) by skaro.lepiller.eu (Postfix) with ESMTPSA id 8932681579 for ; Tue, 3 Jan 2017 20:13:47 +0100 (CET) In-Reply-To: <20170103191217.6431-1-julien@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/ocaml.scm (ocaml-cstruct): New variable. --- gnu/packages/ocaml.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index ab2197c0c..4a861bcd7 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2661,3 +2661,30 @@ and bigarrays, based on new primitives added in version 4.01. It works on strings, bytes and bigstring (Bigarrys of chars), and provides submodules for big- and little-endian, with their unsafe counter-parts.") (license license:lgpl2.1))) + +(define-public ocaml-cstruct + (package + (name "ocaml-cstruct") + (version "2.3.1") + (home-page "https://github.com/mirage/ocaml-cstruct/") + (source + (origin + (method url-fetch) + (uri (string-append home-page "/archive/v" version ".tar.gz")) + (sha256 (base32 + "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949")))) + (build-system ocaml-build-system) + (arguments `(#:configure-flags + (list "--enable-lwt" "--enable-async"))) + (native-inputs `(("ounit" ,ocaml-ounit) + ("ppx-tools" ,ocaml-ppx-tools) + ("camlp4" ,camlp4))) + (propagated-inputs `(("ocplib-endian" ,ocaml-ocplib-endian) + ("lwt" ,ocaml-lwt) + ("async" ,ocaml-async) + ("sexplib" ,ocaml-sexplib))) + (synopsis "Access C structures via a camlp4 extension") + (description "Cstruct is a library and syntax extension to make it easier +to access C-like structures directly from OCaml. It supports both reading and +writing to these structures, and they are accessed via the Bigarray module.") + (license license:isc))) -- 2.11.0