From patchwork Thu Dec 31 22:05:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Soo X-Patchwork-Id: 26135 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5F7D127BC06; Thu, 31 Dec 2020 22:06:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C79B627BC05 for ; Thu, 31 Dec 2020 22:06:09 +0000 (GMT) Received: from localhost ([::1]:36466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv65B-0003UX-0t for patchwork@mira.cbaines.net; Thu, 31 Dec 2020 17:06:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv654-0003UK-Oq for guix-patches@gnu.org; Thu, 31 Dec 2020 17:06:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kv654-0008Gd-HI for guix-patches@gnu.org; Thu, 31 Dec 2020 17:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kv654-0001UM-B5 for guix-patches@gnu.org; Thu, 31 Dec 2020 17:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45575] Add emacs-merlin References: <87eej54upy.fsf@asu.edu> In-Reply-To: <87eej54upy.fsf@asu.edu> Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 31 Dec 2020 22:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45575 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 45575@debbugs.gnu.org Received: via spool by 45575-submit@debbugs.gnu.org id=B45575.16094523545706 (code B ref 45575); Thu, 31 Dec 2020 22:06:02 +0000 Received: (at 45575) by debbugs.gnu.org; 31 Dec 2020 22:05:54 +0000 Received: from localhost ([127.0.0.1]:41779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv64v-0001Tu-H3 for submit@debbugs.gnu.org; Thu, 31 Dec 2020 17:05:53 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:55753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv64p-0001Te-Md for 45575@debbugs.gnu.org; Thu, 31 Dec 2020 17:05:52 -0500 Received: by mail-pj1-f47.google.com with SMTP id lb18so5428429pjb.5 for <45575@debbugs.gnu.org>; Thu, 31 Dec 2020 14:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=4HvycHCzpToGf9i0uPHGdI/1utLRGBhuI1nHcjL+DXY=; b=SW/eamklqr/NCzSeRXPOjdHGNst/AH+6DmvWYBGiQt1oSYclnQ49tkrL4hOvqK5r8h yQhavy6SRSr8a68P7N+lacvEAsz0s0a4TqeKZ3gDDsYoBDEJ8EbxV40vnHYBDR2R/VRX /Hp6N4hCHOphsYTBKjSx/IS7NfPKnKE18llwBrFIOmH5rZpXlIwKCk0WkyruraYxrT6I HN3t7Q857ot12kvIiyS2B+EO7FzFcZSFwnVttvWzrrZRj2b8pEOE7/pFh2/uKV7BRudd p4/cDiH/nIt/W6a+0U1HEtIy0MkPf5tBSWMQeu7Lc79RVs5kWHqZKmALjwmKcEDuylyA AWrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=4HvycHCzpToGf9i0uPHGdI/1utLRGBhuI1nHcjL+DXY=; b=TaX9WzFuioV6G08nmwaG26YKOxyjefHzGcHebFYR1tn+pkC5Q919fE9BQVWJPsSRO+ 0BU0qL5miyhIB6LH3O7NJtqi2hGMi5bpGZc/dkEJHap/fJHn5cqQ/gKBMxH76yUaHa2f TKC9NeESxlunALDBnkJPBvz54xn1GScCnb1Bgfpc63d71leVI4tgFLPVQ70lwp5rPJ3S uK70PmOzE+UhI4/9uH94oBL+58at1o8q2COJEYvRLex238LS9dMwfu0o5rk4J+PbSXkX DawoZgJb+yikcXj+aWqz9kntaDIZTaQxi+IxGa8+2Wam5Ddpjsjtj5LYgb6315ifO1lz ot0w== X-Gm-Message-State: AOAM533BIwEqFcnXK3qDRiEV+FhDLos6cwHwgknvkaRUcl+ywnPZD236 vvfcdLByjhWx9URig/gaK5W8pS/Bo8eTGw== X-Google-Smtp-Source: ABdhPJw5tIwQU2wC1Ac+lGNx10MHuDp57lmW4FQUUMfLfph/Dqk+Xqrn4fpNztjiIgYpU3K6TaDtEQ== X-Received: by 2002:a17:902:8503:b029:dc:44f:62d8 with SMTP id bj3-20020a1709028503b02900dc044f62d8mr58631633plb.34.1609452341858; Thu, 31 Dec 2020 14:05:41 -0800 (PST) Received: from ecenter ([2600:1700:83b0:8bd0::7a8]) by smtp.gmail.com with ESMTPSA id t7sm46927169pfe.179.2020.12.31.14.05.40 for <45575@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Dec 2020 14:05:41 -0800 (PST) From: John Soo Date: Thu, 31 Dec 2020 14:05:40 -0800 Message-ID: <878s9d4onf.fsf@asu.edu> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Oops, I forgot to update the description of ocaml-merlin to reflect the emacs package name. From 26c6ad5f03381277b079165c27f75a12758e0ba5 Mon Sep 17 00:00:00 2001 From: John Soo 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 | 39 ++++++++++++++++++++++++++++++++++++++ gnu/packages/ocaml.scm | 11 +++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0d8d6837e1..a97bd5ce1e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -135,6 +135,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) @@ -646,6 +647,44 @@ 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 bb5d6c4e92..3e71f17dc8 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4070,12 +4070,19 @@ documentation always stays up-to-date.") `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader))) (arguments `(#:package "merlin" - #:test-target "tests")) + #: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"))))))) (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))) (define-public ocaml4.07-merlin -- 2.29.2