Subject: [bug#45762] [PATCH 1/3] ocaml: Add ocaml-ocp-indent * gnu/packages/ocaml.scm (ocaml-ocp-indent): New variable.

From: aecepoglu <[email-masked]>
Date: Mon, 11 Jan 2021 23:55:04 +0300

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..d2e2f03f3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Simon Tournier <[email-masked]>
 ;;; Copyright © 2020 divoplade <[email-masked]>
 ;;; Copyright © 2020 pukkamustard <[email-masked]>
+;;; Copyright © 2021 aecepoglu <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2363,6 +2364,42 @@ 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-ocp-indent
+  (package
+    (name "ocaml-ocp-indent")
+    (version "1.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz")
+        (sha256
+          (base32
+            "0rqcvwzpwwzwqvrzg1l37jjiglrk2ijgjg1c7vy3xvc8lk9zyysw"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:tests? #f
+       #:build-flags (list "--profile=release")))
+    (propagated-inputs
+      `(("ocaml-cmdliner" ,ocaml-cmdliner)))
+    (home-page
+      "http://www.typerex.org/ocp-indent.html")
+    (synopsis
+      "Tool to indent OCaml programs")
+    (description
+      "Ocp-indent is based on an approximate, tolerant OCaml parser
+ and a simple stack machine.
+Presets and configuration options available,
+ with the possibility to set them project-wide.
+Supports most common syntax extensions, and extensible for others.
+
+Includes:
+
+- An indentor program, callable from the command-line or from within editors
+- Bindings for popular editors
+- A library that can be directly used by editor writers,
+  or just for fault-tolerant/approximate parsing.")
+    (license license:lgpl2.1)))
+
 (define-public ocaml-ocurl
   (package
     (name "ocaml-ocurl")
-- 
2.29.2