all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brett Gilio <brettg@gnu.org>
To: 38784@debbugs.gnu.org
Subject: [bug#38784] [WIP 1/1] gnu: Add emacs-company-coq.
Date: Sat, 28 Dec 2019 16:43:15 -0600	[thread overview]
Message-ID: <87imm0hy0s.fsf@gnu.org> (raw)
In-Reply-To: <87mubchy3m.fsf@gnu.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [WIP 1/1] gnu: Add emacs-company-coq. --]
[-- Type: text/x-patch, Size: 4457 bytes --]

From 944029c25a80505aaa5f19928e4911360d8505de Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@gnu.org>
Date: Sat, 28 Dec 2019 16:38:24 -0600
Subject: [WIP 1/1] gnu: Add emacs-company-coq.
To: guix-patches@gnu.org

* gnu/packages/emacs-xyz.scm (emacs-company-coq): New variable.
---
 gnu/packages/emacs-xyz.scm | 75 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 06c8dc2016..b746e5a20a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -92,6 +92,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
+  #:use-module (gnu packages coq)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
@@ -20654,3 +20655,77 @@ buffer.  It can be used to toggle an alternative mode-line, toggle its visibilit
 or simply disable the mode-line in buffers where it is not very useful.")
     (home-page "https://github.com/hlissner/emacs-hide-mode-line")
     (license license:expat)))
+
+(define-public emacs-company-coq
+  (let ((commit "6e8bc2e367e8184079b7f4b4ab359b64ab884d7c")
+	(revision "1")
+	(version "1.0.1"))
+    (package
+      (name "emacs-company-coq")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/cpitclaudel/company-coq.git")
+               (commit commit)))
+         (sha256
+          (base32
+           "192vvz77yik0lx2g4yfjwx2himzzq4zhrc9mlyhdpwsmzwx7bf4r"))
+         (file-name (git-file-name name version))))
+      (build-system emacs-build-system)
+      (arguments
+       `(;; NOTE: By default this package leverages CASK. We do not need
+         ;; this. Instead, we will leverage Guix to handle installation
+         ;; for us.
+         ;; FIXME: REFMAN needs to be installed properly.
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'move-el
+             (lambda _
+               (for-each (lambda (f)
+                           (rename-file f (basename f)))
+                         (find-files "./etc" ".*\\.el$"))
+               (for-each (lambda (f)
+                           (rename-file f (basename f)))
+                         (find-files "./experiments" ".*\\.el$"))
+               #t))
+           (add-after 'move-el 'patch-proof-general
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Patch and load required components for proof-general.
+               (let* ((generic "/share/emacs/site-lisp/ProofGeneral/generic")
+                      (proof-site (string-append
+                                   (assoc-ref inputs "proof-general")
+                                   (string-append generic "/proof-site.el")))
+                      (proof-shell (string-append
+                                    (assoc-ref inputs "proof-general")
+                                    (string-append generic "/proof-shell.el"))))
+                 (substitute* "rebuild-screenshots.el"
+                   (("\\(require 'proof-site\\)")
+                    (string-append
+                     "(load-file \"" proof-site "\")")))
+                 (substitute* "company-coq.el"
+                   (("\\(require 'proof-site\\ nil t)")
+                    (string-append
+                     "(load-file \"" proof-site "\")")))
+                 (substitute* "company-coq-trace.el"
+                   (("\\(require 'proof-shell\\)")
+                    (string-append
+                     "(load-file \"" proof-shell "\")")))
+                 #t))))))
+      (propagated-inputs
+       `(("emacs-company-math" ,emacs-company-math)
+         ("emacs-company" ,emacs-company)
+         ("emacs-yasnippet" ,emacs-yasnippet)
+         ("emacs-dash" ,emacs-dash)
+         ("emacs-noflet" ,emacs-noflet)))
+      (native-inputs
+       `(("python" ,python)
+         ("proof-general" ,proof-general)))
+      (home-page "https://github.com/cpitclaudel/company-coq")
+      (synopsis
+       "Collection of extensions for Proof General's Coq mode")
+      (description
+       "This package includes a collection of company-mode backends for
+Proof-General's Coq mode, and many useful extensions to Proof-General.")
+      (license license:gpl3+))))
-- 
2.24.1

  reply	other threads:[~2019-12-28 22:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-28 22:41 [bug#38784] [WIP 0/1] Add emacs-company-coq Brett Gilio
2019-12-28 22:43 ` Brett Gilio [this message]
2022-04-12 10:45   ` bug#38784: " zimoun

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=87imm0hy0s.fsf@gnu.org \
    --to=brettg@gnu.org \
    --cc=38784@debbugs.gnu.org \
    /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.