emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65745: closed ([PATCH] gnu: yelp: Provide dependencies to display "m


From: GNU bug Tracking System
Subject: bug#65745: closed ([PATCH] gnu: yelp: Provide dependencies to display "man:" URIs.)
Date: Mon, 11 Sep 2023 21:57:02 +0000

Your message dated Mon, 11 Sep 2023 23:56:00 +0200
with message-id <87h6o0pe6n.fsf_-_@gnu.org>
and subject line Re: bug#65745: [PATCH] gnu: yelp: Provide dependencies to 
display "man:" URIs.
has caused the debbugs.gnu.org bug report #65745,
regarding [PATCH] gnu: yelp: Provide dependencies to display "man:" URIs.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
65745: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65745
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: yelp: Provide dependencies to display "man:" URIs. Date: Mon, 4 Sep 2023 22:58:55 +0200
Previously a command like the following one would fail to display the
expected man page:

  guix shell yelp coreutils man-db -C \
     --expose=/tmp/.X11-unix --expose=/run/user \
     --expose=/var/run/dbus --expose=/etc/machine-id \
     -E ^DISPLAY -- yelp man:ls

* gnu/packages/gnome.scm (yelp)[arguments]: New field.
[inputs]: Add 'man-db' and its "groff-minimal" input.

Reported-by: Luis Felipe <sirgazil@zoho.com>
---
 gnu/packages/gnome.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Hi!

Initially I wanted to fix support for URLs like “info:coreutils”,
which Luis also reported on the Fediverse as being broken.  However,
after much debugging I got lost in a maze of callbacks and threads
and opaque objects and eventually gave up.  Someone™ should take
another look.

For the record, this is how I went on my debugging journey:

  guix shell yelp coreutils man-db info-reader \
    --with-debug-info=yelp gdb --pure -E ^DISPLAY -- \
    gdb --args /bin/sh yelp info:coreutils

Ludo’.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3b80692e90..894d77d7ba 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7336,6 +7336,31 @@ (define-public yelp
                (base32
                 "0h9vf4fx056imjf8ibmn03wg1c3hniipy1nsm2jqi62lp1m19c95"))))
     (build-system glib-or-gtk-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'set-man-file-name
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   ;; Create a wrapper for 'man' that knows where to find
+                   ;; 'groff' and 'gunzip'.
+                   (define libexecdir
+                     (string-append #$output "/libexec/yelp"))
+                   (define wrapper
+                     (string-append libexecdir "/man"))
+
+                   (mkdir-p libexecdir)
+                   (symlink (search-input-file inputs "bin/man") wrapper)
+                   (wrap-program wrapper
+                     `("PATH" ":" =
+                       ,(map (lambda (program)
+                               (dirname (search-input-file inputs program)))
+                             '("bin/groff" "bin/gunzip"))))
+
+                   ;; Have Yelp use that 'man' wrapper instead of searching
+                   ;; for 'man' in $PATH.
+                   (substitute* "libyelp/yelp-man-parser.c"
+                     (("\"man\"")
+                      (string-append "\"" wrapper "\""))))))))
     (native-inputs
      (list `(,glib "bin") ; for glib-genmarshal, etc.
            intltool
@@ -7347,6 +7372,8 @@ (define-public yelp
      (list gsettings-desktop-schemas
            libhandy
            libxslt
+           man-db                                 ;for URIs like "man:ls"
+           (lookup-package-input man-db "groff-minimal") ;ditto
            sqlite
            webkitgtk
            yelp-xsl))

base-commit: 1af35bbb25b122cafddfd2f69b644d46c4beff85
-- 
2.41.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#65745: [PATCH] gnu: yelp: Provide dependencies to display "man:" URIs. Date: Mon, 11 Sep 2023 23:56:00 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Pushed, thanks!


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]