unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 37317@debbugs.gnu.org
Subject: [bug#37317] [PATCH] Add emacs-flyspell-grammalecte
Date: Fri, 06 Sep 2019 01:11:29 +0200	[thread overview]
Message-ID: <87mufipcda.fsf@nicolasgoaziou.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]

Hello,

The following patch adds emacs-flyspell-grammalecte.

Feedback welcome.

Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add emacs-flyspell-grammalecte --]
[-- Type: text/x-diff, Size: 3588 bytes --]

From d362da36f369d0bf98d49c484ce9fd6b0603b5b2 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Fri, 6 Sep 2019 01:10:10 +0200
Subject: [PATCH] gnu: Add emacs-flycheck-grammalecte.

* gnu/packages/emacs-xyz.scm (emacs-flycheck-grammalecte): New variable.
---
 gnu/packages/emacs-xyz.scm | 54 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8f866fbc28..7ca3f8e4ca 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -88,6 +88,7 @@
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages dictionaries)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
@@ -3076,6 +3077,59 @@ boundaries defined by syntax highlighting.")
 for Flow files.")
       (license license:gpl3+))))
 
+(define-public emacs-flycheck-grammalecte
+  (package
+    (name "emacs-flycheck-grammalecte")
+    (version "0.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://git.deparis.io/"
+                                  "flycheck-grammalecte/snapshot/"
+                                  "flycheck-grammalecte-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0wjm9xyra870pci4bcrbnc9x66x18mi7iz08rkxa4clxv28xzryb"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:include '("\\.(el|py)$")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-python
+           ;; Hardcode python3 executable in the Emacs library.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((python3 (string-append (assoc-ref inputs "python")
+                                           "/bin/python3")))
+               (substitute* "flycheck-grammalecte.el"
+                 (("python3") python3))
+               #t)))
+         (add-after 'install 'link-to-grammalecte
+           ;; The package expects grammalecte to be in a sub-directory.
+           ;; Symlink it there from the store.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((grammalecte (assoc-ref inputs "grammalecte"))
+                   (out (assoc-ref outputs "out"))
+                   (version ,(version-major+minor (package-version python))))
+               (with-directory-excursion
+                   (string-append out
+                                  "/share/emacs/site-lisp/guix.d/"
+                                  "flycheck-grammalecte-" ,version)
+                 (symlink (string-append grammalecte "/lib/"
+                                         "python" version "/site-packages/"
+                                         "grammalecte")
+                          "grammalecte"))))))))
+    (inputs
+     `(("grammalecte" ,grammalecte)
+       ("python" ,python)))
+    (propagated-inputs
+     `(("emacs-flycheck" ,emacs-flycheck)))
+    (home-page "https://git.deparis.io/flycheck-grammalecte/")
+    (synopsis "Integrate Grammalecte with Flycheck")
+    (description "Integrate the French grammar and typography checker
+Grammalecte with Flycheck to automatically look for mistakes in your
+writings. It also provides an easy way to find synonyms and antonyms for
+a given word (to avoid repetitions for example).")
+    (license license:gpl3+)))
+
 (define-public emacs-elisp-demos
   (package
     (name "emacs-elisp-demos")
-- 
2.23.0


             reply	other threads:[~2019-09-05 23:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 23:11 Nicolas Goaziou [this message]
2019-09-06  7:09 ` [bug#37317] [PATCH] Add emacs-flyspell-grammalecte Nicolas Goaziou
2019-09-26 21:11 ` Ludovic Courtès
2019-09-27 19:48   ` bug#37317: " Nicolas Goaziou

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mufipcda.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=37317@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).