Subject: [bug#73466] [PATCH 09/16] gnu: Add ocaml-js-of-ocaml-compiler.

From: Herman Rimm <[email-masked]>
Date: Wed, 25 Sep 2024 10:03:05 +0200

* gnu/packages/ocaml.scm (ocaml-js-of-ocaml-compiler): Add variable.

Change-Id: I1377fb75bb6945214b1363b24c547c3cc3b54a1a
---
 gnu/packages/ocaml.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 36bbc02a92..651d351bd1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4161,6 +4161,47 @@ (define-public ocaml-uunf
 without a complete in-memory representation.")
     (license license:isc)))
 
+(define-public ocaml-js-of-ocaml-compiler
+  (package
+    (name "ocaml-js-of-ocaml-compiler")
+    (version "5.8.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/ocsigen/js_of_ocaml/"
+                           "releases/download/" version "/js_of_ocaml-"
+                           version ".tbz"))
+       (sha256
+        (base32
+          "0jphrg78blshfj6yhbz1knsdfn83fl3a59akh6alvcgrs95ij83j"))))
+    (build-system dune-build-system)
+    (arguments (list #:tests? #f)) ; tests fail for unknown reason.
+    (propagated-inputs (list ocaml-ppxlib
+                             ocaml-cmdliner
+                             ocaml-sedlex
+                             ocaml-menhir
+                             ocaml-menhirLib
+                             ocaml-menhirSdk
+                             ocaml-yojson
+                             ocaml-odoc))
+    (native-inputs (list node
+                         ocaml-lwt
+                         ocaml-num
+                         ocaml-ppx-expect
+                         ocaml-re
+                         ocaml-reactivedata
+                         ocaml-tyxml
+                         ocaml-uutf))
+    (properties `((upstream-name . "js_of_ocaml-compiler")))
+    (home-page "https://ocsigen.org/js_of_ocaml/latest/manual/overview")
+    (synopsis "Compiler from OCaml bytecode to JavaScript")
+    (description
+     "Js_of_ocaml is a compiler from OCaml bytecode to @code{JavaScript}.  It makes it
+possible to run pure OCaml programs in @code{JavaScript} environment like
+browsers and Node.js.")
+    ;; LGPL 2.1 or later with OCaml LGPL linking exception.
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
 (define-public ocaml-jsonm
   (package
     (name "ocaml-jsonm")
-- 
2.45.2