unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 00/96] ocaml-build-system and packages
@ 2017-01-03 19:10 Julien Lepiller
  2017-01-03 19:10 ` [PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files Julien Lepiller
                   ` (97 more replies)
  0 siblings, 98 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

Hi, it's a bit late for christmas, so let's call this ocamlismas ;).

Here are ~100 patches that:

- Add an ocaml-build-system
- Change the ocaml compiler, camlp4 and findlib to work nicely with it
- A lot of packages (all dependencies of bap, and bap itself).

I took one patch from debian to help the compiler produce reproducible binaries.
Without this patch some modules would embed temporary file names. A few packages
also had reproducibility issues, but that is fixed, except for one of them.

Julien Lepiller (96):
  gnu: ocaml: Add a .file directive to generated .s files
  gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path
  gnu: camlp4: compile native
  gnu: Add ocaml-build-system.
  gnu: ocaml: Use a prefix for license field.
  gnu: ocaml: Use a helper function to download from ocaml-forge.
  gnu: camlp4: Install camlp4 META file.
  gnu: Add ocaml-ounit.
  gnu: Add camlzip
  gnu: Add ocamlmod.
  gnu: Add ocaml-zarith.
  gnu: Add ocaml-frontc
  gnu: Add ocaml-qtest
  gnu: Add ocaml-stringext
  gnu: Add ocaml-bisect
  gnu: Add ocaml-bitstring
  gnu: Add ocaml-result
  gnu: Add ocaml-topkg
  gnu: Add ocaml-rresult
  gnu: Add ocaml-mtime
  gnu: Add ocaml-cmdliner
  gnu: Add ocaml-fmt
  gnu: Add ocaml-astring
  gnu: Add ocaml-alcotest
  gnu: Add ocaml-ppx-tools
  gnu: Add ocaml-react
  gnu: Add ocaml-ssl
  gnu: Add ocaml-lwt
  gnu: Add ocaml-logs
  gnu: Add ocaml-fpath
  gnu: Add ocaml-bos
  gnu: Add ocaml-xmlm
  gnu: Add ocaml-ulex
  gnu: Add ocaml-uchar
  gnu: Add ocaml-uutf
  gnu: Add ocaml-jsonm
  gnu: Add ocaml-ocurl
  gnu: Add ocaml-base64
  gnu: Add ocamlify
  gnu: Add omake
  gnu: Add ocaml-batteries
  gnu: Add ocaml-pcre
  gnu: Add ocaml-expect
  gnu: Add ocaml-fileutils
  gnu: Add ocaml-oasis
  gnu: Add ocaml-js-build-tools
  gnu: Add ocaml-bin-prot
  gnu: Add ocaml-fieldslib
  gnu: Add ocaml-ppx-core
  gnu: Add ocaml-ppx-optcomp
  gnu: Add ocaml-ppx-driver
  gnu: Add ocaml-cppo
  gnu: Add ocaml-ppx-deriving
  gnu: Add ocaml-ppx-type-conv
  gnu: Add ocaml-ppx-inline-test
  gnu: Add ocaml-ppx-bench
  gnu: Add ocaml-ppx-compare
  gnu: Add ocaml-sexplib
  gnu: Add ocaml-typerep
  gnu: Add ocaml-variantslib
  gnu: Add ocaml-ppx-sexp-conv
  gnu: Add ocaml-ppx-variants-conv
  gnu: Add ocaml-ppx-here
  gnu: Add ocaml-ppx-assert
  gnu: Add ocaml-ppx-enumerate
  gnu: Add ocaml-ppx-let
  gnu: Add ocaml-ppx-typerep-conv
  gnu: Add ocaml-ppx-sexp-value
  gnu: Add ocaml-ppx-pipebang
  gnu: Add ocaml-ppx-bin-prot
  gnu: Add ocaml-ppx-fail
  gnu: Add ocaml-ppx-custom-printf
  gnu: Add ocaml-ppx-sexp-message
  gnu: Add ocaml-ppx-fields-conv
  gnu: Add ocaml-re
  gnu: Add ocaml-ppx-expect
  gnu: Add ocaml-ppx-jane
  gnu: Add ocaml-core-kernel
  gnu: Add ocaml-async-kernel
  gnu: Add ocaml-async-rpc-kernel
  gnu: Add ocaml-core
  gnu: Add ocaml-async-unix
  gnu: Add ocaml-async-extra
  gnu: Add ocaml-async
  gnu: Add ocaml-ocplib-endian
  gnu: Add ocaml-cstruct
  gnu: Add ocaml-hex
  gnu: Add ocaml-ezjsonm
  gnu: Add ocaml-uri
  gnu: Add ocaml-easy-format
  gnu: Add ocaml-optcomp
  gnu: Add ocaml-piqilib
  gnu: Add ocaml-uuidm
  gnu: Add ocamlgraph
  gnu: Add ocaml-piqi
  gnu: Add bap

 Makefile.am                                        |    2 +
 gnu/local.mk                                       |    7 +
 gnu/packages/ocaml.scm                             | 2305 +++++++++++++++++++-
 .../patches/ocaml-Add-a-.file-directive.patch      |   96 +
 ...ml-bisect-fix-camlp4-in-another-directory.patch |  125 ++
 .../patches/ocaml-bitstring-fix-configure.patch    |   53 +
 .../patches/ocaml-janestreet-fix-libdir.patch      |   36 +
 .../patches/ocaml-omake-fix-non-determinism.patch  |   41 +
 .../patches/ocaml-piqilib-fix-makefile.patch       |   47 +
 .../ocamlgraph-honor-source-date-epoch.patch       |   34 +
 guix/build-system/ocaml.scm                        |  181 ++
 guix/build/ocaml-build-system.scm                  |  119 +
 12 files changed, 3021 insertions(+), 25 deletions(-)
 create mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch
 create mode 100644 gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
 create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
 create mode 100644 gnu/packages/patches/ocaml-omake-fix-non-determinism.patch
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch
 create mode 100644 gnu/packages/patches/ocamlgraph-honor-source-date-epoch.patch
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

-- 
2.11.0

^ permalink raw reply	[flat|nested] 119+ messages in thread

