unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: guix-devel@gnu.org
Subject: Re: [PATCH 10/96] gnu: Add ocamlmod.
Date: Sun, 15 Jan 2017 14:14:15 +0100	[thread overview]
Message-ID: <20170115141415.630135d3@lepiller.eu> (raw)
In-Reply-To: <CAL1_im==n8x7GDB-J0RasHc6VWzCVyO0stY7c6icj5Q9gAZFvg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

Are you still working on this, or do you expect me to push the
remaining patches? I have reworked them a bit, you will find attached a
patchset rebased on master.

The first patch fixes camlzip (reported by Ben Woodcroft). I added a
snippet in janestreet-origin to fix an issue with ppx packages. They
assume they are installed by opam, where the modules are installed in
lib (a binary, ppx is installed in lib/<name>/ppx and is referenced
as ../lib/<name>/ppx, where . is the module directory: lib/<name> with
opam, and lib/ocaml/site-lib/<name> for us). I also fixed bap so it
actually installs its modules. 

On Wed, 4 Jan 2017 19:19:38 +0100
David Craven <david@craven.ch> wrote:

> So fixed it in commits:
> 3dcaa1226dc8bbe63cfed27f0d566deaefc5fefd
> 337273e41f6bb9486424d0bb636e69f9ca55d88f
> 
> It's going to take me a while to finish going through ~100 patches you
> sent. Here is the ones that are not merged yet rebased on master.


[-- Attachment #2: bap.patchset --]
[-- Type: application/octet-stream, Size: 152662 bytes --]

From 645bd5e08210a27e0000ae1f0fc689b773e0aedf Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sun, 15 Jan 2017 12:30:09 +0100
Subject: [PATCH 01/76] gnu: camlzip: Install both modules.

* gnu/packages/ocaml.scm (camlzip) [arguments]: Install both zip and camlzip
modules.
---
 gnu/packages/ocaml.scm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 93020f1c0..f8609bdc9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -804,10 +804,19 @@ other XUnit testing frameworks.")
      `(#:phases
        (modify-phases %standard-phases
          (delete 'configure)
-         (add-before 'install 'fix-install-name
-           (lambda* (#:key #:allow-other-keys)
-             (substitute* "Makefile"
-               (("install zip") "install camlzip")))))
+         (add-after 'install 'install-camlzip
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
+               (mkdir-p dir)
+               (call-with-output-file (string-append dir "/META")
+                 (lambda (port)
+                   (format port "version=\"1.06\"\n")
+                   (format port "requires=\"unix\"\n")
+                   (format port "archive(byte)=\"zip.cma\"\n")
+                   (format port "archive(native)=\"zip.cmxa\"\n")
+                   (format port "archive(native,plugin)=\"zip.cmxs\"\n")
+                   (format port "directory=\"../zip\"\n")))))))
        #:install-target "install-findlib"
        #:make-flags
        (list "all" "allopt"
-- 
2.11.0

From b22b7f846ffb51b3a9f3fcd011c96d44cea41e60 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:45:15 +0100
Subject: [PATCH 02/76] gnu: Add ocaml-fmt.

* gnu/packages/ocaml.scm (ocaml-fmt): 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 f8609bdc9..26ca275cf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1227,3 +1227,30 @@ module automatically handles syntax errors, help messages and UNIX man page
 generation. It supports programs with single or multiple commands and respects
 most of the POSIX and GNU conventions.")
     (license license:bsd-3)))
+
+(define-public ocaml-fmt
+  (package
+    (name "ocaml-fmt")
+    (version "0.8.0")
+    (home-page "http://erratique.ch/software/fmt")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/fmt-" version ".tbz"))
+        (sha256 (base32
+                  "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("opam" ,opam)
+                     ("topkg" ,ocaml-topkg)))
+    (propagated-inputs `(("result" ,ocaml-result)
+                         ("cmdliner" ,ocaml-cmdliner)))
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build" "--with-base-unix" "true"
+                                     "--with-cmdliner" "true")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (synopsis "OCaml Format pretty-printer combinators")
+    (description "Fmt exposes combinators to devise Format pretty-printing
+functions.")
+    (license license:isc)))
-- 
2.11.0

From dcec40f76de14b15968f4448c2fff943ffe6f0ba Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:46:33 +0100
Subject: [PATCH 03/76] gnu: Add ocaml-astring.

* gnu/packages/ocaml.scm (ocaml-astring): New variable.
---
 gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 26ca275cf..ac007e6e7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1254,3 +1254,32 @@ most of the POSIX and GNU conventions.")
     (description "Fmt exposes combinators to devise Format pretty-printing
 functions.")
     (license license:isc)))
+
+(define-public ocaml-astring
+  (package
+    (name "ocaml-astring")
+    (version "0.8.3")
+    (home-page "http://erratique.ch/software/astring")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/astring-" version ".tbz"))
+        (sha256 (base32
+                  "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("opam" ,opam)
+                     ("topkg" ,ocaml-topkg)))
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (synopsis "Alternative String module for OCaml")
+    (description "Astring exposes an alternative String module for OCaml.  This
+module balances minimality and expressiveness for basic, index-free, string
+processing and provides types and functions for substrings, string sets and
+string maps.  The String module exposed by Astring has exception safe functions,
+removes deprecated and rarely used functions, alters some signatures and names,
+adds a few missing functions and fully exploits OCaml's newfound string
+immutability.")
+    (license license:isc)))
-- 
2.11.0

From db539c5cdb89f7d5d4495bf25ff0f22b220c3cf3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:47:27 +0100
Subject: [PATCH 04/76] gnu: Add ocaml-alcotest.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ac007e6e7..d567f8754 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1283,3 +1283,34 @@ removes deprecated and rarely used functions, alters some signatures and names,
 adds a few missing functions and fully exploits OCaml's newfound string
 immutability.")
     (license license:isc)))
+
+(define-public ocaml-alcotest
+  (package
+    (name "ocaml-alcotest")
+    (version "0.7.2")
+    (home-page "https://github.com/mirage/alcotest/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "releases/download/" version
+                                  "/alcotest-" version ".tbz"))
+              (sha256
+                (base32
+                  "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)
+                     ("topkg" ,ocaml-topkg)))
+    (propagated-inputs `(("fmt" ,ocaml-fmt)
+                         ("astring" ,ocaml-astring)))
+    (synopsis "Lightweight OCaml test framework")
+    (description "Alcotest exposes simple interface to perform unit tests.  It
+exposes a simple TESTABLE module type, a check function to assert test
+predicates and a run function to perform a list of unit -> unit test callbacks.
+Alcotest provides a quiet and colorful output where only faulty runs are fully
+displayed at the end of the run (with the full logs ready to inspect), with a
+simple (yet expressive) query language to select the tests to run.")
+    (license license:isc)))
-- 
2.11.0

From 1445c22ed2814f70dcb0d49ae033e758ff07b242 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:50:19 +0100
Subject: [PATCH 05/76] gnu: Add ocaml-ppx-tools.

* gnu/packages/ocaml.scm (ocaml-ppx-tools): New variables.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d567f8754..c4c7c8b0f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1314,3 +1314,21 @@ Alcotest provides a quiet and colorful output where only faulty runs are fully
 displayed at the end of the run (with the full logs ready to inspect), with a
 simple (yet expressive) query language to select the tests to run.")
     (license license:isc)))
+
+(define-public ocaml-ppx-tools
+  (package
+    (name "ocaml-ppx-tools")
+    (version "5.0+4.02.0")
+    (home-page "https://github.com/alainfrisch/ppx_tools/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:tests? #f))
+    (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
+    (description "Tools for authors of ppx rewriters and other syntactic tools.")
+    (license license:expat)))
-- 
2.11.0

From e0e92816a3d25f582bc59cd196e46932388d6d66 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:51:50 +0100
Subject: [PATCH 06/76] gnu: Add ocaml-react.

* gnu/packages/ocaml.scm (ocaml-react): New variable.
---
 gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c4c7c8b0f..031ce63aa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1332,3 +1332,28 @@ simple (yet expressive) query language to select the tests to run.")
     (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
     (description "Tools for authors of ppx rewriters and other syntactic tools.")
     (license license:expat)))
+
+(define-public ocaml-react
+  (package
+    (name "ocaml-react")
+    (version "1.2.0")
+    (home-page "http://erratique.ch/software/react")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/react-" version ".tbz"))
+        (sha256 (base32
+                  "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("opam" ,opam)))
+    (arguments `(#:tests? #f
+                 #:build-flags (list "native=true" "native-dynlink=true")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (synopsis "Declarative events and signals for OCaml")
+    (description "React is an OCaml module for functional reactive programming
+(FRP).  It provides support to program with time varying values: declarative
+events and signals.  React doesn't define any primitive event or signal, it
+lets the client choose the concrete timeline.")
+    (license license:bsd-3)))
-- 
2.11.0

From 8265790ad1077ceb14d184a8824b4c54a23a7841 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:53:24 +0100
Subject: [PATCH 07/76] gnu: Add ocaml-ssl.

* gnu/packages/ocaml.scm (ocaml-ssl): New variable.
---
 gnu/packages/ocaml.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 031ce63aa..7aaf6ae6a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -44,6 +44,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages time)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -1357,3 +1358,34 @@ simple (yet expressive) query language to select the tests to run.")
 events and signals.  React doesn't define any primitive event or signal, it
 lets the client choose the concrete timeline.")
     (license license:bsd-3)))
+
+(define-public ocaml-ssl
+  (package
+    (name "ocaml-ssl")
+    (version "0.5.3")
+    (home-page "https://github.com/savonet/ocaml-ssl/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "1ds5gzyzpcgwn7h40dmjkll7g990cr82ay05b2a7nrclvv6fdpg8"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'bootstrap
+                     (lambda* (#:key #:allow-other-keys)
+                       (system* "./bootstrap")
+                       (substitute* "src/OCamlMakefile"
+                         (("/bin/sh") (which "bash")))
+                       (substitute* "configure"
+                         (("/bin/sh") (which "bash"))))))))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("which" ,which)))
+    (propagated-inputs `(("openssl" ,openssl)))
+    (synopsis "OCaml bindings for OpenSSL")
+    (description "OCaml bindings for OpenSSL.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From 67872582a0a5666d11aec9c2fe518def03af5ea9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:55:04 +0100
Subject: [PATCH 08/76] gnu: Add ocaml-lwt.

* gnu/packages/ocaml.scm (ocaml-lwt): New variable.
---
 gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7aaf6ae6a..04fe01a7a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,8 +32,10 @@
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
@@ -1389,3 +1391,38 @@ lets the client choose the concrete timeline.")
     (synopsis "OCaml bindings for OpenSSL")
     (description "OCaml bindings for OpenSSL.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-lwt
+  (package
+    (name "ocaml-lwt")
+    (version "2.6.0")
+    (home-page "https://github.com/ocsigen/lwt")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:configure-flags
+                 (list "--enable-ssl" "--enable-glib" "--enable-react"
+                       "--enable-ppx")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'disable-some-checks
+                     (lambda* (#:key #:allow-other-keys)
+                       (substitute* "tests/unix/main.ml"
+                         (("Test_mcast.suite;") "")))))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("ppx-tools" ,ocaml-ppx-tools)))
+    (inputs `(("libev" ,libev)
+              ("glib" ,glib)))
+    (propagated-inputs `(("result" ,ocaml-result)
+                         ("ocaml-ssl" ,ocaml-ssl)
+                         ("ocaml-react" ,ocaml-react)))
+    (synopsis "Cooperative threads and I/O in monadic style")
+    (description "Lwt provides typed, composable cooperative threads.  These
+make it easy to run normally-blocking I/O operations concurrently in a single
+process.  Also, in many cases, Lwt threads can interact without the need for
+locks or other synchronization primitives.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From 95c6382eb01da40d9fda81804d29e9431ebb4c62 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:17:09 +0100
Subject: [PATCH 09/76] gnu: Add ocaml-logs.

* gnu/packages/ocaml.scm (ocaml-logs): New variable.
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 04fe01a7a..45a0ea3fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1426,3 +1426,33 @@ make it easy to run normally-blocking I/O operations concurrently in a single
 process.  Also, in many cases, Lwt threads can interact without the need for
 locks or other synchronization primitives.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-logs
+  (package
+    (name "ocaml-logs")
+    (version "0.6.2")
+    (home-page "http://erratique.ch/software/logs")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/logs-" version ".tbz"))
+              (sha256
+                (base32
+                  "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build" "--with-js_of_ocaml" "false")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("fmt" ,ocaml-fmt)
+                         ("lwt" ,ocaml-lwt)
+                         ("mtime" ,ocaml-mtime)
+                         ("result" ,ocaml-result)
+                         ("cmdliner" ,ocaml-cmdliner)
+                         ("topkg" ,ocaml-topkg)))
+    (synopsis "Logging infrastructure for OCaml")
+    (description "Logs provides a logging infrastructure for OCaml.  Logging is
+performed on sources whose reporting level can be set independently.  Log
+message report is decoupled from logging and is handled by a reporter.")
+    (license license:isc)))
-- 
2.11.0

From 4c424e3ad6d51570248375fe7b5accc6d232ccd7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:01 +0100
Subject: [PATCH 10/76] gnu: Add ocaml-fpath.

* gnu/packages/ocaml.scm (ocaml-fpath): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 45a0ea3fa..add6ee29f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1456,3 +1456,29 @@ locks or other synchronization primitives.")
 performed on sources whose reporting level can be set independently.  Log
 message report is decoupled from logging and is handled by a reporter.")
     (license license:isc)))
+
+(define-public ocaml-fpath
+  (package
+    (name "ocaml-fpath")
+    (version "0.7.1")
+    (home-page "http://erratique.ch/software/fpath")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/fpath-" version ".tbz"))
+              (sha256
+                (base32
+                  "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("topkg" ,ocaml-topkg)
+                         ("astring" ,ocaml-astring)))
+    (synopsis "File system paths for OCaml")
+    (description "Fpath is an OCaml module for handling file system paths with
+POSIX or Windows conventions.  Fpath processes paths without accessing the
+file system and is independent from any system library.")
+    (license license:isc)))
-- 
2.11.0

From f7cb5b98465be23ffbb0576afd7e7118d61f1dd1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:53 +0100
Subject: [PATCH 11/76] gnu: Add ocaml-bos.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index add6ee29f..4c582c63f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1482,3 +1482,34 @@ message report is decoupled from logging and is handled by a reporter.")
 POSIX or Windows conventions.  Fpath processes paths without accessing the
 file system and is independent from any system library.")
     (license license:isc)))
+
+(define-public ocaml-bos
+  (package
+    (name "ocaml-bos")
+    (version "0.1.4")
+    (home-page "http://erratique.ch/software/bos")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/bos-" version ".tbz"))
+              (sha256
+                (base32
+                  "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("topkg" ,ocaml-topkg)
+                         ("astring" ,ocaml-astring)
+                         ("fmt" ,ocaml-fmt)
+                         ("fpath" ,ocaml-fpath)
+                         ("logs" ,ocaml-logs)
+                         ("rresult" ,ocaml-rresult)))
+    (synopsis "Basic OS interaction for OCaml")
+    (description "Bos provides support for basic and robust interaction with
+the operating system in OCaml.  It has functions to access the process
+environment, parse command line arguments, interact with the file system and
+run command line programs.")
+    (license license:isc)))
-- 
2.11.0

From 957dd156674bb2587dc4a6d1f020f1f164ed6e90 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:21:52 +0100
Subject: [PATCH 12/76] gnu: Add ocaml-xmlm.

* gnu/packages/ocaml.scm (ocaml-xmlm): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4c582c63f..cd9cdcea6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1513,3 +1513,29 @@ the operating system in OCaml.  It has functions to access the process
 environment, parse command line arguments, interact with the file system and
 run command line programs.")
     (license license:isc)))
+
+(define-public ocaml-xmlm
+  (package
+    (name "ocaml-xmlm")
+    (version "1.2.0")
+    (home-page "http://erratique.ch/software/xmlm")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/xmlm-" version ".tbz"))
+              (sha256
+                (base32
+                  "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (replace 'build
+                     (lambda* (#:key #:allow-other-keys)
+                       (zero? (system* "pkg/build" "true")))))))
+    (native-inputs `(("opam" ,opam)))
+    (synopsis "Streaming XML codec for OCaml")
+    (description "Xmlm is a streaming codec to decode and encode the XML data
+format.  It can process XML documents without a complete in-memory
+representation of the data.")
+    (license license:isc)))
-- 
2.11.0

