summary refs log tree commit diff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm199
1 files changed, 117 insertions, 82 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 624637dd8a..6c1ac057a4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -182,10 +182,10 @@ OCaml and can effectively bootstrap OCaml 4.07.
 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
       (license license:expat))))
 
-(define-public ocaml-4.11
+(define-public ocaml-4.13
   (package
     (name "ocaml")
-    (version "4.11.1")
+    (version "4.13.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -194,7 +194,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
                     "/ocaml-" version ".tar.xz"))
               (sha256
                (base32
-                "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa"))))
+                "1s7xwqidpjwfhnpfma4nb93gxfr7g9jfn03s1j03iyavmpgph7ck"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
@@ -210,7 +210,10 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
      (list libx11 libiberty ;needed for objdump support
            zlib))                       ;also needed for objdump support
     (arguments
-     `(#:phases
+     `(#:configure-flags '("--enable-ocamltest")
+       #:test-target "tests"
+       #:make-flags '("world.opt")
+       #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-/bin/sh-references
            (lambda* (#:key inputs #:allow-other-keys)
@@ -226,16 +229,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
                                  file quoted-sh)
                          quoted-sh))))
-                  (find-files "." "\\.ml$"))
-                 #t))))
-         (replace 'build
-           (lambda _
-             (invoke "make" "-j" (number->string (parallel-job-count))
-                     "world.opt")))
-         (replace 'check
-           (lambda _
-             (with-directory-excursion "testsuite"
-               (invoke "make" "all")))))))
+                  (find-files "." "\\.ml$")))))))))
     (home-page "https://ocaml.org/")
     (synopsis "The OCaml programming language")
     (description
@@ -250,7 +244,7 @@ functional, imperative and object-oriented styles of programming.")
 
 (define-public ocaml-4.09
   (package
-    (inherit ocaml-4.11)
+    (inherit ocaml-4.13)
     (version "4.09.0")
     (source (origin
               (method url-fetch)
@@ -261,7 +255,33 @@ functional, imperative and object-oriented styles of programming.")
               (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
               (sha256
                (base32
-                "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
+                "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-/bin/sh-references
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((sh (search-input-file inputs "/bin/sh"))
+                    (quoted-sh (string-append "\"" sh "\"")))
+               (with-fluids ((%default-port-encoding #f))
+                 (for-each
+                  (lambda (file)
+                    (substitute* file
+                      (("\"/bin/sh\"")
+                       (begin
+                         (format (current-error-port) "\
+patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
+                                 file quoted-sh)
+                         quoted-sh))))
+                  (find-files "." "\\.ml$"))))))
+         (replace 'build
+           (lambda _
+             (invoke "make" "-j" (number->string (parallel-job-count))
+                     "world.opt")))
+         (replace 'check
+           (lambda _
+             (with-directory-excursion "testsuite"
+               (invoke "make" "all")))))))))
 
 ;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
 ;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
@@ -440,7 +460,7 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)))))
 