* [PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path Julien Lepiller
                   ` (96 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/patches/ocaml-Add-a-.file-directive.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/ocaml.scm (ocaml) [origin]: Add patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             |  7 +-
 .../patches/ocaml-Add-a-.file-directive.patch      | 96 ++++++++++++++++++++++
 3 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0c42f9f44..9cbeaf071 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
   %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/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c5784db90..4bb138a14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,7 +63,10 @@
               (sha256
                (base32
                 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
-              (patches (search-patches "ocaml-CVE-2015-8869.patch"))))
+              (patches
+				(search-patches
+                  "ocaml-CVE-2015-8869.patch"
+                  "ocaml-Add-a-.file-directive.patch"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
new file mode 100644
index 000000000..07842e9c3
--- /dev/null
+++ b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
@@ -0,0 +1,96 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Sun, 16 Aug 2015 20:59:14 +0200
+Subject: Add a .file directive to generated .s files
+
+When no .file directive is given, the toolchain records the filename
+of the .o file, which is sometimes random, making generated objects
+non-deterministic.
+
+We use Location.input_name for adding .file directives to assembly
+files. Note: when the file is preprocessed, this reference holds the
+name of the temporary file. Hence, files compiled with -pp are still
+not deterministic.
+
+Bug-Debian: https://bugs.debian.org/795784
+Bug-Debian: https://bugs.debian.org/796336
+---
+ asmcomp/amd64/emit.mlp | 1 +
+ asmcomp/arm/emit.mlp   | 1 +
+ asmcomp/arm64/emit.mlp | 1 +
+ asmcomp/i386/emit.mlp  | 1 +
+ asmcomp/power/emit.mlp | 1 +
+ asmcomp/sparc/emit.mlp | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
+index d56d0f5..4d7aa30 100644
+--- a/asmcomp/amd64/emit.mlp
++++ b/asmcomp/amd64/emit.mlp
+@@ -794,6 +794,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   if !Clflags.dlcode then begin
+     (* from amd64.S; could emit these constants on demand *)
+     if macosx then
+diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
+index 4948fb2..6f30fba 100644
+--- a/asmcomp/arm/emit.mlp
++++ b/asmcomp/arm/emit.mlp
+@@ -892,6 +892,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   `	.syntax	unified\n`;
+   begin match !arch with
+   | ARMv4   -> `	.arch	armv4t\n`
+diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
+index 750c2b2..5afbb8a 100644
+--- a/asmcomp/arm64/emit.mlp
++++ b/asmcomp/arm64/emit.mlp
+@@ -942,6 +942,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
+index 98df5f9..531150f 100644
+--- a/asmcomp/i386/emit.mlp
++++ b/asmcomp/i386/emit.mlp
+@@ -986,6 +986,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
+index 4344085..343132b 100644
+--- a/asmcomp/power/emit.mlp
++++ b/asmcomp/power/emit.mlp
+@@ -887,6 +887,7 @@ let data l =
+ let begin_assembly() =
+   defined_functions := StringSet.empty;
+   external_functions := StringSet.empty;
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   (* Emit the beginning of the segments *)
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   emit_string data_space;
+diff --git a/asmcomp/sparc/emit.mlp b/asmcomp/sparc/emit.mlp
+index 877a3d5..7b041e9 100644
+--- a/asmcomp/sparc/emit.mlp
++++ b/asmcomp/sparc/emit.mlp
+@@ -727,6 +727,7 @@ let data l =
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.global	{emit_symbol lbl_begin}\n`;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path
  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 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 03/96] gnu: camlp4: compile native Julien Lepiller
                   ` (95 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Add
CAML_LD_LIBRARY_PATH
---
 gnu/packages/ocaml.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4bb138a14..f74cd5245 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -64,14 +64,17 @@
                (base32
                 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
               (patches
-				(search-patches
+                (search-patches
                   "ocaml-CVE-2015-8869.patch"
                   "ocaml-Add-a-.file-directive.patch"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
             (variable "OCAMLPATH")
-            (files (list (string-append "lib/ocaml"))))))
+            (files (list "lib/ocaml")))
+           (search-path-specification
+            (variable "CAML_LD_LIBRARY_PATH")
+            (files (list "lib/ocaml/site-lib/stubslibs")))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 03/96] gnu: camlp4: compile native
  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 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 04/96] gnu: Add ocaml-build-system Julien Lepiller
                   ` (94 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (camlp4): Change default target to "all", and
compile both native and byte version.
---
 gnu/packages/ocaml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f74cd5245..90483c6e1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -237,6 +237,10 @@ Git-friendly development workflow.")
     (inputs `(("ocaml" ,ocaml)))
     (arguments
      '(#:tests? #f                                ;no documented test target
+       ;; a race-condition will lead byte and native targets to  mkdir _build
+       ;; which  fails on the second attempt.
+       #:parallel-build? #f
+       #:make-flags (list "all")
        #:phases (modify-phases %standard-phases
                   (replace
                    'configure
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 04/96] gnu: Add ocaml-build-system.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (2 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 03/96] gnu: camlp4: compile native Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 05/96] gnu: ocaml: Use a prefix for license field Julien Lepiller
                   ` (93 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* guix/build/ocaml-build-system.scm: New file.
* guix/build-system/ocaml.scm: New file.
* Makefile.am (MODULES): Add them.
* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Adjuste OCAMLPATH.
---
 Makefile.am                       |   2 +
 gnu/packages/ocaml.scm            |   2 +-
 guix/build-system/ocaml.scm       | 181 ++++++++++++++++++++++++++++++++++++++
 guix/build/ocaml-build-system.scm | 119 +++++++++++++++++++++++++
 4 files changed, 303 insertions(+), 1 deletion(-)
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

diff --git a/Makefile.am b/Makefile.am
index fb08a004b..1a66fff50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ MODULES =					\
   guix/build-system/haskell.scm			\
   guix/build-system/perl.scm			\
   guix/build-system/python.scm			\
+  guix/build-system/ocaml.scm			\
   guix/build-system/waf.scm			\
   guix/build-system/r.scm			\
   guix/build-system/ruby.scm			\
@@ -95,6 +96,7 @@ MODULES =					\
   guix/build/gnu-dist.scm			\
   guix/build/perl-build-system.scm		\
   guix/build/python-build-system.scm		\
+  guix/build/ocaml-build-system.scm		\
   guix/build/r-build-system.scm			\
   guix/build/ruby-build-system.scm		\
   guix/build/waf-build-system.scm		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 90483c6e1..644638f8a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -71,7 +71,7 @@
     (native-search-paths
      (list (search-path-specification
             (variable "OCAMLPATH")
-            (files (list "lib/ocaml")))
+            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
            (search-path-specification
             (variable "CAML_LD_LIBRARY_PATH")
             (files (list "lib/ocaml/site-lib/stubslibs")))))
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
new file mode 100644
index 000000000..f4f57b5ad
--- /dev/null
+++ b/guix/build-system/ocaml.scm
@@ -0,0 +1,181 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system ocaml)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix derivations)
+  #:use-module (guix search-paths)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:export (%ocaml-build-system-modules
+            ocaml-build
+            ocaml-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for packages using ocaml. This is implemented as an
+;; extension of `gnu-build-system'.
+;;
+;; OCaml packages don't use a single standard for their build system. Some use
+;; autotools, other use custom configure scripts with Makefiles, others use
+;; oasis to generate the configure script and Makefile and lastly, some use
+;; custom ocaml scripts.
+;;
+;; Each phase in the build system will try to figure out what the build system
+;; is for that package. Most packages come with a custom configure script and
+;; a Makefile that in turn call custom build tools. Packages built with oasis
+;; will have a `setup.ml' file in the top directory, that can be used for all
+;; phases. In that case the Makefile is here only to call that script. In case
+;; the setup.ml do not work as expected, the @var{use-make} argument can be
+;; used to ignore the setup.ml file and run make instead.
+;;
+;; Some packages use their own custom scripts, `pkg/pkg.ml' or
+;; `pkg/build.ml'. They can be used here too.
+;;
+;; Code:
+
+(define %ocaml-build-system-modules
+  ;; Build-side modules imported by default.
+  `((guix build ocaml-build-system)
+    ,@%gnu-build-system-modules))
+
+(define (default-ocaml)
+  "Return the default OCaml package."
+
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml)))
+
+(define (default-findlib)
+  "Return the default OCaml-findlib package."
+
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml-findlib)))
+
+(define* (lower name
+                #:key source inputs native-inputs outputs system target
+                (ocaml (default-ocaml))
+                (findlib (default-findlib))
+                #:allow-other-keys
+                #:rest arguments)
+  "Return a bag for NAME."
+  (define private-keywords
+    '(#:source #:target #:ocaml #:findlib #:inputs #:native-inputs))
+
+  (and (not target)                               ;XXX: no cross-compilation
+       (bag
+         (name name)
+         (system system)
+         (host-inputs `(,@(if source
+                              `(("source" ,source))
+                              '())
+                        ,@inputs
+
+                        ;; Keep the standard inputs of 'gnu-build-system'.
+                        ,@(standard-packages)))
+         (build-inputs `(("ocaml" ,ocaml)
+                         ("findlib" ,findlib)
+                         ,@native-inputs))
+         (outputs outputs)
+         (build ocaml-build)
+         (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (ocaml-build store name inputs
+                      #:key (guile #f)
+                      (outputs '("out")) (configure-flags ''())
+                      (search-paths '())
+                      (make-flags ''())
+                      (build-flags ''())
+                      (out-of-source? #t)
+                      (use-make? #f)
+                      (tests? #t)
+                      (test-flags ''("--enable-tests"))
+                      (test-target "test")
+                      (install-target "install")
+                      (validate-runpath? #t)
+                      (patch-shebangs? #t)
+                      (strip-binaries? #t)
+                      (strip-flags ''("--strip-debug"))
+                      (strip-directories ''("lib" "lib64" "libexec"
+                                            "bin" "sbin"))
+                      (phases '(@ (guix build ocaml-build-system)
+                                  %standard-phases))
+                      (system (%current-system))
+                      (imported-modules %ocaml-build-system-modules)
+                      (modules '((guix build ocaml-build-system)
+                                 (guix build utils))))
+  "Build SOURCE using OCAML, and with INPUTS. This assumes that SOURCE
+provides a 'setup.ml' file as its build system."
+  (define builder
+    `(begin
+       (use-modules ,@modules)
+       (ocaml-build #:source ,(match (assoc-ref inputs "source")
+                                (((? derivation? source))
+                                 (derivation->output-path source))
+                                ((source)
+                                 source)
+                                (source
+                                 source))
+                    #:system ,system
+                    #:outputs %outputs
+                    #:inputs %build-inputs
+                    #:search-paths ',(map search-path-specification->sexp
+                                          search-paths)
+                    #:phases ,phases
+                    #:configure-flags ,configure-flags
+                    #:test-flags ,test-flags
+                    #:make-flags ,make-flags
+                    #:build-flags ,build-flags
+                    #:out-of-source? ,out-of-source?
+                    #:use-make? ,use-make?
+                    #:tests? ,tests?
+                    #:test-target ,test-target
+                    #:install-target ,install-target
+                    #:validate-runpath? ,validate-runpath?
+                    #:patch-shebangs? ,patch-shebangs?
+                    #:strip-binaries? ,strip-binaries?
+                    #:strip-flags ,strip-flags
+                    #:strip-directories ,strip-directories)))
+
+  (define guile-for-build
+    (match guile
+      ((? package?)
+       (package-derivation store guile system #:graft? #f))
+      (#f                                         ; the default
+       (let* ((distro (resolve-interface '(gnu packages commencement)))
+              (guile  (module-ref distro 'guile-final)))
+         (package-derivation store guile system #:graft? #f)))))
+
+  (build-expression->derivation store name builder
+                                #:system system
+                                #:inputs inputs
+                                #:modules imported-modules
+                                #:outputs outputs
+                                #:guile-for-build guile-for-build))
+
+(define ocaml-build-system
+  (build-system
+    (name 'ocaml)
+    (description "The standard OCaml build system")
+    (lower lower)))
+
+;;; ocaml.scm ends here
diff --git a/guix/build/ocaml-build-system.scm b/guix/build/ocaml-build-system.scm
new file mode 100644
index 000000000..f77251ca0
--- /dev/null
+++ b/guix/build/ocaml-build-system.scm
@@ -0,0 +1,119 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build ocaml-build-system)
+  #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+  #:use-module (guix build utils)
+  #:use-module (ice-9 match)
+  #:export (%standard-phases
+            ocaml-build))
+
+;; Commentary:
+;;
+;; Builder-side code of the standard ocaml build procedure.
+;;
+;; Code:
+
+(define* (ocaml-findlib-environment #:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out")))
+    (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
+    (setenv "OCAMLFIND_LDCONF" "ignore"))
+  #t)
+
+(define* (configure #:key outputs (configure-flags '())
+                    (test-flags '("--enable-tests")) tests?
+                    #:allow-other-keys)
+  "Configure the given package."
+  (let* ((out        (assoc-ref outputs "out")))
+    (format #t "build directory: ~s~%" (getcwd))
+    (if (file-exists? "setup.ml")
+      (let ((args `("-configure"
+                    "--prefix" ,out
+                    ,@(if tests?
+                          test-flags
+                          '())
+                    ,@configure-flags)))
+        (format #t "running 'setup.ml' with arguments ~s~%" args)
+        (zero? (apply system* "ocaml" "setup.ml" args)))
+       (let ((args `("-prefix" ,out ,@configure-flags)))
+        (format #t "running 'configure' with arguments ~s~%" args)
+        (zero? (apply system* "./configure" args))))))
+
+(define* (build #:key inputs outputs (build-flags '()) (make-flags '())
+                (use-make? #f) #:allow-other-keys)
+  "Build the given package."
+  (if (and (file-exists? "setup.ml") (not use-make?))
+    (zero? (apply system* "ocaml" "setup.ml" "-build" build-flags))
+    (if (file-exists? "Makefile")
+      (zero? (apply system* "make" make-flags))
+      (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml")))
+        (zero? (apply system* "ocaml" "-I"
+                              (string-append (assoc-ref inputs "findlib")
+                                             "/lib/ocaml/site-lib")
+                              file build-flags))))))
+
+(define* (check #:key inputs outputs (make-flags '()) (test-target "test") tests?
+                  (use-make? #f) #:allow-other-keys)
+  "Install the given package."
+  (when tests?
+    (if (and (file-exists? "setup.ml") (not use-make?))
+      (zero? (system* "ocaml" "setup.ml" (string-append "-" test-target)))
+      (if (file-exists? "Makefile")
+        (zero? (apply system* "make" test-target make-flags))
+        (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml")))
+          (zero? (system* "ocaml" "-I"
+                          (string-append (assoc-ref inputs "findlib")
+                                         "/lib/ocaml/site-lib")
+                          file test-target)))))))
+
+(define* (install #:key outputs (build-flags '()) (make-flags '()) (use-make? #f)
+                  (install-target "install")
+                  #:allow-other-keys)
+  "Install the given package."
+  (let ((out (assoc-ref outputs "out")))
+    (if (and (file-exists? "setup.ml") (not use-make?))
+      (zero? (apply system* "ocaml" "setup.ml"
+                    (string-append "-" install-target) build-flags))
+      (if (file-exists? "Makefile")
+        (zero? (apply system* "make" install-target make-flags))
+        (zero? (system* "opam-installer" "-i" (string-append "--prefix=" out)
+                        (string-append "--libdir=" out "/lib/ocaml/site-lib")))))))
+
+(define* (prepare-install #:key outputs #:allow-other-keys)
+  "Prepare for building the given package."
+  (mkdir-p (string-append (assoc-ref outputs "out") "/lib/ocaml/site-lib"))
+  (mkdir-p (string-append (assoc-ref outputs "out") "/bin")))
+
+(define %standard-phases
+  ;; Everything is as with the GNU Build System except for the `configure'
+  ;; , `build', `check' and `install' phases.
+  (modify-phases gnu:%standard-phases
+    (add-before 'configure 'ocaml-findlib-environment
+                ocaml-findlib-environment)
+    (add-before 'install 'prepare-install prepare-install)
+    (replace 'configure configure)
+    (replace 'build build)
+    (replace 'check check)
+    (replace 'install install)))
+
+(define* (ocaml-build #:key inputs (phases %standard-phases)
+                      #:allow-other-keys #:rest args)
+  "Build the given package, applying all of PHASES in order."
+  (apply gnu:gnu-build #:inputs inputs #:phases phases args))
+
+;;; ocaml-build-system.scm ends here
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 05/96] gnu: ocaml: Use a prefix for license field.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (3 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 04/96] gnu: Add ocaml-build-system Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge Julien Lepiller
                   ` (92 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

---
 gnu/packages/ocaml.scm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 644638f8a..1554be217 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -24,7 +24,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages ocaml)
-  #:use-module ((guix licenses) #:hide (zlib))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix svn-download)
@@ -152,7 +152,7 @@ functional, imperative and object-oriented styles of programming.")
     ;; The compiler is distributed under qpl1.0 with a change to choice of
     ;; law: the license is governed by the laws of France.  The library is
     ;; distributed under lgpl2.0.
-    (license (list qpl lgpl2.0))))
+    (license (list license:qpl license:lgpl2.0))))
 
 (define-public opam
   (package
@@ -217,7 +217,7 @@ simultaneous compiler installations, flexible package constraints, and a
 Git-friendly development workflow.")
 
     ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
-    (license lgpl3)))
+    (license license:lgpl3)))
 
 (define-public camlp4
   (package
@@ -263,7 +263,7 @@ syntax of OCaml.")
 
     ;; This is LGPLv2 with an exception that allows packages statically-linked
     ;; against the library to be released under any terms.
-    (license lgpl2.0)))
+    (license license:lgpl2.0)))
 
 (define-public camlp5
   (package
@@ -304,7 +304,7 @@ syntax of OCaml.")
 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
 concrete syntax of the language (Quotations, Syntax Extensions).")
     ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
-    (license (list bsd-3 qpl))))
+    (license (list license:bsd-3 license:qpl))))
 
 (define-public hevea
   (package
@@ -335,7 +335,7 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
     (description
      "HeVeA is a LaTeX to HTML translator that generates modern HTML 5.  It is
 written in Objective Caml.")
-    (license qpl)))
+    (license license:qpl)))
 
 (define-public coq
   (package
@@ -388,7 +388,7 @@ development of computer programs consistent with their formal specification.
 It is developed using Objective Caml and Camlp5.")
     ;; The code is distributed under lgpl2.1.
     ;; Some of the documentation is distributed under opl1.0+.
-    (license (list lgpl2.1 opl1.0+))))
+    (license (list license:lgpl2.1 license:opl1.0+))))
 
 (define-public proof-general
   (package
@@ -466,7 +466,7 @@ It is developed using Objective Caml and Camlp5.")
      "Proof General is a major mode to turn Emacs into an interactive proof
 assistant to write formal mathematical proofs using a variety of theorem
 provers.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public ocaml-menhir
   (package
@@ -502,7 +502,7 @@ Knuth’s LR(1) parser construction technique.")
     ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
     ;; that have an *.ml or *.mli extension are GPL licensed. All other files
     ;; are QPL licensed.
-    (license (list gpl2+ qpl))))
+    (license (list license:gpl2+ license:qpl))))
 
 (define-public lablgtk
   (package
@@ -565,7 +565,7 @@ gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
 gnomeui, gtksourceview, gtkspell,
 libglade (and it an generate OCaml code from .glade files),
 libpanel, librsvg and quartz.")
-    (license lgpl2.1)))
+    (license license:lgpl2.1)))
 
 (define-public unison
   (package
@@ -686,7 +686,7 @@ a collection of files and directories to be stored on different hosts
 (or different disks on the same host), modified separately, and then
 brought up to date by propagating the changes in each replica
 to the other.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public ocaml-findlib
   (package
@@ -734,4 +734,4 @@ dependency information about multiple packages.  There is also a tool that
 allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
-    (license x11)))
+    (license license:x11)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (4 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 05/96] gnu: ocaml: Use a prefix for license field Julien Lepiller
@ 2017-01-03 19:10 ` 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
                   ` (91 subsequent siblings)
  97 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-forge-origin): New procedure.
* gnu/packages/ocaml.scm (lablgtk): Use it.
---
 gnu/packages/ocaml.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1554be217..6bb0e4826 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -50,6 +50,16 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages curl))
 
+;; A shortcut for files from ocaml forge. Downloaded files are computed from
+;; their number, not their name.
+(define (ocaml-forge-origin name version file-number hash)
+  (origin
+    (method url-fetch)
+    (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
+                        (number->string file-number) "/" name "-" version
+                        ".tar.gz"))
+    (sha256 (base32 hash))))
+
 (define-public ocaml
   (package
     (name "ocaml")
@@ -509,13 +519,8 @@ Knuth’s LR(1) parser construction technique.")
     (name "lablgtk")
     (version "2.18.5")
     (source
-      (origin
-        (method url-fetch)
-          (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
-                              "1627/lablgtk-2.18.5.tar.gz"))
-          (sha256
-            (base32
-              "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
+      (ocaml-forge-origin name version 1627
+        "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))
     (build-system gnu-build-system)
     (native-inputs
      `(("camlp4" ,camlp4)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 07/96] gnu: camlp4: Install camlp4 META file.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (5 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 08/96] gnu: Add ocaml-ounit Julien Lepiller
                   ` (90 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-findlib): Delete camlp4 META file.
* gnu/packages/ocaml.scm (camlp4): Install in OCAMLPATH and install its META
file.
---
 gnu/packages/ocaml.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6bb0e4826..7d9d363b5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -258,9 +258,19 @@ Git-friendly development workflow.")
                      ;; This is a home-made 'configure' script.
                      (let ((out (assoc-ref outputs "out")))
                        (zero? (system* "./configure"
-                                       (string-append "--libdir=" out "/lib")
+                                       (string-append "--libdir=" out
+                                                      "/lib/ocaml/site-lib")
                                        (string-append "--bindir=" out "/bin")
-                                       (string-append "--pkgdir=" out)))))))))
+                                       (string-append "--pkgdir=" out
+                                                      "/lib/ocaml/site-lib"))))))
+                  (add-after 'install 'install-meta
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* "camlp4/META.in"
+                          (("directory = .*")
+                            (string-append "directory = \"" out
+                                           "/lib/ocaml/site-lib/camlp4\"\n")))
+                        (zero? (system* "make" "install-META"))))))))
     (home-page "https://github.com/ocaml/camlp4")
     (synopsis "Write parsers in OCaml")
     (description
@@ -725,7 +735,12 @@ to the other.")
                         "-config" (string-append out "/etc/ocamfind.conf")
                         "-mandir" (string-append out "/share/man")
                         "-sitelib" (string-append out "/lib/ocaml/site-lib")
-                        "-with-toolbox")))))))
+                        "-with-toolbox"))))
+                  (add-after 'install 'remove-camlp4
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (delete-file-recursively
+                          (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
     (home-page "http://projects.camlcity.org/projects/findlib.html")
     (synopsis "Management tool for OCaml libraries")
     (description
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 08/96] gnu: Add ocaml-ounit.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (6 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 07/96] gnu: camlp4: Install camlp4 META file Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-04 13:55   ` David Craven
  2017-01-03 19:10 ` [PATCH 09/96] gnu: Add camlzip Julien Lepiller
                   ` (89 subsequent siblings)
  97 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-ounit): 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 7d9d363b5..e32bd9de1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -30,6 +30,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
@@ -48,6 +49,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
 
 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
@@ -755,3 +757,20 @@ allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
     (license license:x11)))
+
+;; note that some tests may hang for no obvious reason.
+(define-public ocaml-ounit
+  (package
+    (name "ocaml-ounit")
+    (version "2.0.0")
+    (home-page "http://ounit.forge.ocamlcore.org")
+    (source (ocaml-forge-origin "ounit" version 1258
+              "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("libxml2" ,libxml2))) ; for xmllint
+    ; tests are done during build
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+    (synopsis "Unit testing framework for OCaml")
+    (description "Unit testing framework for OCaml.  It is similar to JUnit and
+other XUnit testing frameworks.")
+    (license license:lgpl2.1)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 09/96] gnu: Add camlzip
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (7 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 08/96] gnu: Add ocaml-ounit Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-08 12:16   ` Ben Woodcroft
  2017-01-03 19:10 ` [PATCH 10/96] gnu: Add ocamlmod Julien Lepiller
                   ` (88 subsequent siblings)
  97 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (camlzip): 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 e32bd9de1..1de96c760 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -774,3 +774,30 @@ compilers that can directly deal with packages.")
     (description "Unit testing framework for OCaml.  It is similar to JUnit and
 other XUnit testing frameworks.")
     (license license:lgpl2.1)))
+
+(define-public camlzip
+  (package
+    (name "camlzip")
+    (version "1.0.6")
+    (home-page "http://forge.ocamlcore.org/projects/camlzip")
+    (source (ocaml-forge-origin name version 1616
+              "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))
+    (build-system ocaml-build-system)
+    (inputs `(("zlib" ,zlib)))
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-before 'install 'fix-install-name
+                     (lambda* (#:key #:allow-other-keys)
+                       (substitute* "Makefile"
+                         (("install zip") "install camlzip")))))
+                 #:install-target "install-findlib"
+                 #:make-flags
+                 (list "all" "allopt"
+                       (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
+                       "/lib/ocaml"))))
+    (synopsis "Provides easy access to compressed files")
+    (description "Provides easy access to compressed files in ZIP, GZIP and
+JAR format.  It provides functions for reading from and writing to compressed
+files in these formats.")
+    (license license:lgpl2.1)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (8 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 09/96] gnu: Add camlzip Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-04 15:00   ` David Craven
  2017-01-03 19:10 ` [PATCH 11/96] gnu: Add ocaml-zarith Julien Lepiller
                   ` (87 subsequent siblings)
  97 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocamlmod): 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 1de96c760..1900cfc70 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -801,3 +801,18 @@ other XUnit testing frameworks.")
 JAR format.  It provides functions for reading from and writing to compressed
 files in these formats.")
     (license license:lgpl2.1)))
+
+(define-public ocamlmod
+  (package
+    (name "ocamlmod")
+    (version "0.0.8")
+    (home-page "https://forge.ocamlcore.org/projects/ocamlmod/")
+    (source (ocaml-forge-origin name version 1544
+               "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ounit" ,ocaml-ounit)))
+    ; tests are done during build
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+    (synopsis "Generate modules from OCaml source files")
+    (description "Generate modules from OCaml source files.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 11/96] gnu: Add ocaml-zarith.
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (9 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 10/96] gnu: Add ocamlmod Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 12/96] gnu: Add ocaml-frontc Julien Lepiller
                   ` (86 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-zarith): 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 1900cfc70..a1c8df1da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
@@ -816,3 +817,26 @@ files in these formats.")
     (synopsis "Generate modules from OCaml source files")
     (description "Generate modules from OCaml source files.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-zarith
+  (package
+    (name "ocaml-zarith")
+    (version "1.4.1")
+    (home-page "https://forge.ocamlcore.org/projects/zarith/")
+    (source (ocaml-forge-origin "zarith" version 1574
+               "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("perl" ,perl)))
+    (inputs `(("gmp" ,gmp)))
+    (arguments `(#:tests? #f ; no test target
+                 #:phases
+                 (modify-phases %standard-phases
+                   (replace 'configure
+                     (lambda* (#:key #:allow-other-keys)
+                       (zero? (system* "./configure")))))))
+    (synopsis "Implements arbitrary-precision integers")
+    (description "Implements arithmetic and logical operations over
+arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
+over big integers. Small integers are represented as Caml unboxed integers,
+for speed and space economy.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 12/96] gnu: Add ocaml-frontc
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (10 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 11/96] gnu: Add ocaml-zarith Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 13/96] gnu: Add ocaml-qtest Julien Lepiller
                   ` (85 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a1c8df1da..4289e5336 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -840,3 +840,44 @@ arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
 over big integers. Small integers are represented as Caml unboxed integers,
 for speed and space economy.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-frontc
+  (package
+    (name "ocaml-frontc")
+    (version "3.4")
+    (home-page "https://www.irit.fr/FrontC")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
+                                  "frontc/Frontc-" version ".tgz"))
+              (sha256
+                (base32
+                  "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-after 'install 'install-meta
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (with-output-to-file
+                           (string-append out "/lib/ocaml/frontc/META")
+                             (lambda _
+                               (display
+                                 (string-append
+                                   "description = \"Parser for the C language\"
+version = \"" ,version "\"
+requires = \"unix\"
+archive(byte) = \"frontc.cma\"
+archive(native) = \"frontc.cmxa\""))))
+                         (symlink (string-append out "/lib/ocaml/frontc")
+                                  (string-append out "/lib/ocaml/FrontC"))))))
+                 #:make-flags (list (string-append "PREFIX="
+                                                   (assoc-ref %outputs "out"))
+                                    "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+    (synopsis "C parser and lexer library")
+    (description "FrontC is an OCAML library providing a C parser and lexer.
+The result is a syntactic tree easy to process with usual OCAML tree management.
+It provides support for ANSI C syntax, old-C K&R style syntax and the standard
+GNU CC attributes.  It provides also a C pretty printer as an example of use.")
+    (license license:lgpl2.1)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 13/96] gnu: Add ocaml-qtest
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (11 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 12/96] gnu: Add ocaml-frontc Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 14/96] gnu: Add ocaml-stringext Julien Lepiller
                   ` (84 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-qtest): 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 4289e5336..7c3945884 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -881,3 +881,32 @@ The result is a syntactic tree easy to process with usual OCAML tree management.
 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
 GNU CC attributes.  It provides also a C pretty printer as an example of use.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-qtest
+  (package
+    (name "ocaml-qtest")
+    (version "2.3")
+    (home-page "https://github.com/vincent-hugot/iTeML")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/vincent-hugot/iTeML/"
+                                  "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("findlib" ,ocaml-findlib)))
+    (propagated-inputs `(("ounit" ,ocaml-ounit)))
+    (arguments
+      `(#:tests? #f; no test target
+        #:make-flags
+        (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
+        #:phases
+        (modify-phases %standard-phases
+          (delete 'configure))))
+    (synopsis "Inline (Unit) Tests for OCaml")
+    (description "Qtest extracts inline unit tests written using a special
+syntax in comments.  Those tests are then run using the oUnit framework and the
+qcheck library.  The possibilities range from trivial tests -- extremely simple
+to use -- to sophisticated random generation of test cases.")
+    (license license:lgpl3+)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 14/96] gnu: Add ocaml-stringext
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (12 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 13/96] gnu: Add ocaml-qtest Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 15/96] gnu: Add ocaml-bisect Julien Lepiller
                   ` (83 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-stringext): 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 7c3945884..bf89b847a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -910,3 +910,24 @@ syntax in comments.  Those tests are then run using the oUnit framework and the
 qcheck library.  The possibilities range from trivial tests -- extremely simple
 to use -- to sophisticated random generation of test cases.")
     (license license:lgpl3+)))
+
+(define-public ocaml-stringext
+  (package
+    (name "ocaml-stringext")
+    (version "1.4.3")
+    (home-page "https://github.com/rgrinberg/stringext/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("qtest" ,ocaml-qtest)))
+    (synopsis "Extra string functions for OCaml")
+    (description "Provides a single module named Stringext that provides a grab
+bag of often used but missing string functions from the stdlib.  E.g, split,
+full_split, cut, rcut, etc..")
+    ;; the only mention of a license in this project is in its `opam' file
+    ;; where it says `mit'.
+    (license license:expat)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 15/96] gnu: Add ocaml-bisect
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (13 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 14/96] gnu: Add ocaml-stringext Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 16/96] gnu: Add ocaml-bitstring Julien Lepiller
                   ` (82 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-bisect): New variable.
* gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                       |   1 +
 gnu/packages/ocaml.scm                             |  34 ++++++
 ...ml-bisect-fix-camlp4-in-another-directory.patch | 125 +++++++++++++++++++++
 3 files changed, 160 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9cbeaf071..cc46b4749 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -750,6 +750,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-assume-preserve-path.patch		\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
+  %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch	\
   %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	\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bf89b847a..f3f76eb1d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -931,3 +931,37 @@ full_split, cut, rcut, etc..")
     ;; the only mention of a license in this project is in its `opam' file
     ;; where it says `mit'.
     (license license:expat)))
+
+
+(define-public ocaml-bisect
+  (package
+    (name "ocaml-bisect")
+    (version "1.3")
+    (home-page "http://bisect.x9c.fr")
+    (source
+      (origin
+        (inherit (ocaml-forge-origin "bisect" version 1051
+                       "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
+        (patches (search-patches "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("camlp4" ,camlp4)
+                     ("libxml2" ,libxml2)
+                     ("which" ,which)))
+    (propagated-inputs `(("camlp4" ,camlp4)))
+    (arguments `(#:test-target "tests"
+                 #:make-flags
+                 (list "all" (string-append "CAMLP4_LIBDIR="
+                                            (assoc-ref %build-inputs "camlp4")
+                                            "/lib/ocaml/site-lib/camlp4"))
+                 #:phases (modify-phases %standard-phases
+                            (replace 'configure
+                              (lambda* (#:key outputs #:allow-other-keys)
+                                (zero? (system* "./configure" "-prefix"
+                                                (assoc-ref outputs "out"))))))))
+    (synopsis "Code coverage tool for the OCaml language")
+    (description "Bisect is a code coverage tool for the OCaml language.  It is
+a camlp4-based tool that allows to instrument your application before running
+tests.  After application execution, it is possible to generate a report in HTML
+format that is the replica of the application source code annotated with code
+coverage information.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
new file mode 100644
index 000000000..2056b4235
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
@@ -0,0 +1,125 @@
+From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Wed, 14 Dec 2016 14:14:59 +0100
+Subject: [PATCH] fix camlp4 in another directory
+
+---
+ Makefile        | 11 ++++++-----
+ configure       | 13 ++++++++++++-
+ myocamlbuild.ml |  2 +-
+ 3 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a8ce17..d94a6d5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build
+ PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc
+ PATH_SRC=$(PATH_BASE)/src
+ PATH_TESTS=$(PATH_BASE)/tests
+-PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
++PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect
+
+
+ # DEFINITIONS
+@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
+ PROJECT_NAME=bisect
+ OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild
+ OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX)
+-OCAMLBUILD_FLAGS=-classic-display -no-links
++CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)")
++OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE)
+ MODULES_ODOCL=$(PROJECT_NAME).odocl
+ MODULES_MLPACK=$(PROJECT_NAME).mlpack
+ MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack
+@@ -80,11 +81,11 @@ veryclean: clean
+	rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
+
+ install: FORCE
+-	cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \
++	cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \
+	if [ "$(PPX)" = "TRUE" ]; then \
+-	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \
++	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \
+	fi; \
+-	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \
++	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \
+	if [ -x "$(PATH_OCAMLFIND)" ]; then \
+	  $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
+	  $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
+diff --git a/configure b/configure
+index bb7ebf4..61a3095 100755
+--- a/configure
++++ b/configure
+@@ -21,7 +21,9 @@
+ # default values
+ ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'`
+ bin_path=`dirname $ocamlbuild`
++prefix=''
+ ocaml_prefix=`dirname $bin_path`
++camlp4_prefix=`dirname $(dirname $(which camlp4of))`
+ ocamlfind=`which ocamlfind 2> /dev/null || echo ''`
+ native_dynlink='TRUE'
+ devel='FALSE'
+@@ -32,8 +34,12 @@ ppx='FALSE'
+ while [ $# -gt 0 ]
+ do
+     case "$1" in
++        -prefix)
++            prefix="$2"; shift;;
+         -ocaml-prefix)
+             ocaml_prefix="$2"; shift;;
++        -camlp4-prefix)
++            camlp4_prefix="$2"; shift;;
+         -ocamlfind)
+             ocamlfind="$2"; shift;;
+         -no-native-dynlink)
+@@ -45,7 +51,7 @@ do
+         -ppx)
+             ppx='TRUE';;
+         *)
+-            echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
++            echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
+             exit 1;;
+         esac
+         shift
+@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then
+   exit 1
+ fi
+
++# prefix default value
++test -z $prefix && prefix=$ocaml_prefix
++
+ # make options
+ make_quiet=`make -f - <<EOF
+ default: gnumake
+@@ -67,11 +76,13 @@ EOF`
+ # file creation
+ echo "# timestamp: `date`" > Makefile.config
+ echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config
++echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config
+ echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config
+ echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config
+ echo "WARNINGS=$devel" >> Makefile.config
+ echo "NO_CAMLP4=$no_camlp4" >> Makefile.config
+ echo "PPX=$ppx" >> Makefile.config
+ echo "MAKE_QUIET=$make_quiet" >> Makefile.config
++echo "PREFIX=$prefix" >> Makefile.config
+ echo "" >> Makefile.config
+ echo 'Makefile.config successfully created'
+diff --git a/myocamlbuild.ml b/myocamlbuild.ml
+index 8aa25fd..09a7d48 100644
+--- a/myocamlbuild.ml
++++ b/myocamlbuild.ml
+@@ -70,7 +70,7 @@ let () =
+     | After_rules ->
+         let camlp4of =
+           try
+-            let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
++            let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in
+             Filename.concat path_bin "camlp4of"
+           with _ -> "camlp4of" in
+         flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]);
+--
+2.7.4
+
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 16/96] gnu: Add ocaml-bitstring
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (14 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 15/96] gnu: Add ocaml-bisect Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 17/96] gnu: Add ocaml-result Julien Lepiller
                   ` (81 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-bitstring): New variable.
* gnu/packages/patches/ocaml-bitstring-fix-configure.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 62 ++++++++++++++++++++++
 .../patches/ocaml-bitstring-fix-configure.patch    | 53 ++++++++++++++++++
 3 files changed, 116 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cc46b4749..3e8517117 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
   %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch	\
+  %D%/packages/patches/ocaml-bitstring-fix-configure.patch \
   %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	\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f3f76eb1d..9814e10d2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,6 +32,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -49,6 +50,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
@@ -965,3 +967,63 @@ tests.  After application execution, it is possible to generate a report in HTML
 format that is the replica of the application source code annotated with code
 coverage information.")
     (license license:gpl3+)))
+
+(define-public ocaml-bitstring
+  (package
+    (name "ocaml-bitstring")
+    (version "2.1.0")
+    (home-page "https://github.com/xguerin/bitstring/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
+              (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("camlp4" ,camlp4)
+                     ("time" ,time)
+                     ("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("bisect" ,ocaml-bisect)))
+    (propagated-inputs `(("camlp4" ,camlp4)))
+    (arguments `(#:configure-flags
+                 (list "CAMLP4OF=camlp4of" "--enable-coverage")
+                 #:make-flags
+                 (list (string-append "BISECTLIB="
+                                      (assoc-ref %build-inputs "bisect")
+                                      "/lib/ocaml/site-lib")
+                       (string-append "OCAMLCFLAGS=-g -I "
+                                      (assoc-ref %build-inputs "camlp4")
+                                      "/lib/ocaml/site-lib/camlp4 -I "
+                                      "$(BISECTLIB)/bisect")
+                       (string-append "OCAMLOPTFLAGS=-g -I "
+                                      (assoc-ref %build-inputs "camlp4")
+                                      "/lib/ocaml/site-lib/camlp4 -I "
+                                      "$(BISECTLIB)/bisect"))
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'fix-configure
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "Makefile.in"
+                         (("@abs_top_builddir@") (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
+                       (substitute* "configure"
+                         (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
+                                                      "/bin/sh")))))
+                   (add-after 'install 'link-lib
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (stubs (string-append out
+                                       "/lib/ocaml/site-lib/stubslibs"))
+                              (lib (string-append out
+                                     "/lib/ocaml/site-lib/bitstring")))
+                         (mkdir-p stubs)
+                         (symlink (string-append lib "/dllbitstring.so")
+                                  (string-append stubs "/dllbitstring.so"))))))))
+    (synopsis "Bitstrings and bitstring matching for OCaml")
+    (description "Adds Erlang-style bitstrings and matching over bitstrings as
+a syntax extension and library for OCaml.  You can use this module to both parse
+and generate binary formats, files and protocols.  Bitstring handling is added
+as primitives to the language, making it exceptionally simple to use and very
+powerful.")
+    (license license:isc)))
diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
new file mode 100644
index 000000000..c358bf3d6
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
@@ -0,0 +1,53 @@
+From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Thu, 15 Dec 2016 21:17:31 +0100
+Subject: [PATCH] fix configure
+
+---
+ Makefile.in | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index d040f4c..85e0b38 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -32,6 +32,7 @@ BISECT_REPORT	= @BISECT_REPORT@
+ BYTESWAP_H	= @BYTESWAP_H@
+
+ OCAMLLIB	= @OCAMLLIB@
++BISECTLIB	= $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi)
+ top_srcdir	= @top_srcdir@
+
+ pkg_cil		= @OCAML_PKG_cil@
+@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
+ OCAMLOPTLIBS	= -linkpkg
+
+ ifneq ($(enable_coverage),no)
+-OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLCLIBS	+= -I +bisect bisect.cma
+-OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLOPTLIBS	+= -I +bisect bisect.cmxa
+ endif
+
+@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli
+	  -I +camlp4 -pp camlp4of -c $<
+
+ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
+-	$(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
++	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
+	  -pp camlp4of -c $< -o $@
+
+ bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
+@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h
+ ifeq ($(enable_coverage),no)
+ PP	= -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ else
+-PP	= -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
++PP	= -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ endif
+
+ check: test
+--
+2.11.0
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 17/96] gnu: Add ocaml-result
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (15 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 16/96] gnu: Add ocaml-bitstring Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:10 ` [PATCH 18/96] gnu: Add ocaml-topkg Julien Lepiller
                   ` (80 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-result): 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 9814e10d2..335a81c88 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1027,3 +1027,23 @@ and generate binary formats, files and protocols.  Bitstring handling is added
 as primitives to the language, making it exceptionally simple to use and very
 powerful.")
     (license license:isc)))
+
+(define-public ocaml-result
+  (package
+    (name "ocaml-result")
+    (version "1.2")
+    (home-page "https://github.com/janestreet/result/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:tests? #f))
+    (synopsis "Compatibility Result module")
+    (description "Uses the new result type defined in OCaml >= 4.03 while
+staying compatible with older version of OCaml should use the Result module
+defined in this library.")
+    (license license:bsd-3)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 18/96] gnu: Add ocaml-topkg
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (16 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 17/96] gnu: Add ocaml-result Julien Lepiller
@ 2017-01-03 19:10 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 19/96] gnu: Add ocaml-rresult Julien Lepiller
                   ` (79 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:10 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-topkg): 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 335a81c88..25354fbcc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1047,3 +1047,29 @@ powerful.")
 staying compatible with older version of OCaml should use the Result module
 defined in this library.")
     (license license:bsd-3)))
+
+(define-public ocaml-topkg
+  (package
+    (name "ocaml-topkg")
+    (version "0.8.1")
+    (home-page "http://erratique.ch/software/topkg")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/topkg-" version ".tbz"))
+        (sha256 (base32
+                  "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
+    (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 `(("result" ,ocaml-result)))
+    (synopsis "Transitory OCaml software packager")
+    (description "Topkg is a packager for distributing OCaml software. It
+provides an API to describe the files a package installs in a given build
+configuration and to specify information about the package's distribution,
+creation and publication procedures.")
+    (license license:isc)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 19/96] gnu: Add ocaml-rresult
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (17 preceding siblings ...)
  2017-01-03 19:10 ` [PATCH 18/96] gnu: Add ocaml-topkg Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 20/96] gnu: Add ocaml-mtime Julien Lepiller
                   ` (78 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-rresult): 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 25354fbcc..fea3ebda0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1073,3 +1073,29 @@ provides an API to describe the files a package installs in a given build
 configuration and to specify information about the package's distribution,
 creation and publication procedures.")
     (license license:isc)))
+
+(define-public ocaml-rresult
+  (package
+    (name "ocaml-rresult")
+    (version "0.5.0")
+    (home-page "http://erratique.ch/software/rresult")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/rresult-" version ".tbz"))
+              (sha256
+                (base32
+                  "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
+    (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)))
+    (synopsis "Result value combinators for OCaml")
+    (description "Handle computation results and errors in an explicit and
+declarative manner, without resorting to exceptions.  It defines combinators
+to operate on the result type available from OCaml 4.03 in the standard
+library.")
+    (license license:isc)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 20/96] gnu: Add ocaml-mtime
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (18 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 19/96] gnu: Add ocaml-rresult Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 21/96] gnu: Add ocaml-cmdliner Julien Lepiller
                   ` (77 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-mtime): 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 fea3ebda0..e971e72d0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1099,3 +1099,28 @@ declarative manner, without resorting to exceptions.  It defines combinators
 to operate on the result type available from OCaml 4.03 in the standard
 library.")
     (license license:isc)))
+
+(define-public ocaml-mtime
+  (package
+    (name "ocaml-mtime")
+    (version "0.8.3")
+    (home-page "http://erratique.ch/software/mtime")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/mtime-" version ".tbz"))
+              (sha256
+                (base32
+                  "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "native=true" "native-dynlink=true"
+                                     "jsoo=false")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("topkg" ,ocaml-topkg)))
+    (synopsis "Monotonic wall-clock time for OCaml")
+    (description "access monotonic wall-clock time.  It allows to measure time
+spans without being subject to operating system calendar time adjustments.")
+    (license license:isc)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 21/96] gnu: Add ocaml-cmdliner
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (19 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 20/96] gnu: Add ocaml-mtime Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 22/96] gnu: Add ocaml-fmt Julien Lepiller
                   ` (76 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-cmdliner): 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 e971e72d0..8f7e3ec55 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1124,3 +1124,30 @@ library.")
     (description "access monotonic wall-clock time.  It allows to measure time
 spans without being subject to operating system calendar time adjustments.")
     (license license:isc)))
+
+(define-public ocaml-cmdliner
+  (package
+    (name "ocaml-cmdliner")
+    (version "0.9.8")
+    (home-page "http://erratique.ch/software/cmdliner")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/cmdliner-" version ".tbz"))
+        (sha256 (base32
+                  "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
+    (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 definition of command line interfaces for OCaml")
+    (description "Cmdliner is a module for the declarative definition of command
+line interfaces.  It provides a simple and compositional mechanism to convert
+command line arguments to OCaml values and pass them to your functions.  The
+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)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 22/96] gnu: Add ocaml-fmt
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (20 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 21/96] gnu: Add ocaml-cmdliner Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 23/96] gnu: Add ocaml-astring Julien Lepiller
                   ` (75 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 8f7e3ec55..31b717874 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1151,3 +1151,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 23/96] gnu: Add ocaml-astring
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (21 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 22/96] gnu: Add ocaml-fmt Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 24/96] gnu: Add ocaml-alcotest Julien Lepiller
                   ` (74 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 31b717874..bf308f1a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1178,3 +1178,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 24/96] gnu: Add ocaml-alcotest
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (22 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 23/96] gnu: Add ocaml-astring Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 25/96] gnu: Add ocaml-ppx-tools Julien Lepiller
                   ` (73 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 bf308f1a7..93092cfb1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1207,3 +1207,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 25/96] gnu: Add ocaml-ppx-tools
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (23 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 24/96] gnu: Add ocaml-alcotest Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 26/96] gnu: Add ocaml-react Julien Lepiller
                   ` (72 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 93092cfb1..915926e6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1238,3 +1238,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 26/96] gnu: Add ocaml-react
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (24 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 25/96] gnu: Add ocaml-ppx-tools Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 27/96] gnu: Add ocaml-ssl Julien Lepiller
                   ` (71 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 915926e6f..e710efc2f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1256,3 +1256,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 27/96] gnu: Add ocaml-ssl
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (25 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 26/96] gnu: Add ocaml-react Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 28/96] gnu: Add ocaml-lwt Julien Lepiller
                   ` (70 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 e710efc2f..7328004a0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #: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 curl))
@@ -1281,3 +1282,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 28/96] gnu: Add ocaml-lwt
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (26 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 27/96] gnu: Add ocaml-ssl Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 29/96] gnu: Add ocaml-logs Julien Lepiller
                   ` (69 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 7328004a0..5418ee235 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,8 @@
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -1313,3 +1315,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 29/96] gnu: Add ocaml-logs
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (27 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 28/96] gnu: Add ocaml-lwt Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 30/96] gnu: Add ocaml-fpath Julien Lepiller
                   ` (68 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 5418ee235..3856af1e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1350,3 +1350,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 30/96] gnu: Add ocaml-fpath
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (28 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 29/96] gnu: Add ocaml-logs Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 31/96] gnu: Add ocaml-bos Julien Lepiller
                   ` (67 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 3856af1e9..13d9b488d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1380,3 +1380,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 31/96] gnu: Add ocaml-bos
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (29 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 30/96] gnu: Add ocaml-fpath Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 32/96] gnu: Add ocaml-xmlm Julien Lepiller
                   ` (66 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 13d9b488d..1301bcb6d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1406,3 +1406,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 32/96] gnu: Add ocaml-xmlm
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (30 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 31/96] gnu: Add ocaml-bos Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 33/96] gnu: Add ocaml-ulex Julien Lepiller
                   ` (65 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 1301bcb6d..21859ea90 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1437,3 +1437,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 33/96] gnu: Add ocaml-ulex
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (31 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 32/96] gnu: Add ocaml-xmlm Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 34/96] gnu: Add ocaml-uchar Julien Lepiller
                   ` (64 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 21859ea90..33dc8d114 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1463,3 +1463,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 34/96] gnu: Add ocaml-uchar
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (32 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 33/96] gnu: Add ocaml-ulex Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 35/96] gnu: Add ocaml-uutf Julien Lepiller
                   ` (63 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 33dc8d114..48583e8c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1489,3 +1489,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 35/96] gnu: Add ocaml-uutf
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (33 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 34/96] gnu: Add ocaml-uchar Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 36/96] gnu: Add ocaml-jsonm Julien Lepiller
                   ` (62 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 48583e8c0..a4b129f42 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1513,3 +1513,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 36/96] gnu: Add ocaml-jsonm
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (34 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 35/96] gnu: Add ocaml-uutf Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 37/96] gnu: Add ocaml-ocurl Julien Lepiller
                   ` (61 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 a4b129f42..0c8b188ca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1544,3 +1544,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 37/96] gnu: Add ocaml-ocurl
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (35 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 36/96] gnu: Add ocaml-jsonm Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 38/96] gnu: Add ocaml-base64 Julien Lepiller
                   ` (60 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 0c8b188ca..a695d4a5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1571,3 +1571,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 38/96] gnu: Add ocaml-base64
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (36 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 37/96] gnu: Add ocaml-ocurl Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 39/96] gnu: Add ocamlify Julien Lepiller
                   ` (59 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 a695d4a5e..7d86fc2a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1597,3 +1597,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 39/96] gnu: Add ocamlify
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (37 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 38/96] gnu: Add ocaml-base64 Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 40/96] gnu: Add omake Julien Lepiller
                   ` (58 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocamlify): 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 7d86fc2a7..44329e1da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1626,3 +1626,20 @@ 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 (ocaml-forge-origin name version 1209
+               "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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 40/96] gnu: Add omake
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (38 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 39/96] gnu: Add ocamlify Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 41/96] gnu: Add ocaml-batteries Julien Lepiller
                   ` (57 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 3e8517117..ba38f9d43 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -755,6 +755,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 44329e1da..bea104f37 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1643,3 +1643,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 41/96] gnu: Add ocaml-batteries
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (39 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 40/96] gnu: Add omake Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 42/96] gnu: Add ocaml-pcre Julien Lepiller
                   ` (56 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-batteries): 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 bea104f37..2975004b0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1684,3 +1684,25 @@ 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 (ocaml-forge-origin "batteries" version 1650
+              "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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 42/96] gnu: Add ocaml-pcre
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (40 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 41/96] gnu: Add ocaml-batteries Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 43/96] gnu: Add ocaml-expect Julien Lepiller
                   ` (55 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 2975004b0..09017211c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -52,6 +52,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 time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -1706,3 +1707,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 43/96] gnu: Add ocaml-expect
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (41 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 42/96] gnu: Add ocaml-pcre Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 44/96] gnu: Add ocaml-fileutils Julien Lepiller
                   ` (54 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-expect): 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 09017211c..337e66aff 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1729,3 +1729,20 @@ 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 (ocaml-forge-origin name version 1372
+              "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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 44/96] gnu: Add ocaml-fileutils
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (42 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 43/96] gnu: Add ocaml-expect Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:58   ` David Craven
  2017-01-03 19:11 ` [PATCH 45/96] gnu: Add ocaml-oasis Julien Lepiller
                   ` (53 subsequent siblings)
  97 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 337e66aff..a45a745cc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1746,3 +1746,17 @@ 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 (ocaml-forge-origin name version 1651
+              "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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 45/96] gnu: Add ocaml-oasis
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (43 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 44/96] gnu: Add ocaml-fileutils Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 46/96] gnu: Add ocaml-js-build-tools Julien Lepiller
                   ` (52 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-oasis): 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 a45a745cc..158b99ea2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1760,3 +1760,28 @@ 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 (ocaml-forge-origin "oasis" version 1669
+               "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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 46/96] gnu: Add ocaml-js-build-tools
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (44 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 45/96] gnu: Add ocaml-oasis Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 47/96] gnu: Add ocaml-bin-prot Julien Lepiller
                   ` (51 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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                             | 43 ++++++++++++++++++++++
 .../patches/ocaml-janestreet-fix-libdir.patch      | 36 ++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ba38f9d43..0b879c367 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -755,6 +755,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 158b99ea2..e30c3a6ef 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -69,6 +69,30 @@
                         ".tar.gz"))
     (sha256 (base32 hash))))
 
+;; 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"))))
+
+;; 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")
@@ -1785,3 +1809,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 47/96] gnu: Add ocaml-bin-prot
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (45 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 46/96] gnu: Add ocaml-js-build-tools Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 48/96] gnu: Add ocaml-fieldslib Julien Lepiller
                   ` (50 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 e30c3a6ef..1e6a34e44 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1828,3 +1828,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 48/96] gnu: Add ocaml-fieldslib
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (46 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 47/96] gnu: Add ocaml-bin-prot Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 49/96] gnu: Add ocaml-ppx-core Julien Lepiller
                   ` (49 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 1e6a34e44..1dad83fe7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1848,3 +1848,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 49/96] gnu: Add ocaml-ppx-core
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (47 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 48/96] gnu: Add ocaml-fieldslib Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 50/96] gnu: Add ocaml-ppx-optcomp Julien Lepiller
                   ` (48 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 1dad83fe7..3a9a8de13 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1865,3 +1865,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 50/96] gnu: Add ocaml-ppx-optcomp
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (48 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 49/96] gnu: Add ocaml-ppx-core Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 51/96] gnu: Add ocaml-ppx-driver Julien Lepiller
                   ` (47 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 3a9a8de13..78bd4db6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1887,3 +1887,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 51/96] gnu: Add ocaml-ppx-driver
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (49 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 50/96] gnu: Add ocaml-ppx-optcomp Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 52/96] gnu: Add ocaml-cppo Julien Lepiller
                   ` (46 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 78bd4db6f..58fd0eb0c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1906,3 +1906,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 52/96] gnu: Add ocaml-cppo
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (50 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 51/96] gnu: Add ocaml-ppx-driver Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 53/96] gnu: Add ocaml-ppx-deriving Julien Lepiller
                   ` (45 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 58fd0eb0c..ae7218a92 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1930,3 +1930,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 53/96] gnu: Add ocaml-ppx-deriving
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (51 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 52/96] gnu: Add ocaml-cppo Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 54/96] gnu: Add ocaml-ppx-type-conv Julien Lepiller
                   ` (44 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 ae7218a92..cb5f20f6e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1957,3 +1957,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 54/96] gnu: Add ocaml-ppx-type-conv
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (52 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 53/96] gnu: Add ocaml-ppx-deriving Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 55/96] gnu: Add ocaml-ppx-inline-test Julien Lepiller
                   ` (43 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 cb5f20f6e..f8ede85dc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1991,3 +1991,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 55/96] gnu: Add ocaml-ppx-inline-test
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (53 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 54/96] gnu: Add ocaml-ppx-type-conv Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 56/96] gnu: Add ocaml-ppx-bench Julien Lepiller
                   ` (42 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 f8ede85dc..0d7e5eefb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2013,3 +2013,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 56/96] gnu: Add ocaml-ppx-bench
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (54 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 55/96] gnu: Add ocaml-ppx-inline-test Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 57/96] gnu: Add ocaml-ppx-compare Julien Lepiller
                   ` (41 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 0d7e5eefb..c028fa26c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2032,3 +2032,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 57/96] gnu: Add ocaml-ppx-compare
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (55 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 56/96] gnu: Add ocaml-ppx-bench Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 58/96] gnu: Add ocaml-sexplib Julien Lepiller
                   ` (40 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 c028fa26c..369e1f769 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2052,3 +2052,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 58/96] gnu: Add ocaml-sexplib
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (56 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 57/96] gnu: Add ocaml-ppx-compare Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 59/96] gnu: Add ocaml-typerep Julien Lepiller
                   ` (39 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 369e1f769..993007484 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2077,3 +2077,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 59/96] gnu: Add ocaml-typerep
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (57 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 58/96] gnu: Add ocaml-sexplib Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 60/96] gnu: Add ocaml-variantslib Julien Lepiller
                   ` (38 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 993007484..cee7e9321 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2093,3 +2093,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 60/96] gnu: Add ocaml-variantslib
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (58 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 59/96] gnu: Add ocaml-typerep Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 61/96] gnu: Add ocaml-ppx-sexp-conv Julien Lepiller
                   ` (37 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 cee7e9321..eabfbb541 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2108,3 +2108,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 61/96] gnu: Add ocaml-ppx-sexp-conv
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (59 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 60/96] gnu: Add ocaml-variantslib Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 62/96] gnu: Add ocaml-ppx-variants-conv Julien Lepiller
                   ` (36 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 eabfbb541..e82e29326 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2123,3 +2123,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 62/96] gnu: Add ocaml-ppx-variants-conv
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (60 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 61/96] gnu: Add ocaml-ppx-sexp-conv Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 63/96] gnu: Add ocaml-ppx-here Julien Lepiller
                   ` (35 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 e82e29326..d6af72d78 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2144,3 +2144,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 63/96] gnu: Add ocaml-ppx-here
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (61 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 62/96] gnu: Add ocaml-ppx-variants-conv Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 64/96] gnu: Add ocaml-ppx-assert Julien Lepiller
                   ` (34 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 d6af72d78..911fd24e0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2165,3 +2165,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 64/96] gnu: Add ocaml-ppx-assert
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (62 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 63/96] gnu: Add ocaml-ppx-here Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 65/96] gnu: Add ocaml-ppx-enumerate Julien Lepiller
                   ` (33 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ocaml.scm (ocaml-ppx-assert): 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 911fd24e0..b46ace7c2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2182,3 +2182,26 @@ 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 (janestreet-origin "ppx_assert" version
+              "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
+    (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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 65/96] gnu: Add ocaml-ppx-enumerate
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (63 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 64/96] gnu: Add ocaml-ppx-assert Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 66/96] gnu: Add ocaml-ppx-let Julien Lepiller
                   ` (32 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 b46ace7c2..e9913fa1f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2205,3 +2205,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 66/96] gnu: Add ocaml-ppx-let
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (64 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 65/96] gnu: Add ocaml-ppx-enumerate Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 67/96] gnu: Add ocaml-ppx-typerep-conv Julien Lepiller
                   ` (31 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 e9913fa1f..988fa5b98 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2225,3 +2225,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 67/96] gnu: Add ocaml-ppx-typerep-conv
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (65 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 66/96] gnu: Add ocaml-ppx-let Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 68/96] gnu: Add ocaml-ppx-sexp-value Julien Lepiller
                   ` (30 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 988fa5b98..d771814a3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2243,3 +2243,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 68/96] gnu: Add ocaml-ppx-sexp-value
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (66 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 67/96] gnu: Add ocaml-ppx-typerep-conv Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 69/96] gnu: Add ocaml-ppx-pipebang Julien Lepiller
                   ` (29 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 d771814a3..a27bd62fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2262,3 +2262,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 69/96] gnu: Add ocaml-ppx-pipebang
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (67 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 68/96] gnu: Add ocaml-ppx-sexp-value Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 70/96] gnu: Add ocaml-ppx-bin-prot Julien Lepiller
                   ` (28 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 a27bd62fa..3b485a976 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2283,3 +2283,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 70/96] gnu: Add ocaml-ppx-bin-prot
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (68 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 69/96] gnu: Add ocaml-ppx-pipebang Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 71/96] gnu: Add ocaml-ppx-fail Julien Lepiller
                   ` (27 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 3b485a976..f1e9d5eb4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2302,3 +2302,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 71/96] gnu: Add ocaml-ppx-fail
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (69 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 70/96] gnu: Add ocaml-ppx-bin-prot Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 72/96] gnu: Add ocaml-ppx-custom-printf Julien Lepiller
                   ` (26 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 f1e9d5eb4..cb0b0af5a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2322,3 +2322,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 72/96] gnu: Add ocaml-ppx-custom-printf
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (70 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 71/96] gnu: Add ocaml-ppx-fail Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 73/96] gnu: Add ocaml-ppx-sexp-message Julien Lepiller
                   ` (25 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 cb0b0af5a..4329d51fc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2342,3 +2342,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 73/96] gnu: Add ocaml-ppx-sexp-message
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (71 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 72/96] gnu: Add ocaml-ppx-custom-printf Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 74/96] gnu: Add ocaml-ppx-fields-conv Julien Lepiller
                   ` (24 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 4329d51fc..7c10492d7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2362,3 +2362,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 74/96] gnu: Add ocaml-ppx-fields-conv
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (72 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 73/96] gnu: Add ocaml-ppx-sexp-message Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 75/96] gnu: Add ocaml-re Julien Lepiller
                   ` (23 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 7c10492d7..00eae8e7e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2385,3 +2385,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 75/96] gnu: Add ocaml-re
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (73 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 74/96] gnu: Add ocaml-ppx-fields-conv Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 76/96] gnu: Add ocaml-ppx-expect Julien Lepiller
                   ` (22 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 00eae8e7e..7ad1460c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2408,3 +2408,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 76/96] gnu: Add ocaml-ppx-expect
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (74 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 75/96] gnu: Add ocaml-re Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 77/96] gnu: Add ocaml-ppx-jane Julien Lepiller
                   ` (21 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 7ad1460c0..744fb1a4a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2431,3 +2431,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 77/96] gnu: Add ocaml-ppx-jane
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (75 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 76/96] gnu: Add ocaml-ppx-expect Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:11 ` [PATCH 78/96] gnu: Add ocaml-core-kernel Julien Lepiller
                   ` (20 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 744fb1a4a..c9537be14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2464,3 +2464,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 78/96] gnu: Add ocaml-core-kernel
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (76 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 77/96] gnu: Add ocaml-ppx-jane Julien Lepiller
@ 2017-01-03 19:11 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 79/96] gnu: Add ocaml-async-kernel Julien Lepiller
                   ` (19 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:11 UTC (permalink / raw)
  To: guix-devel

* 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 c9537be14..36f4654e2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2498,3 +2498,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 79/96] gnu: Add ocaml-async-kernel
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (77 preceding siblings ...)
  2017-01-03 19:11 ` [PATCH 78/96] gnu: Add ocaml-core-kernel Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 80/96] gnu: Add ocaml-async-rpc-kernel Julien Lepiller
                   ` (18 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 36f4654e2..82f4d2678 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2528,3 +2528,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 80/96] gnu: Add ocaml-async-rpc-kernel
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (78 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 79/96] gnu: Add ocaml-async-kernel Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 81/96] gnu: Add ocaml-core Julien Lepiller
                   ` (17 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 82f4d2678..9ab3f5b1a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2546,3 +2546,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 81/96] gnu: Add ocaml-core
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (79 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 80/96] gnu: Add ocaml-async-rpc-kernel Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 82/96] gnu: Add ocaml-async-unix Julien Lepiller
                   ` (16 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 9ab3f5b1a..16cda44b7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2564,3 +2564,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 82/96] gnu: Add ocaml-async-unix
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (80 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 81/96] gnu: Add ocaml-core Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 83/96] gnu: Add ocaml-async-extra Julien Lepiller
                   ` (15 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 16cda44b7..7493abb15 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2583,3 +2583,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 83/96] gnu: Add ocaml-async-extra
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (81 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 82/96] gnu: Add ocaml-async-unix Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 84/96] gnu: Add ocaml-async Julien Lepiller
                   ` (14 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 7493abb15..aa2b757f1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2602,3 +2602,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 84/96] gnu: Add ocaml-async
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (82 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 83/96] gnu: Add ocaml-async-extra Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 85/96] gnu: Add ocaml-ocplib-endian Julien Lepiller
                   ` (13 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 aa2b757f1..50e028bf7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2622,3 +2622,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 85/96] gnu: Add ocaml-ocplib-endian
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (83 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 84/96] gnu: Add ocaml-async Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 86/96] gnu: Add ocaml-cstruct Julien Lepiller
                   ` (12 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 50e028bf7..ab2197c0c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2640,3 +2640,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 86/96] gnu: Add ocaml-cstruct
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (84 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 85/96] gnu: Add ocaml-ocplib-endian Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 87/96] gnu: Add ocaml-hex Julien Lepiller
                   ` (11 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ab2197c0c..4a861bcd7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2661,3 +2661,30 @@ and bigarrays, based on new primitives added in version 4.01. It works on
 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
 big- and little-endian, with their unsafe counter-parts.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-cstruct
+  (package
+    (name "ocaml-cstruct")
+    (version "2.3.1")
+    (home-page "https://github.com/mirage/ocaml-cstruct/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:configure-flags
+                 (list "--enable-lwt" "--enable-async")))
+    (native-inputs `(("ounit" ,ocaml-ounit)
+                     ("ppx-tools" ,ocaml-ppx-tools)
+                     ("camlp4" ,camlp4)))
+    (propagated-inputs `(("ocplib-endian" ,ocaml-ocplib-endian)
+                         ("lwt" ,ocaml-lwt)
+                         ("async" ,ocaml-async)
+                         ("sexplib" ,ocaml-sexplib)))
+    (synopsis "Access C structures via a camlp4 extension")
+    (description "Cstruct is a library and syntax extension to make it easier
+to access C-like structures directly from OCaml.  It supports both reading and
+writing to these structures, and they are accessed via the Bigarray module.")
+    (license license:isc)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 87/96] gnu: Add ocaml-hex
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (85 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 86/96] gnu: Add ocaml-cstruct Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 88/96] gnu: Add ocaml-ezjsonm Julien Lepiller
                   ` (10 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 4a861bcd7..9b9b3aa32 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2688,3 +2688,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 88/96] gnu: Add ocaml-ezjsonm
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (86 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 87/96] gnu: Add ocaml-hex Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 89/96] gnu: Add ocaml-uri Julien Lepiller
                   ` (9 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 9b9b3aa32..b4b506f8e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2705,3 +2705,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 89/96] gnu: Add ocaml-uri
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (87 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 88/96] gnu: Add ocaml-ezjsonm Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 90/96] gnu: Add ocaml-easy-format Julien Lepiller
                   ` (8 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 b4b506f8e..5d7e994f7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2733,3 +2733,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 90/96] gnu: Add ocaml-easy-format
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (88 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 89/96] gnu: Add ocaml-uri Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 91/96] gnu: Add ocaml-optcomp Julien Lepiller
                   ` (7 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 5d7e994f7..40e285820 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2755,3 +2755,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 91/96] gnu: Add ocaml-optcomp
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (89 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 90/96] gnu: Add ocaml-easy-format Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 92/96] gnu: Add ocaml-piqilib Julien Lepiller
                   ` (6 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 40e285820..ed24aa526 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2775,3 +2775,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 92/96] gnu: Add ocaml-piqilib
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (90 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 91/96] gnu: Add ocaml-optcomp Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 93/96] gnu: Add ocaml-uuidm Julien Lepiller
                   ` (5 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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                             | 38 +++++++++++++++++
 .../patches/ocaml-piqilib-fix-makefile.patch       | 47 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0b879c367..ba04b9648 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -757,6 +757,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 ed24aa526..68e941cc9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2800,3 +2800,41 @@ 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"))))))
+       (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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 93/96] gnu: Add ocaml-uuidm
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (91 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 92/96] gnu: Add ocaml-piqilib Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 94/96] gnu: Add ocamlgraph Julien Lepiller
                   ` (4 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 68e941cc9..13ab37491 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2838,3 +2838,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 94/96] gnu: Add ocamlgraph
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (92 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 93/96] gnu: Add ocaml-uuidm Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 95/96] gnu: Add ocaml-piqi Julien Lepiller
                   ` (3 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 ba04b9648..642334779 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -758,6 +758,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 13ab37491..9b13c22b6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2864,3 +2864,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 95/96] gnu: Add ocaml-piqi
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (93 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 94/96] gnu: Add ocamlgraph Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:12 ` [PATCH 96/96] gnu: Add bap Julien Lepiller
                   ` (2 subsequent siblings)
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

