diff mbox series

[bug#35558] gnu: add ocaml-odoc.

Message ID 87sgtuxtna.fsf@gmail.com
State Accepted
Headers show
Series [bug#35558] gnu: add ocaml-odoc. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Gabriel Hondet May 4, 2019, 12:59 p.m. UTC
Hi everyone,

Please find enclosed a sequence of patches to add ocaml-odoc

Gabriel

Comments

Julien Lepiller May 14, 2019, 7:42 p.m. UTC | #1
Le Sat, 04 May 2019 14:59:21 +0200,
Gabriel Hondet <gabrielhondet@gmail.com> a écrit :

> Hi everyone,
> 
> Please find enclosed a sequence of patches to add ocaml-odoc
> 
> Gabriel

Pushed as 38089b549fa1d54fcced3aaab96cc50ea980eb54 to
2f8e77bee26aa548e232a06cbec41f9bf31e533d.

Thank you and sorry for the delay!
diff mbox series

Patch

From 8cf63e00d15182fc674fa6e75b2949aa460f0cce Mon Sep 17 00:00:00 2001
From: gabrielhdt <gabrielhondet@gmail.com>
Date: Sat, 4 May 2019 14:53:58 +0200
Subject: [PATCH 4/4] gnu: Add ocaml-odoc.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 787bbd855c..6cb597e75f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5072,3 +5072,57 @@  nice HTML report showing which places were visited and which were missed.
 Usage is simple - add package bisect_ppx when building tests, run your tests,
 then run the Bisect_ppx report tool on the generated visitation files.")
     (license license:mpl2.0)))
+
+(define-public ocaml-odoc
+  (package
+    (name "ocaml-odoc")
+    (version "1.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocaml/odoc")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0br11cw6wa0mwafja4xdb45d2f8908l6nzdq5mw5lbfq2jnp68km"))))
+    (build-system dune-build-system)
+    (inputs
+     `(("ocaml-alcotest" ,ocaml-alcotest)
+       ("ocaml-markup" ,ocaml-markup)
+       ("ocaml-sexplib" ,ocaml-sexplib)
+       ("ocaml-re" ,ocaml-re)
+       ("ocaml-uutf" ,ocaml-uutf)))
+    (native-inputs
+     `(("ocaml-astring" ,ocaml-astring)
+       ("ocaml-cmdliner" ,ocaml-cmdliner)
+       ("ocaml-cppo" ,ocaml-cppo)
+       ("ocaml-fpath" ,ocaml-fpath)
+       ("ocaml-result" ,ocaml-result)
+       ("ocaml-tyxml" ,ocaml-tyxml)
+       ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)))
+    (home-page "https://github.com/ocaml/odoc")
+    (synopsis "OCaml documentation generator")
+    (description "@emph{odoc} is a documentation generator for OCaml.  It reads
+@emph{doc comments}, delimited with @code{(** ... *)}, and outputs
+@acronym{HTML}.
+
+Text inside doc comments is marked up in ocamldoc syntax:
+@code{
+val compare : string -> string -> int
+(** [compare s1 s2] compares [s1] and [s2] in {e lexicographic} order.  The
+    result is negative if [s1] precedes [s2], positive if [s1] follows [s2],
+    and zero if [s1] and [s2] are equal. *)
+}
+
+The syntax reference is
+@uref{https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sec357, here}.
+There is also an
+@uref{https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sec352,
+explanation} of how to attach comments to specific types, values, and other
+elements in your program.
+
+odoc's main advantage over ocamldoc is an accurate cross-referencer, which
+handles the complexity of the OCaml module system.")
+    (license license:isc)))
-- 
2.21.0