diff mbox series

[bug#45558] Add js_of_ocaml

Message ID 559a908f91e39af40a1580447a708209785c69b8.camel@divoplade.fr
State Accepted
Headers show
Series [bug#45558] Add js_of_ocaml | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

divoplade Dec. 30, 2020, 7:22 p.m. UTC
Dear guix,

I finally got js_of_ocaml packaged. I'm not sure I did everything
correctly (especially indentation, but also how to make non-4.07
packages, and whether the package should have multiple outputs
corresponding to the opam packages), so do not hesitate to sendfeedback. 

Best regards,

divoplade
diff mbox series

Patch

From 151ffb96657268adf40103d8c4aac04f4d3a61fb Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:08:57 +0100
Subject: [PATCH 5/5] gnu: Add ocaml-js-of-ocaml

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 353394e4d4..ce1d09f936 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6177,3 +6177,41 @@  when Graphics.open_graph is called.
 
 This library used to be distributed with OCaml up to OCaml 4.08.")
     (license license:lgpl2.1+)))
+
+(define-public ocaml-js-of-ocaml
+  (package
+    (name "ocaml-js-of-ocaml")
+    (version "3.8.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocsigen/js_of_ocaml")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1ls3nhavhifsfwwz45k4xw91ml9zi6rnkfp3175b2havbavbzral"))))
+    (build-system dune-build-system)
+    (arguments `(#:tests? #f))
+    (propagated-inputs
+     `(("ocaml-ppxlib" ,ocaml-ppxlib)
+       ("ocaml-uchar" ,ocaml-uchar)
+       ("ocaml-menhir" ,ocaml-menhir)
+       ("ocaml-reactivedata" ,ocaml-reactivedata)
+       ("ocaml-cmdliner" ,ocaml-cmdliner)
+       ("ocaml-lwt" ,ocaml-lwt)
+       ("ocaml-tyxml" ,ocaml-tyxml)
+       ("ocaml-re" ,ocaml-re)
+       ("ocaml-uutf" ,ocaml-uutf)
+       ("ocaml-graphics" ,ocaml-graphics)))
+    (properties `((upstream-name . "js_of_ocaml")))
+    (home-page
+     "http://ocsigen.github.io/js_of_ocaml")
+    (synopsis
+     "Compiler from OCaml bytecode to Javascript")
+    (description
+     "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
+It makes it possible to run pure OCaml programs in JavaScript
+environment like browsers and Node.js
+")
+    (license license:lgpl2.1+)))
-- 
2.29.2