* 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 9b13c22b6..30dcb58a9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -53,6 +53,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -2891,3 +2892,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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [PATCH 96/96] gnu: Add bap
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (94 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 95/96] gnu: Add ocaml-piqi Julien Lepiller
@ 2017-01-03 19:12 ` Julien Lepiller
  2017-01-03 19:46 ` [PATCH 00/96] ocaml-build-system and packages David Craven
  2017-01-04 20:57 ` Ludovic Courtès
  97 siblings, 0 replies; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 19:12 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 30dcb58a9..89518f923 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages libevent)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -2922,3 +2923,60 @@ 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.0.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
+            "1apfzxndysy92bz5g0dslfmfcqhkpxlfihjbkcsrxbk3gwha42bg"))))
+   (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 `(#: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-tests"
+                                      "--enable-everything")))))))
+   (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

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (95 preceding siblings ...)
  2017-01-03 19:12 ` [PATCH 96/96] gnu: Add bap Julien Lepiller
@ 2017-01-03 19:46 ` David Craven
  2017-01-03 20:21   ` Julien Lepiller
  2017-01-04 20:57 ` Ludovic Courtès
  97 siblings, 1 reply; 119+ messages in thread
From: David Craven @ 2017-01-03 19:46 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

> Hi, it's a bit late for christmas, so let's call this ocamlismas ;).
>
> Here are ~100 patches that:
>
> - Add an ocaml-build-system
> - Change the ocaml compiler, camlp4 and findlib to work nicely with it
> - A lot of packages (all dependencies of bap, and bap itself).
>
> I took one patch from debian to help the compiler produce reproducible binaries.
> Without this patch some modules would embed temporary file names. A few packages
> also had reproducibility issues, but that is fixed, except for one of them.

