From: John Soo <jsoo1@asu.edu>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 45575@debbugs.gnu.org
Subject: [bug#45575] gnu: Update ocaml-merlin
Date: Thu, 31 Dec 2020 15:50:45 -0800 [thread overview]
Message-ID: <8735zl4jsa.fsf_-_@asu.edu> (raw)
In-Reply-To: <20201231233242.1a367ae3@tachikoma.lepiller.eu> (Julien Lepiller's message of "Thu, 31 Dec 2020 23:32:42 +0100")
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
Hi Julien,
Julien Lepiller <julien@lepiller.eu> writes:
> 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?
Oops! I have too many unmerged patches and rebasing is getting to be a
chore. ocaml-merlin on master looks good to me. The only thing I would
like to see is the emacs-merlin package. Having emacs-merlin as a
package is nice because it takes advantage of the guix autoload
machinery.
Here's a rebased patch. I understand if it needs more thought.
Thanks a lot!
- John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-merlin.patch --]
[-- Type: text/x-patch, Size: 4594 bytes --]
From f9b6926c9e15780aab978dabc7fd6f65365200cb Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 13:34:57 -0800
Subject: [PATCH] gnu: Add emacs-merlin.
* gnu/packages/emacs-xyz.scm (emacs-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output,
[description] Note location of emacs package.
---
gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
gnu/packages/ocaml.scm | 19 ++++++++++++++-----
2 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 2f8bc1c7f2..b49106dfa3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -137,6 +137,7 @@
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages ibus)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages telephony)
@@ -668,6 +669,43 @@ process, passing on the arguments as command line arguments.")
"Magit-annex adds a few git-annex operations to the Magit interface.")
(license license:gpl3+))))
+(define-public emacs-merlin
+ (package
+ (name "emacs-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 emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auto-complete" ,emacs-auto-complete)
+ ("emacs-company" ,emacs-company)
+ ("emacs-iedit" ,emacs-iedit)
+ ("ocaml-merlin" ,ocaml-merlin)))
+ (arguments
+ `(#:tests? #f ; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'setup-emacs-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((merlin (assoc-ref inputs "ocaml-merlin")))
+ (chdir "emacs")
+ (for-each make-file-writable (find-files "." "\\.el$"))
+ (emacs-substitute-variables "merlin.el"
+ ("merlin-command"
+ (string-append merlin "/bin/ocamlmerlin")))))))))
+ (synopsis "Context sensitive completion for OCaml in Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. This package provides the Emacs support for Merlin.")
+ (license license:expat)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..71a3a870e6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3951,22 +3951,31 @@ format}. @code{craml} is released as a single binary (called @code{craml}).")
(base32
"0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
(build-system dune-build-system)
- (arguments '(#:package "merlin"
- #:test-target "tests"))
+ (arguments
+ `(#:package "merlin"
+ #:test-target "tests"
+ #:phases
+ ;; FIXME: Make merlin.vim into a separate package.
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-emacs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/emacs")))))))
(inputs
`(("ocaml-yojson" ,ocaml-yojson)
("ocaml-csexp" ,ocaml-csexp)
("ocaml-result" ,ocaml-result)))
(native-inputs
- `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader) ; required for tests
- ("ocaml-mdx" ,ocaml-mdx)
+ `(("ocaml-mdx" ,ocaml-mdx)
("jq" ,jq)))
+ (propagated-inputs
+ `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
(home-page "https://ocaml.github.io/merlin/")
(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.")
+Atom. To install the emacs specific package, use @code{emacs-merlin}.")
(license license:expat)))
;; ocaml-merlin 3.4.2 can not be built with old version of dune used in
--
2.29.2
next prev parent reply other threads:[~2020-12-31 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
2020-12-31 22:00 ` [bug#45575] Add emacs-merlin John Soo
2020-12-31 22:05 ` John Soo
2020-12-31 22:13 ` John Soo
2020-12-31 22:32 ` [bug#45575] gnu: Update ocaml-merlin Julien Lepiller
2020-12-31 23:50 ` John Soo [this message]
2021-01-24 18:40 ` bug#45575: Already done John Soo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735zl4jsa.fsf_-_@asu.edu \
--to=jsoo1@asu.edu \
--cc=45575@debbugs.gnu.org \
--cc=julien@lepiller.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.