>From 4427d0313fc07a8a2ff342575c7fe1e9c2a3b912 Mon Sep 17 00:00:00 2001 From: John Soo 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