Hi Julien,

Wow! Looks good. I guess this makes my patches obsolete.

Nitpick: The commit messages are missing trailing dots.

Would you mind pushing to git somewhere so that I can fetch your branch?

Thanks,
David

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 44/96] gnu: Add ocaml-fileutils
  2017-01-03 19:11 ` [PATCH 44/96] gnu: Add ocaml-fileutils Julien Lepiller
@ 2017-01-03 19:58   ` David Craven
  0 siblings, 0 replies; 119+ messages in thread
From: David Craven @ 2017-01-03 19:58 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

home-page should be above synopsis by convention.

> +    (version "0.5.1")
> +    (home-page "http://ocaml-fileutils.forge.ocamlcore.org/")
> +    (source (ocaml-forge-origin name version 1651
> +              "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

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  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
  0 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-03 20:21 UTC (permalink / raw)
  To: guix-devel

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

On Tue, 3 Jan 2017 20:46:38 +0100
David Craven <david@craven.ch> wrote:

> > Hi, it's a bit late for christmas, so let's call this ocamlismas ;).
> >
> > Here are ~100 patches that:
> >
> > - Add an ocaml-build-system
> > - Change the ocaml compiler, camlp4 and findlib to work nicely with
> > it
> > - A lot of packages (all dependencies of bap, and bap itself).
> >
> > I took one patch from debian to help the compiler produce
> > reproducible binaries. Without this patch some modules would embed
> > temporary file names. A few packages also had reproducibility
> > issues, but that is fixed, except for one of them.  
> 
> Hi Julien,
> 
> Wow! Looks good. I guess this makes my patches obsolete.
> 
> Nitpick: The commit messages are missing trailing dots.
> 
> Would you mind pushing to git somewhere so that I can fetch your
> branch?
Here is the complete patchset so you can apply it locally with git am <
ocaml.patchset. I hope that's enough.

> 
> Thanks,
> David


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

From 7cca9e2c53014fcfa668e7c74873e6b1a748f49b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 17:44:22 +0100
Subject: [PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files

* gnu/packages/patches/ocaml-Add-a-.file-directive.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/ocaml.scm (ocaml) [origin]: Add patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             |  7 +-
 .../patches/ocaml-Add-a-.file-directive.patch      | 96 ++++++++++++++++++++++
 3 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0c42f9f44..9cbeaf071 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
   %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/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c5784db90..4bb138a14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,7 +63,10 @@
               (sha256
                (base32
                 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
-              (patches (search-patches "ocaml-CVE-2015-8869.patch"))))
+              (patches
+				(search-patches
+                  "ocaml-CVE-2015-8869.patch"
+                  "ocaml-Add-a-.file-directive.patch"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
new file mode 100644
index 000000000..07842e9c3
--- /dev/null
+++ b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
@@ -0,0 +1,96 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Sun, 16 Aug 2015 20:59:14 +0200
+Subject: Add a .file directive to generated .s files
+
+When no .file directive is given, the toolchain records the filename
+of the .o file, which is sometimes random, making generated objects
+non-deterministic.
+
+We use Location.input_name for adding .file directives to assembly
+files. Note: when the file is preprocessed, this reference holds the
+name of the temporary file. Hence, files compiled with -pp are still
+not deterministic.
+
+Bug-Debian: https://bugs.debian.org/795784
+Bug-Debian: https://bugs.debian.org/796336
+---
+ asmcomp/amd64/emit.mlp | 1 +
+ asmcomp/arm/emit.mlp   | 1 +
+ asmcomp/arm64/emit.mlp | 1 +
+ asmcomp/i386/emit.mlp  | 1 +
+ asmcomp/power/emit.mlp | 1 +
+ asmcomp/sparc/emit.mlp | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
+index d56d0f5..4d7aa30 100644
+--- a/asmcomp/amd64/emit.mlp
++++ b/asmcomp/amd64/emit.mlp
+@@ -794,6 +794,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   if !Clflags.dlcode then begin
+     (* from amd64.S; could emit these constants on demand *)
+     if macosx then
+diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
+index 4948fb2..6f30fba 100644
+--- a/asmcomp/arm/emit.mlp
++++ b/asmcomp/arm/emit.mlp
+@@ -892,6 +892,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   `	.syntax	unified\n`;
+   begin match !arch with
+   | ARMv4   -> `	.arch	armv4t\n`
+diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
+index 750c2b2..5afbb8a 100644
+--- a/asmcomp/arm64/emit.mlp
++++ b/asmcomp/arm64/emit.mlp
+@@ -942,6 +942,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
+index 98df5f9..531150f 100644
+--- a/asmcomp/i386/emit.mlp
++++ b/asmcomp/i386/emit.mlp
+@@ -986,6 +986,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
+index 4344085..343132b 100644
+--- a/asmcomp/power/emit.mlp
++++ b/asmcomp/power/emit.mlp
+@@ -887,6 +887,7 @@ let data l =
+ let begin_assembly() =
+   defined_functions := StringSet.empty;
+   external_functions := StringSet.empty;
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   (* Emit the beginning of the segments *)
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   emit_string data_space;
+diff --git a/asmcomp/sparc/emit.mlp b/asmcomp/sparc/emit.mlp
+index 877a3d5..7b041e9 100644
+--- a/asmcomp/sparc/emit.mlp
++++ b/asmcomp/sparc/emit.mlp
+@@ -727,6 +727,7 @@ let data l =
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.global	{emit_symbol lbl_begin}\n`;
-- 
2.11.0

From d39392122f3668405e7ca954c04d28b9660d2335 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sun, 1 Jan 2017 16:49:35 +0100
Subject: [PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path

* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Add
CAML_LD_LIBRARY_PATH
---
 gnu/packages/ocaml.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4bb138a14..f74cd5245 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -64,14 +64,17 @@
                (base32
                 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
               (patches
-				(search-patches
+                (search-patches
                   "ocaml-CVE-2015-8869.patch"
                   "ocaml-Add-a-.file-directive.patch"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
             (variable "OCAMLPATH")
-            (files (list (string-append "lib/ocaml"))))))
+            (files (list "lib/ocaml")))
+           (search-path-specification
+            (variable "CAML_LD_LIBRARY_PATH")
+            (files (list "lib/ocaml/site-lib/stubslibs")))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)))
-- 
2.11.0

From 911c8d1f8b0e9e52fe1b575be51aa50c13d758d5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 12:42:10 +0100
Subject: [PATCH 03/96] gnu: camlp4: compile native

* gnu/packages/ocaml.scm (camlp4): Change default target to "all", and
compile both native and byte version.
---
 gnu/packages/ocaml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f74cd5245..90483c6e1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -237,6 +237,10 @@ Git-friendly development workflow.")
     (inputs `(("ocaml" ,ocaml)))
     (arguments
      '(#:tests? #f                                ;no documented test target
+       ;; a race-condition will lead byte and native targets to  mkdir _build
+       ;; which  fails on the second attempt.
+       #:parallel-build? #f
+       #:make-flags (list "all")
        #:phases (modify-phases %standard-phases
                   (replace
                    'configure
-- 
2.11.0

From 2ccd136de66a5b2c7d2f16e1e5ee33117d92f71b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 22 Dec 2016 19:56:33 +0100
Subject: [PATCH 04/96] gnu: Add ocaml-build-system.

* guix/build/ocaml-build-system.scm: New file.
* guix/build-system/ocaml.scm: New file.
* Makefile.am (MODULES): Add them.
* gnu/packages/ocaml.scm (ocaml) [native-search-paths]: Adjuste OCAMLPATH.
---
 Makefile.am                       |   2 +
 gnu/packages/ocaml.scm            |   2 +-
 guix/build-system/ocaml.scm       | 181 ++++++++++++++++++++++++++++++++++++++
 guix/build/ocaml-build-system.scm | 119 +++++++++++++++++++++++++
 4 files changed, 303 insertions(+), 1 deletion(-)
 create mode 100644 guix/build-system/ocaml.scm
 create mode 100644 guix/build/ocaml-build-system.scm

diff --git a/Makefile.am b/Makefile.am
index fb08a004b..1a66fff50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ MODULES =					\
   guix/build-system/haskell.scm			\
   guix/build-system/perl.scm			\
   guix/build-system/python.scm			\
+  guix/build-system/ocaml.scm			\
   guix/build-system/waf.scm			\
   guix/build-system/r.scm			\
   guix/build-system/ruby.scm			\
@@ -95,6 +96,7 @@ MODULES =					\
   guix/build/gnu-dist.scm			\
   guix/build/perl-build-system.scm		\
   guix/build/python-build-system.scm		\
+  guix/build/ocaml-build-system.scm		\
   guix/build/r-build-system.scm			\
   guix/build/ruby-build-system.scm		\
   guix/build/waf-build-system.scm		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 90483c6e1..644638f8a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -71,7 +71,7 @@
     (native-search-paths
      (list (search-path-specification
             (variable "OCAMLPATH")
-            (files (list "lib/ocaml")))
+            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
            (search-path-specification
             (variable "CAML_LD_LIBRARY_PATH")
             (files (list "lib/ocaml/site-lib/stubslibs")))))
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
new file mode 100644
index 000000000..f4f57b5ad
--- /dev/null
+++ b/guix/build-system/ocaml.scm
@@ -0,0 +1,181 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system ocaml)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix derivations)
+  #:use-module (guix search-paths)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:export (%ocaml-build-system-modules
+            ocaml-build
+            ocaml-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for packages using ocaml. This is implemented as an
+;; extension of `gnu-build-system'.
+;;
+;; OCaml packages don't use a single standard for their build system. Some use
+;; autotools, other use custom configure scripts with Makefiles, others use
+;; oasis to generate the configure script and Makefile and lastly, some use
+;; custom ocaml scripts.
+;;
+;; Each phase in the build system will try to figure out what the build system
+;; is for that package. Most packages come with a custom configure script and
+;; a Makefile that in turn call custom build tools. Packages built with oasis
+;; will have a `setup.ml' file in the top directory, that can be used for all
+;; phases. In that case the Makefile is here only to call that script. In case
+;; the setup.ml do not work as expected, the @var{use-make} argument can be
+;; used to ignore the setup.ml file and run make instead.
+;;
+;; Some packages use their own custom scripts, `pkg/pkg.ml' or
+;; `pkg/build.ml'. They can be used here too.
+;;
+;; Code:
+
+(define %ocaml-build-system-modules
+  ;; Build-side modules imported by default.
+  `((guix build ocaml-build-system)
+    ,@%gnu-build-system-modules))
+
+(define (default-ocaml)
+  "Return the default OCaml package."
+
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml)))
+
+(define (default-findlib)
+  "Return the default OCaml-findlib package."
+
+  ;; Do not use `@' to avoid introducing circular dependencies.
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml-findlib)))
+
+(define* (lower name
+                #:key source inputs native-inputs outputs system target
+                (ocaml (default-ocaml))
+                (findlib (default-findlib))
+                #:allow-other-keys
+                #:rest arguments)
+  "Return a bag for NAME."
+  (define private-keywords
+    '(#:source #:target #:ocaml #:findlib #:inputs #:native-inputs))
+
+  (and (not target)                               ;XXX: no cross-compilation
+       (bag
+         (name name)
+         (system system)
+         (host-inputs `(,@(if source
+                              `(("source" ,source))
+                              '())
+                        ,@inputs
+
+                        ;; Keep the standard inputs of 'gnu-build-system'.
+                        ,@(standard-packages)))
+         (build-inputs `(("ocaml" ,ocaml)
+                         ("findlib" ,findlib)
+                         ,@native-inputs))
+         (outputs outputs)
+         (build ocaml-build)
+         (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (ocaml-build store name inputs
+                      #:key (guile #f)
+                      (outputs '("out")) (configure-flags ''())
+                      (search-paths '())
+                      (make-flags ''())
+                      (build-flags ''())
+                      (out-of-source? #t)
+                      (use-make? #f)
+                      (tests? #t)
+                      (test-flags ''("--enable-tests"))
+                      (test-target "test")
+                      (install-target "install")
+                      (validate-runpath? #t)
+                      (patch-shebangs? #t)
+                      (strip-binaries? #t)
+                      (strip-flags ''("--strip-debug"))
+                      (strip-directories ''("lib" "lib64" "libexec"
+                                            "bin" "sbin"))
+                      (phases '(@ (guix build ocaml-build-system)
+                                  %standard-phases))
+                      (system (%current-system))
+                      (imported-modules %ocaml-build-system-modules)
+                      (modules '((guix build ocaml-build-system)
+                                 (guix build utils))))
+  "Build SOURCE using OCAML, and with INPUTS. This assumes that SOURCE
+provides a 'setup.ml' file as its build system."
+  (define builder
+    `(begin
+       (use-modules ,@modules)
+       (ocaml-build #:source ,(match (assoc-ref inputs "source")
+                                (((? derivation? source))
+                                 (derivation->output-path source))
+                                ((source)
+                                 source)
+                                (source
+                                 source))
+                    #:system ,system
+                    #:outputs %outputs
+                    #:inputs %build-inputs
+                    #:search-paths ',(map search-path-specification->sexp
+                                          search-paths)
+                    #:phases ,phases
+                    #:configure-flags ,configure-flags
+                    #:test-flags ,test-flags
+                    #:make-flags ,make-flags
+                    #:build-flags ,build-flags
+                    #:out-of-source? ,out-of-source?
+                    #:use-make? ,use-make?
+                    #:tests? ,tests?
+                    #:test-target ,test-target
+                    #:install-target ,install-target
+                    #:validate-runpath? ,validate-runpath?
+                    #:patch-shebangs? ,patch-shebangs?
+                    #:strip-binaries? ,strip-binaries?
+                    #:strip-flags ,strip-flags
+                    #:strip-directories ,strip-directories)))
+
+  (define guile-for-build
+    (match guile
+      ((? package?)
+       (package-derivation store guile system #:graft? #f))
+      (#f                                         ; the default
+       (let* ((distro (resolve-interface '(gnu packages commencement)))
+              (guile  (module-ref distro 'guile-final)))
+         (package-derivation store guile system #:graft? #f)))))
+
+  (build-expression->derivation store name builder
+                                #:system system
+                                #:inputs inputs
+                                #:modules imported-modules
+                                #:outputs outputs
+                                #:guile-for-build guile-for-build))
+
+(define ocaml-build-system
+  (build-system
+    (name 'ocaml)
+    (description "The standard OCaml build system")
+    (lower lower)))
+
+;;; ocaml.scm ends here
diff --git a/guix/build/ocaml-build-system.scm b/guix/build/ocaml-build-system.scm
new file mode 100644
index 000000000..f77251ca0
--- /dev/null
+++ b/guix/build/ocaml-build-system.scm
@@ -0,0 +1,119 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build ocaml-build-system)
+  #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+  #:use-module (guix build utils)
+  #:use-module (ice-9 match)
+  #:export (%standard-phases
+            ocaml-build))
+
+;; Commentary:
+;;
+;; Builder-side code of the standard ocaml build procedure.
+;;
+;; Code:
+
+(define* (ocaml-findlib-environment #:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out")))
+    (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
+    (setenv "OCAMLFIND_LDCONF" "ignore"))
+  #t)
+
+(define* (configure #:key outputs (configure-flags '())
+                    (test-flags '("--enable-tests")) tests?
+                    #:allow-other-keys)
+  "Configure the given package."
+  (let* ((out        (assoc-ref outputs "out")))
+    (format #t "build directory: ~s~%" (getcwd))
+    (if (file-exists? "setup.ml")
+      (let ((args `("-configure"
+                    "--prefix" ,out
+                    ,@(if tests?
+                          test-flags
+                          '())
+                    ,@configure-flags)))
+        (format #t "running 'setup.ml' with arguments ~s~%" args)
+        (zero? (apply system* "ocaml" "setup.ml" args)))
+       (let ((args `("-prefix" ,out ,@configure-flags)))
+        (format #t "running 'configure' with arguments ~s~%" args)
+        (zero? (apply system* "./configure" args))))))
+
+(define* (build #:key inputs outputs (build-flags '()) (make-flags '())
+                (use-make? #f) #:allow-other-keys)
+  "Build the given package."
+  (if (and (file-exists? "setup.ml") (not use-make?))
+    (zero? (apply system* "ocaml" "setup.ml" "-build" build-flags))
+    (if (file-exists? "Makefile")
+      (zero? (apply system* "make" make-flags))
+      (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml")))
+        (zero? (apply system* "ocaml" "-I"
+                              (string-append (assoc-ref inputs "findlib")
+                                             "/lib/ocaml/site-lib")
+                              file build-flags))))))
+
+(define* (check #:key inputs outputs (make-flags '()) (test-target "test") tests?
+                  (use-make? #f) #:allow-other-keys)
+  "Install the given package."
+  (when tests?
+    (if (and (file-exists? "setup.ml") (not use-make?))
+      (zero? (system* "ocaml" "setup.ml" (string-append "-" test-target)))
+      (if (file-exists? "Makefile")
+        (zero? (apply system* "make" test-target make-flags))
+        (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml")))
+          (zero? (system* "ocaml" "-I"
+                          (string-append (assoc-ref inputs "findlib")
+                                         "/lib/ocaml/site-lib")
+                          file test-target)))))))
+
+(define* (install #:key outputs (build-flags '()) (make-flags '()) (use-make? #f)
+                  (install-target "install")
+                  #:allow-other-keys)
+  "Install the given package."
+  (let ((out (assoc-ref outputs "out")))
+    (if (and (file-exists? "setup.ml") (not use-make?))
+      (zero? (apply system* "ocaml" "setup.ml"
+                    (string-append "-" install-target) build-flags))
+      (if (file-exists? "Makefile")
+        (zero? (apply system* "make" install-target make-flags))
+        (zero? (system* "opam-installer" "-i" (string-append "--prefix=" out)
+                        (string-append "--libdir=" out "/lib/ocaml/site-lib")))))))
+
+(define* (prepare-install #:key outputs #:allow-other-keys)
+  "Prepare for building the given package."
+  (mkdir-p (string-append (assoc-ref outputs "out") "/lib/ocaml/site-lib"))
+  (mkdir-p (string-append (assoc-ref outputs "out") "/bin")))
+
+(define %standard-phases
+  ;; Everything is as with the GNU Build System except for the `configure'
+  ;; , `build', `check' and `install' phases.
+  (modify-phases gnu:%standard-phases
+    (add-before 'configure 'ocaml-findlib-environment
+                ocaml-findlib-environment)
+    (add-before 'install 'prepare-install prepare-install)
+    (replace 'configure configure)
+    (replace 'build build)
+    (replace 'check check)
+    (replace 'install install)))
+
+(define* (ocaml-build #:key inputs (phases %standard-phases)
+                      #:allow-other-keys #:rest args)
+  "Build the given package, applying all of PHASES in order."
+  (apply gnu:gnu-build #:inputs inputs #:phases phases args))
+
+;;; ocaml-build-system.scm ends here
-- 
2.11.0

From a3d9fa07d3e2f044958140f3d4a788964bd6502e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 22 Dec 2016 20:00:04 +0100
Subject: [PATCH 05/96] gnu: ocaml: Use a prefix for license field.

---
 gnu/packages/ocaml.scm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 644638f8a..1554be217 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -24,7 +24,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages ocaml)
-  #:use-module ((guix licenses) #:hide (zlib))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix svn-download)
@@ -152,7 +152,7 @@ functional, imperative and object-oriented styles of programming.")
     ;; The compiler is distributed under qpl1.0 with a change to choice of
     ;; law: the license is governed by the laws of France.  The library is
     ;; distributed under lgpl2.0.
-    (license (list qpl lgpl2.0))))
+    (license (list license:qpl license:lgpl2.0))))
 
 (define-public opam
   (package
@@ -217,7 +217,7 @@ simultaneous compiler installations, flexible package constraints, and a
 Git-friendly development workflow.")
 
     ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
-    (license lgpl3)))
+    (license license:lgpl3)))
 
 (define-public camlp4
   (package
@@ -263,7 +263,7 @@ syntax of OCaml.")
 
     ;; This is LGPLv2 with an exception that allows packages statically-linked
     ;; against the library to be released under any terms.
-    (license lgpl2.0)))
+    (license license:lgpl2.0)))
 
 (define-public camlp5
   (package
@@ -304,7 +304,7 @@ syntax of OCaml.")
 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
 concrete syntax of the language (Quotations, Syntax Extensions).")
     ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
-    (license (list bsd-3 qpl))))
+    (license (list license:bsd-3 license:qpl))))
 
 (define-public hevea
   (package
@@ -335,7 +335,7 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
     (description
      "HeVeA is a LaTeX to HTML translator that generates modern HTML 5.  It is
 written in Objective Caml.")
-    (license qpl)))
+    (license license:qpl)))
 
 (define-public coq
   (package
@@ -388,7 +388,7 @@ development of computer programs consistent with their formal specification.
 It is developed using Objective Caml and Camlp5.")
     ;; The code is distributed under lgpl2.1.
     ;; Some of the documentation is distributed under opl1.0+.
-    (license (list lgpl2.1 opl1.0+))))
+    (license (list license:lgpl2.1 license:opl1.0+))))
 
 (define-public proof-general
   (package
@@ -466,7 +466,7 @@ It is developed using Objective Caml and Camlp5.")
      "Proof General is a major mode to turn Emacs into an interactive proof
 assistant to write formal mathematical proofs using a variety of theorem
 provers.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public ocaml-menhir
   (package
@@ -502,7 +502,7 @@ Knuth’s LR(1) parser construction technique.")
     ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
     ;; that have an *.ml or *.mli extension are GPL licensed. All other files
     ;; are QPL licensed.
-    (license (list gpl2+ qpl))))
+    (license (list license:gpl2+ license:qpl))))
 
 (define-public lablgtk
   (package
@@ -565,7 +565,7 @@ gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
 gnomeui, gtksourceview, gtkspell,
 libglade (and it an generate OCaml code from .glade files),
 libpanel, librsvg and quartz.")
-    (license lgpl2.1)))
+    (license license:lgpl2.1)))
 
 (define-public unison
   (package
@@ -686,7 +686,7 @@ a collection of files and directories to be stored on different hosts
 (or different disks on the same host), modified separately, and then
 brought up to date by propagating the changes in each replica
 to the other.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public ocaml-findlib
   (package
@@ -734,4 +734,4 @@ dependency information about multiple packages.  There is also a tool that
 allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
-    (license x11)))
+    (license license:x11)))
-- 
2.11.0

From 8c6fe2851f23989c26edd269b01a9905ad0b3e80 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 22 Dec 2016 20:05:46 +0100
Subject: [PATCH 06/96] gnu: ocaml: Use a helper function to download from
 ocaml-forge.

* gnu/packages/ocaml.scm (ocaml-forge-origin): New procedure.
* gnu/packages/ocaml.scm (lablgtk): Use it.
---
 gnu/packages/ocaml.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1554be217..6bb0e4826 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -50,6 +50,16 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages curl))
 
+;; A shortcut for files from ocaml forge. Downloaded files are computed from
+;; their number, not their name.
+(define (ocaml-forge-origin name version file-number hash)
+  (origin
+    (method url-fetch)
+    (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
+                        (number->string file-number) "/" name "-" version
+                        ".tar.gz"))
+    (sha256 (base32 hash))))
+
 (define-public ocaml
   (package
     (name "ocaml")
@@ -509,13 +519,8 @@ Knuth’s LR(1) parser construction technique.")
     (name "lablgtk")
     (version "2.18.5")
     (source
-      (origin
-        (method url-fetch)
-          (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
-                              "1627/lablgtk-2.18.5.tar.gz"))
-          (sha256
-            (base32
-              "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
+      (ocaml-forge-origin name version 1627
+        "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))
     (build-system gnu-build-system)
     (native-inputs
      `(("camlp4" ,camlp4)
-- 
2.11.0

From d1f06c51d336f865bc203db98d6667e8151d90b4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 22 Dec 2016 20:13:49 +0100
Subject: [PATCH 07/96] gnu: camlp4: Install camlp4 META file.

* gnu/packages/ocaml.scm (ocaml-findlib): Delete camlp4 META file.
* gnu/packages/ocaml.scm (camlp4): Install in OCAMLPATH and install its META
file.
---
 gnu/packages/ocaml.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6bb0e4826..7d9d363b5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -258,9 +258,19 @@ Git-friendly development workflow.")
                      ;; This is a home-made 'configure' script.
                      (let ((out (assoc-ref outputs "out")))
                        (zero? (system* "./configure"
-                                       (string-append "--libdir=" out "/lib")
+                                       (string-append "--libdir=" out
+                                                      "/lib/ocaml/site-lib")
                                        (string-append "--bindir=" out "/bin")
-                                       (string-append "--pkgdir=" out)))))))))
+                                       (string-append "--pkgdir=" out
+                                                      "/lib/ocaml/site-lib"))))))
+                  (add-after 'install 'install-meta
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* "camlp4/META.in"
+                          (("directory = .*")
+                            (string-append "directory = \"" out
+                                           "/lib/ocaml/site-lib/camlp4\"\n")))
+                        (zero? (system* "make" "install-META"))))))))
     (home-page "https://github.com/ocaml/camlp4")
     (synopsis "Write parsers in OCaml")
     (description
@@ -725,7 +735,12 @@ to the other.")
                         "-config" (string-append out "/etc/ocamfind.conf")
                         "-mandir" (string-append out "/share/man")
                         "-sitelib" (string-append out "/lib/ocaml/site-lib")
-                        "-with-toolbox")))))))
+                        "-with-toolbox"))))
+                  (add-after 'install 'remove-camlp4
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (delete-file-recursively
+                          (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
     (home-page "http://projects.camlcity.org/projects/findlib.html")
     (synopsis "Management tool for OCaml libraries")
     (description
-- 
2.11.0

From bdcec5f7b8535caa32a50e346733b7bd1c2d7119 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 22 Dec 2016 20:19:00 +0100
Subject: [PATCH 08/96] gnu: Add ocaml-ounit.

* gnu/packages/ocaml.scm (ocaml-ounit): 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 7d9d363b5..e32bd9de1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -30,6 +30,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
@@ -48,6 +49,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
 
 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
@@ -755,3 +757,20 @@ allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
     (license license:x11)))
+
+;; note that some tests may hang for no obvious reason.
+(define-public ocaml-ounit
+  (package
+    (name "ocaml-ounit")
+    (version "2.0.0")
+    (home-page "http://ounit.forge.ocamlcore.org")
+    (source (ocaml-forge-origin "ounit" version 1258
+              "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("libxml2" ,libxml2))) ; for xmllint
+    ; tests are done during build
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+    (synopsis "Unit testing framework for OCaml")
+    (description "Unit testing framework for OCaml.  It is similar to JUnit and
+other XUnit testing frameworks.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From 685be986421abc828232058d037eef7a7ea667ba Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 10:48:21 +0100
Subject: [PATCH 09/96] gnu: Add camlzip

* gnu/packages/ocaml.scm (camlzip): 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 e32bd9de1..1de96c760 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -774,3 +774,30 @@ compilers that can directly deal with packages.")
     (description "Unit testing framework for OCaml.  It is similar to JUnit and
 other XUnit testing frameworks.")
     (license license:lgpl2.1)))
+
+(define-public camlzip
+  (package
+    (name "camlzip")
+    (version "1.0.6")
+    (home-page "http://forge.ocamlcore.org/projects/camlzip")
+    (source (ocaml-forge-origin name version 1616
+              "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))
+    (build-system ocaml-build-system)
+    (inputs `(("zlib" ,zlib)))
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-before 'install 'fix-install-name
+                     (lambda* (#:key #:allow-other-keys)
+                       (substitute* "Makefile"
+                         (("install zip") "install camlzip")))))
+                 #:install-target "install-findlib"
+                 #:make-flags
+                 (list "all" "allopt"
+                       (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
+                       "/lib/ocaml"))))
+    (synopsis "Provides easy access to compressed files")
+    (description "Provides easy access to compressed files in ZIP, GZIP and
+JAR format.  It provides functions for reading from and writing to compressed
+files in these formats.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From 01c27f6f3cda6a102841cbc1335cb17d9b7ccadf Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 10:52:48 +0100
Subject: [PATCH 10/96] gnu: Add ocamlmod.

* gnu/packages/ocaml.scm (ocamlmod): 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 1de96c760..1900cfc70 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -801,3 +801,18 @@ other XUnit testing frameworks.")
 JAR format.  It provides functions for reading from and writing to compressed
 files in these formats.")
     (license license:lgpl2.1)))
+
+(define-public ocamlmod
+  (package
+    (name "ocamlmod")
+    (version "0.0.8")
+    (home-page "https://forge.ocamlcore.org/projects/ocamlmod/")
+    (source (ocaml-forge-origin name version 1544
+               "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("ounit" ,ocaml-ounit)))
+    ; tests are done during build
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))
+    (synopsis "Generate modules from OCaml source files")
+    (description "Generate modules from OCaml source files.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

From b8e008123e82588a82dcf6dbb04f25444f2f620f Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 10:53:41 +0100
Subject: [PATCH 11/96] gnu: Add ocaml-zarith.

* gnu/packages/ocaml.scm (ocaml-zarith): 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 1900cfc70..a1c8df1da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
@@ -816,3 +817,26 @@ files in these formats.")
     (synopsis "Generate modules from OCaml source files")
     (description "Generate modules from OCaml source files.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-zarith
+  (package
+    (name "ocaml-zarith")
+    (version "1.4.1")
+    (home-page "https://forge.ocamlcore.org/projects/zarith/")
+    (source (ocaml-forge-origin "zarith" version 1574
+               "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))
+    (build-system ocaml-build-system)
+    (native-inputs `(("perl" ,perl)))
+    (inputs `(("gmp" ,gmp)))
+    (arguments `(#:tests? #f ; no test target
+                 #:phases
+                 (modify-phases %standard-phases
+                   (replace 'configure
+                     (lambda* (#:key #:allow-other-keys)
+                       (zero? (system* "./configure")))))))
+    (synopsis "Implements arbitrary-precision integers")
+    (description "Implements arithmetic and logical operations over
+arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
+over big integers. Small integers are represented as Caml unboxed integers,
+for speed and space economy.")
+    (license license:lgpl2.1))); with an exception
-- 
2.11.0

From 1cdf4ebad0561feb40b7ede881aa12907b2eded6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 10:56:00 +0100
Subject: [PATCH 12/96] gnu: Add ocaml-frontc

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a1c8df1da..4289e5336 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -840,3 +840,44 @@ arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
 over big integers. Small integers are represented as Caml unboxed integers,
 for speed and space economy.")
     (license license:lgpl2.1))); with an exception
+
+(define-public ocaml-frontc
+  (package
+    (name "ocaml-frontc")
+    (version "3.4")
+    (home-page "https://www.irit.fr/FrontC")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
+                                  "frontc/Frontc-" version ".tgz"))
+              (sha256
+                (base32
+                  "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-after 'install 'install-meta
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (with-output-to-file
+                           (string-append out "/lib/ocaml/frontc/META")
+                             (lambda _
+                               (display
+                                 (string-append
+                                   "description = \"Parser for the C language\"
+version = \"" ,version "\"
+requires = \"unix\"
+archive(byte) = \"frontc.cma\"
+archive(native) = \"frontc.cmxa\""))))
+                         (symlink (string-append out "/lib/ocaml/frontc")
+                                  (string-append out "/lib/ocaml/FrontC"))))))
+                 #:make-flags (list (string-append "PREFIX="
+                                                   (assoc-ref %outputs "out"))
+                                    "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+    (synopsis "C parser and lexer library")
+    (description "FrontC is an OCAML library providing a C parser and lexer.
+The result is a syntactic tree easy to process with usual OCAML tree management.
+It provides support for ANSI C syntax, old-C K&R style syntax and the standard
+GNU CC attributes.  It provides also a C pretty printer as an example of use.")
+    (license license:lgpl2.1)))
-- 
2.11.0

From 5ea485ae30c54d04b5c7d6ca4f52294a93b8a749 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:14:13 +0100
Subject: [PATCH 13/96] gnu: Add ocaml-qtest

* gnu/packages/ocaml.scm (ocaml-qtest): 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 4289e5336..7c3945884 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -881,3 +881,32 @@ The result is a syntactic tree easy to process with usual OCAML tree management.
 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
 GNU CC attributes.  It provides also a C pretty printer as an example of use.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-qtest
+  (package
+    (name "ocaml-qtest")
+    (version "2.3")
+    (home-page "https://github.com/vincent-hugot/iTeML")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/vincent-hugot/iTeML/"
+                                  "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("findlib" ,ocaml-findlib)))
+    (propagated-inputs `(("ounit" ,ocaml-ounit)))
+    (arguments
+      `(#:tests? #f; no test target
+        #:make-flags
+        (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
+        #:phases
+        (modify-phases %standard-phases
+          (delete 'configure))))
+    (synopsis "Inline (Unit) Tests for OCaml")
+    (description "Qtest extracts inline unit tests written using a special
+syntax in comments.  Those tests are then run using the oUnit framework and the
+qcheck library.  The possibilities range from trivial tests -- extremely simple
+to use -- to sophisticated random generation of test cases.")
+    (license license:lgpl3+)))
-- 
2.11.0

From 1cfded4fcfb552e3e36861770a1ec1a96aa7eb43 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:15:19 +0100
Subject: [PATCH 14/96] gnu: Add ocaml-stringext

* gnu/packages/ocaml.scm (ocaml-stringext): 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 7c3945884..bf89b847a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -910,3 +910,24 @@ syntax in comments.  Those tests are then run using the oUnit framework and the
 qcheck library.  The possibilities range from trivial tests -- extremely simple
 to use -- to sophisticated random generation of test cases.")
     (license license:lgpl3+)))
+
+(define-public ocaml-stringext
+  (package
+    (name "ocaml-stringext")
+    (version "1.4.3")
+    (home-page "https://github.com/rgrinberg/stringext/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("qtest" ,ocaml-qtest)))
+    (synopsis "Extra string functions for OCaml")
+    (description "Provides a single module named Stringext that provides a grab
+bag of often used but missing string functions from the stdlib.  E.g, split,
+full_split, cut, rcut, etc..")
+    ;; the only mention of a license in this project is in its `opam' file
+    ;; where it says `mit'.
+    (license license:expat)))
-- 
2.11.0

From 04c09f518e1d98b773675d3bc05bd592ac9fa1a2 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:17:17 +0100
Subject: [PATCH 15/96] gnu: Add ocaml-bisect

* gnu/packages/ocaml.scm (ocaml-bisect): New variable.
* gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                       |   1 +
 gnu/packages/ocaml.scm                             |  34 ++++++
 ...ml-bisect-fix-camlp4-in-another-directory.patch | 125 +++++++++++++++++++++
 3 files changed, 160 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9cbeaf071..cc46b4749 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -750,6 +750,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-assume-preserve-path.patch		\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
+  %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch	\
   %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	\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bf89b847a..f3f76eb1d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -931,3 +931,37 @@ full_split, cut, rcut, etc..")
     ;; the only mention of a license in this project is in its `opam' file
     ;; where it says `mit'.
     (license license:expat)))
+
+
+(define-public ocaml-bisect
+  (package
+    (name "ocaml-bisect")
+    (version "1.3")
+    (home-page "http://bisect.x9c.fr")
+    (source
+      (origin
+        (inherit (ocaml-forge-origin "bisect" version 1051
+                       "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
+        (patches (search-patches "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("camlp4" ,camlp4)
+                     ("libxml2" ,libxml2)
+                     ("which" ,which)))
+    (propagated-inputs `(("camlp4" ,camlp4)))
+    (arguments `(#:test-target "tests"
+                 #:make-flags
+                 (list "all" (string-append "CAMLP4_LIBDIR="
+                                            (assoc-ref %build-inputs "camlp4")
+                                            "/lib/ocaml/site-lib/camlp4"))
+                 #:phases (modify-phases %standard-phases
+                            (replace 'configure
+                              (lambda* (#:key outputs #:allow-other-keys)
+                                (zero? (system* "./configure" "-prefix"
+                                                (assoc-ref outputs "out"))))))))
+    (synopsis "Code coverage tool for the OCaml language")
+    (description "Bisect is a code coverage tool for the OCaml language.  It is
+a camlp4-based tool that allows to instrument your application before running
+tests.  After application execution, it is possible to generate a report in HTML
+format that is the replica of the application source code annotated with code
+coverage information.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
new file mode 100644
index 000000000..2056b4235
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
@@ -0,0 +1,125 @@
+From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Wed, 14 Dec 2016 14:14:59 +0100
+Subject: [PATCH] fix camlp4 in another directory
+
+---
+ Makefile        | 11 ++++++-----
+ configure       | 13 ++++++++++++-
+ myocamlbuild.ml |  2 +-
+ 3 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a8ce17..d94a6d5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build
+ PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc
+ PATH_SRC=$(PATH_BASE)/src
+ PATH_TESTS=$(PATH_BASE)/tests
+-PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
++PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect
+
+
+ # DEFINITIONS
+@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
+ PROJECT_NAME=bisect
+ OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild
+ OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX)
+-OCAMLBUILD_FLAGS=-classic-display -no-links
++CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)")
++OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE)
+ MODULES_ODOCL=$(PROJECT_NAME).odocl
+ MODULES_MLPACK=$(PROJECT_NAME).mlpack
+ MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack
+@@ -80,11 +81,11 @@ veryclean: clean
+	rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
+
+ install: FORCE
+-	cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \
++	cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \
+	if [ "$(PPX)" = "TRUE" ]; then \
+-	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \
++	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \
+	fi; \
+-	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \
++	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \
+	if [ -x "$(PATH_OCAMLFIND)" ]; then \
+	  $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
+	  $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
+diff --git a/configure b/configure
+index bb7ebf4..61a3095 100755
+--- a/configure
++++ b/configure
+@@ -21,7 +21,9 @@
+ # default values
+ ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'`
+ bin_path=`dirname $ocamlbuild`
++prefix=''
+ ocaml_prefix=`dirname $bin_path`
++camlp4_prefix=`dirname $(dirname $(which camlp4of))`
+ ocamlfind=`which ocamlfind 2> /dev/null || echo ''`
+ native_dynlink='TRUE'
+ devel='FALSE'
+@@ -32,8 +34,12 @@ ppx='FALSE'
+ while [ $# -gt 0 ]
+ do
+     case "$1" in
++        -prefix)
++            prefix="$2"; shift;;
+         -ocaml-prefix)
+             ocaml_prefix="$2"; shift;;
++        -camlp4-prefix)
++            camlp4_prefix="$2"; shift;;
+         -ocamlfind)
+             ocamlfind="$2"; shift;;
+         -no-native-dynlink)
+@@ -45,7 +51,7 @@ do
+         -ppx)
+             ppx='TRUE';;
+         *)
+-            echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
++            echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
+             exit 1;;
+         esac
+         shift
+@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then
+   exit 1
+ fi
+
++# prefix default value
++test -z $prefix && prefix=$ocaml_prefix
++
+ # make options
+ make_quiet=`make -f - <<EOF
+ default: gnumake
+@@ -67,11 +76,13 @@ EOF`
+ # file creation
+ echo "# timestamp: `date`" > Makefile.config
+ echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config
++echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config
+ echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config
+ echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config
+ echo "WARNINGS=$devel" >> Makefile.config
+ echo "NO_CAMLP4=$no_camlp4" >> Makefile.config
+ echo "PPX=$ppx" >> Makefile.config
+ echo "MAKE_QUIET=$make_quiet" >> Makefile.config
++echo "PREFIX=$prefix" >> Makefile.config
+ echo "" >> Makefile.config
+ echo 'Makefile.config successfully created'
+diff --git a/myocamlbuild.ml b/myocamlbuild.ml
+index 8aa25fd..09a7d48 100644
+--- a/myocamlbuild.ml
++++ b/myocamlbuild.ml
+@@ -70,7 +70,7 @@ let () =
+     | After_rules ->
+         let camlp4of =
+           try
+-            let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
++            let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in
+             Filename.concat path_bin "camlp4of"
+           with _ -> "camlp4of" in
+         flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]);
+--
+2.7.4
+
-- 
2.11.0

From 8e53965ac5a6dab7dc642a24c4f58d3d6ec1523a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:33:36 +0100
Subject: [PATCH 16/96] gnu: Add ocaml-bitstring

* gnu/packages/ocaml.scm (ocaml-bitstring): New variable.
* gnu/packages/patches/ocaml-bitstring-fix-configure.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ocaml.scm                             | 62 ++++++++++++++++++++++
 .../patches/ocaml-bitstring-fix-configure.patch    | 53 ++++++++++++++++++
 3 files changed, 116 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cc46b4749..3e8517117 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
   %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch	\
+  %D%/packages/patches/ocaml-bitstring-fix-configure.patch \
   %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	\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f3f76eb1d..9814e10d2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,6 +32,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ocaml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -49,6 +50,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl))
@@ -965,3 +967,63 @@ tests.  After application execution, it is possible to generate a report in HTML
 format that is the replica of the application source code annotated with code
 coverage information.")
     (license license:gpl3+)))
+
+(define-public ocaml-bitstring
+  (package
+    (name "ocaml-bitstring")
+    (version "2.1.0")
+    (home-page "https://github.com/xguerin/bitstring/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "archive/v" version ".tar.gz"))
+              (sha256
+                (base32
+                  "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
+              (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs `(("camlp4" ,camlp4)
+                     ("time" ,time)
+                     ("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("bisect" ,ocaml-bisect)))
+    (propagated-inputs `(("camlp4" ,camlp4)))
+    (arguments `(#:configure-flags
+                 (list "CAMLP4OF=camlp4of" "--enable-coverage")
+                 #:make-flags
+                 (list (string-append "BISECTLIB="
+                                      (assoc-ref %build-inputs "bisect")
+                                      "/lib/ocaml/site-lib")
+                       (string-append "OCAMLCFLAGS=-g -I "
+                                      (assoc-ref %build-inputs "camlp4")
+                                      "/lib/ocaml/site-lib/camlp4 -I "
+                                      "$(BISECTLIB)/bisect")
+                       (string-append "OCAMLOPTFLAGS=-g -I "
+                                      (assoc-ref %build-inputs "camlp4")
+                                      "/lib/ocaml/site-lib/camlp4 -I "
+                                      "$(BISECTLIB)/bisect"))
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-before 'configure 'fix-configure
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "Makefile.in"
+                         (("@abs_top_builddir@") (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
+                       (substitute* "configure"
+                         (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
+                                                      "/bin/sh")))))
+                   (add-after 'install 'link-lib
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (stubs (string-append out
+                                       "/lib/ocaml/site-lib/stubslibs"))
+                              (lib (string-append out
+                                     "/lib/ocaml/site-lib/bitstring")))
+                         (mkdir-p stubs)
+                         (symlink (string-append lib "/dllbitstring.so")
+                                  (string-append stubs "/dllbitstring.so"))))))))
+    (synopsis "Bitstrings and bitstring matching for OCaml")
+    (description "Adds Erlang-style bitstrings and matching over bitstrings as
+a syntax extension and library for OCaml.  You can use this module to both parse
+and generate binary formats, files and protocols.  Bitstring handling is added
+as primitives to the language, making it exceptionally simple to use and very
+powerful.")
+    (license license:isc)))
diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
new file mode 100644
index 000000000..c358bf3d6
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
@@ -0,0 +1,53 @@
+From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Thu, 15 Dec 2016 21:17:31 +0100
+Subject: [PATCH] fix configure
+
+---
+ Makefile.in | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index d040f4c..85e0b38 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -32,6 +32,7 @@ BISECT_REPORT	= @BISECT_REPORT@
+ BYTESWAP_H	= @BYTESWAP_H@
+
+ OCAMLLIB	= @OCAMLLIB@
++BISECTLIB	= $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi)
+ top_srcdir	= @top_srcdir@
+
+ pkg_cil		= @OCAML_PKG_cil@
+@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
+ OCAMLOPTLIBS	= -linkpkg
+
+ ifneq ($(enable_coverage),no)
+-OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLCLIBS	+= -I +bisect bisect.cma
+-OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLOPTLIBS	+= -I +bisect bisect.cmxa
+ endif
+
+@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli
+	  -I +camlp4 -pp camlp4of -c $<
+
+ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
+-	$(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
++	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
+	  -pp camlp4of -c $< -o $@
+
+ bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
+@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h
+ ifeq ($(enable_coverage),no)
+ PP	= -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ else
+-PP	= -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
++PP	= -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ endif
+
+ check: test
+--
+2.11.0
-- 
2.11.0

From 8ee7db236469e83697dd1b59e3a9a6d18444d056 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:36:41 +0100
Subject: [PATCH 17/96] gnu: Add ocaml-result

* gnu/packages/ocaml.scm (ocaml-result): 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 9814e10d2..335a81c88 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1027,3 +1027,23 @@ and generate binary formats, files and protocols.  Bitstring handling is added
 as primitives to the language, making it exceptionally simple to use and very
 powerful.")
     (license license:isc)))
+
+(define-public ocaml-result
+  (package
+    (name "ocaml-result")
+    (version "1.2")
+    (home-page "https://github.com/janestreet/result/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/" version ".tar.gz"))
+        (sha256 (base32
+                  "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+                 #:tests? #f))
+    (synopsis "Compatibility Result module")
+    (description "Uses the new result type defined in OCaml >= 4.03 while
+staying compatible with older version of OCaml should use the Result module
+defined in this library.")
+    (license license:bsd-3)))
-- 
2.11.0

From 59344b88dca1642d2b46fee7ffdc6efdf43523a9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:40:26 +0100
Subject: [PATCH 18/96] gnu: Add ocaml-topkg

* gnu/packages/ocaml.scm (ocaml-topkg): 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 335a81c88..25354fbcc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1047,3 +1047,29 @@ powerful.")
 staying compatible with older version of OCaml should use the Result module
 defined in this library.")
     (license license:bsd-3)))
+
+(define-public ocaml-topkg
+  (package
+    (name "ocaml-topkg")
+    (version "0.8.1")
+    (home-page "http://erratique.ch/software/topkg")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/topkg-" version ".tbz"))
+        (sha256 (base32
+                  "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
+    (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 `(("result" ,ocaml-result)))
+    (synopsis "Transitory OCaml software packager")
+    (description "Topkg is a packager for distributing OCaml software. It
+provides an API to describe the files a package installs in a given build
+configuration and to specify information about the package's distribution,
+creation and publication procedures.")
+    (license license:isc)))
-- 
2.11.0

From 462f2670a02cea71191fa015f8d5bb9006d482c6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:41:50 +0100
Subject: [PATCH 19/96] gnu: Add ocaml-rresult

* gnu/packages/ocaml.scm (ocaml-rresult): 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 25354fbcc..fea3ebda0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1073,3 +1073,29 @@ provides an API to describe the files a package installs in a given build
 configuration and to specify information about the package's distribution,
 creation and publication procedures.")
     (license license:isc)))
+
+(define-public ocaml-rresult
+  (package
+    (name "ocaml-rresult")
+    (version "0.5.0")
+    (home-page "http://erratique.ch/software/rresult")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/rresult-" version ".tbz"))
+              (sha256
+                (base32
+                  "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
+    (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)))
+    (synopsis "Result value combinators for OCaml")
+    (description "Handle computation results and errors in an explicit and
+declarative manner, without resorting to exceptions.  It defines combinators
+to operate on the result type available from OCaml 4.03 in the standard
+library.")
+    (license license:isc)))
-- 
2.11.0

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

* gnu/packages/ocaml.scm (ocaml-mtime): 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 fea3ebda0..e971e72d0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1099,3 +1099,28 @@ declarative manner, without resorting to exceptions.  It defines combinators
 to operate on the result type available from OCaml 4.03 in the standard
 library.")
     (license license:isc)))
+
+(define-public ocaml-mtime
+  (package
+    (name "ocaml-mtime")
+    (version "0.8.3")
+    (home-page "http://erratique.ch/software/mtime")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/releases/mtime-" version ".tbz"))
+              (sha256
+                (base32
+                  "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:tests? #f
+                 #:build-flags (list "native=true" "native-dynlink=true"
+                                     "jsoo=false")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure))))
+    (native-inputs `(("opam" ,opam)))
+    (propagated-inputs `(("topkg" ,ocaml-topkg)))
+    (synopsis "Monotonic wall-clock time for OCaml")
+    (description "access monotonic wall-clock time.  It allows to measure time
+spans without being subject to operating system calendar time adjustments.")
+    (license license:isc)))
-- 
2.11.0

From a7de82689d7168fba87154a9298437001ccef878 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:44:15 +0100
Subject: [PATCH 21/96] =?UTF-8?q?gnu:=C2=A0Add=20ocaml-cmdliner?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/ocaml.scm (ocaml-cmdliner): 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 e971e72d0..8f7e3ec55 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1124,3 +1124,30 @@ library.")
     (description "access monotonic wall-clock time.  It allows to measure time
 spans without being subject to operating system calendar time adjustments.")
     (license license:isc)))
+
+(define-public ocaml-cmdliner
+  (package
+    (name "ocaml-cmdliner")
+    (version "0.9.8")
+    (home-page "http://erratique.ch/software/cmdliner")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/releases/cmdliner-" version ".tbz"))
+        (sha256 (base32
+                  "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
+    (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 definition of command line interfaces for OCaml")
+    (description "Cmdliner is a module for the declarative definition of command
+line interfaces.  It provides a simple and compositional mechanism to convert
+command line arguments to OCaml values and pass them to your functions.  The
+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)))
-- 
2.11.0

From 7298cc6be3c98a5153967035697c6472037801d0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:45:15 +0100
Subject: [PATCH 22/96] 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 8f7e3ec55..31b717874 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1151,3 +1151,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 4105ae5781d6c120c270cc39bbf7da41cf00ead5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:46:33 +0100
Subject: [PATCH 23/96] 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 31b717874..bf308f1a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1178,3 +1178,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 ea1735f7d3326f4f5e8aa10cf31564d47745cbc1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:47:27 +0100
Subject: [PATCH 24/96] 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 bf308f1a7..93092cfb1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1207,3 +1207,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 606b759600a87a6fdc6888d9d8c303c9887c102b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:50:19 +0100
Subject: [PATCH 25/96] 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 93092cfb1..915926e6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1238,3 +1238,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 10fe143c8b473dfc940b16d0a2431a1e823fbb7b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:51:50 +0100
Subject: [PATCH 26/96] 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 915926e6f..e710efc2f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1256,3 +1256,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 cd23644b7a2bdbf6f3e534f020a1a8f0cfa77923 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:53:24 +0100
Subject: [PATCH 27/96] 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 e710efc2f..7328004a0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #: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 curl))
@@ -1281,3 +1282,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 d7b0b452257858be192969a25d681bf56f6f0890 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:55:04 +0100
Subject: [PATCH 28/96] 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 7328004a0..5418ee235 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -47,6 +47,8 @@
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -1313,3 +1315,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 80293eb1f67ef170cd60e7efe6f75178189b9c72 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:17:09 +0100
Subject: [PATCH 29/96] 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 5418ee235..3856af1e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1350,3 +1350,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 85d1098e2b52cc8d94f18c0d1a6e22a7219e1bfb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:01 +0100
Subject: [PATCH 30/96] 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 3856af1e9..13d9b488d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1380,3 +1380,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 aaeb0473a32db2cc1e40893f0141a0e9d9f680cb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:53 +0100
Subject: [PATCH 31/96] 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 13d9b488d..1301bcb6d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1406,3 +1406,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 d5098e231ec7a7856ccce455d7fc1fd8d9e4e001 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:21:52 +0100
Subject: [PATCH 32/96] 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 1301bcb6d..21859ea90 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1437,3 +1437,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 26bf2c96c001c86554b9cb975ff987011831a6d4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:22:48 +0100
Subject: [PATCH 33/96] 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 21859ea90..33dc8d114 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1463,3 +1463,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 d837791b709729ec63c55ad3e94695659184905b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:24:17 +0100
Subject: [PATCH 34/96] 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 33dc8d114..48583e8c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1489,3 +1489,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 2517b4637f27670e4a98cd799ffea7960bc46a33 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:25:08 +0100
Subject: [PATCH 35/96] 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 48583e8c0..a4b129f42 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1513,3 +1513,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 edac3a2200d9b7d40522575c67af088533f5e7b4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:35:16 +0100
Subject: [PATCH 36/96] 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 a4b129f42..0c8b188ca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1544,3 +1544,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 29e6c389086453da4ca993db3cb3f31ba460b4cb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:36:12 +0100
Subject: [PATCH 37/96] 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 0c8b188ca..a695d4a5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1571,3 +1571,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 b2691e4a3d7a2278dabc443751f8356a058b41f5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:38:32 +0100
Subject: [PATCH 38/96] 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 a695d4a5e..7d86fc2a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1597,3 +1597,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 137d9d5a4516f134836eb16d6ff6bb5de9cf8faa Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:39:42 +0100
Subject: [PATCH 39/96] gnu: Add ocamlify

* gnu/packages/ocaml.scm (ocamlify): 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 7d86fc2a7..44329e1da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1626,3 +1626,20 @@ 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 (ocaml-forge-origin name version 1209
+               "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 fc1100863b4c96c9822071fbae3c1b4b67170ef0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:40:45 +0100
Subject: [PATCH 40/96] 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 3e8517117..ba38f9d43 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -755,6 +755,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 44329e1da..bea104f37 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1643,3 +1643,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 1c1b0a31301995b3f5adf5c8d2e473a553a9061d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 2 Jan 2017 12:42:29 +0100
Subject: [PATCH 41/96] gnu: Add ocaml-batteries

* gnu/packages/ocaml.scm (ocaml-batteries): 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 bea104f37..2975004b0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1684,3 +1684,25 @@ 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 (ocaml-forge-origin "batteries" version 1650
+              "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 df361fb2892136c35813d1c8b6c44cbf64e61998 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:46:48 +0100
Subject: [PATCH 42/96] 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 2975004b0..09017211c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -52,6 +52,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 time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -1706,3 +1707,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 7592434f00904a321a71f4d7088f4b28255eca4e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:48:37 +0100
Subject: [PATCH 43/96] gnu: Add ocaml-expect

* gnu/packages/ocaml.scm (ocaml-expect): 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 09017211c..337e66aff 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1729,3 +1729,20 @@ 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 (ocaml-forge-origin name version 1372
+              "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 51178ed56b987577d870665d04863344832e1d3b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:50:33 +0100
Subject: [PATCH 44/96] gnu: Add ocaml-fileutils

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 337e66aff..a45a745cc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1746,3 +1746,17 @@ 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 (ocaml-forge-origin name version 1651
+              "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 900a5ef2956c25d052534972dd9f7f3e1b6e9f00 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 13:06:40 +0100
Subject: [PATCH 45/96] gnu: Add ocaml-oasis

* gnu/packages/ocaml.scm (ocaml-oasis): 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 a45a745cc..158b99ea2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1760,3 +1760,28 @@ 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 (ocaml-forge-origin "oasis" version 1669
+               "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 eb426c90d2ba9380a279ac6c3abdf74a4629ceff Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:26:27 +0100
Subject: [PATCH 46/96] 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                             | 43 ++++++++++++++++++++++
 .../patches/ocaml-janestreet-fix-libdir.patch      | 36 ++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ba38f9d43..0b879c367 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -755,6 +755,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 158b99ea2..e30c3a6ef 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -69,6 +69,30 @@
                         ".tar.gz"))
     (sha256 (base32 hash))))
 
+;; 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"))))
+
+;; 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")
@@ -1785,3 +1809,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 65dfc04ded665c20a8e929be4ab521c530d6081a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:27:27 +0100
Subject: [PATCH 47/96] 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 e30c3a6ef..1e6a34e44 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1828,3 +1828,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 7b55fd5f38c3bdf4aeb6c2cb1e668851c9c37575 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:28:46 +0100
Subject: [PATCH 48/96] 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 1e6a34e44..1dad83fe7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1848,3 +1848,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 66fce38f1980d38ff56b0b18f4f6cd8b23abcd0e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:30:46 +0100
Subject: [PATCH 49/96] 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 1dad83fe7..3a9a8de13 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1865,3 +1865,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 98e0fc2c7b3cf9d0c4794fb95cb799e6dc04cae1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:32:14 +0100
Subject: [PATCH 50/96] 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 3a9a8de13..78bd4db6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1887,3 +1887,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 ebce0d5792b48f12af807cdee2cebe1d95af015c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:34:09 +0100
Subject: [PATCH 51/96] 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 78bd4db6f..58fd0eb0c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1906,3 +1906,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 cca80471efcc3ec990412f573d3b2a833f7c9bf2 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:35:13 +0100
Subject: [PATCH 52/96] 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 58fd0eb0c..ae7218a92 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1930,3 +1930,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 7f83657422d776259d7605b60c64571728ff1d99 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:36:30 +0100
Subject: [PATCH 53/96] 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 ae7218a92..cb5f20f6e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1957,3 +1957,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 cecf207080403e83a13c60068b6bd32770666b12 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:15:44 +0100
Subject: [PATCH 54/96] 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 cb5f20f6e..f8ede85dc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1991,3 +1991,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 53b1e23ed6dbe10a94b6b9b9506dd8d010aec48b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:17:09 +0100
Subject: [PATCH 55/96] 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 f8ede85dc..0d7e5eefb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2013,3 +2013,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 0f80277f2dcc3342a1bf6f84b19493b184019133 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:18:37 +0100
Subject: [PATCH 56/96] 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 0d7e5eefb..c028fa26c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2032,3 +2032,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 bb0a74b1c98966de7b6d2799f711b166262ed0a4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:19:40 +0100
Subject: [PATCH 57/96] 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 c028fa26c..369e1f769 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2052,3 +2052,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 2f3dd883b445096617acd11b4f988db9e665dcba Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:21:17 +0100
Subject: [PATCH 58/96] 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 369e1f769..993007484 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2077,3 +2077,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 7b88144ef5c8198a295e9206ddcb216bebbd7e59 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:22:46 +0100
Subject: [PATCH 59/96] 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 993007484..cee7e9321 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2093,3 +2093,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 1f9001250bf711573c2ecb3cd66ba74ed8770b09 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:23:34 +0100
Subject: [PATCH 60/96] 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 cee7e9321..eabfbb541 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2108,3 +2108,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 797b9c6a91138fadcb6f0e9c45933865d517267e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:25:45 +0100
Subject: [PATCH 61/96] 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 eabfbb541..e82e29326 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2123,3 +2123,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 7bb1df27db53bce6babbac24745a9752692dfb8b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:27:10 +0100
Subject: [PATCH 62/96] 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 e82e29326..d6af72d78 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2144,3 +2144,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 4a49178d089bf0a4f5f5eb67dd68e88909a2e645 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:28:31 +0100
Subject: [PATCH 63/96] 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 d6af72d78..911fd24e0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2165,3 +2165,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 9d3de384479773d8bb7c4cb1653427a73301e4b1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:30:07 +0100
Subject: [PATCH 64/96] gnu: Add ocaml-ppx-assert

* gnu/packages/ocaml.scm (ocaml-ppx-assert): 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 911fd24e0..b46ace7c2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2182,3 +2182,26 @@ 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 (janestreet-origin "ppx_assert" version
+              "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
+    (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 c276db92cc817fcaedfba87c8c5dda0b39ba1f6b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:32:14 +0100
Subject: [PATCH 65/96] 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 b46ace7c2..e9913fa1f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2205,3 +2205,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 dcef5dd6cacd122fbb322c50380f41b43543c601 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:36:47 +0100
Subject: [PATCH 66/96] 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 e9913fa1f..988fa5b98 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2225,3 +2225,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 e7c122071479aa4327407c6c9caeede4dd659958 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:38:28 +0100
Subject: [PATCH 67/96] 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 988fa5b98..d771814a3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2243,3 +2243,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 ea316d26084245c0b8fd95750610ca0f827a0ddf Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:39:43 +0100
Subject: [PATCH 68/96] 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 d771814a3..a27bd62fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2262,3 +2262,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 b4c15049bee7ec4d6701256da9c45492b4b103bc Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:41:17 +0100
Subject: [PATCH 69/96] 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 a27bd62fa..3b485a976 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2283,3 +2283,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 4e1ae6d2bd3b88cb6f42c55f57e75738982e34d0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:42:49 +0100
Subject: [PATCH 70/96] 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 3b485a976..f1e9d5eb4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2302,3 +2302,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 cedde2a606d95f2ad6078d6b6241c7308be926ef Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:44:07 +0100
Subject: [PATCH 71/96] 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 f1e9d5eb4..cb0b0af5a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2322,3 +2322,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 a34216ca698dd550587a4d331ce55a01e5ad0bb1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:46:28 +0100
Subject: [PATCH 72/96] 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 cb0b0af5a..4329d51fc 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2342,3 +2342,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 8c071ae619ef8085eaf04f029bf78b480b72733c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:48:38 +0100
Subject: [PATCH 73/96] 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 4329d51fc..7c10492d7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2362,3 +2362,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 c78ab8db1d41846e4827d4d932970fd55130fd61 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:17:35 +0100
Subject: [PATCH 74/96] 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 7c10492d7..00eae8e7e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2385,3 +2385,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 f68ca287fd39d0be6df027a24a3c6712118f8b43 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:20:17 +0100
Subject: [PATCH 75/96] 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 00eae8e7e..7ad1460c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2408,3 +2408,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 fb7b087bab0f5b9aa9fd69ad350a02dc268726d4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:28:18 +0100
Subject: [PATCH 76/96] 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 7ad1460c0..744fb1a4a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2431,3 +2431,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 c796182e8b1d4f8e08d910265ae723887e50f5a4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:31:00 +0100
Subject: [PATCH 77/96] 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 744fb1a4a..c9537be14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2464,3 +2464,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 4b089426372d03caff51b060c0a7cdcd118feb04 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:38:35 +0100
Subject: [PATCH 78/96] 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 c9537be14..36f4654e2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2498,3 +2498,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 f66cdb105b00f2079ad63fba263ac5882d7c35ca Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:55:06 +0100
Subject: [PATCH 79/96] 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 36f4654e2..82f4d2678 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2528,3 +2528,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 08c884015a24046720c84fc3fdabdc98f79e39ed Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:59:46 +0100
Subject: [PATCH 80/96] 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 82f4d2678..9ab3f5b1a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2546,3 +2546,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 15cd044577bc7f1ee1354ca78a03b45654141aba Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:35:16 +0100
Subject: [PATCH 81/96] 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 9ab3f5b1a..16cda44b7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2564,3 +2564,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 65ab7f6e1788bb0666571cdb5c49aabe1f2330c8 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:42:52 +0100
Subject: [PATCH 82/96] 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 16cda44b7..7493abb15 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2583,3 +2583,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 f7c782f5f48842c58d1c8eeb77ac0ec262504845 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:48:42 +0100
Subject: [PATCH 83/96] 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 7493abb15..aa2b757f1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2602,3 +2602,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 e19e1505b10b333cd5d02bdac7ac3c30465b7ade Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:52:44 +0100
Subject: [PATCH 84/96] 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 aa2b757f1..50e028bf7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2622,3 +2622,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 b1f518196ac189f2485c822c032b64a1adb0fd26 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:57:33 +0100
Subject: [PATCH 85/96] 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 50e028bf7..ab2197c0c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2640,3 +2640,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 e448b308c8da2903078555475bb550ca4df77902 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:00:38 +0100
Subject: [PATCH 86/96] 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 ab2197c0c..4a861bcd7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2661,3 +2661,30 @@ and bigarrays, based on new primitives added in version 4.01. It works on
 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
 big- and little-endian, with their unsafe counter-parts.")
     (license license:lgpl2.1)))
+
+(define-public ocaml-cstruct
+  (package
+    (name "ocaml-cstruct")
+    (version "2.3.1")
+    (home-page "https://github.com/mirage/ocaml-cstruct/")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append home-page "/archive/v" version ".tar.gz"))
+        (sha256 (base32
+                  "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))))
+    (build-system ocaml-build-system)
+    (arguments `(#:configure-flags
+                 (list "--enable-lwt" "--enable-async")))
+    (native-inputs `(("ounit" ,ocaml-ounit)
+                     ("ppx-tools" ,ocaml-ppx-tools)
+                     ("camlp4" ,camlp4)))
+    (propagated-inputs `(("ocplib-endian" ,ocaml-ocplib-endian)
+                         ("lwt" ,ocaml-lwt)
+                         ("async" ,ocaml-async)
+                         ("sexplib" ,ocaml-sexplib)))
+    (synopsis "Access C structures via a camlp4 extension")
+    (description "Cstruct is a library and syntax extension to make it easier
+to access C-like structures directly from OCaml.  It supports both reading and
+writing to these structures, and they are accessed via the Bigarray module.")
+    (license license:isc)))
-- 
2.11.0

From 44fce09265492aa3cd9309056794f8eae892b3f9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:07:38 +0100
Subject: [PATCH 87/96] 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 4a861bcd7..9b9b3aa32 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2688,3 +2688,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 1e9e954f5dfeec34280c69ca04dc6df6b597ff8d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:11:28 +0100
Subject: [PATCH 88/96] 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 9b9b3aa32..b4b506f8e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2705,3 +2705,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 1392067954e72e91d76874168e11a17cb3abee2c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:19:32 +0100
Subject: [PATCH 89/96] 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 b4b506f8e..5d7e994f7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2733,3 +2733,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 1566e41a526d33dafcf47c290733b0b081d1731b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:22:35 +0100
Subject: [PATCH 90/96] 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 5d7e994f7..40e285820 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2755,3 +2755,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 32c884fbea9090c698e867cbc250144b22898eb7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:25:17 +0100
Subject: [PATCH 91/96] 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 40e285820..ed24aa526 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2775,3 +2775,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 34b7c209140ff63792dab7eff2b925964d6678e9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:32:20 +0100
Subject: [PATCH 92/96] 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                             | 38 +++++++++++++++++
 .../patches/ocaml-piqilib-fix-makefile.patch       | 47 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0b879c367..ba04b9648 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -757,6 +757,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 ed24aa526..68e941cc9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2800,3 +2800,41 @@ 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"))))))
+       (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 6c0e33f5646dcabf0f4dfec8f530c9f3ac4555ab Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:46:19 +0100
Subject: [PATCH 93/96] 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 68e941cc9..13ab37491 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2838,3 +2838,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 2b6b91044e510a4965f80f33cb7c71f3b2d077e4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:35:04 +0100
Subject: [PATCH 94/96] 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 ba04b9648..642334779 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -758,6 +758,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 13ab37491..9b13c22b6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2864,3 +2864,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 b4eb03ea35ab2a7801435280457ddf4f9e163e8f Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:57:25 +0100
Subject: [PATCH 95/96] 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 9b13c22b6..30dcb58a9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -53,6 +53,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -2891,3 +2892,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 a634f0b9618aff0eabe7c9f73937d620ef0506c9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:59:12 +0100
Subject: [PATCH 96/96] gnu: Add bap

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 30dcb58a9..227f6f9f5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages libevent)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -2922,3 +2923,59 @@ 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.0.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
+            "1apfzxndysy92bz5g0dslfmfcqhkpxlfihjbkcsrxbk3gwha42bg"))))
+   (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 `(#: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")))))))
+   (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


^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-03 20:21   ` Julien Lepiller
@ 2017-01-03 20:27     ` David Craven
  0 siblings, 0 replies; 119+ messages in thread
From: David Craven @ 2017-01-03 20:27 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

> Here is the complete patchset so you can apply it locally with git am <
> ocaml.patchset. I hope that's enough.

Thanks! Applied beautifully.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge.
  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
  0 siblings, 0 replies; 119+ messages in thread
From: David Craven @ 2017-01-04 13:38 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

+      (ocaml-forge-origin name version 1627
+        "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))

I changed this to be ocaml-forge-uri.

There are multiple reasons why I think it's a better idea:

* if one ever writes an ocaml updater then it can use the existing
code to update the hash.
* the hash is checked at compile time to be a correct base32 hash
(when running make). This is because base32 is implemented as a syntax
rule.
* it's consistent with what other packages do.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 08/96] gnu: Add ocaml-ounit.
  2017-01-03 19:10 ` [PATCH 08/96] gnu: Add ocaml-ounit Julien Lepiller
@ 2017-01-04 13:55   ` David Craven
  0 siblings, 0 replies; 119+ messages in thread
From: David Craven @ 2017-01-04 13:55 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

Looks like the license is expat.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  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
  0 siblings, 1 reply; 119+ messages in thread
From: David Craven @ 2017-01-04 15:00 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

+    (arguments `(#:phases (modify-phases %standard-phases (delete 'check))))

The standard way of doing this is with #:tests? #f.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 15:00   ` David Craven
@ 2017-01-04 16:57     ` julien lepiller
  2017-01-04 17:35       ` David Craven
  0 siblings, 1 reply; 119+ messages in thread
From: julien lepiller @ 2017-01-04 16:57 UTC (permalink / raw)
  To: guix-devel

Le 2017-01-04 16:00, David Craven a écrit :
> +    (arguments `(#:phases (modify-phases %standard-phases (delete 
> 'check))))
> 
> The standard way of doing this is with #:tests? #f.

The thing is tests are passed during 'build. This is activated by the 
--enable-tests argument, that is enabled by #:tests? #t. This is only to 
disable passing tests twice. With #:tests? #f, no test is run. So, what 
should we do? Maybe change ocaml-build-system to have #:tests? only 
modify the phases, and not the configure argument, and having a 
separated #:test-argument? to add the argument to configure?

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 16:57     ` julien lepiller
@ 2017-01-04 17:35       ` David Craven
  2017-01-04 17:55         ` David Craven
  2017-01-04 21:02         ` Ludovic Courtès
  0 siblings, 2 replies; 119+ messages in thread
From: David Craven @ 2017-01-04 17:35 UTC (permalink / raw)
  To: julien lepiller; +Cc: guix-devel

> The thing is tests are passed during 'build. This is activated by the --enable-tests argument, that is enabled by #:tests? #t.

Ah I see. Then it makes sense. I was a bit hasty with this. I already
pushed the first 20 packages. Sorry about that, I'll change it back.

If you take a little more care with the commit message conventions and
coding style, we might be able to convince Ludo to give you commit
access, since you are clearly our local ocaml expert :)

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 17:35       ` David Craven
@ 2017-01-04 17:55         ` David Craven
  2017-01-04 18:19           ` David Craven
  2017-01-04 21:02         ` Ludovic Courtès
  1 sibling, 1 reply; 119+ messages in thread
From: David Craven @ 2017-01-04 17:55 UTC (permalink / raw)
  To: julien lepiller; +Cc: guix-devel

> If you take a little more care with the commit message conventions and
> coding style, we might be able to convince Ludo to give you commit
> access, since you are clearly our local ocaml expert :)

Not that I have any say in this and apologize if I'm overstepping...

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 17:55         ` David Craven
@ 2017-01-04 18:19           ` David Craven
  2017-01-15 13:14             ` Julien Lepiller
  0 siblings, 1 reply; 119+ messages in thread
From: David Craven @ 2017-01-04 18:19 UTC (permalink / raw)
  To: julien lepiller; +Cc: guix-devel

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

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: patchset.patch --]
[-- Type: text/x-patch, Size: 149049 bytes --]

From 66b3497e7f2e524667000cb720f03c9b5945ecf5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:45:15 +0100
Subject: [PATCH 01/75] 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 25c081578..cc8630b5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1212,3 +1212,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 bc586d1fa020a9db8252429bb718efe43d1b3827 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:46:33 +0100
Subject: [PATCH 02/75] 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 cc8630b5e..d35461163 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1239,3 +1239,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 ab776c0511348c6441d29e36abace0e988fec1e3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:47:27 +0100
Subject: [PATCH 03/75] 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 d35461163..abb94349e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1268,3 +1268,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 2c829a338d467770a037263166b6080bd6eac1dc Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:50:19 +0100
Subject: [PATCH 04/75] 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 abb94349e..c33b6b921 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1299,3 +1299,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 a5bc4fc60f596fdd6a5df6fec05a8c4662e4588e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:51:50 +0100
Subject: [PATCH 05/75] 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 c33b6b921..a257d56ef 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1317,3 +1317,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 8b7eba9e6878e8409385b362ed24ba72bbe6d97a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:53:24 +0100
Subject: [PATCH 06/75] 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 a257d56ef..227e1ac25 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)
@@ -1342,3 +1343,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 a1308bc7a895d911dcec7e13bed48adc603fe3cb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 11:55:04 +0100
Subject: [PATCH 07/75] 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 227e1ac25..ccea601ec 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)
@@ -1374,3 +1376,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 890a9cc4d464eedb48830b0bee8dead9f5b2ba4a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:17:09 +0100
Subject: [PATCH 08/75] 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 ccea601ec..2b28eefe3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1411,3 +1411,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 4d0f4e0dcea5b1aa088e973c65d3e18fb362eef1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:01 +0100
Subject: [PATCH 09/75] 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 2b28eefe3..8b3b7aafe 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1441,3 +1441,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 55c03a000b291d6718b4778a1f2d7554785d4f9c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:20:53 +0100
Subject: [PATCH 10/75] 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 8b3b7aafe..27183344d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1467,3 +1467,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 20855502149ea5f2fb03906cba737febdf8e5f8c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:21:52 +0100
Subject: [PATCH 11/75] 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 27183344d..c9f4b0fa1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1498,3 +1498,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 14a43a7bcb224760f330e8650cfbe46a55e9fad0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:22:48 +0100
Subject: [PATCH 12/75] 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 c9f4b0fa1..437833940 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1524,3 +1524,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 776a31491a760b969f55842a8756bd648966700e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:24:17 +0100
Subject: [PATCH 13/75] 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 437833940..59e243328 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1550,3 +1550,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 3f8e63c468b8a417faea3dd4edc428dce88d8c3a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:25:08 +0100
Subject: [PATCH 14/75] 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 59e243328..66e070968 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1574,3 +1574,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 4fe1134b364941905bcfaba29df5888d4f67b9ac Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:35:16 +0100
Subject: [PATCH 15/75] 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 66e070968..42c6f5578 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1605,3 +1605,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 431c72b614d59cc8f437823f8f28799072f5e5e5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:36:12 +0100
Subject: [PATCH 16/75] 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 42c6f5578..7984870ec 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1632,3 +1632,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 9bc5970ec63916fe8b87a321c9a5ed54e05c7de1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:38:32 +0100
Subject: [PATCH 17/75] 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 7984870ec..dcb853564 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1658,3 +1658,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 901d56701270265049f253e14e436f2651e67873 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:39:42 +0100
Subject: [PATCH 18/75] gnu: Add ocamlify.

* gnu/packages/ocaml.scm (ocamlify): 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 dcb853564..526a204eb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1687,3 +1687,20 @@ 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 (ocaml-forge-origin name version 1209
+               "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 d153c82a1b757f3a88cb66159582dbb63baa28e2 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:40:45 +0100
Subject: [PATCH 19/75] 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 8feb13908..ac049f1a9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -756,6 +756,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 526a204eb..485662b6f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1704,3 +1704,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 4a2dff3f533c1403553cbeabe4b0ab85711e431d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 2 Jan 2017 12:42:29 +0100
Subject: [PATCH 20/75] gnu: Add ocaml-batteries.

* gnu/packages/ocaml.scm (ocaml-batteries): 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 485662b6f..99bb0d0fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1745,3 +1745,25 @@ 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 (ocaml-forge-origin "batteries" version 1650
+              "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 64daa0c67dc91789ef7d9cec2431c0ea3d02d9aa Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:46:48 +0100
Subject: [PATCH 21/75] 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 99bb0d0fa..a5f783b0b 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)
@@ -1767,3 +1768,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 e16d5547992bfb36fcea88389a0dfed4ecfd4b06 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:48:37 +0100
Subject: [PATCH 22/75] gnu: Add ocaml-expect.

* gnu/packages/ocaml.scm (ocaml-expect): 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 a5f783b0b..a5c1abcc9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1790,3 +1790,20 @@ 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 (ocaml-forge-origin name version 1372
+              "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 51c52a2cfffdd5b57500d1d6d403ff859a5f2af6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 12:50:33 +0100
Subject: [PATCH 23/75] gnu: Add ocaml-fileutils.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a5c1abcc9..145b46b86 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1807,3 +1807,17 @@ 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 (ocaml-forge-origin name version 1651
+              "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 4977237ca2ce117a33488b12bd7e38e11bf8b15c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 13:06:40 +0100
Subject: [PATCH 24/75] gnu: Add ocaml-oasis.

* gnu/packages/ocaml.scm (ocaml-oasis): 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 145b46b86..5fb6506db 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1821,3 +1821,28 @@ 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 (ocaml-forge-origin "oasis" version 1669
+               "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 6e77f79e96b465b16c3d6df8bbff925ce94a7c2b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:26:27 +0100
Subject: [PATCH 25/75] 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                             | 43 ++++++++++++++++++++++
 .../patches/ocaml-janestreet-fix-libdir.patch      | 36 ++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-janestreet-fix-libdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ac049f1a9..6290a5f7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -756,6 +756,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 5fb6506db..979388558 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -66,6 +66,30 @@
                  (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"))))
+
+;; 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")
@@ -1846,3 +1870,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 1f03575f1a99b7d1c830eb93ece0a573e4ad96a3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:27:27 +0100
Subject: [PATCH 26/75] 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 979388558..7c1cb4673 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1889,3 +1889,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 29b36f4d0c29a3be21eeae807741f2550bd5066c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:28:46 +0100
Subject: [PATCH 27/75] 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 7c1cb4673..0fd522226 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1909,3 +1909,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 c51da6a331f9a92be198c6b14187e0d614308598 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:30:46 +0100
Subject: [PATCH 28/75] 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 0fd522226..be2bce987 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1926,3 +1926,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 8e4da48b38530941ad79b135395e84ec7581ac33 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:32:14 +0100
Subject: [PATCH 29/75] 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 be2bce987..954422d73 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1948,3 +1948,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 83620c2fe2a0df4214b8b18b710d8be4771e16a3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:34:09 +0100
Subject: [PATCH 30/75] 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 954422d73..8b6652fb4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1967,3 +1967,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 15fd5d4384519ba6df6b159a0228585ce9894920 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:35:13 +0100
Subject: [PATCH 31/75] 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 8b6652fb4..bb8a99de3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1991,3 +1991,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 962c5c28b00c7864cc97915893e920406518a198 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 16:36:30 +0100
Subject: [PATCH 32/75] 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 bb8a99de3..462717fa2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2018,3 +2018,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 d62c65b0c50d4efeb16b3b4a0f47dc1bfc28e3e0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:15:44 +0100
Subject: [PATCH 33/75] 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 462717fa2..393b62af9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2052,3 +2052,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 952235d9e2d3cffdb33b9bec35ade323a77bcf65 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:17:09 +0100
Subject: [PATCH 34/75] 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 393b62af9..179d60667 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2074,3 +2074,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 a7c4c3fcb7068d43317b4ec13b154ee49d9d7a7b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:18:37 +0100
Subject: [PATCH 35/75] 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 179d60667..28d2c2534 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2093,3 +2093,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 19066c92c27cfa656da22d0c64f7258bc578ad67 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:19:40 +0100
Subject: [PATCH 36/75] 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 28d2c2534..49a207fbb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2113,3 +2113,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 c6f7ce7d3c86d1fcbd70f830332607be4d9abff0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:21:17 +0100
Subject: [PATCH 37/75] 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 49a207fbb..36f437525 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2138,3 +2138,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 7bceb6b9291a1ec4ca2baa97016b7221dbbd7e5c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:22:46 +0100
Subject: [PATCH 38/75] 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 36f437525..297b9c2bf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2154,3 +2154,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 63b46d76c38bdedc8af3cad9f390562d2f42684e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:23:34 +0100
Subject: [PATCH 39/75] 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 297b9c2bf..ad5a04a14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2169,3 +2169,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 fc1247b1b53e1c42deb2c36d2179e997352c0dbc Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:25:45 +0100
Subject: [PATCH 40/75] 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 ad5a04a14..3be50bba3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2184,3 +2184,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 f94141ccc7e85b943fcb23f147e4bebfe3dacc72 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:27:10 +0100
Subject: [PATCH 41/75] 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 3be50bba3..aa1482ebd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2205,3 +2205,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 ba9352cfa305f84382e6ed0ec58a233c4bbff808 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:28:31 +0100
Subject: [PATCH 42/75] 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 aa1482ebd..c7a1f9295 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2226,3 +2226,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 21f64af019d2165a9e77054753b58c87b36f223e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:30:07 +0100
Subject: [PATCH 43/75] gnu: Add ocaml-ppx-assert.

* gnu/packages/ocaml.scm (ocaml-ppx-assert): 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 c7a1f9295..138249c6a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2243,3 +2243,26 @@ 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 (janestreet-origin "ppx_assert" version
+              "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
+    (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 d8a9232fe3f9ac662fba372dc80fa3484dffe348 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:32:14 +0100
Subject: [PATCH 44/75] 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 138249c6a..d9825bc14 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2266,3 +2266,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 a1fc4a43e52f6a10bf07b95f1c7750ba3197e705 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:36:47 +0100
Subject: [PATCH 45/75] 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 d9825bc14..8bb769801 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2286,3 +2286,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 c603bc8535549cb2307a5ca27f1eddb1e79de9e9 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:38:28 +0100
Subject: [PATCH 46/75] 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 8bb769801..a13b8bf2b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2304,3 +2304,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 ba19b69188d0017d226324ebe360b8e545c4c23e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:39:43 +0100
Subject: [PATCH 47/75] 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 a13b8bf2b..89155ee0b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2323,3 +2323,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 a886dff3ac4348f0829ea4e90ae9d77dda3ad89b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:41:17 +0100
Subject: [PATCH 48/75] 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 89155ee0b..0731521f1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2344,3 +2344,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 344a21bb6fb0efbf789c4da7db768f0b24fc5c8f Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:42:49 +0100
Subject: [PATCH 49/75] 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 0731521f1..ce28cf0f3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2363,3 +2363,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 e05693b2660ed96dd6ef3a8c24dc25de83d12f67 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:44:07 +0100
Subject: [PATCH 50/75] 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 ce28cf0f3..207a53b63 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2383,3 +2383,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 382ac9460c5eaf419cc65d15e98cb4647cda71e3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:46:28 +0100
Subject: [PATCH 51/75] 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 207a53b63..af07acc97 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2403,3 +2403,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 c4df2ef5b3fb6eabea5f195a85ac3c3cd762a9f6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 19:48:38 +0100
Subject: [PATCH 52/75] 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 af07acc97..9229b1024 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2423,3 +2423,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 6f6c9fe437e400ac672294c95ed86b277437cc95 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:17:35 +0100
Subject: [PATCH 53/75] 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 9229b1024..e6cbb5603 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2446,3 +2446,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 590260d4934c0ea6b0048086b12f8c685cc098ff Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:20:17 +0100
Subject: [PATCH 54/75] 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 e6cbb5603..a2d0334c1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2469,3 +2469,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 4d2a3c3f1c5dae832a43672189109c60a5ee98f7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:28:18 +0100
Subject: [PATCH 55/75] 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 a2d0334c1..d4de1c05d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2492,3 +2492,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 a7517905a95b79dd223dc5cd69d66840f7cc9d19 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:31:00 +0100
Subject: [PATCH 56/75] 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 d4de1c05d..2f46d40c4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2525,3 +2525,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 004405ff5b06c820bc29b6b8576c7e6129598927 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:38:35 +0100
Subject: [PATCH 57/75] 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 2f46d40c4..db07df1a5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2559,3 +2559,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 55992de146f9b051e3ab445520e08c71880a3dcf Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:55:06 +0100
Subject: [PATCH 58/75] 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 db07df1a5..a23f44288 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2589,3 +2589,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 6a641f4a6a6fb8a96e319a2c00ddebd0409c66c5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 20:59:46 +0100
Subject: [PATCH 59/75] 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 a23f44288..00d3120e7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2607,3 +2607,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 41a6af0c9cd3fe4d6408e179a68b9d1d07f178f3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:35:16 +0100
Subject: [PATCH 60/75] 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 00d3120e7..9425e0eb4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2625,3 +2625,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 7b7decf073766d5aca7fbaafe173a55c3b01acce Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:42:52 +0100
Subject: [PATCH 61/75] 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 9425e0eb4..e93016393 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2644,3 +2644,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 fcfb11f8b50327ff0614a4c12e47c2f3d4746f65 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:48:42 +0100
Subject: [PATCH 62/75] 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 e93016393..9cdc66a4a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2663,3 +2663,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 b3c9d403207988996745142b669d98a14874aa38 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:52:44 +0100
Subject: [PATCH 63/75] 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 9cdc66a4a..669142f02 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2683,3 +2683,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 ed72c52df0d5b37dc3a4fe70e286e6531abf19b0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 22:57:33 +0100
Subject: [PATCH 64/75] 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 669142f02..047779fe7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2701,3 +2701,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 9db4d4a0d093387696f9a0a73ad4c11e04073f79 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:00:38 +0100
Subject: [PATCH 65/75] 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 047779fe7..b86a26a02 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2722,3 +2722,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 9893349c470e40b258deebef213f972dd7b63fbb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:07:38 +0100
Subject: [PATCH 66/75] 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 b86a26a02..7f7915d1f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2749,3 +2749,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 010c041aeeb6a9da6a54f66602de8e2daf7a835d Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:11:28 +0100
Subject: [PATCH 67/75] 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 7f7915d1f..5683f9a93 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2766,3 +2766,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 6d04b9ee784ba19b753f3dd5726a29bcfcdf2410 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:19:32 +0100
Subject: [PATCH 68/75] 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 5683f9a93..a73e1d86b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2794,3 +2794,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 bf621fdc249bf9bb0887a40f96152bd3adb2ab34 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:22:35 +0100
Subject: [PATCH 69/75] 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 a73e1d86b..076c2dcec 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2816,3 +2816,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 5a5f4f00c4dc84a734947fca315ef3173f5955eb Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:25:17 +0100
Subject: [PATCH 70/75] 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 076c2dcec..8c8009aa7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2836,3 +2836,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 2b7fb6d3e2c7a1d95a709b917111129bcbf8f159 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:32:20 +0100
Subject: [PATCH 71/75] 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                             | 38 +++++++++++++++++
 .../patches/ocaml-piqilib-fix-makefile.patch       | 47 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-piqilib-fix-makefile.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6290a5f7f..2441f3ad5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -758,6 +758,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 8c8009aa7..7f9699ca5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2861,3 +2861,41 @@ 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"))))))
+       (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 78f1bdf55d1fba7f866233a803c2c09829283e6c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:46:19 +0100
Subject: [PATCH 72/75] 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 7f9699ca5..3515e3ec8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2899,3 +2899,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 07c1321259269970918abee5cc1e341a4e2ce4d2 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 30 Dec 2016 23:35:04 +0100
Subject: [PATCH 73/75] 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 2441f3ad5..6509b2bef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -759,6 +759,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 3515e3ec8..b8b903f97 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2925,3 +2925,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 ab0c30c903f682f0bfef7cb2a862da11a4ea22b4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:57:25 +0100
Subject: [PATCH 74/75] 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 b8b903f97..03f46f387 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)
@@ -2952,3 +2953,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 5186f1e8f778da593ab03998e23b56afd05978cc Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 31 Dec 2016 10:59:12 +0100
Subject: [PATCH 75/75] gnu: Add bap.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 03f46f387..d574d3558 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)
@@ -2983,3 +2984,59 @@ 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.0.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
+            "1apfzxndysy92bz5g0dslfmfcqhkpxlfihjbkcsrxbk3gwha42bg"))))
+   (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 `(#: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")))))))
+   (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


^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
                   ` (96 preceding siblings ...)
  2017-01-03 19:46 ` [PATCH 00/96] ocaml-build-system and packages David Craven
@ 2017-01-04 20:57 ` Ludovic Courtès
  2017-01-25 17:58   ` Ludovic Courtès
  97 siblings, 1 reply; 119+ messages in thread
From: Ludovic Courtès @ 2017-01-04 20:57 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

Hello!

Julien Lepiller <julien@lepiller.eu> skribis:

> Hi, it's a bit late for christmas, so let's call this ocamlismas ;).
>
> Here are ~100 patches that:
>
> - Add an ocaml-build-system
> - Change the ocaml compiler, camlp4 and findlib to work nicely with it
> - A lot of packages (all dependencies of bap, and bap itself).

Woow, congrats!

> I took one patch from debian to help the compiler produce reproducible binaries.
> Without this patch some modules would embed temporary file names. A few packages
> also had reproducibility issues, but that is fixed, except for one of them.

Great that you checked that too!

Unless someone explicitly asks for help, I’ll let David Craven handle it
since he’s more in OCaml than I am AFAICT.

Do you have an OPAM importer for this?  We should probably consider
adding one and an updater as well.  :-)

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 17:35       ` David Craven
  2017-01-04 17:55         ` David Craven
@ 2017-01-04 21:02         ` Ludovic Courtès
  2017-01-04 21:45           ` Leo Famulari
  1 sibling, 1 reply; 119+ messages in thread
From: Ludovic Courtès @ 2017-01-04 21:02 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

Hello!

David Craven <david@craven.ch> skribis:

> If you take a little more care with the commit message conventions and
> coding style, we might be able to convince Ludo to give you commit
> access, since you are clearly our local ocaml expert :)

Sounds like a good idea to me!

Julien: could you create a Savannah account and upload the OpenPGP key
that you’re going to use to sign commits?

Like Dave suggest, you’re welcome to take another look at the commit log
conventions and all that, I think you’re almost there.  ;-)

  https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 21:02         ` Ludovic Courtès
@ 2017-01-04 21:45           ` Leo Famulari
  0 siblings, 0 replies; 119+ messages in thread
From: Leo Famulari @ 2017-01-04 21:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Wed, Jan 04, 2017 at 10:02:29PM +0100, Ludovic Courtès wrote:
> Hello!
> 
> David Craven <david@craven.ch> skribis:
> 
> > If you take a little more care with the commit message conventions and
> > coding style, we might be able to convince Ludo to give you commit
> > access, since you are clearly our local ocaml expert :)
> 
> Sounds like a good idea to me!
> 
> Julien: could you create a Savannah account and upload the OpenPGP key
> that you’re going to use to sign commits?
> 
> Like Dave suggest, you’re welcome to take another look at the commit log
> conventions and all that, I think you’re almost there.  ;-)
> 
>   https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html

And make sure to read 'HACKING'! :)

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 09/96] gnu: Add camlzip
  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
  0 siblings, 1 reply; 119+ messages in thread
From: Ben Woodcroft @ 2017-01-08 12:16 UTC (permalink / raw)
  To: Julien Lepiller, guix-devel

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

Hi Julien,

Thanks for all your efforts in this patch series - impressive stuff, and 
thanks to David for reviewing them.

On 04/01/17 05:10, Julien Lepiller wrote:
[...]
> +    (arguments `(#:phases
> +                 (modify-phases %standard-phases
> +                   (delete 'configure)
> +                   (add-before 'install 'fix-install-name
> +                     (lambda* (#:key #:allow-other-keys)
> +                       (substitute* "Makefile"
> +                         (("install zip") "install camlzip")))))
Can I ask if this substitution is necessary? I have a downstream OCaml 
package (pplacer) which is failing to compile because of it (though with 
OCaml 4.01.0).

I've attached my unpolished, convoluted patch series to get to pplacer, 
for reference.

Thanks, ben.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pplacer_series.patch --]
[-- Type: text/x-patch; name="pplacer_series.patch", Size: 32871 bytes --]

From 8151b508dc3550bde6ad00d9997f16673999b5b2 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Mon, 2 Jan 2017 17:18:59 +1000
Subject: [PATCH 01/13] gnu: Add ocaml-4.01.

* gnu/packages/ocaml.scm (ocaml-4.01): 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 93020f1c0..de15926ca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -167,6 +168,36 @@ functional, imperative and object-oriented styles of programming.")
     ;; distributed under lgpl2.0.
     (license (list license:qpl license:lgpl2.0))))
 
+(define-public ocaml-4.01
+  (package
+    (inherit ocaml)
+    (version "4.01.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://caml.inria.fr/pub/distrib/ocaml-"
+                    (version-major+minor version)
+                    "/ocaml-" version ".tar.xz"))
+              (sha256
+               (base32
+                "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ocaml)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'build
+             (lambda _
+               ;; Specifying '-j' at all causes the build to fail.
+               (zero? (system* "make" "world.opt"))))
+           (replace 'check
+             (lambda _
+               (with-directory-excursion "testsuite"
+                 (zero? (system*
+                         "make"
+                         "all"
+                         (string-append
+                          "TOPDIR=" (getcwd) "/.."))))))))))))
+
 (define-public opam
   (package
     (name "opam")
-- 
2.11.0


From 544536c5ee33119fc9f8ed680aaa72b62e2228f5 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Mon, 2 Jan 2017 22:29:28 +1000
Subject: [PATCH 02/13] gnu: Add ocaml4.01-findlib.

* gnu/packages/ocaml.scm (ocaml4.01-findlib): New variable.
---
 gnu/packages/ocaml.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index de15926ca..4d0737797 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -793,6 +793,14 @@ compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
     (license license:x11)))
 
+(define-public ocaml4.01-findlib
+  (package
+    (inherit ocaml-findlib)
+    (name "ocaml4.01-findlib")
+    (native-inputs
+     `(("m4" ,m4)
+       ("ocaml" ,ocaml-4.01)))))
+
 ;; note that some tests may hang for no obvious reason.
 (define-public ocaml-ounit
   (package
-- 
2.11.0


From 22fd7a5a1fbe09416dd151db3fab5eb450e984bb Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Mon, 2 Jan 2017 22:23:34 +1000
Subject: [PATCH 03/13] build-system: Add package-with-ocaml4.01.

* guix/build-system/ocaml.scm (default-ocaml4.01, default-ocaml4.01-findlib,
package-with-explicit-ocaml, package-with-ocaml4.01,
strip-ocaml4.01-variant): New variables.
---
 guix/build-system/ocaml.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 91 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index f4f57b5ad..7fba1c261 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -15,7 +16,6 @@
 ;;;
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
-
 (define-module (guix build-system ocaml)
   #:use-module (guix store)
   #:use-module (guix utils)
@@ -25,7 +25,10 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
   #:use-module (ice-9 match)
+  #:use-module (srfi srfi-1)
   #:export (%ocaml-build-system-modules
+            package-with-ocaml4.01
+            strip-ocaml4.01-variant
             ocaml-build
             ocaml-build-system))
 
@@ -71,6 +74,93 @@
   (let ((module (resolve-interface '(gnu packages ocaml))))
     (module-ref module 'ocaml-findlib)))
 
+(define (default-ocaml4.01)
+  (let ((ocaml (resolve-interface '(gnu packages ocaml))))
+    (module-ref ocaml 'ocaml-4.01)))
+
+(define (default-ocaml4.01-findlib)
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml4.01-findlib)))
+
+(define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix
+                                       #:key variant-property)
+  "Return a procedure of one argument, P.  The procedure creates a package
+with the same fields as P, which is assumed to use OCAML-BUILD-SYSTEM, such
+that it is compiled with OCAML and FINDLIB instead.  The inputs are changed
+recursively accordingly.  If the name of P starts with OLD-PREFIX, this is
+replaced by NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name.
+
+When VARIANT-PROPERTY is present, it is used as a key to search for
+pre-defined variants of this transformation recorded in the 'properties' field
+of packages.  The property value must be the promise of a package.  This is a
+convenient way for package writers to force the transformation to use
+pre-defined variants."
+  (define transform
+    ;; Memoize the transformations.  Failing to do that, we would build a huge
+    ;; object graph with lots of duplicates, which in turns prevents us from
+    ;; benefiting from memoization in 'package-derivation'.
+    (memoize                                      ;FIXME: use 'eq?'
+     (lambda (p)
+       (let* ((rewrite-if-package
+               (lambda (content)
+                 ;; CONTENT may be a file name, in which case it is returned,
+                 ;; or a package, which is rewritten with the new OCAML and
+                 ;; NEW-PREFIX.
+                 (if (package? content)
+                     (transform content)
+                     content)))
+              (rewrite
+               (match-lambda
+                 ((name content . rest)
+                  (append (list name (rewrite-if-package content)) rest)))))
+
+         (cond
+          ;; If VARIANT-PROPERTY is present, use that.
+          ((and variant-property
+                (assoc-ref (package-properties p) variant-property))
+           => force)
+
+          ;; Otherwise build the new package object graph.
+          ((eq? (package-build-system p) ocaml-build-system)
+           (package
+             (inherit p)
+             (location (package-location p))
+             (name (let ((name (package-name p)))
+                     (string-append new-prefix
+                                    (if (string-prefix? old-prefix name)
+                                        (substring name
+                                                   (string-length old-prefix))
+                                        name))))
+             (arguments
+              (let ((ocaml (if (promise? ocaml)
+                               (force ocaml)
+                               ocaml))
+                    (findlib (if (promise? findlib)
+                                 (force findlib)
+                                 findlib)))
+                (ensure-keyword-arguments (package-arguments p)
+                                          `(#:ocaml ,ocaml
+                                            #:findlib ,findlib))))
+             (inputs (map rewrite (package-inputs p)))
+             (propagated-inputs (map rewrite (package-propagated-inputs p)))
+             (native-inputs (map rewrite (package-native-inputs p)))))
+          (else
+           p))))))
+
+  transform)
+
+(define package-with-ocaml4.01
+  (package-with-explicit-ocaml (delay (default-ocaml4.01))
+                               (delay (default-ocaml4.01-findlib))
+                                "ocaml-" "ocaml4.01-"
+                                #:variant-property 'ocaml4.01-variant))
+
+(define (strip-ocaml4.01-variant p)
+  "Remove the 'ocaml4.01-variant' property from P."
+  (package
+    (inherit p)
+    (properties (alist-delete 'ocaml4.01-variant (package-properties p)))))
+
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (ocaml (default-ocaml))
-- 
2.11.0


From f7403598b564a408b31256486ea37675a6e1b547 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 21:01:05 +1000
Subject: [PATCH 04/13] gnu: Add ocaml-sqlite3.

* gnu/packages/ocaml.scm (ocaml-sqlite3, ocaml4.01-sqlite3): New variables.
---
 gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4d0737797..433d9b875 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -30,6 +30,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
@@ -1199,6 +1200,39 @@ to operate on the result type available from OCaml 4.03 in the standard
 library.")
     (license license:isc)))
 
+(define-public ocaml-sqlite3
+  (package
+    (name "ocaml-sqlite3")
+    (version "4.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/mmottl/sqlite3-ocaml/releases/download/v"
+             version "/sqlite3-ocaml-" version ".tar.gz"))
+       (sha256
+        (base32
+         "14c1nir7c6bivajg0vyx853y7la7r5d25g1v5hjb2wfi73r15p1m"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("sqlite" ,sqlite)))
+    (home-page "https://mmottl.github.io/sqlite3-ocaml")
+    (synopsis "SQLite3 Bindings for OCaml")
+    (description
+     "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
+API.  Sqlite3 is a self-contained, serverless, zero-configuration,
+transactional SQL database engine with outstanding performance for many use
+cases.  These bindings are written in a way that enables a friendly
+coexistence with the old (version 2) SQLite and its OCaml wrapper
+@code{ocaml-sqlite}.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-sqlite3))))
+    (license license:expat)))
+
+(define-public ocaml4.01-sqlite3
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-sqlite3)))
+
 (define-public ocaml-mtime
   (package
     (name "ocaml-mtime")
-- 
2.11.0


From 90e69c8fe9ca3622d1fe8e272280987b889a741c Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 21:31:07 +1000
Subject: [PATCH 05/13] gnu: Add ocaml-csv.

* gnu/packages/ocaml.scm (ocaml-csv, ocaml4.01-csv): New variables.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 433d9b875..ae94138a1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1233,6 +1233,34 @@ coexistence with the old (version 2) SQLite and its OCaml wrapper
 (define-public ocaml4.01-sqlite3
   (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-sqlite3)))
 
+(define-public ocaml-csv
+  (package
+    (name "ocaml-csv")
+    (version "1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "http://github.com/Chris00/ocaml-csv//download/"
+         version "/csv-" version ".tar.gz"))
+       (sha256
+        (base32
+         "13zm5g390i741qwhvd25xn0aq3gmnd0qipqgp5j3vzpmwls7cc7n"))))
+    (build-system ocaml-build-system)
+    (home-page "https://github.com/Chris00/ocaml-csv")
+    (synopsis "Pure OCaml functions to read and write CSV")
+    (description
+     "@dfn{Comma separated values} (CSV) is a simple tabular format supported
+by all major spreadsheets.  This library implements pure OCaml functions to
+read and write files in this format as well as some convenience functions to
+manipulate such data.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-csv))))
+    (license (package-license camlp4))))
+
+(define-public ocaml4.01-csv
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-csv)))
+
 (define-public ocaml-mtime
   (package
     (name "ocaml-mtime")
-- 
2.11.0


From 90937983017eb0637fa40b040ae7a2872304f772 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 21:37:06 +1000
Subject: [PATCH 06/13] gnu: Add ocaml-gsl.

* gnu/packages/ocaml.scm (ocaml-gsl, ocaml4.01-gsl): New variables.
---
 gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ae94138a1..6e6dea71c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
@@ -1261,6 +1262,34 @@ manipulate such data.")
 (define-public ocaml4.01-csv
   (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-csv)))
 
+(define-public ocaml-gsl
+  (package
+    (name "ocaml-gsl")
+    (version "1.19.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://github.com/mmottl/gsl-ocaml/releases/download/v"
+         version"/gsl-ocaml-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0rjbng1540kn33c7dfhqga9hna71zkm1llq1yb1a0kivxna1b285"))))
+    (build-system ocaml-build-system)
+    (inputs
+     `(("gsl" ,gsl)))
+    (home-page "https://mmottl.github.io/gsl-ocaml")
+    (synopsis "Bindings to the GNU Scientific Library")
+    (description
+     "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
+the OCaml language.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-gsl))))
+    (license license:gpl3+)))
+
+(define-public ocaml4.01-gsl
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-gsl)))
+
 (define-public ocaml-mtime
   (package
     (name "ocaml-mtime")
-- 
2.11.0


From 4bfa6e3473f27c2f125662abaec0f02762cb8a6a Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 21:52:34 +1000
Subject: [PATCH 07/13] gnu: Add ocaml-mcl.

* gnu/packages/machine-learning.scm (ocaml-mcl, ocaml4.01-mcl): New
variables.
---
 gnu/packages/machine-learning.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 8f1f8ee53..ed63c6065 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -26,6 +26,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ocaml)
   #:use-module (guix build-system r)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
@@ -35,6 +36,7 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages image)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages ocaml)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -239,6 +241,42 @@ networks) based on simulation of (stochastic) flow in graphs.")
     ;; http://listserver.ebi.ac.uk/pipermail/mcl-users/2016/000376.html
     (license license:gpl3)))
 
+(define-public ocaml-mcl
+  (package
+    (name "ocaml-mcl")
+    (version "12-068oasis4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/fhcrc/mcl/archive/"
+             version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1l5jbhwjpsj38x8b9698hfpkv75h8hn3kj0gihjhn8ym2cwwv110"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-paths
+           (lambda _
+             (substitute* "configure"
+               (("SHELL = /bin/sh") (string-append "SHELL = "(which "sh"))))
+             (substitute* "setup.ml"
+               (("LDFLAGS=-fPIC") (string-append "LDFLAGS=-fPIC\"; \"SHELL=" (which "sh"))))
+             #t)))))
+    (home-page "https://github.com/fhcrc/mcl")
+    (synopsis "OCaml wrappers around MCL")
+    (description
+     "This package provides OCaml bindings for the MCL graph clustering
+algorithm.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-mcl))))
+    (license license:gpl3)))
+
+(define-public ocaml4.01-mcl
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-mcl)))
+
 (define-public randomjungle
   (package
     (name "randomjungle")
-- 
2.11.0


From 2501809d57b36317d30c323f55c1b9c0c67006c8 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 22:11:00 +1000
Subject: [PATCH 08/13] gnu: Add ocaml4.01-bisect.

* gnu/packages/ocaml.scm (ocaml4.01-bisect): New variable.
(ocaml-bisect)[properties]: New field.
---
 gnu/packages/ocaml.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6e6dea71c..3206dbfbf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1050,8 +1050,21 @@ a camlp4-based tool that allows to instrument your application before running
 tests.  After application execution, it is possible to generate a report in HTML
 format that is the replica of the application source code annotated with code
 coverage information.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-bisect))))
     (license license:gpl3+)))
 
+(define-public ocaml4.01-bisect
+  (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-bisect))))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ;; In OCaml 4.01.0, camlp4 is bundled with OCaml.
+         ((#:make-flags _) '(list "all"))))
+      (native-inputs
+       `(("which" ,which)))
+      (propagated-inputs '()))))
+
 (define-public ocaml-bitstring
   (package
     (name "ocaml-bitstring")
-- 
2.11.0


From 74aa2c3b759c3986974b90f922aac5b9e64f3ae6 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 22:15:12 +1000
Subject: [PATCH 09/13] gnu: Add ocaml4.01-camlzip.

* gnu/packages/ocaml.scm (ocaml4.01-camlzip): 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 3206dbfbf..0d0688dc0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -859,8 +859,27 @@ other XUnit testing frameworks.")
     (description "Provides easy access to compressed files in ZIP, GZIP and
 JAR format.  It provides functions for reading from and writing to compressed
 files in these formats.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-camlzip))))
     (license license:lgpl2.1+)))
 
