diff mbox series

[bug#58213] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp.

Message ID 8735c6t0ss.fsf@rohleder.de
State Accepted
Headers show
Series [bug#58213] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp. | expand

Checks

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

Commit Message

Michael Rohleder Oct. 2, 2022, 8:42 p.m. UTC
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.
This applies to the first one.  I changed emacs-substitute-sexps to
emacs-substitute-variables.

Comments

Efraim Flashner Oct. 3, 2022, 7:37 a.m. UTC | #1
On Sun, Oct 02, 2022 at 10:42:27PM +0200, Michael Rohleder wrote:
> 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.

Thanks. Patches pushed!
diff mbox series

Patch

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