diff mbox series

[bug#49819] gnu: Add emacs-geiser-chez.

Message ID 9443b246c7d74a51435e7f0c5bbb9c6ac23af33c.1627896152.git.public@yoctocell.xyz
State Accepted
Headers show
Series [bug#49819] gnu: Add emacs-geiser-chez. | expand

Checks

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

Commit Message

Xinglu Chen Aug. 2, 2021, 9:23 a.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-geiser-chez): New variable.
---
 gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)


base-commit: 536bec1ce5b3d68a6773f31e3788c63e8905ce98

Comments

Maxim Cournoyer Aug. 3, 2021, 7:01 p.m. UTC | #1
Hello,

Xinglu Chen <public@yoctocell.xyz> writes:

> * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): New variable.
> ---
>  gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index e3b94228e1..bbda1db614 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -138,6 +138,7 @@
>    #:use-module (gnu packages aspell)
>    #:use-module (gnu packages audio)
>    #:use-module (gnu packages bash)
> +  #:use-module (gnu packages chez)
>    #:use-module (gnu packages cmake)
>    #:use-module (gnu packages code)
>    #:use-module (gnu packages cpp)
> @@ -408,6 +409,48 @@ a generic Scheme interaction mode for the GNU Emacs editor.")
>  a generic Scheme interaction mode for the GNU Emacs editor.")
>      (license license:bsd-3)))
>  
> +(define-public emacs-geiser-chez
> +  (package
> +    (name "emacs-geiser-chez")
> +    (version "0.16")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://gitlab.com/emacs-geiser/chez")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> +         "0cc1z5z5cpvxa5f3n8kvms0wxlybzcg4l1bh3rwv1l1sb0lk1xzx"))))
> +    (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-chez-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 ")"))))))))

Could you please report the above issue to upstream so that it can
properly be fixed?  And then add a reference to it in a comment in the
above package definition.

> +    (inputs
> +     `(("chez-scheme" ,chez-scheme)))
> +    (propagated-inputs
> +     `(("emacs-geiser" ,emacs-geiser)))
> +    (home-page "https://nongnu.org/geiser/")
> +    (synopsis "Support for Chez Scheme in Geiser")
> +    (description
> +     "This package adds support for using Chez Scheme in Emacs with Geiser.")
> +    (license license:bsd-3)))
> +
>  (define-public emacs-vc-hgcmd
>    (package
>      (name "emacs-vc-hgcmd")

The rest LGTM!

Thank you,

Maxim
Xinglu Chen Aug. 4, 2021, 8:14 a.m. UTC | #2
On Tue, Aug 03 2021, Maxim Cournoyer wrote:

> Hello,
>
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>> * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): New variable.
>> ---
>>  gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 43 insertions(+)
>>
>> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
>> index e3b94228e1..bbda1db614 100644
>> --- a/gnu/packages/emacs-xyz.scm
>> +++ b/gnu/packages/emacs-xyz.scm
>> @@ -138,6 +138,7 @@
>>    #:use-module (gnu packages aspell)
>>    #:use-module (gnu packages audio)
>>    #:use-module (gnu packages bash)
>> +  #:use-module (gnu packages chez)
>>    #:use-module (gnu packages cmake)
>>    #:use-module (gnu packages code)
>>    #:use-module (gnu packages cpp)
>> @@ -408,6 +409,48 @@ a generic Scheme interaction mode for the GNU Emacs editor.")
>>  a generic Scheme interaction mode for the GNU Emacs editor.")
>>      (license license:bsd-3)))
>>  
>> +(define-public emacs-geiser-chez
>> +  (package
>> +    (name "emacs-geiser-chez")
>> +    (version "0.16")
>> +    (source
>> +     (origin
>> +       (method git-fetch)
>> +       (uri (git-reference
>> +             (url "https://gitlab.com/emacs-geiser/chez")
>> +             (commit version)))
>> +       (file-name (git-file-name name version))
>> +       (sha256
>> +        (base32
>> +         "0cc1z5z5cpvxa5f3n8kvms0wxlybzcg4l1bh3rwv1l1sb0lk1xzx"))))
>> +    (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-chez-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 ")"))))))))
>
> Could you please report the above issue to upstream so that it can
> properly be fixed?  And then add a reference to it in a comment in the
> above package definition.

Reported upstream; I will send a v2.  :)

  <https://gitlab.com/emacs-geiser/chez/-/issues/7>
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e3b94228e1..bbda1db614 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -138,6 +138,7 @@ 
   #:use-module (gnu packages aspell)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages chez)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
   #:use-module (gnu packages cpp)
@@ -408,6 +409,48 @@  a generic Scheme interaction mode for the GNU Emacs editor.")
 a generic Scheme interaction mode for the GNU Emacs editor.")
     (license license:bsd-3)))
 
+(define-public emacs-geiser-chez
+  (package
+    (name "emacs-geiser-chez")
+    (version "0.16")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/emacs-geiser/chez")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0cc1z5z5cpvxa5f3n8kvms0wxlybzcg4l1bh3rwv1l1sb0lk1xzx"))))
+    (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-chez-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 ")"))))))))
+    (inputs
+     `(("chez-scheme" ,chez-scheme)))
+    (propagated-inputs
+     `(("emacs-geiser" ,emacs-geiser)))
+    (home-page "https://nongnu.org/geiser/")
+    (synopsis "Support for Chez Scheme in Geiser")
+    (description
+     "This package adds support for using Chez Scheme in Emacs with Geiser.")
+    (license license:bsd-3)))
+
 (define-public emacs-vc-hgcmd
   (package
     (name "emacs-vc-hgcmd")