+(define-public ocaml4.01-camlzip
+  (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant camlzip))))
+    (package
+      (inherit base)
+      (name "ocaml4.01-camlzip")
+      ;; Version 1.05 is the last version to support OCaml 4.01.0.
+      (version "1.05")
+      (source
+       (origin
+         (method url-fetch)
+         (uri
+          (string-append
+           "http://forge.ocamlcore.org/frs/download.php/1037/camlzip-"
+           version ".tar.gz"))
+         (sha256
+          (base32
+           "0syh72jk9s0qwjmmfrkqchaj98m020ii082jn38pwnmb6v3p02wk")))))))
+
 (define-public ocamlmod
   (package
     (name "ocamlmod")
-- 
2.11.0


From 4e991766742313c1022c16c045895758ac39f4ac Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 22:17:34 +1000
Subject: [PATCH 10/13] gnu: Add ocaml4.01-qtest.

* gnu/packages/ocaml.scm (ocaml4.01-qtest): New variable.
(ocaml-qtest)[properties]: New field.
---
 gnu/packages/ocaml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0d0688dc0..4c75c87cf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1004,8 +1004,12 @@ GNU CC attributes.  It provides also a C pretty printer as an example of use.")
 syntax in comments.  Those tests are then run using the oUnit framework and the
 qcheck library.  The possibilities range from trivial tests -- extremely simple
 to use -- to sophisticated random generation of test cases.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-qtest))))
     (license license:lgpl3+)))
 
