diff mbox series

[bug#48635,2/3] gnu: Add emacs-geiser-racket.

Message ID 20210524213932.1848-1-mail@davie.li
State Accepted
Headers show
Series Update emacs-geiser, emacs-geiser-guile and add emacs-geiser-racket | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

David Dashyan May 24, 2021, 9:39 p.m. UTC
---
 gnu/packages/emacs-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Nicolas Goaziou May 25, 2021, 9:36 a.m. UTC | #1
Hello,

David Dashyan <mail@davie.li> writes:

> ---
>  gnu/packages/emacs-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)

Thank you!

I tweaked the commit message and applied this patch. I dropped the other
two because they were a duplicate of bug#48537.

I forgot to add a copyright line for you in "emacs-xyz.scm". I'll do
that shortly.

Regards,
David Dashyan May 28, 2021, 12:48 p.m. UTC | #2
Nicolas Goaziou writes:
> I tweaked the commit message and applied this patch. I dropped the other
> two because they were a duplicate of bug#48537.

Thank you Nicolas!
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 46e28e6cbe..089d57f5f1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -187,6 +187,7 @@ 
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pdf)
+  #:use-module (gnu packages racket)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages rust-apps)
   #:use-module (gnu packages scheme)
@@ -360,6 +361,49 @@  using geiser.")
 a generic Scheme interaction mode for the GNU Emacs editor.")
     (license license:expat)))
 
+(define-public emacs-geiser-racket
+  (package
+    (name "emacs-geiser-racket")
+    (version "0.16")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/emacs-geiser/racket.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1aqsvmk1hi7kc3j4h8xlza7c6rwm71v98fv5wpw8kmyj9vsp49wx"))))
+    (build-system emacs-build-system)
+    (arguments
+     '(#:include (cons "^src/" %default-include)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'make-autoloads 'patch-autoloads
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* (string-append
+                           (elpa-directory (assoc-ref outputs "out"))
+                           "/geiser-racket-autoloads.el")
+               ;; Activating implementations fails when Geiser is not yet
+               ;; loaded, so let's defer that until it is.
+               (("\\(geiser-activate-implementation .*\\)" all)
+                (string-append
+                 "(eval-after-load 'geiser-impl '" all ")"))
+	       (("\\(geiser-implementation-extension .*\\)" all)
+                (string-append
+                 "(eval-after-load 'geiser-impl '" all ")")))
+             #t)))))
+    (inputs
+     `(("racket" ,racket)))
+    (propagated-inputs
+     `(("geiser" ,emacs-geiser)))
+    (home-page "https://nongnu.org/geiser/")
+    (synopsis "Racket support for Geiser")
+    (description
+     "This package adds support for the Racket implementation to Geiser,
+a generic Scheme interaction mode for the GNU Emacs editor.")
+    (license license:bsd-3)))
+
 (define-public emacs-vc-hgcmd
   (package
     (name "emacs-vc-hgcmd")