[PATCH] gnu: emacs-deadgrep: Add missing input.

  • Done
  • quality assurance status badge
Details
2 participants
  • Matthew James Kraai
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Matthew James Kraai
Severity
normal

Debbugs page

Matthew James Kraai wrote 4 years ago
(address . guix-patches@gnu.org)(name . Matthew James Kraai)(address . kraai@ftbfs.org)
20210707031810.27321-1-kraai@ftbfs.org
* gnu/packages/emacs-xyz.scm (emacs-deadgrep)[propagated-inputs]: Add
ripgrep.
---
gnu/packages/emacs-xyz.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Add ripgrep as propagated-input, as is done for emacs-ripgrep and emacs-rg.

Toggle diff (16 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9591a4e6e7..029b20ee72 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20805,7 +20805,8 @@ accept and reject GitHub pull requests.")
(propagated-inputs
`(("emacs-dash" ,emacs-dash)
("emacs-s" ,emacs-s)
- ("emacs-spinner" ,emacs-spinner)))
+ ("emacs-spinner" ,emacs-spinner)
+ ("ripgrep" ,ripgrep)))
(home-page "https://github.com/Wilfred/deadgrep")
(synopsis "Frontend for @code{ripgrep}")
(description "This package provides an Emacs interface for performing
--
2.32.0
Nicolas Goaziou wrote 4 years ago
(name . Matthew James Kraai)(address . kraai@ftbfs.org)(address . 49450@debbugs.gnu.org)
878s2itdc4.fsf@nicolasgoaziou.fr
Hello,

Matthew James Kraai <kraai@ftbfs.org> writes:

Toggle quote (9 lines)
> * gnu/packages/emacs-xyz.scm (emacs-deadgrep)[propagated-inputs]: Add
> ripgrep.
> ---
> gnu/packages/emacs-xyz.scm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Add ripgrep as propagated-input, as is done for emacs-ripgrep and
> emacs-rg.

I think ripgrep should be an input. Both emacs-ripgrep and emacs-rg
needs to be fixed, too.

Regards,
--
Nicolas Goaziou
Matthew Kraai wrote 4 years ago
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 49450@debbugs.gnu.org)
859C1BD7-D59C-4990-949F-376ADF47AF26@ftbfs.org
Hi Nicolas,

I was trying to ensure that when emacs-deadgrep is installed, ripgrep is also installed. The former doesn’t need the latter to build but does require it at runtime. Isn’t propagated-inputs the right field for that?

Sent from my iPhone

Toggle quote (21 lines)
> On Jul 7, 2021, at 7:20 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> Matthew James Kraai <kraai@ftbfs.org> writes:
>
>> * gnu/packages/emacs-xyz.scm (emacs-deadgrep)[propagated-inputs]: Add
>> ripgrep.
>> ---
>> gnu/packages/emacs-xyz.scm | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> Add ripgrep as propagated-input, as is done for emacs-ripgrep and
>> emacs-rg.
>
> I think ripgrep should be an input. Both emacs-ripgrep and emacs-rg
> needs to be fixed, too.
>
> Regards,
> --
> Nicolas Goaziou
Nicolas Goaziou wrote 4 years ago
(name . Matthew Kraai)(address . kraai@ftbfs.org)(address . 49450@debbugs.gnu.org)
874kd6t925.fsf@nicolasgoaziou.fr
Matthew Kraai <kraai@ftbfs.org> writes:

Toggle quote (5 lines)
> I was trying to ensure that when emacs-deadgrep is installed, ripgrep
> is also installed. The former doesn’t need the latter to build but
> does require it at runtime. Isn’t propagated-inputs the right field
> for that?

Inputs are also available at runtime, but do not clobber user's profile.
It's preferable to use them, when it's reasonably possible.

In this case, it means you just need to modify the Elisp source to make
sure code points to the right ripgrep executable in the store. See,
e.g., emacs-flycheck-grammalecte.
Matthew James Kraai wrote 4 years ago
[PATCH] gnu: emacs-deadgrep: Add missing input.
(address . 49450@debbugs.gnu.org)(name . Matthew James Kraai)(address . kraai@ftbfs.org)
20210707235624.25962-1-kraai@ftbfs.org
* gnu/packages/emacs-xyz.scm (emacs-deadgrep)[inputs]: Add ripgrep.
[arguments]: Add configure phase to set deadgrep-executable to absolute path.
---
gnu/packages/emacs-xyz.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9591a4e6e7..fd7f1b54d3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20802,10 +20802,25 @@ accept and reject GitHub pull requests.")
(base32
"1vjhrq02l8gvdn2haygzq7277hnhjchs9xrfpcnh76gqip200gx4"))))
(build-system emacs-build-system)
+ (inputs `(("ripgrep" ,ripgrep)))
(propagated-inputs
`(("emacs-dash" ,emacs-dash)
("emacs-s" ,emacs-s)
("emacs-spinner" ,emacs-spinner)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((ripgrep (assoc-ref inputs "ripgrep")))
+ ;; .el is read-only in git.
+ (chmod "deadgrep.el" #o644)
+ ;; Specify the absolute file names of rg so that everything
+ ;; works out-of-the-box.
+ (emacs-substitute-variables
+ "deadgrep.el"
+ ("deadgrep-executable"
+ (string-append ripgrep "/bin/rg")))))))))
(home-page "https://github.com/Wilfred/deadgrep")
(synopsis "Frontend for @code{ripgrep}")
(description "This package provides an Emacs interface for performing
--
2.32.0
Nicolas Goaziou wrote 4 years ago
(name . Matthew James Kraai)(address . kraai@ftbfs.org)(address . 49450-done@debbugs.gnu.org)
87h7h5qmyd.fsf@nicolasgoaziou.fr
Hello,

Matthew James Kraai <kraai@ftbfs.org> writes:

Toggle quote (4 lines)
> * gnu/packages/emacs-xyz.scm (emacs-deadgrep)[inputs]: Add ripgrep.
> [arguments]: Add configure phase to set deadgrep-executable to
> absolute path.

Thank you.

Toggle quote (3 lines)
> + ;; .el is read-only in git.
> + (chmod "deadgrep.el" #o644)

I used `make-file-writable' function instead of chmod.

Applied. Thank you.

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49450@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49450
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help