+(define-public ocaml4.01-qtest
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-qtest)))
+
 (define-public ocaml-stringext
   (package
     (name "ocaml-stringext")
-- 
2.11.0


From 4071f6d9efd03b5bf99e93e7856daa05be38e1c5 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 22:34:01 +1000
Subject: [PATCH 11/13] gnu: Add ocaml4.01-ounit.

* gnu/packages/ocaml.scm (ocaml4.01-ounit): New variable.
(ocaml-ounit)[properties]: New field.
---
 gnu/packages/ocaml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4c75c87cf..0ae8b36af 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -826,8 +826,12 @@ compilers that can directly deal with packages.")
     (synopsis "Unit testing framework for OCaml")
     (description "Unit testing framework for OCaml.  It is similar to JUnit and
 other XUnit testing frameworks.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-ounit))))
     (license license:expat)))
 
+(define-public ocaml4.01-ounit
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-ounit)))
+
 (define-public camlzip
   (package
     (name "camlzip")
-- 
2.11.0


From 253bb2d3bdc15b3df4216318b44e0eea964485e1 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Fri, 6 Jan 2017 22:29:29 +1000
Subject: [PATCH 12/13] gnu: Add ocaml-qcheck.

* gnu/packages/ocaml.scm (ocaml-qcheck, ocaml4.01-qcheck): New variables.
---
 gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0ae8b36af..9bf89c49c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1014,6 +1014,39 @@ to use -- to sophisticated random generation of test cases.")
 (define-public ocaml4.01-qtest
   (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-qtest)))
 
+(define-public ocaml-qcheck
+  (package
+    (name "ocaml-qcheck")
+    (version "0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "http://github.com/c-cube/qcheck/archive/"
+         version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0gxvh3yr2016m2i7xm4lc08vklj12z2jhhhhyz3if5mrh5ch63ck"))))
+    (build-system ocaml-build-system)
+    (inputs
+     `(("ocaml-ounit" ,ocaml-ounit)))
+    (home-page "https://c-cube.github.io/qcheck")
+    (synopsis "QuickCheck inspired property-based testing for OCaml")
+    (description
+     "The OCaml library takes inspiration from Haskell's QuickCheck library.
+The rough idea is that the programer describes invariants that values of a
+certain type need to satisfy (\"properties\"), as functions from this type to
+@code{bool}.  She also needs to desribe how to generate random values of the
+type, so that the property is tried and checked on a number of random
+instances.")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-qcheck))))
+    (license license:x11))) ;?
+
+(define-public ocaml4.01-qcheck
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-qcheck)))
+
 (define-public ocaml-stringext
   (package
     (name "ocaml-stringext")
-- 
2.11.0


From cb73c5f668664231bcbeec283f6e6f88c452acfc Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sun, 8 Jan 2017 22:12:29 +1000
Subject: [PATCH 13/13] WIP: final pplacer addition

---
 gnu/packages/ocaml.scm | 154 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 153 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9bf89c49c..1e3313fee 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
@@ -852,7 +853,7 @@ other XUnit testing frameworks.")
          (add-before 'install 'fix-install-name
            (lambda* (#:key #:allow-other-keys)
              (substitute* "Makefile"
-               (("install zip") "install camlzip")))))
+               (("install zip") "install zip")))))
        #:install-target "install-findlib"
        #:make-flags
        (list "all" "allopt"
@@ -884,6 +885,157 @@ files in these formats.")
           (base32
            "0syh72jk9s0qwjmmfrkqchaj98m020ii082jn38pwnmb6v3p02wk")))))))
 
+(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
+        (string-append
+         "https://github.com/ocaml-batteries-team/batteries-included/archive/v"
+         version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1fbhafjdqarppp54nmzalng577s9wk1753qw11f449shwv4cydyl"))))
+    (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+)))
+
+(define-public ocaml4.01-batteries
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-batteries)))
+
+
+(define-public ocaml-xmlm
+  (package
+    (name "ocaml-xmlm")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://erratique.ch/software/xmlm/releases/xmlm-"
+             version ".tbz"))
+       (sha256
+        (base32
+         "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:tests? #f ; There are no tests, maybe?
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+                  (lambda _
+                    (zero? (system* "pkg/build" "true"))))
+         (add-before 'install 'setup-install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (destdir (string-append out "/lib/ocaml")))
+                      (mkdir-p destdir)
+                      (setenv "OCAMLFIND_DESTDIR" destdir)
+                      (setenv "OCAMLFIND_LDCONF" (string-append destdir "/ld.conf"))
+                      #t)))
+         (replace 'install
+                  (lambda _
+                    ;(system* "ls" "_build/**/*")
+                    (zero? (system* "ocamlfind" "install" "xmlm"
+                                    ;; List of files was compiled from _build/pkg/META.
+                                    "_build/pkg/META"
+                                    "_build/src/xmlm.a"
+                                    "_build/src/xmlm.annot"
+                                    "_build/src/xmlm.cma"
+                                    "_build/src/xmlm.cmi"
+                                    "_build/src/xmlm.cmt"
+                                    "_build/src/xmlm.cmx"
+                                    "_build/src/xmlm.cmxa"
+                                    "_build/src/xmlm.cmxs"
+                                    "_build/src/xmlm.mli"))
+                    )))))
+    (native-inputs
+     `(("ocaml" ,ocaml)
+       ("ocaml-findlib" ,ocaml-findlib)))
+    (home-page "")
+    (synopsis "")
+    (description
+     "")
+    (properties `((ocaml4.01-variant . ,(delay ocaml4.01-xmlm))))
+    (license license:x11))) ;?
+
+(define-public ocaml4.01-xmlm
+  (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-xmlm)))
+
+(define-public pplacer
+  (package
+    (name "pplacer")
+    (version "1.1.alpha19")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/matsen/pplacer/archive/v"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0z1lnd2s8sh6kpzg106wzbh2szw7h0hvq8syd5a6wv4rmyyz6x0f"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:ocaml ,ocaml-4.01
+       #:findlib ,ocaml4.01-findlib
+       ;; #:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'fix-makefile
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("DESCRIPT:=pplacer-.*") "DESCRIPT:=pplacer-test\n")) ;fixme
+                      #t))
+         (replace 'build
+                  (lambda _ (zero? (system* "make" "all"))))
+         (replace 'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (bin (string-append out "/bin")))
+                      (copy-recursively "bin" bin)
+                      ;; TODO: Install scripts.
+                      )
+                    #t))
+         )))
+    (inputs
+     `(("zlib" ,zlib)
+       ("ocaml-gsl" ,ocaml4.01-gsl)
+       ("gsl" ,gsl)
+       ("ocaml-batteries" ,ocaml4.01-batteries)
+       ("ocaml-camlzip" ,ocaml4.01-camlzip)
+       ("ocaml-csv" ,ocaml4.01-csv)
+       ("ocaml-sqlite3" ,ocaml4.01-sqlite3)
+       ("ocaml-xmlm" ,ocaml4.01-xmlm)
+       ("ocaml-mcl" ,ocaml4.01-mcl)
+       ;("python" ,python-2)
+                                        ;("python-biopython" ,python2-biopython)
+       ))
+    (native-inputs
+     `(("ocaml-ounit" ,ocaml4.01-ounit)))
+    (synopsis "")
+    (description
+     "")
+    (home-page "")
+    (license license:gpl3)))
+
+
 (define-public ocamlmod
   (package
     (name "ocamlmod")
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 09/96] gnu: Add camlzip
  2017-01-08 12:16   ` Ben Woodcroft
@ 2017-01-08 17:40     ` Julien Lepiller
  2017-01-09  9:56       ` Ben Woodcroft
  0 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-08 17:40 UTC (permalink / raw)
  To: guix-devel

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

On Sun, 8 Jan 2017 22:16:05 +1000
Ben Woodcroft <b.woodcroft@uq.edu.au> wrote:

> Hi Julien,
> 
> Thanks for all your efforts in this patch series - impressive stuff,
> and thanks to David for reviewing them.
> 
> On 04/01/17 05:10, Julien Lepiller wrote:
> [...]
> > +    (arguments `(#:phases
> > +                 (modify-phases %standard-phases
> > +                   (delete 'configure)
> > +                   (add-before 'install 'fix-install-name
> > +                     (lambda* (#:key #:allow-other-keys)
> > +                       (substitute* "Makefile"
> > +                         (("install zip") "install camlzip")))))  
> Can I ask if this substitution is necessary? I have a downstream
> OCaml package (pplacer) which is failing to compile because of it
> (though with OCaml 4.01.0).
> 
> I've attached my unpolished, convoluted patch series to get to
> pplacer, for reference.
> 
> Thanks, ben.

It was required because the dependant packages I had looked for camlzip
instead of just zip. Looking at the opam recipe though, it seems some
packages also refer to this one as zip. Could you try with that patch?
I also fixed the install directory.


[-- Attachment #2: 0001-gnu-camlzip-Install-both-zip-and-camlzip-modules.patch --]
[-- Type: text/x-patch, Size: 1781 bytes --]

From c0f14cdae6bfbb74b1b5fbe836423747dbe17b60 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sun, 8 Jan 2017 18:37:23 +0100
Subject: [PATCH] gnu: camlzip: Install both zip and camlzip modules.

* gnu/packages/ocaml.scm (camlzip) [arguments]: Install camlzip module.
---
 gnu/packages/ocaml.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 93020f1c0..1bd90ad60 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -804,15 +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)
+                   (display "directory=\"../zip\"" port)))))))
        #:install-target "install-findlib"
        #:make-flags
        (list "all" "allopt"
              (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
-                            "/lib/ocaml"))))
+                            "/lib/ocaml/site-lib"))))
     (home-page "http://forge.ocamlcore.org/projects/camlzip")
     (synopsis "Provides easy access to compressed files")
     (description "Provides easy access to compressed files in ZIP, GZIP and
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 09/96] gnu: Add camlzip
  2017-01-08 17:40     ` Julien Lepiller
@ 2017-01-09  9:56       ` Ben Woodcroft
  0 siblings, 0 replies; 119+ messages in thread
From: Ben Woodcroft @ 2017-01-09  9:56 UTC (permalink / raw)
  To: Julien Lepiller, guix-devel

On 09/01/17 03:40, Julien Lepiller wrote:
> On Sun, 8 Jan 2017 22:16:05 +1000
> Ben Woodcroft <b.woodcroft@uq.edu.au> wrote:
>
>> Hi Julien,
>>
>> Thanks for all your efforts in this patch series - impressive stuff,
>> and thanks to David for reviewing them.
>>
>> On 04/01/17 05:10, Julien Lepiller wrote:
>> [...]
>>> +    (arguments `(#:phases
>>> +                 (modify-phases %standard-phases
>>> +                   (delete 'configure)
>>> +                   (add-before 'install 'fix-install-name
>>> +                     (lambda* (#:key #:allow-other-keys)
>>> +                       (substitute* "Makefile"
>>> +                         (("install zip") "install camlzip")))))
>> Can I ask if this substitution is necessary? I have a downstream
>> OCaml package (pplacer) which is failing to compile because of it
>> (though with OCaml 4.01.0).
>>
>> I've attached my unpolished, convoluted patch series to get to
>> pplacer, for reference.
>>
>> Thanks, ben.
> It was required because the dependant packages I had looked for camlzip
> instead of just zip. Looking at the opam recipe though, it seems some
> packages also refer to this one as zip. Could you try with that patch?
> I also fixed the install directory.

Works for me. Thanks. I'll send the pplacer patches to the list once 
your ocaml-xmlm and ocaml-batteries are merged.
ben

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-04 18:19           ` David Craven
@ 2017-01-15 13:14             ` Julien Lepiller
  2017-01-15 14:27               ` David Craven
  0 siblings, 1 reply; 119+ messages in thread
From: Julien Lepiller @ 2017-01-15 13:14 UTC (permalink / raw)
  To: guix-devel

[-- 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


^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [PATCH 10/96] gnu: Add ocamlmod.
  2017-01-15 13:14             ` Julien Lepiller
@ 2017-01-15 14:27               ` David Craven
  0 siblings, 0 replies; 119+ messages in thread
From: David Craven @ 2017-01-15 14:27 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

You're the boss :)

Currently have to study for exams, then I'll be working on adding a
system test for efi which will involve a bunch of work - building
coreboot - add tianocore payload and making qemu flags more
configurable (the idea being that we can add system tests for uboot
using the coreboot uboot payload too). rustc needs adapting to the new
cargo based rustbuild system...

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-04 20:57 ` Ludovic Courtès
@ 2017-01-25 17:58   ` Ludovic Courtès
  2017-01-26  9:27     ` julien lepiller
  0 siblings, 1 reply; 119+ messages in thread
From: Ludovic Courtès @ 2017-01-25 17:58 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

Hey Julien,

I think I missed the answer to that question:

> Do you have an OPAM importer for this?  We should probably consider
> adding one and an updater as well.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-25 17:58   ` Ludovic Courtès
@ 2017-01-26  9:27     ` julien lepiller
  2017-01-26 18:05       ` Ludovic Courtès
  0 siblings, 1 reply; 119+ messages in thread
From: julien lepiller @ 2017-01-26  9:27 UTC (permalink / raw)
  To: guix-devel

Le 2017-01-25 18:58, ludo@gnu.org a écrit :
> Hey Julien,
> 
> I think I missed the answer to that question:
> 
>> Do you have an OPAM importer for this?  We should probably consider
>> adding one and an updater as well.  :-)
> 
> Ludo’.

Sorry, I forgot to answer. I don't have an importer or updater yet, but 
it should be feasible. It's on my todo list, just after pushing the 
remaining ocaml packages. If anyone is interested, you can look at 
https://opam.ocaml.org/urls.txt.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [PATCH 00/96] ocaml-build-system and packages
  2017-01-26  9:27     ` julien lepiller
@ 2017-01-26 18:05       ` Ludovic Courtès
  0 siblings, 0 replies; 119+ messages in thread
From: Ludovic Courtès @ 2017-01-26 18:05 UTC (permalink / raw)
  To: julien lepiller; +Cc: guix-devel

julien lepiller <julien@lepiller.eu> skribis:

> Le 2017-01-25 18:58, ludo@gnu.org a écrit :
>> Hey Julien,
>>
>> I think I missed the answer to that question:
>>
>>> Do you have an OPAM importer for this?  We should probably consider
>>> adding one and an updater as well.  :-)
>>
>> Ludo’.
>
> Sorry, I forgot to answer. I don't have an importer or updater yet,
> but it should be feasible. It's on my todo list, just after pushing
> the remaining ocaml packages. If anyone is interested, you can look at
> https://opam.ocaml.org/urls.txt.

Interesting, thanks for sharing!

Ludo’.

^ permalink raw reply	[flat|nested] 119+ messages in thread

end of thread, other threads:[~2017-01-26 18:05 UTC | newest]

Thread overview: 119+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).