From 5c227e6b12017543bbcf159af13b3d682f124242 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:22:48 +0100
Subject: [PATCH 13/76] gnu: Add ocaml-ulex.

* gnu/packages/ocaml.scm (ocaml-ulex): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index cd9cdcea6..baf5201bb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1539,3 +1539,29 @@ run command line programs.")
 format.  It can process XML documents without a complete in-memory
 representation of the data.")
     (license license:isc)))
+
+(define-public ocaml-ulex
+  (package
+    (name "ocaml-ulex")
+    (version "1.1")
+    (home-page "http://www.cduce.org/download.html#side")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.cduce.org/download/ulex-"
+                                  version ".tar.gz"))
+              (sha256
+                (base32
+                  "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:tests? #f
+                 #:make-flags
+                 (list "all.opt"
+                       (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
+                                      "-cflags -I,"
+                                      (assoc-ref %build-inputs "camlp4")
+                                      "/lib/ocaml/site-lib/camlp4"))))
+    (native-inputs `(("camlp4" ,camlp4)))
+    (synopsis "Lexer generator for Unicode and OCaml")
+    (description "Lexer generator for Unicode and OCaml.")
+    (license license:expat)))
-- 
2.11.0

From 4494871060a664d65600ba2c985c17685e116625 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:24:17 +0100
Subject: [PATCH 14/76] gnu: Add ocaml-uchar.

* gnu/packages/ocaml.scm (ocaml-uchar): New variable.
---
 gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index baf5201bb..ae8832ebd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1565,3 +1565,27 @@ representation of the data.")
     (synopsis "Lexer generator for Unicode and OCaml")
     (description "Lexer generator for Unicode and OCaml.")
     (license license:expat)))
+
+(define-public ocaml-uchar
+  (package
+    (name "ocaml-uchar")
+    (version "0.0.1")
+    (home-page "https://github.com/ocaml/uchar")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/download/v" version
+                            "/uchar-" version ".tbz"))
+        (sha256 (base32
+                  "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "native=true" "native-dynlink=true")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (synopsis "Compatibility library for OCaml's Uchar module")
+    (description "The uchar package provides a compatibility library for the
+`Uchar` module introduced in OCaml 4.03.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From e608b8a811e0a8a205d8a771bf1638c4ba2fc88c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:25:08 +0100
Subject: [PATCH 15/76] gnu: Add ocaml-uutf.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ae8832ebd..3a7b1dff6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1589,3 +1589,34 @@ representation of the data.")
     (description "The uchar package provides a compatibility library for the
 `Uchar` module introduced in OCaml 4.03.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-uutf
+  (package
+    (name "ocaml-uutf")
+    (version "1.0.0")
+    (home-page "http://erratique.ch/software/uutf")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/uutf-" version ".tbz"))
+              (sha256
+                (base32
+                  "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)
+                     ("topkg" ,ocaml-topkg)))
+    (propagated-inputs `(("uchar" ,ocaml-uchar)
+                         ("cmdliner" ,ocaml-cmdliner)))
+    (synopsis "Non-blocking streaming Unicode codec for OCaml")
+    (description "Uutf is a non-blocking streaming codec to decode and encode
+the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes.  It can efficiently
+work character by character without blocking on IO.  Decoders perform character
+position tracking and support newline normalization.
+
+Functions are also provided to fold over the characters of UTF encoded OCaml
+string values and to directly encode characters in OCaml Buffer.t values.")
+    (license license:isc)))
-- 
2.11.0

From d38446f96b40298cd597b77324d0bcbeb90ae18f Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:35:16 +0100
Subject: [PATCH 16/76] gnu: Add ocaml-jsonm.

* gnu/packages/ocaml.scm (ocaml-jsonm): 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 3a7b1dff6..65d918822 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1620,3 +1620,30 @@ position tracking and support newline normalization.
 Functions are also provided to fold over the characters of UTF encoded OCaml
 string values and to directly encode characters in OCaml Buffer.t values.")
     (license license:isc)))
+
+(define-public ocaml-jsonm
+  (package
+    (name "ocaml-jsonm")
+    (version "1.0.0")
+    (home-page "http://erratique.ch/software/jsonm")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/jsonm-" version ".tbz"))
+              (sha256
+                (base32
+                  "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)
+                     ("topkg" ,ocaml-topkg)))
+    (propagated-inputs `(("uutf" ,ocaml-uutf)
+                         ("cmdliner" ,ocaml-cmdliner)))
+    (synopsis "Non-blocking streaming JSON codec for OCaml")
+    (description "Jsonm is a non-blocking streaming codec to decode and encode
+the JSON data format.  It can process JSON text without blocking on IO and
+without a complete in-memory representation of the data.")
+    (license license:isc)))
-- 
2.11.0

From a1935e16a6dc5382d1676704ea30d8e70c0867e7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:36:12 +0100
Subject: [PATCH 17/76] gnu: Add ocaml-ocurl.

* gnu/pcakages/ocaml.scm (ocaml-ocurl): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 65d918822..61fcfb309 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1647,3 +1647,29 @@ string values and to directly encode characters in OCaml Buffer.t values.")
 the JSON data format.  It can process JSON text without blocking on IO and
 without a complete in-memory representation of the data.")
     (license license:isc)))
+
+(define-public ocaml-ocurl
+  (package
+    (name "ocaml-ocurl")
+    (version "0.7.9")
+    (home-page "http://ocurl.forge.ocamlcore.org/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
+                                  version ".tar.gz"))
+              (sha256
+                (base32
+                  "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'fix-/bin/sh
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "configure"
+                         (("-/bin/sh") (string-append "-" (which "bash")))))))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("curl" ,curl)))
+    (synopsis "OCaml bindings for libcurl")
+    (description "Client-side URL transfer library, supporting HTTP and a
+multitude of other network protocols (FTP/SMTP/RTSP/etc).")
+    (license license:isc)))
-- 
2.11.0

From 529c17b4397687e52dd1641010af7551cca2db1d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:38:32 +0100
Subject: [PATCH 18/76] gnu: Add ocaml-base64.

* gnu/packages/ocaml.scm (ocaml-base64): New variable.
---
 gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 61fcfb309..b3b0aa2cc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1673,3 +1673,32 @@ without a complete in-memory representation of the data.")
     (description "Client-side URL transfer library, supporting HTTP and a
 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
     (license license:isc)))
+
+(define-public ocaml-base64
+  (package
+    (name "ocaml-base64")
+    (version "2.1.2")
+    (home-page "https://github.com/mirage/ocaml-base64")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/download/v" version
+                                  "/base64-" version ".tbz"))
+              (sha256
+                (base32
+                  "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:build-flags (list "build" "--tests" "true")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (native-inputs `(("topkg" ,ocaml-topkg)
+                     ("opam" ,opam)
+                     ("rresult" ,ocaml-rresult)
+                     ("bos" ,ocaml-bos)
+                     ("alcotest" ,ocaml-alcotest)))
+    (synopsis "Base64 encoding for OCaml")
+    (description "Base64 is a group of similar binary-to-text encoding schemes
+that represent binary data in an ASCII string format by translating it into a
+radix-64 representation.  It is specified in RFC 4648.")
+    (license license:isc)))
-- 
2.11.0

From 7ae2cba39aa34163311cbe63311207a5d4852d55 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:39:42 +0100
Subject: [PATCH 19/76] gnu: Add ocamlify.

* gnu/packages/ocaml.scm (ocamlify): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b3b0aa2cc..af21a581b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1702,3 +1702,24 @@ multitude of other network protocols (FTP/SMTP/RTSP/etc).")
 that represent binary data in an ASCII string format by translating it into a
 radix-64 representation.  It is specified in RFC 4648.")
     (license license:isc)))
+
+(define-public ocamlify
+  (package
+    (name "ocamlify")
+    (version "0.0.2")
+    (home-page "https://forge.ocamlcore.org/projects/ocamlify/")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1209))
+              (sha256
+               (base32
+                "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
+    (build-system ocaml-build-system)
+    ; tests are done during build
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+    (synopsis "Include files in OCaml code")
+    (description "OCamlify allows to create OCaml source code by including
+whole files into OCaml string or string list.  The code generated can be
+compiled as a standard OCaml file.  It allows embedding external resources as
+OCaml code.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

From 2be20f10a755d7375611b1bceb7102b57e5ff1ed Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:40:45 +0100
Subject: [PATCH 20/76] gnu: Add omake.

* gnu/packages/ocaml.scm (omake): New variable.
* gnu/packages/patches/ocaml-omake-fix-non-determinism.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 41 ++++++++++++++++++++++
 .../patches/ocaml-omake-fix-non-determinism.patch  | 41 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-omake-fix-non-determinism.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 81d774eb6..8baca61e0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -776,6 +776,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ocaml-CVE-2015-8869.patch		\
   %D%/packages/patches/ocaml-Add-a-.file-directive.patch	\
   %D%/packages/patches/ocaml-findlib-make-install.patch	\
+  %D%/packages/patches/ocaml-omake-fix-non-determinism.patch	\
   %D%/packages/patches/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index af21a581b..899002fca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1723,3 +1723,44 @@ whole files into OCaml string or string list.  The code generated can be
 compiled as a standard OCaml file.  It allows embedding external resources as
 OCaml code.")
     (license license:lgpl2.1))); with an exception
+
+(define-public omake
+  (package
+    (name "omake")
+    (version "0.10.1")
+    (home-page "http://projects.camlcity.org/projects/omake.html")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://download.camlcity.org/download/"
+                                  "omake-" version ".tar.gz"))
+              (sha256
+               (base32
+                "093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj"))
+              (patches (search-patches "ocaml-omake-fix-non-determinism.patch"))))
+    (build-system ocaml-build-system)
+    (arguments
+      `(#:make-flags
+        (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+        #:tests? #f; no test target
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'fix-makefile
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* "mk/osconfig_unix.mk"
+                 (("CC = cc") "CC = gcc")))))))
+    (native-inputs `(("hevea" ,hevea)))
+    (synopsis "Build system designed for scalability and portability")
+    (description "Similar to make utilities you may have used, but it features
+many additional enhancements, including:
+
+- Support for projects spanning several directories or directory hierarchies.
+- Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
+with full support for incremental builds.
+- Dependency analysis takes the command lines into account — whenever the
+command line used to build a target changes, the target is considered
+out-of-date.
+-  Fully scriptable, includes a library that providing support for standard
+tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.")
+    (license (list license:lgpl2.1; libmojave
+                   license:expat; OMake scripts
+                   license:gpl2)))); OMake itself, with an exception
diff --git a/gnu/packages/patches/ocaml-omake-fix-non-determinism.patch b/gnu/packages/patches/ocaml-omake-fix-non-determinism.patch
new file mode 100644
index 000000000..813ce3cd7
--- /dev/null
+++ b/gnu/packages/patches/ocaml-omake-fix-non-determinism.patch
@@ -0,0 +1,41 @@
+From 2e7e254160506dc00f1beabf170512a8e932934b Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 31 Dec 2016 15:43:38 +0100
+Subject: [PATCH] fix build date in binary
+
+---
+ src/magic/omake_gen_magic.ml | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/magic/omake_gen_magic.ml b/src/magic/omake_gen_magic.ml
+index b2419ba..fad52f5 100644
+--- a/src/magic/omake_gen_magic.ml
++++ b/src/magic/omake_gen_magic.ml
+@@ -150,7 +150,7 @@ let ir_magic = "%s"
+ let obj_magic = "%s"
+ let lib_dir = "%s"
+ let version = "%s"
+-let version_message = "OMake %s:\\n\\tbuild [%s %s %d %02d:%02d:%02d %d]\\n\\ton %s"
++let version_message = "OMake %s"
+ |}
+        default_save_interval
+        digest_len
+@@ -160,15 +160,7 @@ let version_message = "OMake %s:\\n\\tbuild [%s %s %d %02d:%02d:%02d %d]\\n\\ton
+        (digest_files ".omo.magic" ".omo" omo_files)
+        (String.escaped libdir)
+        (String.escaped (shorten_version version))
+-       (String.escaped version)
+-       [|"Sun"; "Mon"; "Tue"; "Wed"; "Thu"; "Fri"; "Sat"|].(tm.tm_wday)
+-       [|"Jan"; "Feb"; "Mar"; "Apr"; "May"; "Jun"; "Jul"; "Aug"; "Sep"; "Oct"; "Nov"; "Dec"|].(tm.tm_mon)
+-       tm.tm_mday
+-       tm.tm_hour
+-       tm.tm_min
+-       tm.tm_sec
+-       (tm.tm_year + 1900)
+-       (String.escaped (Unix.gethostname ()));
++       (String.escaped version);
+   List.iter
+     (fun (name,value) ->
+        Printf.fprintf buf "let %s = %S\n" name value
+--
+2.11.0
-- 
2.11.0

From e044476760e5a81c9388e77b8521d617610fdb9a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 2 Jan 2017 12:42:29 +0100
Subject: [PATCH 21/76] gnu: Add ocaml-batteries.

* gnu/packages/ocaml.scm (ocaml-batteries): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 899002fca..8ac372751 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1764,3 +1764,29 @@ tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.")
     (license (list license:lgpl2.1; libmojave
                    license:expat; OMake scripts
                    license:gpl2)))); OMake itself, with an exception
