GNU bug report logs - #65107
[PATCH] gnu: Add gf.

Previous Next

Package: guix-patches;

Reported by: dan <i <at> dan.games>

Date: Sun, 6 Aug 2023 05:53:02 UTC

Severity: normal

Tags: patch

Full log


Message #17 received at 65107 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: dan <i <at> dan.games>
Cc: 65107 <at> debbugs.gnu.org
Subject: Re: [bug#65107] [PATCH v2] gnu: Add gf.
Date: Wed, 16 Aug 2023 22:23:27 +0800
Hi dan,

On Tue, 08 Aug 2023 09:57:59 +0800,
dan wrote:
>
> The following is the updated patch changed according to Hilton's
> suggestion. Note that for the vim version in guix we don't have `--servername'
> support, but I patched it anyway.
>
> ---


If you want to add explanation which isn't part of the commit message
to a patch, you can add it below the first "---" (i.e. here).  Content
above that line is used as git commit message.

And in Guix there's a vim-full package.


>  gnu/packages/debug.scm | 91 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 91 insertions(+)
>
> diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
> index e2a29a3ae9..57d0d3b479 100644
> --- a/gnu/packages/debug.scm
> +++ b/gnu/packages/debug.scm
[...]
> +             #:phases #~(modify-phases %standard-phases
> +                          (add-after 'unpack 'patch-path
> +                            (lambda* (#:key inputs outputs #:allow-other-keys)
> +                              (substitute* "gf2.cpp"
> +                                (("\"gdb\";")
> +                                 (format #f "\"~a\";"
> +                                         (search-input-file inputs "/bin/gdb")))
> +                                (("\"vim ")
> +                                 (format #f "\"~a "
> +                                         (search-input-file inputs "/bin/vim")))
> +                                (("grep")
> +                                 (format #f "~a"
> +                                         (search-input-file inputs "/bin/grep")))
> +                                (("fc-list")
> +                                 (format #f "~a"
> +                                         (search-input-file inputs
> +                                                            "/bin/fc-list")))
> +                                (("fc-match")
> +                                 (format #f "~a"
> +                                         (search-input-file inputs
> +                                                            "/bin/fc-match")))
> +                                (("awk")
> +                                 (format #f "~a"
> +                                         (search-input-file inputs "/bin/awk"))))))


Then here, search-input-file returns a string so those (format #f "~a"
...) invocations are unnecessary, some of the substitutions can be
merged into one as well:
--8<---------------cut here---------------start------------->8---
(("grep|fc-list|fc-match|awk" cmd)
 (search-input-file
  inputs (string-append "/bin/" cmd)))
--8<---------------cut here---------------end--------------->8---

Thanks




This bug report was last modified 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.