-(define-public ocaml ocaml-4.11)
+(define-public ocaml ocaml-4.13)
 
 (define-public ocamlbuild
   (package
@@ -882,19 +902,17 @@ Git-friendly development workflow.")
 (define-public camlp5
   (package
     (name "camlp5")
-    (version "7.13")
+    (version "8.00.02")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/camlp5/camlp5")
-             (commit (string-append "rel" (string-delete #\. version)))))
+             (commit (string-append "rel" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1d9spy3f5ahixm8nxxk086kpslzva669a5scn49am0s7vx4i71kp"))))
+        (base32 "03qm99h2380x0y69sppg10yz1mwx7smkscia7pa175wmilifx8vy"))))
     (build-system gnu-build-system)
-    (inputs
-     (list ocaml))
     (arguments
      `(#:tests? #f  ; XXX TODO figure out how to run the tests
        #:phases
@@ -924,6 +942,10 @@ Git-friendly development workflow.")
              (install-file "etc/META" (string-append (assoc-ref outputs "out")
                                                      "/lib/ocaml/camlp5/"))
              #t)))))
+    (inputs
+     (list ocaml))
+    (native-inputs
+     (list perl))
     (home-page "https://camlp5.github.io/")
     (synopsis "Pre-processor Pretty Printer for OCaml")
     (description
@@ -1251,14 +1273,14 @@ to the other.")
 (define-public ocaml-findlib
   (package
     (name "ocaml-findlib")
-    (version "1.8.1")
+    (version "1.9.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.camlcity.org/download/"
                                   "findlib" "-" version ".tar.gz"))
               (sha256
                (base32
-                "00s3sfb02pnjmkax25pcnljcnhcggiliccfz69a72ic7gsjwz1cf"))))
+                "1qhgk25avmz4l4g47g8jvk0k1g9p9d5hbdrwpz2693a8ajyvhhib"))))
     (build-system gnu-build-system)
     (native-inputs
      (list m4 ocaml))
@@ -1808,57 +1830,59 @@ module of this library is parameterised by the type of S-expressions.")
     (propagated-inputs
      (list ocaml-ppx-derivers ocamlbuild ocaml-result))
     (properties `((upstream-name . "ocaml-migrate-parsetree")
-                  ;; OCaml 4.07 packages require version 1.*
-                  (ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-migrate-parsetree-1)))))
+                  (ocaml4.07-variant . ,(delay ocaml4.07-migrate-parsetree))))
     (synopsis "OCaml parsetree converter")
     (description "This library converts between parsetrees of different OCaml
 versions.  For each version, there is a snapshot of the parsetree and conversion
 functions to the next and/or previous version.")
     (license license:lgpl2.1+)))
 
-(define-public ocaml-migrate-parsetree-1
-  (package
-    (inherit ocaml-migrate-parsetree)
-    (name "ocaml-migrate-parsetree-1")
-    (version "1.8.0")
-    (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url home-page)
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
-    (properties '((upstream-name . "ocaml-migrate-parsetree")))))
+;; OCaml 4.07 packages require version 1.*
+(define-public ocaml4.07-migrate-parsetree
+  (package-with-ocaml4.07
+    (package
+      (inherit ocaml-migrate-parsetree)
+      (name "ocaml-migrate-parsetree")
+      (version "1.8.0")
+      (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit (string-append "v" version))))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
+      (properties '((upstream-name . "ocaml-migrate-parsetree"))))))
 
-(define-public ocaml-ppx-tools-versioned
-  (package
-    (name "ocaml-ppx-tools-versioned")
-    (version "5.4.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
-                     (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
-    (build-system dune-build-system)
-    (arguments
-     `(#:test-target "."
-       #:package "ppx_tools_versioned"))
-    (propagated-inputs
-     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)))
-    (properties `((upstream-name . "ppx_tools_versioned")))
-    (home-page "https://github.com/let-def/ppx_tools_versioned")
-    (synopsis "Variant of ppx_tools")
-    (description "This package is a variant of ppx_tools based on
+(define-public ocaml4.07-ppx-tools-versioned
+  (package-with-ocaml4.07
+    (package
+      (name "ocaml-ppx-tools-versioned")
+      (version "5.4.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                       (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
+                       (commit version)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
+      (build-system dune-build-system)
+      (arguments
+       `(#:test-target "."
+         #:package "ppx_tools_versioned"))
+      (propagated-inputs
+       (list ocaml-migrate-parsetree))
+      (properties `((upstream-name . "ppx_tools_versioned")))
+      (home-page "https://github.com/let-def/ppx_tools_versioned")
+      (synopsis "Variant of ppx_tools")
+      (description "This package is a variant of ppx_tools based on
 ocaml-migrate-parsetree")
-    (license license:expat)))
+      (license license:expat))))
 
 (define-public ocaml-bitstring
   (package
@@ -1911,7 +1935,7 @@ powerful.")
                  (base32
                   "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
       (propagated-inputs
-       `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
+       `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)))
       (properties '()))))
  
 (define-public ocaml-result
@@ -2549,14 +2573,14 @@ message report is decoupled from logging and is handled by a reporter.")
 (define-public ocaml-fpath
   (package
     (name "ocaml-fpath")
-    (version "0.7.2")
+    (version "0.7.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://erratique.ch/software/fpath/releases/"
                                   "fpath-" version ".tbz"))
               (sha256
                 (base32
-                  "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
+                  "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"))))
     (build-system ocaml-build-system)
     (arguments
      `(#:tests? #f
@@ -2749,7 +2773,7 @@ and consumable.")
                 (base32
                  "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
      (propagated-inputs
-      `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
+      `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
         ,@(package-propagated-inputs ocaml-sedlex)))
      (properties '()))))
 
@@ -3146,7 +3170,7 @@ is used to determine whether the results truly differ.")
 (define-public ocaml-batteries
   (package
     (name "ocaml-batteries")
-    (version "3.3.0")
+    (version "3.4.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -3155,7 +3179,7 @@ is used to determine whether the results truly differ.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1h03nkc3vajaijqhj1dy5hw85j2hwwxdkg8rvs2fc00qaf44ad1d"))))
+                "1cd7475n1mxhq482aidmhh27mq5p2vmb8d9fkb1mlza9pz5z66yq"))))
     (build-system ocaml-build-system)
     (propagated-inputs (list ocaml-num))
     (native-inputs
@@ -4733,7 +4757,7 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
 (define-public ocaml-dot-merlin-reader
   (package
     (name "ocaml-dot-merlin-reader")
-    (version "4.3.1-411")
+    (version "4.4-413")
     (source
      (origin
        (method git-fetch)
@@ -4743,7 +4767,7 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1nwgc9nyy80dc9cgkskyfwv9c785yjyg39s005d4wiagj4fy68v8"))))
+         "0wijg1vh2q6yr46vkv34vvksligd0ajl4hv7m6qbz3ywqr8akg23"))))
     (build-system dune-build-system)
     (arguments '(#:package "dot-merlin-reader"
                  #:tests? #f))          ; no tests
@@ -5840,7 +5864,7 @@ ocaml values.")
         ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
     (properties `((upstream-name . "ppx_sexp_message")))
     (home-page "https://github.com/janestreet/ppx_sexp_message")
-    (synopsis "A ppx rewriter for easy construction of s-expressions")
+    (synopsis "Ppx rewriter for easy construction of s-expressions")
     (description "Ppx_sexp_message aims 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
@@ -6726,7 +6750,7 @@ then run the Bisect_ppx report tool on the generated visitation files.")
            "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
       (propagated-inputs
        `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
-         ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
+         ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
          ,@(package-propagated-inputs ocaml-bisect-ppx)))
       (native-inputs
        `(("ocaml-ounit2" ,ocaml-ounit2)))
@@ -6739,7 +6763,7 @@ then run the Bisect_ppx report tool on the generated visitation files.")
 (define-public ocaml-odoc
   (package
     (name "ocaml-odoc")
-    (version "2.0.0")
+    (version "2.0.2")
     (source
      (origin
        (method git-fetch)
@@ -6748,7 +6772,7 @@ then run the Bisect_ppx report tool on the generated visitation files.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0lkmanfn8pc0rgcn9cc4mv48i29q2w1nl01n21qqxpyyfavgc98s"))))
+        (base32 "06rm1bhfp2yvkvidksndwii9v074r0lc9sqfp60q8mfcfd7pj7rx"))))
     (build-system dune-build-system)
     (arguments
      `(#:phases
@@ -7615,7 +7639,7 @@ libraries.")
 (define-public js-of-ocaml
   (package
     (name "js-of-ocaml")
-    (version "3.9.1")
+    (version "3.11.0")
     (source
      (origin
        (method git-fetch)
@@ -7624,9 +7648,20 @@ libraries.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "00hdjaj94j3nc6f6wbbpx59h4yc79siphs34i1hry11r56paaqyk"))))
+        (base32 "1x5f1ph9wgx0mgyibssssnrcwp69ihw66gzhsnz9h79czgzyjpp2"))))
     (build-system dune-build-system)
-    (arguments `(#:test-target "."))
+    (arguments
+     `(#:test-target "."
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-failing-test
+           (lambda _
+             ;; Formating difference
+             (with-output-to-file "compiler/tests-jsoo/bin/error2.expected"
+               (lambda _
+                 (format #t
+                         "Fatal error: exception Match_failure(\
+\"compiler/tests-jsoo/bin/error2.ml\", 11, 2)\n\n"))))))))
     (propagated-inputs
      (list ocaml-ppxlib
            ocaml-uchar