+
+(define-public ocaml-batteries
+  (package
+    (name "ocaml-batteries")
+    (version "2.5.3")
+    (home-page "http://batteries.forge.ocamlcore.org/")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri "batteries" version 1650))
+              (sha256
+               (base32
+                "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("qtest" ,ocaml-qtest)
+                     ("bisect" ,ocaml-bisect)
+                     ("ounit" ,ocaml-ounit)))
+    (arguments `(#:phases (modify-phases %standard-phases
+                            (delete 'check); tests are run by the build phase
+                            (replace 'build
+                              (lambda* (#:key outputs #:allow-other-keys)
+                                (zero? (system* "ocaml" "setup.ml" "-build")))))))
+    (synopsis "Development platform for the OCaml programming language")
+    (description "Define a standard set of libraries which may be expected on
+every compliant installation of OCaml and organize these libraries into a
+hierarchy of modules.")
+    (license license:lgpl2.1+)))
-- 
2.11.0

From 916f38305369a3642a856995c43b3026fae17e4a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:46:48 +0100
Subject: [PATCH 22/76] gnu: Add ocaml-pcre.

* gnu/packages/ocaml.scm (ocaml-pcre): New variable.
---
 gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8ac372751..ce2c82b48 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -1790,3 +1791,25 @@ tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.")
 every compliant installation of OCaml and organize these libraries into a
 hierarchy of modules.")
     (license license:lgpl2.1+)))
+
+(define-public ocaml-pcre
+  (package
+    (name "ocaml-pcre")
+    (version "7.2.3")
+    (home-page "https://mmottl.github.io/pcre-ocaml/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
+                                  "/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("batteries" ,ocaml-batteries)
+                     ("pcre:bin" ,pcre "bin")))
+    (propagated-inputs `(("pcre" ,pcre)))
+    (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
+    (description "Pcre-ocaml offers library functions for string pattern
+matching and substitution, similar to the functionality offered by the Perl
+language.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

From b884c1076c3336ba8f170223c855c9d8493118bd Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:48:37 +0100
Subject: [PATCH 23/76] gnu: Add ocaml-expect.

* gnu/packages/ocaml.scm (ocaml-expect): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ce2c82b48..120fe5615 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1813,3 +1813,24 @@ hierarchy of modules.")
 matching and substitution, similar to the functionality offered by the Perl
 language.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-expect
+  (package
+    (name "ocaml-expect")
+    (version "0.0.5")
+    (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1372))
+              (sha256
+               (base32
+                "07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ocaml-pcre" ,ocaml-pcre)
+                     ("ounit" ,ocaml-ounit)))
+    (propagated-inputs `(("batteries" ,ocaml-batteries)))
+    (arguments `(#:tests? #f)) ; tries to open dllpcre_stubs library
+    (synopsis "Simple implementation of expect")
+    (description "Help building unitary testing of interactive program.  You
+can match the question using a regular expression or a timeout.")
+    (license license:lgpl2.0))); with an exception
-- 
2.11.0

From c4a944bd05120d1dfac32afe3306444df8100ae3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:50:33 +0100
Subject: [PATCH 24/76] gnu: Add ocaml-fileutils.

* gnu/packages/ocaml.scm (ocaml-fileutils): New variable.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 120fe5615..682b4a642 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1834,3 +1834,21 @@ language.")
     (description "Help building unitary testing of interactive program.  You
 can match the question using a regular expression or a timeout.")
     (license license:lgpl2.0))); with an exception
+
+(define-public ocaml-fileutils
+  (package
+    (name "ocaml-fileutils")
+    (version "0.5.1")
+    (home-page "http://ocaml-fileutils.forge.ocamlcore.org/")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1651))
+              (sha256
+               (base32
+                "0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ounit" ,ocaml-ounit)))
+    (synopsis "Pure OCaml functions to manipulate real file and filename")
+    (description "Library to provide pure OCaml functions to manipulate real
+file (POSIX like) and filename.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From c871031d7665f93b3ba2d33d923eab87d3f41ec4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 13:06:40 +0100
Subject: [PATCH 25/76] gnu: Add ocaml-oasis.

* gnu/packages/ocaml.scm (ocaml-oasis): New variable.
---
 gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 682b4a642..fc179c525 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1852,3 +1852,32 @@ can match the question using a regular expression or a timeout.")
     (description "Library to provide pure OCaml functions to manipulate real
 file (POSIX like) and filename.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-oasis
+  (package
+    (name "ocaml-oasis")
+    (version "0.4.8")
+    (home-page "https://oasis.forge.ocamlcore.org/")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1669))
+              (sha256
+               (base32
+                "1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ocamlify" ,ocamlify)
+                     ("ocamlmod" ,ocamlmod)
+                     ("ounit" ,ocaml-ounit)
+                     ("omake" ,omake)
+                     ("ocaml-expect" ,ocaml-expect)
+                     ("ocaml-pcre" ,ocaml-pcre)
+                     ("ocaml-fileutils" ,ocaml-fileutils)
+                     ("camlp4" ,camlp4)
+                     ("texlive" ,texlive)
+                     ("pkg-config" ,pkg-config)))
+    (arguments `(#:tests? #f)) ; 33.33% test failures... ld cannot find crti.o
+    (synopsis "Integrates a configure, build, install system in OCaml projects")
+    (description "OASIS is a tool to integrate a configure, build and install
+system in your OCaml projects.  It helps to create standard entry points in your
+build system and allows external tools to analyse your project easily.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

From eadfb3806efc6c5fb93371ade04405a03a6c672a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:26:27 +0100
Subject: [PATCH 26/76] gnu: Add ocaml-js-build-tools.

* gnu/packages/ocaml.scm (ocaml-js-build-tools): New variable.
* gnu/packages/patches/ocaml-janestreet-fix-libdir.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 47 ++++++++++++++++++++++
 .../patches/ocaml-janestreet-fix-libdir.patch      | 36 +++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8baca61e0..27354e28e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -776,6 +776,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ocaml-CVE-2015-8869.patch		\
   %D%/packages/patches/ocaml-Add-a-.file-directive.patch	\
   %D%/packages/patches/ocaml-findlib-make-install.patch	\
+  %D%/packages/patches/ocaml-janestreet-fix-libdir.patch \
   %D%/packages/patches/ocaml-omake-fix-non-determinism.patch	\
   %D%/packages/patches/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index fc179c525..cc0f059c1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -66,6 +66,34 @@
                  (number->string file-number) "/" name "-" version
                  ".tar.gz"))
 
+;; Janestreet packages are found in a similar way and all need the same patch
+(define (janestreet-origin name version hash)
+  (origin (method url-fetch)
+          (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
+                              (version-major+minor version) "/files/"
+                              name "-" version ".tar.gz"))
+          (sha256 (base32 hash))
+          (patches (search-patches "ocaml-janestreet-fix-libdir.patch"))
+          (modules '((guix build utils)))
+          (snippet `(substitute* "install.ml"
+                                 (((string-append "lib/" ,name))
+                                  (string-append "lib/ocaml/site-lib/" ,name))))))
+
+;; They also require almost the same set of arguments
+(define janestreet-arguments
+  `(#:use-make? #t
+    #:make-flags (list (string-append "CONFIGUREFLAGS=--prefix "
+                                      (assoc-ref %outputs "out")
+                                      " --enable-tests")
+                       (string-append "LIBDIR="
+                                      (assoc-ref %outputs "out")
+                                      "/lib/ocaml/site-lib")
+                       ;; for ocaml-bin-prot, otherwise ignored
+                       (string-append "OCAML_TOPLEVEL_PATH="
+                                      (assoc-ref %build-inputs "findlib")
+                                      "/lib/ocaml/site-lib"))
+    #:phases (modify-phases %standard-phases (delete 'configure))))
+
 (define-public ocaml
   (package
     (name "ocaml")
@@ -1881,3 +1909,22 @@ file (POSIX like) and filename.")
 system in your OCaml projects.  It helps to create standard entry points in your
 build system and allows external tools to analyse your project easily.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-js-build-tools
+  (package
+    (name "ocaml-js-build-tools")
+    (version "113.33.06")
+    (home-page "https://github.com/janestreet/js-build-tools/")
+    (source (janestreet-origin "js-build-tools" version
+              "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("opam" ,opam)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Collection of tools to help building Jane Street Packages")
+    (description "This packages contains tools to help building Jane Street
+Packages. However most of it is general purpose.  It contains:
+
+- an oasis2opam-install tool to produce a .install file from the oasis build log
+- an js_build_tools ocamlbuild plugin with various goodies")
+    (license license:asl2.0)))
diff --git a/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch b/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
new file mode 100644
index 000000000..07cabe3c4
--- /dev/null
+++ b/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
@@ -0,0 +1,36 @@
+diff -aur package.pristine/Makefile package.new/Makefile
+--- package.pristine/Makefile	2016-02-06 01:55:14.650150309 +0100
++++ package.new/Makefile	2016-02-06 01:57:56.012174364 +0100
+@@ -29,26 +29,26 @@
+ 	ocaml -I js-utils js-utils/gen_install.ml
+
+ install: $(NAME).install
+-	opam-installer -i --prefix $(PREFIX) $(NAME).install
++	opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ uninstall: $(NAME).install
+-	opam-installer -u --prefix $(PREFIX) $(NAME).install
++	opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ reinstall: $(NAME).install
+-	opam-installer -u --prefix $(PREFIX) $(NAME).install &> /dev/null || true
+-	opam-installer -i --prefix $(PREFIX) $(NAME).install
++	opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install &> /dev/null || true
++	opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ bin.tar.gz: $(NAME).install
+ 	rm -rf _install
+ 	mkdir _install
+-	opam-installer -i --prefix _install $(NAME).install
++	opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install
+ 	tar czf bin.tar.gz -C _install .
+ 	rm -rf _install
+
+ bin.lzo: $(NAME).install
+ 	rm -rf _install
+ 	mkdir _install
+-	opam-installer -i --prefix _install $(NAME).install
++	opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install
+ 	cd _install && lzop -1 -P -o ../bin.lzo `find . -type f`
+ 	rm -rf _install
+
-- 
2.11.0

From 1a6f7360824f47db4c2267d52b05e46eb063ec66 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:27:27 +0100
Subject: [PATCH 27/76] gnu: Add ocaml-bin-prot.

* gnu/packages/ocaml.scm (ocaml-bin-prot): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index cc0f059c1..80702848b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1928,3 +1928,23 @@ Packages. However most of it is general purpose.  It contains:
 - an oasis2opam-install tool to produce a .install file from the oasis build log
 - an js_build_tools ocamlbuild plugin with various goodies")
     (license license:asl2.0)))
+
+(define-public ocaml-bin-prot
+  (package
+    (name "ocaml-bin-prot")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/bin_prot/")
+    (source (janestreet-origin "bin_prot" version
+               "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "A binary protocol generator")
+    (description "This library contains functionality for reading and writing
+OCaml-values in a type-safe binary protocol.  It is extremely efficient,
+typically supporting type-safe marshalling and unmarshalling of even highly
+structured values at speeds sufficient to saturate a gigabit connection.  The
+protocol is also heavily optimized for size, making it ideal for long-term
+storage of large amounts of data.")
+    (license license:asl2.0)))
-- 
2.11.0

From 15e27262324b7f5a5a1941cd8c25424bcfaa5b74 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:28:46 +0100
Subject: [PATCH 28/76] gnu: Add ocaml-fieldslib.

* gnu/packages/ocaml.scm (ocaml-fieldslib): New variable.
---
 gnu/packages/ocaml.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 80702848b..d26baa92b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1948,3 +1948,20 @@ structured values at speeds sufficient to saturate a gigabit connection.  The
 protocol is also heavily optimized for size, making it ideal for long-term
 storage of large amounts of data.")
     (license license:asl2.0)))
+
+(define-public ocaml-fieldslib
+  (package
+    (name "ocaml-fieldslib")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/fieldslib/")
+    (source (janestreet-origin "fieldslib" version
+               "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv"))
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Syntax extension to record fields")
+    (description "Syntax extension to define first class values representing
+record fields, to get and set record fields, iterate and fold over all fields
+of a record and create new record values.")
+    (license license:asl2.0)))
-- 
2.11.0

From 131a837d8fc8c74ffcd755413954104d03832c05 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:30:46 +0100
Subject: [PATCH 29/76] gnu: Add ocaml-ppx-core.

* gnu/packages/ocaml.scm (ocaml-ppx-core): New variable.
---
 gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d26baa92b..510bd7291 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1965,3 +1965,25 @@ storage of large amounts of data.")
 record fields, to get and set record fields, iterate and fold over all fields
 of a record and create new record values.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-core
+  (package
+    (name "ocaml-ppx-core")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_core/")
+    (source (janestreet-origin "ppx_core" version
+               "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (inputs `(("ppx-tools" ,ocaml-ppx-tools)))
+    (arguments janestreet-arguments)
+    (synopsis "Standard library for ppx rewriters")
+    (description "Ppx_core is a standard library for OCaml AST transformers.
+It contains:
+
+- various auto-generated AST traversal using an open recursion scheme
+- helpers for building AST fragments
+- helpers for matching AST fragments
+- a framework for dealing with attributes and extension points.")
+    (license license:asl2.0)))
-- 
2.11.0

