all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Rohleder <mike@rohleder.de>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 58213@debbugs.gnu.org
Subject: [bug#58213] [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp.
Date: Sun, 02 Oct 2022 22:42:27 +0200	[thread overview]
Message-ID: <8735c6t0ss.fsf@rohleder.de> (raw)
In-Reply-To: <YznU6XRPXBygWT2p@3900XT> (Efraim Flashner's message of "Sun, 2 Oct 2022 21:14:01 +0300")


[-- Attachment #1.1: Type: text/plain, Size: 215 bytes --]

Hi Efraim!

Thanks for reviewing!

Efraim Flashner <efraim@flashner.co.il> writes:
> Can you split this into two patches? The first to not propagate the
> silver searcher and the second to switch to gexps? Thanks.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: emacs-ag: Use gexps. --]
[-- Type: text/x-patch, Size: 1819 bytes --]

From 040aa27ca507032e8c02e02a90dc2e7aaecf4511 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 2 Oct 2022 22:01:17 +0200
Subject: [PATCH] gnu: emacs-ag: Use gexps.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
{install-info}: Adjust for gexps.
---
 gnu/packages/emacs-xyz.scm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 93ad1a6fbf..f907838dc8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3026,17 +3026,17 @@ (define-public emacs-ag
         (base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'make-info
-           (lambda _
-             (with-directory-excursion "docs"
-               (invoke "make" "info"))))
-         (add-after 'install 'install-info
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (info (string-append out "/share/info")))
-               (install-file "docs/_build/texinfo/agel.info" info)))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'make-info
+            (lambda _
+              (with-directory-excursion "docs"
+                (invoke "make" "info"))))
+          (add-after 'install 'install-info
+            (lambda _
+              (install-file "docs/_build/texinfo/agel.info"
+                            (string-append #$output "/share/info")))))))
     (native-inputs
      (list python-sphinx texinfo))
     (propagated-inputs
-- 
2.37.3


[-- Attachment #1.3: Type: text/plain, Size: 98 bytes --]


This applies to the first one.  I changed emacs-substitute-sexps to
emacs-substitute-variables.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: emacs-ag: Do not propagate the-silver-searcher. --]
[-- Type: text/x-patch, Size: 1836 bytes --]

From f3ace8a1daa1a40c90c08043df42d0af4864e5cb Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 2 Oct 2022 22:25:56 +0200
Subject: [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Add phase substitute-ag-path
to avoid propagating ag.
[inputs]: Add the-silver-searcher.
[propagated-inputs]: Remove the-silver-searcher.
---
 gnu/packages/emacs-xyz.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f907838dc8..ff2d45500e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3029,6 +3029,11 @@ (define-public emacs-ag
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'substitute-ag-path
+            (lambda _
+              (make-file-writable "ag.el")
+              (emacs-substitute-variables "ag.el"
+                ("ag-executable" (which "ag")))))
           (add-before 'install 'make-info
             (lambda _
               (with-directory-excursion "docs"
@@ -3037,12 +3042,11 @@ (define-public emacs-ag
             (lambda _
               (install-file "docs/_build/texinfo/agel.info"
                             (string-append #$output "/share/info")))))))
+    (inputs (list the-silver-searcher))
     (native-inputs
      (list python-sphinx texinfo))
     (propagated-inputs
-     (list emacs-dash
-           emacs-s
-           the-silver-searcher))        ;'ag' executable
+     (list emacs-dash emacs-s))
     (home-page "https://github.com/Wilfred/ag.el")
     (synopsis "Front-end for ag (the-silver-searcher) for Emacs")
     (description "This package provides the ability to use the silver
-- 
2.37.3


[-- Attachment #1.5: Type: text/plain, Size: 233 bytes --]


-- 
I still maintain the point that designing a monolithic kernel in 1991 is a
fundamental error.  Be thankful you are not my student.  You would not get a
high grade for such a design :-)
(Andrew Tanenbaum to Linus Torvalds)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

  reply	other threads:[~2022-10-02 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01  5:33 [bug#58213] [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp Michael Rohleder
2022-10-02 18:14 ` Efraim Flashner
2022-10-02 20:42   ` Michael Rohleder [this message]
2022-10-03  7:37     ` bug#58213: " Efraim Flashner

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=8735c6t0ss.fsf@rohleder.de \
    --to=mike@rohleder.de \
    --cc=58213@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /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.