diff mbox series

[bug#45575] gnu: Update ocaml-merlin

Message ID 87eej54upy.fsf@asu.edu
State Accepted
Headers show
Series [bug#45575] gnu: Update ocaml-merlin | expand

Checks

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

Commit Message

John Soo Dec. 31, 2020, 7:54 p.m. UTC
Hi Guix,

After working with ocaml a little, I felt the need to have a current
merlin.  I kept the 4.07 variants of packages but I don't understand why
they exist.

Thanks!

John

Comments

Julien Lepiller Dec. 31, 2020, 10:32 p.m. UTC | #1
Le Thu, 31 Dec 2020 11:54:33 -0800,
John Soo <jsoo1@asu.edu> a écrit :

> Hi Guix,
> 
> After working with ocaml a little, I felt the need to have a current
> merlin.  I kept the 4.07 variants of packages but I don't understand
> why they exist.
> 
> Thanks!
> 
> John
> 
> 

Hi John,

thanks for the patches! I have pushed a series of patches from
Pukkamustard a few days ago that already add ocaml-merlin for the
latest OCaml compiler. Could you rebase your patches on master and
check if any of your patches is still relevant?

Thanks!
John Soo Jan. 24, 2021, 6:40 p.m. UTC | #2
Thanks for the patches!
diff mbox series

Patch

From 4427d0313fc07a8a2ff342575c7fe1e9c2a3b912 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:48:15 -0800
Subject: [PATCH 9/9] gnu: Add ocaml-merlin.

* gnu/packages/ocaml.scm (ocaml-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-merlin): Inerhit from ocaml-merlin.
---
 gnu/packages/ocaml.scm | 47 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 39 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2975f866c9..bb5d6c4e92 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -71,6 +71,7 @@ 
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages virtualization)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages web-browsers)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -4041,8 +4042,45 @@  The test mode allows to ensure that shell scripts and OCaml fragments in the
 documentation always stays up-to-date.")
   (license license:isc)))
 
+(define-public ocaml-merlin
+  (package
+    (name "ocaml-merlin")
+    (version "3.4.2")
+    (home-page "https://ocaml.github.io/merlin/")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocaml/merlin")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+    (build-system dune-build-system)
+    (inputs
+     `(("ocaml-biniou" ,ocaml-biniou)
+       ("ocaml-yojson" ,ocaml-yojson)
+       ("ocaml-easy-format" ,ocaml-easy-format)))
+    (native-inputs
+     `(("ocaml-findlib" ,ocaml-findlib)
+       ("ocaml-mdx" ,ocaml-mdx)
+       ("jq" ,jq)))
+    (propagated-inputs
+     `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
+    (arguments
+     `(#:package "merlin"
+       #:test-target "tests"))
+    (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
+    (description "Merlin is an editor service that provides modern IDE
+features for OCaml.  Emacs and Vim support is provided out-of-the-box.
+External contributors added support for Visual Studio Code, Sublime Text and
+Atom.")
+    (license license:expat)))
+
 (define-public ocaml4.07-merlin
   (package
+    (inherit ocaml-merlin)
     (name "ocaml4.07-merlin")
     (version "3.2.2")
     (home-page "https://ocaml.github.io/merlin/")
@@ -4056,7 +4094,6 @@  documentation always stays up-to-date.")
        (sha256
         (base32
          "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
-    (build-system dune-build-system)
     (inputs
      `(("ocaml-biniou" ,(package-with-ocaml4.07 ocaml-biniou))
        ("ocaml-yojson" ,(package-with-ocaml4.07 ocaml-yojson))
@@ -4068,13 +4105,7 @@  documentation always stays up-to-date.")
        #:tests? #f ;; Errors in tests in version 3.2.2
        #:ocaml ,ocaml-4.07
        #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
-    (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
-    (description "Merlin is an editor service that provides modern IDE
-features for OCaml.  Emacs and Vim support is provided out-of-the-box.
-External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
-    (license license:expat)))
+       #:dune ,ocaml4.07-dune))))
 
 (define-public ocaml4.07-gsl
   (package
-- 
2.29.2