From fe0a95c625dfe8528ab2eb5664c2df584d1f810c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:32:14 +0100
Subject: [PATCH 30/76] gnu: Add ocaml-ppx-optcomp.

* gnu/packages/ocaml.scm (ocaml-ppx-optcomp): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 510bd7291..148aa299f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1987,3 +1987,22 @@ It contains:
 - helpers for matching AST fragments
 - a framework for dealing with attributes and extension points.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-optcomp
+  (package
+    (name "ocaml-ppx-optcomp")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_optcomp/")
+    (source (janestreet-origin "ppx_optcomp" version
+               "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Optional compilation for OCaml")
+    (description "ppx_optcomp stands for Optional Compilation.  It is a tool
+used to handle optional compilations of pieces of code depending of the word
+size, the version of the compiler, ...")
+    (license license:asl2.0)))
-- 
2.11.0

From ada6ffa34df96c6f9df0d444adfd2aa77a6bff1b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:34:09 +0100
Subject: [PATCH 31/76] gnu: Add ocaml-ppx-driver.

* gnu/packages/ocaml.scm (ocaml-ppx-driver): New variable.
---
 gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 148aa299f..6bf3cc592 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2006,3 +2006,27 @@ It contains:
 used to handle optional compilations of pieces of code depending of the word
 size, the version of the compiler, ...")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-driver
+  (package
+    (name "ocaml-ppx-driver")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_driver/")
+    (source (janestreet-origin "ppx_driver" version
+              "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-optcomp" ,ocaml-ppx-optcomp)))
+    (propagated-inputs `(("ppx-optcomp" ,ocaml-ppx-optcomp)
+						 ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Feature-full driver for OCaml AST transformers")
+    (description "A driver is an executable created from a set of OCaml AST
+transformers linked together with a command line frontend.  The aim is to
+provide a tool that can be used to:
+
+- easily view the pre-processed version of a file, no need to construct a complex command line: ppx file.ml will do
+- use a single executable to run several transformations: no need to fork many times just for pre-processing
+- improved errors for misspelled/misplaced attributes and extension points.")
+    (license license:asl2.0)))
-- 
2.11.0

From e9035ab94c6faf1231a2779689019ff0ed415922 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:35:13 +0100
Subject: [PATCH 32/76] gnu: Add ocaml-cppo.

* gnu/packages/ocaml.scm (ocaml-cppo): 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 6bf3cc592..94bd15eca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2030,3 +2030,30 @@ provide a tool that can be used to:
 - use a single executable to run several transformations: no need to fork many times just for pre-processing
 - improved errors for misspelled/misplaced attributes and extension points.")
     (license license:asl2.0)))
+
+(define-public ocaml-cppo
+  (package
+    (name "ocaml-cppo")
+    (version "1.4.1")
+    (home-page "https://github.com/mjambon/cppo")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "02gma6nw09vfnd6h7bl3n70lwz7m9z2svplxyfh6h5bf4lqgqzjv"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:make-flags (list (string-append "BINDIR="
+                                                   (assoc-ref %outputs "out")
+                                                   "/bin"))
+                 #:tests? #f))
+    (synopsis "Equivalent of the C preprocessor for OCaml programs")
+    (description "Cppo is an equivalent of the C preprocessor for OCaml
+programs.  It allows the definition of simple macros and file inclusion.  Cppo is:
+
+- more OCaml-friendly than cpp
+- easy to learn without consulting a manual
+- reasonably fast
+- simple to install and to maintain.")
+    (license license:bsd-3)))
-- 
2.11.0

From 5aa758de137511eef3e93938252a421d9df6d180 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:36:30 +0100
Subject: [PATCH 33/76] gnu: Add ocaml-ppx-deriving.

* gnu/packages/ocaml.scm (ocaml-ppx-deriving): New variable.
---
 gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 94bd15eca..7fb320e26 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2057,3 +2057,37 @@ programs.  It allows the definition of simple macros and file inclusion.  Cppo i
 - reasonably fast
 - simple to install and to maintain.")
     (license license:bsd-3)))
+
+;; this package is not reproducible. This is related to temporary filenames
+;; such as findlib_initxxxxx where xxxxx is random.
+(define-public ocaml-ppx-deriving
+  (package
+    (name "ocaml-ppx-deriving")
+    (version "4.1")
+    (home-page "https://github.com/whitequark/ppx_deriving/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "1fr16g121j6zinwcprzlhx2py4271n9jzs2m9hq2f3qli2b1p0vl"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("cppo" ,ocaml-cppo)
+                     ("ounit" ,ocaml-ounit)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("result" ,ocaml-result)
+                         ("ppx-tools" ,ocaml-ppx-tools)))
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-before 'install 'fix-environment
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       ;; the installation procedures looks for the installed module
+                       (setenv "OCAMLPATH"
+                               (string-append (getenv "OCAMLPATH") ":"
+                                              (getenv "OCAMLFIND_DESTDIR"))))))))
+    (synopsis "Type-driven code generation for OCaml >=4.02")
+    (description "ppx_deriving provides common infrastructure for generating
+code based on type definitions, and a set of useful plugins for common tasks.")
+    (license license:expat)))
-- 
2.11.0

From 7c8cd6b2ea0e19309810a5f9dc060704829dad28 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:15:44 +0100
Subject: [PATCH 34/76] gnu: Add ocaml-ppx-type-conv.

* gnu/packages/ocaml.scm (ocaml-ppx-type-conv): New variable.
---
 gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7fb320e26..286d5d4a5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2091,3 +2091,25 @@ programs.  It allows the definition of simple macros and file inclusion.  Cppo i
     (description "ppx_deriving provides common infrastructure for generating
 code based on type definitions, and a set of useful plugins for common tasks.")
     (license license:expat)))
+
+(define-public ocaml-ppx-type-conv
+  (package
+    (name "ocaml-ppx-type-conv")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_type_conv/")
+    (source
+      (janestreet-origin "ppx_type_conv" version
+        "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-deriving" ,ocaml-ppx-deriving)
+              ("ppx-tools" ,ocaml-ppx-tools)
+              ("result" ,ocaml-result)
+              ("ppx-core" ,ocaml-ppx-core)
+              ("ppx-driver" ,ocaml-ppx-driver)))
+    (arguments janestreet-arguments)
+    (synopsis "Support Library for type-driven code generators")
+    (description "The type_conv library factors out functionality needed by
+different preprocessors that generate code from type specifications.")
+    (license license:asl2.0)))
-- 
2.11.0

From 0dc43a3407ba451e2327ee64e9efc612a69a7a8b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:17:09 +0100
Subject: [PATCH 35/76] gnu: Add ocaml-ppx-inline-test.

* gnu/packages/ocaml.scm (ocaml-ppx-inline-test): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 286d5d4a5..e23453fc0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2113,3 +2113,22 @@ code based on type definitions, and a set of useful plugins for common tasks.")
     (description "The type_conv library factors out functionality needed by
 different preprocessors that generate code from type specifications.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-inline-test
+  (package
+    (name "ocaml-ppx-inline-test")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_inline_test/")
+    (source (janestreet-origin "ppx_inline_test" version
+              "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-core" ,ocaml-ppx-core)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Syntax extension for writing in-line tests in ocaml code")
+    (description "Syntax extension for writing in-line tests in ocaml code.")
+    (license license:asl2.0)))
-- 
2.11.0

From aa3ee7c002dbdb1389c13b379c887f983ebc9c81 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:18:37 +0100
Subject: [PATCH 36/76] gnu: Add ocaml-ppx-bench.

* gnu/packages/ocaml.scm (ocaml-ppx-bench): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e23453fc0..9d5aa729c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2132,3 +2132,23 @@ different preprocessors that generate code from type specifications.")
     (synopsis "Syntax extension for writing in-line tests in ocaml code")
     (description "Syntax extension for writing in-line tests in ocaml code.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-bench
+  (package
+    (name "ocaml-ppx-bench")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_bench/")
+    (source (janestreet-origin "ppx_bench" version
+                   "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-core" ,ocaml-ppx-core)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-inline-test" ,ocaml-ppx-inline-test)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
+    (description "Syntax extension for writing in-line benchmarks in ocaml code.")
+    (license license:asl2.0)))
-- 
2.11.0

From e623a9288dfa56bdac0fffcd273ad9fc6077414a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:19:40 +0100
Subject: [PATCH 37/76] gnu: Add ocaml-ppx-compare.

* gnu/packages/ocaml.scm (ocaml-ppx-compare): New variable.
---
 gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9d5aa729c..ee66b3fcf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2152,3 +2152,28 @@ different preprocessors that generate code from type specifications.")
     (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
     (description "Syntax extension for writing in-line benchmarks in ocaml code.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-compare
+  (package
+    (name "ocaml-ppx-compare")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_compare/")
+    (source (janestreet-origin "ppx_compare" version
+              "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-core" ,ocaml-ppx-core)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of comparison functions from types")
+    (description "Generation of fast comparison functions from type expressions
+and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
+from type representations.  The scaffolded functions are usually much faster
+than ocaml's Pervasives.compare.  Scaffolding functions also gives you more
+flexibility by allowing you to override them for a specific type and more safety
+by making sure that you only compare comparable values.")
+    (license license:asl2.0)))
-- 
2.11.0

From d22f7739802c5ba1bcb08edddb8d624b33d2240a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:21:17 +0100
Subject: [PATCH 38/76] gnu: Add ocaml-sexplib.

* gnu/packages/ocaml.scm (ocaml-sexplib): New variable.
---
 gnu/packages/ocaml.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ee66b3fcf..c1da80d7f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2177,3 +2177,19 @@ than ocaml's Pervasives.compare.  Scaffolding functions also gives you more
 flexibility by allowing you to override them for a specific type and more safety
 by making sure that you only compare comparable values.")
     (license license:asl2.0)))
+
+(define-public ocaml-sexplib
+  (package
+    (name "ocaml-sexplib")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/sexplib/")
+    (source (janestreet-origin "sexplib" version
+               "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (arguments janestreet-arguments)
+    (synopsis "Library for serializing OCaml values to and from S-expressions")
+    (description "Sexplib contains functionality for parsing and pretty-printing
+s-expressions.")
+    (license license:asl2.0)))
-- 
2.11.0

From a47b9a323b2454941fc3de7500db011ac71a1ac7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:22:46 +0100
Subject: [PATCH 39/76] gnu: Add ocaml-typerep.

* gnu/packages/ocaml.scm (ocaml-typerep): New variable.
---
 gnu/packages/ocaml.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c1da80d7f..6979b91b8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2193,3 +2193,18 @@ by making sure that you only compare comparable values.")
     (description "Sexplib contains functionality for parsing and pretty-printing
 s-expressions.")
     (license license:asl2.0)))
+
+(define-public ocaml-typerep
+  (package
+    (name "ocaml-typerep")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/typerep/")
+    (source (janestreet-origin "typerep" version
+               "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy"))
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Typerep is a library for runtime types")
+    (description "Typerep is a library for runtime types.")
+    (license license:asl2.0)))
-- 
2.11.0

From f78f6155d0edec3e590d8b3218ac1f114e6d519c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:23:34 +0100
Subject: [PATCH 40/76] gnu: Add ocaml-variantslib.

* gnu/packages/ocaml.scm (ocaml-variantslib): New variable.
---
 gnu/packages/ocaml.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6979b91b8..639f6b8ff 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2208,3 +2208,18 @@ s-expressions.")
     (synopsis "Typerep is a library for runtime types")
     (description "Typerep is a library for runtime types.")
     (license license:asl2.0)))
+
+(define-public ocaml-variantslib
+  (package
+    (name "ocaml-variantslib")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/variantslib/")
+    (source (janestreet-origin "variantslib" version
+               "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n"))
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "OCaml variants as first class values")
+    (description "OCaml variants as first class values.")
+    (license license:asl2.0)))
-- 
2.11.0

From a35720d656149d9d3f55d6d291b0c8ddaa214550 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:25:45 +0100
Subject: [PATCH 41/76] gnu: Add ocaml-ppx-sexp-conv.

* gnu/packages/ocaml.scm (ocaml-ppx-sexp-conv): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 639f6b8ff..40297f4af 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2223,3 +2223,24 @@ s-expressions.")
     (synopsis "OCaml variants as first class values")
     (description "OCaml variants as first class values.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-sexp-conv
+  (package
+    (name "ocaml-ppx-sexp-conv")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_sexp_conv/")
+    (source (janestreet-origin "ppx_sexp_conv" version
+              "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-core" ,ocaml-ppx-core)))
+    (propagated-inputs `(("sexplib" ,ocaml-sexplib)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)
+                         ("ppx-tools" ,ocaml-ppx-tools)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of S-expression conversion functions from type definitions")
+    (description "Generation of S-expression conversion functions from type
+definitions.")
+    (license license:asl2.0)))
-- 
2.11.0

From 592050a57f16085840f59426886eac1456cbf430 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:27:10 +0100
Subject: [PATCH 42/76] gnu: Add ocaml-ppx-variants-conv.

* gnu/packages/ocaml.scm (ocaml-ppx-variants-conv): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 40297f4af..d2b0f0f2a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2244,3 +2244,24 @@ s-expressions.")
     (description "Generation of S-expression conversion functions from type
 definitions.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-variants-conv
+  (package
+    (name "ocaml-ppx-variants-conv")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_variants_conv/")
+    (source (janestreet-origin "ppx_variants_conv" version
+              "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-core" ,ocaml-ppx-core)
+                         ("variantslib" ,ocaml-variantslib)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of accessor and iteration functions for ocaml variant
+types")
+    (description "Generation of accessor and iteration functions for ocaml
+variant types.")
+    (license license:asl2.0)))
-- 
2.11.0

From 09487a7fc721a925065599970a16cbf27b9b1c72 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:28:31 +0100
Subject: [PATCH 43/76] gnu: Add ocaml-ppx-here.

* gnu/packages/ocaml.scm (ocaml-ppx-here): New variable.
---
 gnu/packages/ocaml.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d2b0f0f2a..e7423febf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2265,3 +2265,20 @@ types")
     (description "Generation of accessor and iteration functions for ocaml
 variant types.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-here
+  (package
+    (name "ocaml-ppx-here")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_here/")
+    (source (janestreet-origin "ppx_here" version
+              "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Expands [%here] into its location")
+    (description "Expands [%here] into its location.")
+    (license license:asl2.0)))
-- 
2.11.0

From 66140334d59cdd23775f2f279ea5ff903b1f5b8a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:30:07 +0100
Subject: [PATCH 44/76] gnu: Add ocaml-ppx-assert.

* gnu/packages/ocaml.scm (ocaml-ppx-assert): New variable.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e7423febf..dca82ee5c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2282,3 +2282,31 @@ variant types.")
     (synopsis "Expands [%here] into its location")
     (description "Expands [%here] into its location.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-assert
+  (package
+    (name "ocaml-ppx-assert")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_assert/")
+    (source
+      (origin (inherit (janestreet-origin "ppx_assert" version
+                          "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
+              (modules '((guix build utils)))
+              (snippet `(substitute* "install.ml"
+                                     (("lib/ppx_assert")
+                                      "lib/ocaml/site-lib/ppx_assert")))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-compare" ,ocaml-ppx-compare)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)
+                         ("ppx-sexplib" ,ocaml-sexplib)
+                         ("ppx-here" ,ocaml-ppx-here)))
+    (arguments janestreet-arguments)
+    (synopsis "Assert-like extension nodes that raise useful errors on failure")
+    (description "Assert-like extension nodes that raise useful errors on failure.")
+    (license license:asl2.0)))
-- 
2.11.0

From 09530541282309ddf0911e8d540f1a086d1c315a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:32:14 +0100
Subject: [PATCH 45/76] gnu: Add ocaml-ppx-enumerate.

* gnu/packages/ocaml.scm (ocaml-ppx-enumerate): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index dca82ee5c..84c99ef0f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2310,3 +2310,23 @@ variant types.")
     (synopsis "Assert-like extension nodes that raise useful errors on failure")
     (description "Assert-like extension nodes that raise useful errors on failure.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-enumerate
+  (package
+    (name "ocaml-ppx-enumerate")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_enumerate/")
+    (source (janestreet-origin "ppx_enumerate" version
+              "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Generate a list containing all values of a finite type")
+    (description "Ppx_enumerate is a ppx rewriter which generates a definition
+for the list of all values of a type (for a type which only has finitely
+many values).")
+    (license license:asl2.0)))
-- 
2.11.0

From 9095a3bbcbddbcf4d6b327fbf3e1340c7586bc3b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:36:47 +0100
Subject: [PATCH 46/76] gnu: Add ocaml-ppx-let.

* gnu/packages/ocaml.scm (ocaml-ppx-let): New variable.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 84c99ef0f..ddab8d92b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2330,3 +2330,21 @@ variant types.")
 for the list of all values of a type (for a type which only has finitely
 many values).")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-let
+  (package
+    (name "ocaml-ppx-let")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_let/")
+    (source (janestreet-origin "ppx_let" version
+              "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Monadic let-bindings")
+    (description "A ppx rewriter for monadic and applicative let bindings,
+match expressions, and if expressions.")
+    (license license:asl2.0)))
-- 
2.11.0

From 3da1a73f8bd8901db990922dae848b94607943de Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:38:28 +0100
Subject: [PATCH 47/76] gnu: Add ocaml-ppx-typerep-conv.

* gnu/packages/ocaml.scm (ocaml-ppx-typerep-conv): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ddab8d92b..5ba161da3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2348,3 +2348,22 @@ many values).")
     (description "A ppx rewriter for monadic and applicative let bindings,
 match expressions, and if expressions.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-typerep-conv
+  (package
+    (name "ocaml-ppx-typerep-conv")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_typerep_conv/")
+    (source (janestreet-origin "ppx_typerep_conv" version
+              "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("typerep" ,ocaml-typerep)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of runtime types from type declarations")
+    (description "Automatic generation of runtime types from type definitions.")
+    (license license:asl2.0)))
-- 
2.11.0

From 6a066c5f1997358fc25bff565eddf56622411944 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:39:43 +0100
Subject: [PATCH 48/76] gnu: Add ocaml-ppx-sexp-value.

* gnu/packages/ocaml.scm (ocaml-ppx-sexp-value): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5ba161da3..9e1a85d82 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2367,3 +2367,24 @@ match expressions, and if expressions.")
     (synopsis "Generation of runtime types from type declarations")
     (description "Automatic generation of runtime types from type definitions.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-sexp-value
+  (package
+    (name "ocaml-ppx-sexp-value")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_sexp_value/")
+    (source (janestreet-origin "ppx_sexp_value" version
+              "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-here" ,ocaml-ppx-here)
+                         ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Simplify building s-expressions from ocaml values")
+    (description "A ppx rewriter that simplifies building s-expressions from
+ocaml values.")
+    (license license:asl2.0)))
-- 
2.11.0

From 0f38300b7dd2216c7d4fa08e64f5110d94c42fc0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:41:17 +0100
Subject: [PATCH 49/76] gnu: Add ocaml-ppx-pipebang.

* gnu/packages/ocaml.scm (ocaml-ppx-pipebang): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9e1a85d82..b3a1acf41 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2388,3 +2388,22 @@ match expressions, and if expressions.")
     (description "A ppx rewriter that simplifies building s-expressions from
 ocaml values.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-pipebang
+  (package
+    (name "ocaml-ppx-pipebang")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_pipebang/")
+    (source (janestreet-origin "ppx_pipebang" version
+              "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Inline reverse application operators `|>` and `|!`")
+    (description "A ppx rewriter that inlines reverse application operators
+`|>` and `|!`.")
+    (license license:asl2.0)))
-- 
2.11.0

From 5f1121612cf5dee47984cb8f2a53754318a27b1e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:42:49 +0100
Subject: [PATCH 50/76] gnu: Add ocaml-ppx-bin-prot.

* gnu/packages/ocaml.scm (ocaml-ppx-bin-prot): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b3a1acf41..4980bce70 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2407,3 +2407,23 @@ ocaml values.")
     (description "A ppx rewriter that inlines reverse application operators
 `|>` and `|!`.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-bin-prot
+  (package
+    (name "ocaml-ppx-bin-prot")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_bin_prot/")
+    (source (janestreet-origin "ppx_bin_prot" version
+              "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("bin-prot" ,ocaml-bin-prot)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of bin_prot readers and writers from types")
+    (description "Generation of binary serialization and deserialization
+functions from type definitions.")
+    (license license:asl2.0)))
-- 
2.11.0

From d8fa67cfcad82ab78e1bd28f29faa7913219d25f Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:44:07 +0100
Subject: [PATCH 51/76] gnu: Add ocaml-ppx-fail.

* gnu/packages/ocaml.stcm (ocaml-ppx-fail): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4980bce70..5308cc0a9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2427,3 +2427,23 @@ ocaml values.")
     (description "Generation of binary serialization and deserialization
 functions from type definitions.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-fail
+  (package
+    (name "ocaml-ppx-fail")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_fail/")
+    (source (janestreet-origin "ppx_fail" version
+              "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-here" ,ocaml-ppx-here)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "Add location to calls to failwiths")
+    (description "Syntax extension that makes [failwiths] always include a
+position.")
+    (license license:asl2.0)))
-- 
2.11.0

From 291e897f4951ce4942e1268791ae4053a4cb3911 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:46:28 +0100
Subject: [PATCH 52/76] gnu: Add ocaml-ppx-custom-printf.

* gnu/packages/ocaml.scm (ocaml-ppx-custom-printf): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5308cc0a9..69ec90f5a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2447,3 +2447,23 @@ functions from type definitions.")
     (description "Syntax extension that makes [failwiths] always include a
 position.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-custom-printf
+  (package
+    (name "ocaml-ppx-custom-printf")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_custom_printf/")
+    (source (janestreet-origin "ppx_custom_printf" version
+              "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-driver" ,ocaml-ppx-driver)))
+    (arguments janestreet-arguments)
+    (synopsis "Printf-style format-strings for user-defined string conversion")
+    (description "Extensions to printf-style format-strings for user-defined
+string conversion.")
+    (license license:asl2.0)))
-- 
2.11.0

From 0b21a828f09d401f149c21581e4a9c8d58020d90 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:48:38 +0100
Subject: [PATCH 53/76] gnu: Add ocaml-ppx-sexp-message.

* gnu/packages/ocaml.scm (ocaml-ppx-sexp-message): New variable.
---
 gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 69ec90f5a..3c3e2a67d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2467,3 +2467,26 @@ position.")
     (description "Extensions to printf-style format-strings for user-defined
 string conversion.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-sexp-message
+  (package
+    (name "ocaml-ppx-sexp-message")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_sexp_message/")
+    (source (janestreet-origin "ppx_sexp_message" version
+              "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-here" ,ocaml-ppx-here)
+                         ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)))
+    (arguments janestreet-arguments)
+    (synopsis "A ppx rewriter for easy construction of s-expressions")
+    (description "The aim of ppx_sexp_message is to ease the creation of
+s-expressions in OCaml.  This is mainly motivated by writing error and debugging
+messages, where one needs to construct a s-expression based on various element
+of the context such as function arguments.")
+    (license license:asl2.0)))
-- 
2.11.0

From 4792c0eea04c79388771d77b3fbf8eb73ffdce24 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:17:35 +0100
Subject: [PATCH 54/76] gnu: Add ocaml-ppx-fields-conv.

* gnu/packages/ocaml.scm (ocaml-ppx-fields-conv): New variable.
---
 gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3c3e2a67d..e4f30b962 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2490,3 +2490,26 @@ s-expressions in OCaml.  This is mainly motivated by writing error and debugging
 messages, where one needs to construct a s-expression based on various element
 of the context such as function arguments.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-fields-conv
+  (package
+    (name "ocaml-ppx-fields-conv")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_fields_conv/")
+    (source (janestreet-origin "ppx_fields_conv" version
+              "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)
+                     ("ppx-core" ,ocaml-ppx-core)))
+    (propagated-inputs `(("fieldslib" ,ocaml-fieldslib)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-type-conv" ,ocaml-ppx-type-conv)))
+    (arguments janestreet-arguments)
+    (synopsis "Generation of accessor and iteration functions for ocaml records")
+    (description "Ppx_fields_conv is a ppx rewriter that can be used to define
+first class values representing record fields, and additional routines, to get
+and set record fields, iterate and fold over all fields of a record and create
+new record values.")
+    (license license:asl2.0)))
-- 
2.11.0

From 3bdb59d45881795885bc501e82132dc503366c54 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:20:17 +0100
Subject: [PATCH 55/76] gnu: Add ocaml-re.

* gnu/packages/ocaml.scm (ocaml-re): New variable.
---
 gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e4f30b962..215f4ced5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2513,3 +2513,26 @@ first class values representing record fields, and additional routines, to get
 and set record fields, iterate and fold over all fields of a record and create
 new record values.")
     (license license:asl2.0)))
+
+(define-public ocaml-re
+  (package
+    (name "ocaml-re")
+    (version "1.7.1")
+    (home-page "https://github.com/ocaml/ocaml-re/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "1s3rcr76cgm4p1xmaazc58arkg2lz3zfcp1icm00m6s5ccnkh67b"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ounit" ,ocaml-ounit)))
+    (synopsis "Regular expression library for OCaml")
+    (description "Pure OCaml regular expressions with:
+
+- Perl-style regular expressions (module Re_perl)
+- Posix extended regular expressions (module Re_posix)
+- Emacs-style regular expressions (module Re_emacs)
+- Shell-style file globbing (module Re_glob)
+- Compatibility layer for OCaml's built-in Str module (module Re_str)")
+    (license license:expat)))
-- 
2.11.0

From e475e8c23c40930d3f96b9094eaf59991634341d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:28:18 +0100
Subject: [PATCH 56/76] gnu: Add ocaml-ppx-expect.

* gnu/packages/ocaml.scm (ocaml-ppx-expect): New variable.
---
 gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 215f4ced5..bd0a1ef20 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2536,3 +2536,36 @@ new record values.")
 - Shell-style file globbing (module Re_glob)
 - Compatibility layer for OCaml's built-in Str module (module Re_str)")
     (license license:expat)))
+
+(define-public ocaml-ppx-expect
+  (package
+    (name "ocaml-ppx-expect")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_expect/")
+    (source (janestreet-origin "ppx_expect" version
+              "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("fieldslib" ,ocaml-fieldslib)
+                         ("ppx-tools" ,ocaml-ppx-tools)
+                         ("ppx-assert" ,ocaml-ppx-assert)
+                         ("ppx-compare" ,ocaml-ppx-compare)
+                         ("ppx-core" ,ocaml-ppx-core)
+                         ("ppx-custom-printf" ,ocaml-ppx-custom-printf)
+                         ("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-fields-conv" ,ocaml-ppx-fields-conv)
+                         ("ppx-inline-test" ,ocaml-ppx-inline-test)
+                         ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-variants-conv" ,ocaml-ppx-variants-conv)
+                         ("re" ,ocaml-re)
+                         ("sexplib" ,ocaml-sexplib)
+                         ("variantslib" ,ocaml-variantslib)))
+    (arguments janestreet-arguments)
+    (synopsis "Cram like framework for OCaml")
+    (description "Expect-test is a framework for writing tests in OCaml, similar
+to Cram.  Expect-tests mimic the existing inline tests framework with the
+let%expect_test construct.  The body of an expect-test can contain
+output-generating code, interleaved with %expect extension expressions to denote
+the expected output.")
+    (license license:asl2.0)))
-- 
2.11.0

From 860fe6f48fc3824fe290999b032dbfa161409843 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:31:00 +0100
Subject: [PATCH 57/76] gnu: Add ocaml-ppx-jane.

* gnu/packages/ocaml.scm (ocaml-ppx-jane): New variable.
---
 gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bd0a1ef20..8e94a5e77 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2569,3 +2569,37 @@ let%expect_test construct.  The body of an expect-test can contain
 output-generating code, interleaved with %expect extension expressions to denote
 the expected output.")
     (license license:asl2.0)))
+
+(define-public ocaml-ppx-jane
+  (package
+    (name "ocaml-ppx-jane")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/ppx_jane/")
+    (source (janestreet-origin "ppx_jane" version
+              "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("ppx-assert" ,ocaml-ppx-assert)
+                         ("ppx-bench" ,ocaml-ppx-bench)
+                         ("ppx-bin-prot" ,ocaml-ppx-bin-prot)
+                         ("ppx-compare" ,ocaml-ppx-compare)
+                         ("ppx-custom-printf" ,ocaml-ppx-custom-printf)
+                         ("ppx-deriving" ,ocaml-ppx-deriving)
+                         ("ppx-enumerate" ,ocaml-ppx-enumerate)
+                         ("ppx-expect" ,ocaml-ppx-expect)
+                         ("ppx-fail" ,ocaml-ppx-fail)
+                         ("ppx-fields-conv" ,ocaml-ppx-fields-conv)
+                         ("ppx-here" ,ocaml-ppx-here)
+                         ("ppx-inline-test" ,ocaml-ppx-inline-test)
+                         ("ppx-let" ,ocaml-ppx-let)
+                         ("ppx-pipebang" ,ocaml-ppx-pipebang)
+                         ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("ppx-sexp-message" ,ocaml-ppx-sexp-message)
+                         ("ppx-sexp-value" ,ocaml-ppx-sexp-value)
+                         ("ppx-typerep-conv" ,ocaml-ppx-typerep-conv)
+                         ("ppx-variants-conv" ,ocaml-ppx-variants-conv)))
+    (arguments janestreet-arguments)
+    (synopsis "Standard Jane Street ppx rewriters")
+    (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
+    (license license:asl2.0)))
-- 
2.11.0

From 52b65d5cdd2466d561ce71450b77a3c1d3678611 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:38:35 +0100
Subject: [PATCH 58/76] gnu: Add ocaml-core-kernel.

* gnu/packages/ocaml.scm (ocaml-core-kernel): New variable.
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8e94a5e77..876e4d997 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2603,3 +2603,33 @@ the expected output.")
     (synopsis "Standard Jane Street ppx rewriters")
     (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
     (license license:asl2.0)))
+
+(define-public ocaml-core-kernel
+  (package
+    (name "ocaml-core-kernel")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/core_kernel/")
+    (source (janestreet-origin "core_kernel" version
+               "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y"))
+    (native-inputs `(("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("bin_prot" ,ocaml-bin-prot)
+                         ("ppx-assert" ,ocaml-ppx-assert)
+                         ("ppx-bench" ,ocaml-ppx-bench)
+                         ("ppx-driver" ,ocaml-ppx-driver)
+                         ("ppx-expect" ,ocaml-ppx-expect)
+                         ("ppx-inline-test" ,ocaml-ppx-inline-test)
+                         ("typerep" ,ocaml-typerep)
+                         ("sexplib" ,ocaml-sexplib)
+                         ("variantslib" ,ocaml-variantslib)
+                         ("result" ,ocaml-result)
+                         ("fieldslib" ,ocaml-fieldslib)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Portable standard library for OCaml")
+    (description "Core is an alternative to the OCaml standard library.
+
+Core_kernel is the system-independent part of Core. It is aimed for cases when
+the full Core is not available, such as in Javascript.")
+    (license license:asl2.0)))
-- 
2.11.0

From ba3379d43538738c3bdc10ed67736bc0972608da Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:55:06 +0100
Subject: [PATCH 59/76] gnu: Add ocaml-async-kernel.

* gnu/packages/ocaml.scm (ocaml-async-kernel): New variable.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 876e4d997..33a758f25 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2633,3 +2633,21 @@ the expected output.")
 Core_kernel is the system-independent part of Core. It is aimed for cases when
 the full Core is not available, such as in Javascript.")
     (license license:asl2.0)))
+
+(define-public ocaml-async-kernel
+  (package
+    (name "ocaml-async-kernel")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/async_kernel/")
+    (source(janestreet-origin "async_kernel" version
+              "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("core-kernel" ,ocaml-core-kernel)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Monadic concurrency library")
+    (description "Monadic concurrency library.")
+    (license license:asl2.0)))
-- 
2.11.0

From db6367c58e43488ad8c556f7c6645ee3cf424f32 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:59:46 +0100
Subject: [PATCH 60/76] gnu: Add ocaml-async-rpc-kernel.

* gnu/packages/ocaml.scm (ocaml-async-rpc-kernel): New variable.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 33a758f25..579d71d0c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2651,3 +2651,21 @@ the full Core is not available, such as in Javascript.")
     (synopsis "Monadic concurrency library")
     (description "Monadic concurrency library.")
     (license license:asl2.0)))
+
+(define-public ocaml-async-rpc-kernel
+  (package
+    (name "ocaml-async-rpc-kernel")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/async_rpc_kernel/")
+    (source(janestreet-origin "async_rpc_kernel" version
+              "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("async-kernel" ,ocaml-async-kernel)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Platform-independent core of Async RPC library")
+    (description "Platform-independent core of Async RPC library.")
+    (license license:asl2.0)))
-- 
2.11.0

From d9092ffe4201a5655e3a4186c081eb351b4af1ec Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:35:16 +0100
Subject: [PATCH 61/76] gnu: Add ocaml-core.

* gnu/packages/ocaml.scm (ocaml-core): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 579d71d0c..8c8a53209 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2669,3 +2669,22 @@ the full Core is not available, such as in Javascript.")
     (synopsis "Platform-independent core of Async RPC library")
     (description "Platform-independent core of Async RPC library.")
     (license license:asl2.0)))
+
+(define-public ocaml-core
+  (package
+    (name "ocaml-core")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/core/")
+    (source(janestreet-origin "core" version
+              "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("core-kernel" ,ocaml-core-kernel)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Alternative to OCaml's standard library")
+    (description "The Core suite of libraries is an alternative to OCaml's
+standard library that was developed by Jane Street.")
+    (license license:asl2.0)))
-- 
2.11.0

From 66883eee1e9812a9c789373c83dd9f2f3847e2f3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:42:52 +0100
Subject: [PATCH 62/76] gnu: Add ocaml-async-unix.

* gnu/packages/ocaml.scm (ocaml-async-unix): New variable.
---
 gnu/packages/ocaml.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8c8a53209..892dcb09a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2688,3 +2688,22 @@ the full Core is not available, such as in Javascript.")
     (description "The Core suite of libraries is an alternative to OCaml's
 standard library that was developed by Jane Street.")
     (license license:asl2.0)))
+
+(define-public ocaml-async-unix
+  (package
+    (name "ocaml-async-unix")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/async_unix/")
+    (source(janestreet-origin "async_unix" version
+              "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("async-kernel" ,ocaml-async-kernel)
+                         ("core" ,ocaml-core)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Monadic concurrency library")
+    (description "Monadic concurrency library.")
+    (license license:asl2.0)))
-- 
2.11.0

From dbf3dc983e0166d674ed496513f8696bbd0e4e6a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:48:42 +0100
Subject: [PATCH 63/76] gnu: Add ocaml-async-extra.

* gnu/packages/ocaml.scm (ocaml-async-extra): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 892dcb09a..a31455b6c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2707,3 +2707,23 @@ standard library that was developed by Jane Street.")
     (synopsis "Monadic concurrency library")
     (description "Monadic concurrency library.")
     (license license:asl2.0)))
+
+(define-public ocaml-async-extra
+  (package
+    (name "ocaml-async-extra")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/async_extra/")
+    (source(janestreet-origin "async_extra" version
+              "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("async-rpc-kernel" ,ocaml-async-rpc-kernel)
+                         ("async-unix" ,ocaml-async-unix)
+                         ("core" ,ocaml-core)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Monadic concurrency library")
+    (description "Monadic concurrency library.")
+    (license license:asl2.0)))
-- 
2.11.0

From 14b1d6e529be196493bf9b0f64a3b27acec1719e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:52:44 +0100
Subject: [PATCH 64/76] gnu: Add ocaml-async.

* gnu/packages/ocaml.scm (ocaml-async): New variable.
---
 gnu/packages/ocaml.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a31455b6c..3eaa3d837 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2727,3 +2727,21 @@ standard library that was developed by Jane Street.")
     (synopsis "Monadic concurrency library")
     (description "Monadic concurrency library.")
     (license license:asl2.0)))
+
+(define-public ocaml-async
+  (package
+    (name "ocaml-async")
+    (version "113.33.03")
+    (home-page "https://github.com/janestreet/async/")
+    (source(janestreet-origin "async" version
+              "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25"))
+    (native-inputs `(("oasis" ,ocaml-oasis)
+                     ("js-build-tools" ,ocaml-js-build-tools)
+                     ("ppx-jane" ,ocaml-ppx-jane)
+                     ("opam" ,opam)))
+    (propagated-inputs `(("async-extra" ,ocaml-async-extra)))
+    (build-system ocaml-build-system)
+    (arguments janestreet-arguments)
+    (synopsis "Monadic concurrency library")
+    (description "Monadic concurrency library.")
+    (license license:asl2.0)))
-- 
2.11.0

From 68101aaae2d69f242e909609ce66d9bda197c9cf Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:57:33 +0100
Subject: [PATCH 65/76] gnu: Add ocaml-ocplib-endian.

* gnu/packages/ocaml.scm (ocaml-ocplib-endian): New variable.
---
 gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3eaa3d837..cfc1b5a3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2745,3 +2745,24 @@ standard library that was developed by Jane Street.")
     (synopsis "Monadic concurrency library")
     (description "Monadic concurrency library.")
     (license license:asl2.0)))
+
+(define-public ocaml-ocplib-endian
+  (package
+    (name "ocaml-ocplib-endian")
+    (version "1.0")
+    (home-page "https://github.com/OCamlPro/ocplib-endian/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("cppo" ,ocaml-cppo)))
+    (synopsis "Optimised functions to read and write int16/32/64 from strings
+and bigarrays")
+    (description "Optimised functions to read and write int16/32/64 from strings
+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)))
-- 
2.11.0

From c2a37ef99d9547ebaf102d034f72de72e695caa1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:00:38 +0100
Subject: [PATCH 66/76] gnu: Add ocaml-cstruct.

* 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 cfc1b5a3a..55eccbe22 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2766,3 +2766,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

From 42f3dd8125e39cd398ce9ed8d3718ec2a86de336 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:07:38 +0100
Subject: [PATCH 67/76] gnu: Add ocaml-hex.

* gnu/packages/ocaml.scm (ocaml-hex): New variable.
---
 gnu/packages/ocaml.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 55eccbe22..bb66009bd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2793,3 +2793,20 @@ big- and little-endian, with their unsafe counter-parts.")
 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)))
+
+(define-public ocaml-hex
+  (package
+    (name "ocaml-hex")
+    (version "1.0.0")
+    (home-page "https://github.com/mirage/ocaml-hex/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v"))))
+    (build-system ocaml-build-system)
+    (propagated-inputs `(("cstruct" ,ocaml-cstruct)))
+    (synopsis "Minimal library providing hexadecimal converters")
+    (description "Minimal library providing hexadecimal converters.")
+    (license license:isc)))
-- 
2.11.0

From dfd3101e9a0eaf3de1c3778fa4ee0d979aa3936c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:11:28 +0100
Subject: [PATCH 68/76] gnu: Add ocaml-ezjsonm.

* gnu/packages/ocaml.scm (ocaml-ezjsonm): New variable.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bb66009bd..620e4226c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2810,3 +2810,31 @@ writing to these structures, and they are accessed via the Bigarray module.")
     (synopsis "Minimal library providing hexadecimal converters")
     (description "Minimal library providing hexadecimal converters.")
     (license license:isc)))
+
+(define-public ocaml-ezjsonm
+  (package
+    (name "ocaml-ezjsonm")
+    (version "0.4.3")
+    (home-page "https://github.com/mirage/ezjsonm/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/" version ".tar.gz"))
+              (sha256
+                (base32
+                  "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("alcotest" ,ocaml-alcotest)))
+    (propagated-inputs `(("hex" ,ocaml-hex)
+                         ("jsonm" ,ocaml-jsonm)
+                         ("lwt" ,ocaml-lwt)
+                         ("sexplib" ,ocaml-sexplib)))
+    (arguments `(#:configure-flags (list "--enable-lwt")
+                 ;; dllcstruct_stubs.so: cannot open shared object file: No
+                 ;; such file or directory
+                 #:tests? #f))
+    (synopsis "An easy interface on top of the Jsonm library")
+    (description "This version provides more convenient (but far less flexible)
+input and output functions that go to and from [string] values.  This avoids
+the need to write signal code, which is useful for quick scripts that
+manipulate JSON.")
+    (license license:isc)))
-- 
2.11.0

From 8658cfa5e000791eb6185af1b8bc540538b0376b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:19:32 +0100
Subject: [PATCH 69/76] gnu: Add ocaml-uri.

* gnu/packages/ocaml.scm (ocaml-uri): New variable.
---
 gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 620e4226c..1f184e02c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2838,3 +2838,25 @@ input and output functions that go to and from [string] values.  This avoids
 the need to write signal code, which is useful for quick scripts that
 manipulate JSON.")
     (license license:isc)))
+
+(define-public ocaml-uri
+  (package
+    (name "ocaml-uri")
+    (version "1.9.2")
+    (home-page "https://github.com/mirage/ocaml-uri/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ounit" ,ocaml-ounit)))
+    (propagated-inputs `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+                         ("re" ,ocaml-re)
+                         ("ppx-deriving" ,ocaml-ppx-deriving)
+                         ("sexplib" ,ocaml-sexplib)
+                         ("stringext" ,ocaml-stringext)))
+    (synopsis "RFC3986 URI/URL parsing library")
+    (description "RFC3986 URI/URL parsing library.")
+    (license license:isc)))
-- 
2.11.0

From 0cc4e3759d667837ba830b0e124b815ac3a8f821 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:22:35 +0100
Subject: [PATCH 70/76] gnu: Add ocaml-easy-format.

* gnu/packages/ocaml.scm (ocaml-easy-format): New variable.
---
 gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1f184e02c..3a6df467b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2860,3 +2860,23 @@ manipulate JSON.")
     (synopsis "RFC3986 URI/URL parsing library")
     (description "RFC3986 URI/URL parsing library.")
     (license license:isc)))
+
+(define-public ocaml-easy-format
+  (package
+    (name "ocaml-easy-format")
+    (version "1.2.0")
+    (home-page "https://github.com/mjambon/easy-format")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:tests? #f))
+    (synopsis "High-level and functional interface to the Format module of the
+OCaml standard library")
+    (description "High-level and functional interface to the Format module of
+the OCaml standard library.")
+    (license license:bsd-3)))
-- 
2.11.0

From c75235ef34f4017f092d80e5c89b05d1a1eb702e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:25:17 +0100
Subject: [PATCH 71/76] gnu: Add ocaml-optcomp.

* gnu/packages/ocaml.scm (ocaml-optcomp): New variable.
---
 gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3a6df467b..7ca4af3f6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2880,3 +2880,28 @@ OCaml standard library")
     (description "High-level and functional interface to the Format module of
 the OCaml standard library.")
     (license license:bsd-3)))
+
+(define-public ocaml-optcomp
+  (package
+    (name "ocaml-optcomp")
+    (version "1.6")
+    (home-page "https://github.com/diml/optcomp")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/archive/" version ".tar.gz"))
+              (sha256
+                (base32
+                  "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:use-make? #t
+	   #:make-flags
+       (list (string-append "BUILDFLAGS=\""
+                            "-cflags -I,"
+                            (assoc-ref %build-inputs "camlp4")
+                            "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\""))))
+    (native-inputs `(("camlp4" ,camlp4)))
+    (propagated-inputs `(("camlp4" ,camlp4)))
+    (synopsis "Optional compilation with cpp-like directives")
+    (description "Optional compilation with cpp-like directives.")
+    (license license:bsd-3)))
-- 
2.11.0

From 8802a89bdd7763e7395d3337c513c24344678af6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:32:20 +0100
Subject: [PATCH 72/76] gnu: Add ocaml-piqilib.

* gnu/packages/ocaml.scm (ocaml-piqilib): New package.
* gnu/packages/patches/ocaml-piqilib-fix-makefile.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 41 +++++++++++++++++++
 .../patches/ocaml-piqilib-fix-makefile.patch       | 47 ++++++++++++++++++++++
 3 files changed, 89 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 27354e28e..f20278d3e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -778,6 +778,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ocaml-findlib-make-install.patch	\
   %D%/packages/patches/ocaml-janestreet-fix-libdir.patch \
   %D%/packages/patches/ocaml-omake-fix-non-determinism.patch	\
+  %D%/packages/patches/ocaml-piqilib-fix-makefile.patch \
   %D%/packages/patches/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7ca4af3f6..a11446f5f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2905,3 +2905,44 @@ the OCaml standard library.")
     (synopsis "Optional compilation with cpp-like directives")
     (description "Optional compilation with cpp-like directives.")
     (license license:bsd-3)))
+
+(define-public ocaml-piqilib
+  (package
+    (name "ocaml-piqilib")
+    (version "0.6.13")
+    (home-page "http://piqi.org")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/alavrik/piqi/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+                (base32
+                  "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l"))
+              (patches (search-patches "ocaml-piqilib-fix-makefile.patch"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "make/OCamlMakefile"
+                 (("/bin/sh") (which "bash")))
+               (zero? (system* "./configure" "--prefix" out "--ocaml-libdir"
+                               (string-append out "/lib/ocaml/site-lib"))))))
+       (add-after 'build 'build-ocaml
+         (lambda* (#:key outputs #:allow-other-keys)
+           (zero? (system* "make" "ocaml")))) 
+       (add-after 'install 'install-ocaml
+         (lambda* (#:key outputs #:allow-other-keys)
+           (zero? (system* "make" "ocaml-install")))))))
+    (native-inputs `(("which" ,which)
+                     ("camlp4" ,camlp4)))
+    (propagated-inputs `(("xmlm" ,ocaml-xmlm)
+                         ("ulex" ,ocaml-ulex)
+                         ("optcomp" ,ocaml-optcomp)
+                         ("easy-format" ,ocaml-easy-format)
+                         ("base64" ,ocaml-base64)))
+    (synopsis "Data serialization and conversion library")
+    (description "Common library used by piqi command-line tool and piqi-ocaml.")
+    (license license:asl2.0)))
diff --git a/gnu/packages/patches/ocaml-piqilib-fix-makefile.patch b/gnu/packages/patches/ocaml-piqilib-fix-makefile.patch
new file mode 100644
index 000000000..a21b21983
--- /dev/null
+++ b/gnu/packages/patches/ocaml-piqilib-fix-makefile.patch
@@ -0,0 +1,47 @@
+From 336e69d6882a1b8d725c43f1c2e340ef4464bac5 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 31 Dec 2016 11:21:14 +0100
+Subject: [PATCH] fix OCAMLPATH in makefile
+
+---
+ Makefile            | 2 +-
+ make/Makefile.ocaml | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4db87da..9315887 100644
+--- a/Makefile
++++ b/Makefile
+@@ -23,7 +23,7 @@ OCAMLFIND_DESTDIR := $(shell cygpath -w $(OCAMLFIND_DESTDIR))
+ endif
+ export OCAMLFIND_DESTDIR
+
+-OCAMLPATH := $(PIQI_ROOT)/deps
++OCAMLPATH := $(OCAMLPATH):$(PIQI_ROOT)/deps
+ ifeq ($(SYSTEM),$(filter $(SYSTEM),mingw mingw64))
+ OCAMLPATH := $(shell cygpath -w $(OCAMLPATH))
+ endif
+diff --git a/make/Makefile.ocaml b/make/Makefile.ocaml
+index 2b6324d..b82c041 100644
+--- a/make/Makefile.ocaml
++++ b/make/Makefile.ocaml
+@@ -1,7 +1,7 @@
+ OCAMLMAKEFILE := $(PIQI_ROOT)/make/OCamlMakefile
+
+
+-OCAMLPATH := $(PIQI_BUILD)/lib/ocaml
++OCAMLPATH := $(OCAMLPATH):$(PIQI_BUILD)/lib/ocaml
+ ifeq ($(SYSTEM),$(filter $(SYSTEM),mingw mingw64))
+ OCAMLPATH := $(shell cygpath -w $(OCAMLPATH))
+ endif
+@@ -23,6 +23,7 @@ post_target::
+
+
+ .ml.mli: $(EXTRADEPS)
++			echo $(OCAMLPATH)
+ 			$(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ 			if [ -z "$$pp" ]; then \
+ 			  $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
+--
+2.11.0
+
-- 
2.11.0

From 40853fb4b5310a1e45b75ccca0c1969168db3a10 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:46:19 +0100
Subject: [PATCH 73/76] gnu: Add ocaml-uuidm.

* gnu/packages/ocaml.scm (ocaml-uuidm): New variable.
---
 gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a11446f5f..7ca2d8d91 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2946,3 +2946,29 @@ the OCaml standard library.")
     (synopsis "Data serialization and conversion library")
     (description "Common library used by piqi command-line tool and piqi-ocaml.")
     (license license:asl2.0)))
+
+(define-public ocaml-uuidm
+  (package
+    (name "ocaml-uuidm")
+    (version "0.9.6")
+    (home-page "http://erratique.ch/software/uuidm")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/uuidm-" version ".tbz"))
+        (sha256 (base32
+                  "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "build" "--with-cmdliner" "true")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("cmdliner" ,ocaml-cmdliner)
+                         ("topkg" ,ocaml-topkg)))
+    (synopsis "Universally unique identifiers (UUIDs) for OCaml")
+    (description "Uuidm is an OCaml module implementing 128 bits universally
+unique identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4
+(random based) according to RFC 4122.")
+    (license license:isc)))
-- 
2.11.0

From c7d9ec043e34ad64119563dfcb8684bb1378a99b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:35:04 +0100
Subject: [PATCH 74/76] gnu: Add ocamlgraph.

* gnu/packages/ocaml.scm (ocamlgraph): New variable.
* gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 27 +++++++++++++++++
 .../ocamlgraph-honor-source-date-epoch.patch       | 34 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f20278d3e..a7bbadd50 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -779,6 +779,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ocaml-janestreet-fix-libdir.patch \
   %D%/packages/patches/ocaml-omake-fix-non-determinism.patch	\
   %D%/packages/patches/ocaml-piqilib-fix-makefile.patch \
+  %D%/packages/patches/ocamlgraph-honor-source-date-epoch.patch	\
   %D%/packages/patches/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7ca2d8d91..8cb6a6f85 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2972,3 +2972,30 @@ the OCaml standard library.")
 unique identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4
 (random based) according to RFC 4122.")
     (license license:isc)))
+
+(define-public ocamlgraph
+  (package
+    (name "ocamlgraph")
+    (version "1.8.7")
+    (home-page "http://ocamlgraph.lri.fr/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "http://ocamlgraph.lri.fr/download/ocamlgraph-"
+                            version ".tar.gz"))
+        (sha256 (base32
+                  "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz"))
+        (patches (search-patches "ocamlgraph-honor-source-date-epoch.patch"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:install-target "install-findlib"
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'fix-/bin/sh
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "configure"
+                         (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
+                                                      "/bin/sh"))))))))
+    (inputs `(("lablgtk" ,lablgtk)))
+    (synopsis "A generic graph library for OCaml")
+    (description "A generic graph library for OCaml.")
+    (license license:lgpl2.1)))
diff --git a/gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch b/gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch
new file mode 100644
index 000000000..9f8713e3d
--- /dev/null
+++ b/gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch
@@ -0,0 +1,34 @@
+From 354ef78aac0b887fae3c10b28eb2b0d83f66bdfe Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Mon, 2 Jan 2017 17:05:24 +0100
+Subject: [PATCH] Honor SOURCE_DATE_EPOCH
+
+---
+ Makefile.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a32b4b8..ef4c174 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -113,11 +113,16 @@ graph.cmx: $(CMI) $(CMX)
+	$(OCAMLOPT) $(INCLUDES) -pack -o $@ $^
+ 
+ VERSION=1.8.7
++ifdef SOURCE_DATE_EPOCH
++BUILD_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date)
++else
++BUILD_DATE=$(shell date)
++endif
+ 
+ src/version.ml: Makefile
+	rm -f $@
+	echo "let version = \""$(VERSION)"\"" > $@
+-	echo "let date = \""`date`"\"" >> $@
++	echo "let date = \""$(BUILD_DATE)"\"" >> $@
+ 
+ # gtk2 graph editor
+ ###################
+-- 
+2.11.0
+
-- 
2.11.0

From 5bac4ae05ba794cd1a3b195a33c9c944d6da5867 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:57:25 +0100
Subject: [PATCH 75/76] gnu: Add ocaml-piqi.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8cb6a6f85..cf751fdcf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -43,6 +43,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
@@ -2999,3 +3000,33 @@ unique identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4
     (synopsis "A generic graph library for OCaml")
     (description "A generic graph library for OCaml.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-piqi
+  (package
+    (name "ocaml-piqi")
+    (version "0.7.5")
+    (home-page "https://github.com/alavrik/piqi-ocaml")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "0ngz6y8i98i5v2ma8nk6mc83pdsmf2z0ks7m3xi6clfg3zqbddrv"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-before 'build 'patch-/bin/sh
+                    (lambda _
+                      (substitute* "make/OCamlMakefile"
+                        (("/bin/sh") (which "sh")))
+                      #t)))))
+    (native-inputs `(("which" ,which)
+                     ("protobuf" ,protobuf))) ; for tests
+    (propagated-inputs `(("piqilib" ,ocaml-piqilib)))
+    (synopsis "Protocol serialization system for OCaml")
+    (description "Piqi is a multi-format data serialization system for OCaml.
+It provides a uniform interface for serializing OCaml data structures to JSON,
+XML and Protocol Buffers formats.")
+    (license license:asl2.0)))
-- 
2.11.0

From 636a97d28f8ed4c5262ab9c7e0ae20307ecf7667 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:59:12 +0100
Subject: [PATCH 76/76] gnu: Add bap.

* gnu/packages/ocaml.scm (bap): New variable.
---
 gnu/packages/ocaml.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index cf751fdcf..486180c3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -36,6 +36,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libevent)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
@@ -3030,3 +3031,72 @@ unique identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4
 It provides a uniform interface for serializing OCaml data structures to JSON,
 XML and Protocol Buffers formats.")
     (license license:asl2.0)))
+
+(define-public bap
+  (package
+    (name "bap")
+    (version "1.1.0")
+    (home-page "https://github.com/BinaryAnalysisPlatform/bap")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256
+          (base32
+            "1ms95m4j1qrmy7zqmsn2izh7gq68lnmssl7chyhk977kd3sxj66m"))))
+   (build-system ocaml-build-system)
+   (native-inputs `(("oasis" ,ocaml-oasis)
+                    ("clang" ,clang)
+                    ("ounit" ,ocaml-ounit)))
+   (propagated-inputs `(("core-kernel" ,ocaml-core-kernel)
+                        ("ppx-driver" ,ocaml-ppx-driver)
+                        ("uri" ,ocaml-uri)
+                        ("llvm" ,llvm)
+                        ("gmp" ,gmp)
+                        ("clang-runtime" ,clang-runtime)
+                        ("fileutils" ,ocaml-fileutils)
+                        ("cmdliner" ,ocaml-cmdliner)
+                        ("zarith" ,ocaml-zarith)
+                        ("uuidm" ,ocaml-uuidm)
+                        ("camlzip" ,camlzip)
+                        ("frontc" ,ocaml-frontc)
+                        ("ezjsonm" ,ocaml-ezjsonm)
+                        ("ocurl" ,ocaml-ocurl)
+                        ("piqi" ,ocaml-piqi)
+                        ("ocamlgraph" ,ocamlgraph)
+                        ("bitstring" ,ocaml-bitstring)
+                        ("ppx-jane" ,ocaml-ppx-jane)
+                        ("re" ,ocaml-re)))
+   (inputs `(("llvm" ,llvm)))
+   (arguments `(#:use-make? #t
+                #:phases
+                (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (zero? (system* "./configure" "--prefix"
+                                      (assoc-ref outputs "out")
+                                      "--libdir"
+                                      (string-append
+                                        (assoc-ref outputs "out")
+                                        "/lib/ocaml/site-lib")
+                                      "--with-llvm-version=3.8"
+                                      "--with-llvm-config=llvm-config"
+                                      "--enable-everything"))))
+                  (add-before 'install 'fix-ocamlpath
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (setenv "OCAMLPATH"
+                              (string-append
+                                (getenv "OCAMLPATH") ":"
+                                (assoc-ref outputs "out")
+                                "/lib/ocaml/site-lib"))
+                      (setenv "PATH"
+                              (string-append (getenv "PATH") ":"
+                                             (assoc-ref outputs "out") "/bin"))
+                      (substitute* "tools/build_plugins.sh"
+                        (("2>/dev/null") "")))))))
+   (synopsis "Binary Analysis Platform")
+   (description "Binary Analysis Platform is a framework for writing program
+analysis tools, that target binary files.  The framework consists of a plethora
+of libraries, plugins, and frontends.  The libraries provide code reusability,
+the plugins facilitate extensibility, and the frontends serve as entry points.")
+   (license license:expat)))
-- 
2.11.0


  reply	other threads:[~2017-01-15 13:14 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
2017-01-03 19:10 ` [PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files Julien Lepiller
2017-01-03 19:10 ` [PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path Julien Lepiller
2017-01-03 19:10 ` [PATCH 03/96] gnu: camlp4: compile native Julien Lepiller
2017-01-03 19:10 ` [PATCH 04/96] gnu: Add ocaml-build-system Julien Lepiller
2017-01-03 19:10 ` [PATCH 05/96] gnu: ocaml: Use a prefix for license field Julien Lepiller
2017-01-03 19:10 ` [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge Julien Lepiller
2017-01-04 13:38   ` David Craven
2017-01-03 19:10 ` [PATCH 07/96] gnu: camlp4: Install camlp4 META file Julien Lepiller
2017-01-03 19:10 ` [PATCH 08/96] gnu: Add ocaml-ounit Julien Lepiller
2017-01-04 13:55   ` David Craven
2017-01-03 19:10 ` [PATCH 09/96] gnu: Add camlzip Julien Lepiller
2017-01-08 12:16   ` Ben Woodcroft
2017-01-08 17:40     ` Julien Lepiller
2017-01-09  9:56       ` Ben Woodcroft
2017-01-03 19:10 ` [PATCH 10/96] gnu: Add ocamlmod Julien Lepiller
2017-01-04 15:00   ` David Craven
2017-01-04 16:57     ` julien lepiller
2017-01-04 17:35       ` David Craven
2017-01-04 17:55         ` David Craven
2017-01-04 18:19           ` David Craven
2017-01-15 13:14             ` Julien Lepiller [this message]
2017-01-15 14:27               ` David Craven
2017-01-04 21:02         ` Ludovic Courtès
2017-01-04 21:45           ` Leo Famulari
2017-01-03 19:10 ` [PATCH 11/96] gnu: Add ocaml-zarith Julien Lepiller
2017-01-03 19:10 ` [PATCH 12/96] gnu: Add ocaml-frontc Julien Lepiller
2017-01-03 19:10 ` [PATCH 13/96] gnu: Add ocaml-qtest Julien Lepiller
2017-01-03 19:10 ` [PATCH 14/96] gnu: Add ocaml-stringext Julien Lepiller
2017-01-03 19:10 ` [PATCH 15/96] gnu: Add ocaml-bisect Julien Lepiller
2017-01-03 19:10 ` [PATCH 16/96] gnu: Add ocaml-bitstring Julien Lepiller
2017-01-03 19:10 ` [PATCH 17/96] gnu: Add ocaml-result Julien Lepiller
2017-01-03 19:10 ` [PATCH 18/96] gnu: Add ocaml-topkg Julien Lepiller
2017-01-03 19:11 ` [PATCH 19/96] gnu: Add ocaml-rresult Julien Lepiller
2017-01-03 19:11 ` [PATCH 20/96] gnu: Add ocaml-mtime Julien Lepiller
2017-01-03 19:11 ` [PATCH 21/96] gnu: Add ocaml-cmdliner Julien Lepiller
2017-01-03 19:11 ` [PATCH 22/96] gnu: Add ocaml-fmt Julien Lepiller
2017-01-03 19:11 ` [PATCH 23/96] gnu: Add ocaml-astring Julien Lepiller
2017-01-03 19:11 ` [PATCH 24/96] gnu: Add ocaml-alcotest Julien Lepiller
2017-01-03 19:11 ` [PATCH 25/96] gnu: Add ocaml-ppx-tools Julien Lepiller
2017-01-03 19:11 ` [PATCH 26/96] gnu: Add ocaml-react Julien Lepiller
2017-01-03 19:11 ` [PATCH 27/96] gnu: Add ocaml-ssl Julien Lepiller
2017-01-03 19:11 ` [PATCH 28/96] gnu: Add ocaml-lwt Julien Lepiller
2017-01-03 19:11 ` [PATCH 29/96] gnu: Add ocaml-logs Julien Lepiller
2017-01-03 19:11 ` [PATCH 30/96] gnu: Add ocaml-fpath Julien Lepiller
2017-01-03 19:11 ` [PATCH 31/96] gnu: Add ocaml-bos Julien Lepiller
2017-01-03 19:11 ` [PATCH 32/96] gnu: Add ocaml-xmlm Julien Lepiller
2017-01-03 19:11 ` [PATCH 33/96] gnu: Add ocaml-ulex Julien Lepiller
2017-01-03 19:11 ` [PATCH 34/96] gnu: Add ocaml-uchar Julien Lepiller
2017-01-03 19:11 ` [PATCH 35/96] gnu: Add ocaml-uutf Julien Lepiller
2017-01-03 19:11 ` [PATCH 36/96] gnu: Add ocaml-jsonm Julien Lepiller
2017-01-03 19:11 ` [PATCH 37/96] gnu: Add ocaml-ocurl Julien Lepiller
2017-01-03 19:11 ` [PATCH 38/96] gnu: Add ocaml-base64 Julien Lepiller
2017-01-03 19:11 ` [PATCH 39/96] gnu: Add ocamlify Julien Lepiller
2017-01-03 19:11 ` [PATCH 40/96] gnu: Add omake Julien Lepiller
2017-01-03 19:11 ` [PATCH 41/96] gnu: Add ocaml-batteries Julien Lepiller
2017-01-03 19:11 ` [PATCH 42/96] gnu: Add ocaml-pcre Julien Lepiller
2017-01-03 19:11 ` [PATCH 43/96] gnu: Add ocaml-expect Julien Lepiller
2017-01-03 19:11 ` [PATCH 44/96] gnu: Add ocaml-fileutils Julien Lepiller
2017-01-03 19:58   ` David Craven
2017-01-03 19:11 ` [PATCH 45/96] gnu: Add ocaml-oasis Julien Lepiller
2017-01-03 19:11 ` [PATCH 46/96] gnu: Add ocaml-js-build-tools Julien Lepiller
2017-01-03 19:11 ` [PATCH 47/96] gnu: Add ocaml-bin-prot Julien Lepiller
2017-01-03 19:11 ` [PATCH 48/96] gnu: Add ocaml-fieldslib Julien Lepiller
2017-01-03 19:11 ` [PATCH 49/96] gnu: Add ocaml-ppx-core Julien Lepiller
2017-01-03 19:11 ` [PATCH 50/96] gnu: Add ocaml-ppx-optcomp Julien Lepiller
2017-01-03 19:11 ` [PATCH 51/96] gnu: Add ocaml-ppx-driver Julien Lepiller
2017-01-03 19:11 ` [PATCH 52/96] gnu: Add ocaml-cppo Julien Lepiller
2017-01-03 19:11 ` [PATCH 53/96] gnu: Add ocaml-ppx-deriving Julien Lepiller
2017-01-03 19:11 ` [PATCH 54/96] gnu: Add ocaml-ppx-type-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 55/96] gnu: Add ocaml-ppx-inline-test Julien Lepiller
2017-01-03 19:11 ` [PATCH 56/96] gnu: Add ocaml-ppx-bench Julien Lepiller
2017-01-03 19:11 ` [PATCH 57/96] gnu: Add ocaml-ppx-compare Julien Lepiller
2017-01-03 19:11 ` [PATCH 58/96] gnu: Add ocaml-sexplib Julien Lepiller
2017-01-03 19:11 ` [PATCH 59/96] gnu: Add ocaml-typerep Julien Lepiller
2017-01-03 19:11 ` [PATCH 60/96] gnu: Add ocaml-variantslib Julien Lepiller
2017-01-03 19:11 ` [PATCH 61/96] gnu: Add ocaml-ppx-sexp-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 62/96] gnu: Add ocaml-ppx-variants-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 63/96] gnu: Add ocaml-ppx-here Julien Lepiller
2017-01-03 19:11 ` [PATCH 64/96] gnu: Add ocaml-ppx-assert Julien Lepiller
2017-01-03 19:11 ` [PATCH 65/96] gnu: Add ocaml-ppx-enumerate Julien Lepiller
2017-01-03 19:11 ` [PATCH 66/96] gnu: Add ocaml-ppx-let Julien Lepiller
2017-01-03 19:11 ` [PATCH 67/96] gnu: Add ocaml-ppx-typerep-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 68/96] gnu: Add ocaml-ppx-sexp-value Julien Lepiller
2017-01-03 19:11 ` [PATCH 69/96] gnu: Add ocaml-ppx-pipebang Julien Lepiller
2017-01-03 19:11 ` [PATCH 70/96] gnu: Add ocaml-ppx-bin-prot Julien Lepiller
2017-01-03 19:11 ` [PATCH 71/96] gnu: Add ocaml-ppx-fail Julien Lepiller
2017-01-03 19:11 ` [PATCH 72/96] gnu: Add ocaml-ppx-custom-printf Julien Lepiller
2017-01-03 19:11 ` [PATCH 73/96] gnu: Add ocaml-ppx-sexp-message Julien Lepiller
2017-01-03 19:11 ` [PATCH 74/96] gnu: Add ocaml-ppx-fields-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 75/96] gnu: Add ocaml-re Julien Lepiller
2017-01-03 19:11 ` [PATCH 76/96] gnu: Add ocaml-ppx-expect Julien Lepiller
2017-01-03 19:11 ` [PATCH 77/96] gnu: Add ocaml-ppx-jane Julien Lepiller
2017-01-03 19:11 ` [PATCH 78/96] gnu: Add ocaml-core-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 79/96] gnu: Add ocaml-async-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 80/96] gnu: Add ocaml-async-rpc-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 81/96] gnu: Add ocaml-core Julien Lepiller
2017-01-03 19:12 ` [PATCH 82/96] gnu: Add ocaml-async-unix Julien Lepiller
2017-01-03 19:12 ` [PATCH 83/96] gnu: Add ocaml-async-extra Julien Lepiller
2017-01-03 19:12 ` [PATCH 84/96] gnu: Add ocaml-async Julien Lepiller
2017-01-03 19:12 ` [PATCH 85/96] gnu: Add ocaml-ocplib-endian Julien Lepiller
2017-01-03 19:12 ` [PATCH 86/96] gnu: Add ocaml-cstruct Julien Lepiller
2017-01-03 19:12 ` [PATCH 87/96] gnu: Add ocaml-hex Julien Lepiller
2017-01-03 19:12 ` [PATCH 88/96] gnu: Add ocaml-ezjsonm Julien Lepiller
2017-01-03 19:12 ` [PATCH 89/96] gnu: Add ocaml-uri Julien Lepiller
2017-01-03 19:12 ` [PATCH 90/96] gnu: Add ocaml-easy-format Julien Lepiller
2017-01-03 19:12 ` [PATCH 91/96] gnu: Add ocaml-optcomp Julien Lepiller
2017-01-03 19:12 ` [PATCH 92/96] gnu: Add ocaml-piqilib Julien Lepiller
2017-01-03 19:12 ` [PATCH 93/96] gnu: Add ocaml-uuidm Julien Lepiller
2017-01-03 19:12 ` [PATCH 94/96] gnu: Add ocamlgraph Julien Lepiller
2017-01-03 19:12 ` [PATCH 95/96] gnu: Add ocaml-piqi Julien Lepiller
2017-01-03 19:12 ` [PATCH 96/96] gnu: Add bap Julien Lepiller
2017-01-03 19:46 ` [PATCH 00/96] ocaml-build-system and packages David Craven
2017-01-03 20:21   ` Julien Lepiller
2017-01-03 20:27     ` David Craven
2017-01-04 20:57 ` Ludovic Courtès
2017-01-25 17:58   ` Ludovic Courtès
2017-01-26  9:27     ` julien lepiller
2017-01-26 18:05       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170115141415.630135d3@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).