Message ID | 8bafadb0d4f4f3b1d1912c710f40f2ddd1a17cfd.1694423163.git.ludo@gnu.org |
---|---|
State | New |
Headers | show |
Series | [bug#65745,v2] gnu: yelp: Provide dependencies to display "man:" URIs. | expand |
Hi Ludo, Ludovic Courtès <ludo@gnu.org> writes: [...] > Here's an improved and more reasonable version. > > There's still an issue we should fix in 'man-db' but I ran out of time before > I could find the remaining place where 'man' searches for 'groff' in $PATH. > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 3b80692e90..36fe1a80a1 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -142,6 +142,7 @@ (define-module (gnu packages gnome) > #:use-module (gnu packages geo) > #:use-module (gnu packages gperf) > #:use-module (gnu packages graphviz) > + #:use-module (gnu packages groff) > #:use-module (gnu packages gstreamer) > #:use-module (gnu packages gtk) > #:use-module (gnu packages guile) > @@ -7336,6 +7337,28 @@ (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 #:allow-other-keys) > + ;; Invoke 'man' directly instead of searching $PATH. > + (substitute* '("libyelp/yelp-man-parser.c" > + "libyelp/yelp-uri.c") > + (("\"man\"") > + (string-append "\"" > + (search-input-file inputs "bin/man") > + "\"")) > + (("G_SPAWN_SEARCH_PATH") > + "0")))) > + (add-after 'install 'help-man-find-its-dependencies > + (lambda* (#:key inputs outputs #:allow-other-keys) > + ;; XXX: Currently 'man' looks for 'groff' in $PATH in one > + ;; case. This should be fixed in 'man-db' proper. > + (wrap-program (string-append (assoc-ref outputs "out") > + "/bin/yelp") > + `("PATH" ":" prefix > + (,(dirname (search-input-file inputs "bin/groff")))))))))) > (native-inputs > (list `(,glib "bin") ; for glib-genmarshal, etc. > intltool > @@ -7347,6 +7370,8 @@ (define-public yelp > (list gsettings-desktop-schemas > libhandy > libxslt > + man-db ;for URIs like "man:ls" > + groff-minimal ;ditto > sqlite > webkitgtk > yelp-xsl)) This v2 LGTM! Thanks for the fix.
Am Montag, dem 11.09.2023 um 10:13 -0400 schrieb Maxim Cournoyer: > Hi Ludo, > > Ludovic Courtès <ludo@gnu.org> writes: > > [...] > > > Here's an improved and more reasonable version. > > > > There's still an issue we should fix in 'man-db' but I ran out of > > time before > > I could find the remaining place where 'man' searches for 'groff' > > in $PATH. > > > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > > index 3b80692e90..36fe1a80a1 100644 > > --- a/gnu/packages/gnome.scm > > +++ b/gnu/packages/gnome.scm > > @@ -142,6 +142,7 @@ (define-module (gnu packages gnome) > > #:use-module (gnu packages geo) > > #:use-module (gnu packages gperf) > > #:use-module (gnu packages graphviz) > > + #:use-module (gnu packages groff) > > #:use-module (gnu packages gstreamer) > > #:use-module (gnu packages gtk) > > #:use-module (gnu packages guile) > > @@ -7336,6 +7337,28 @@ (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 #:allow-other-keys) > > + ;; Invoke 'man' directly instead of searching > > $PATH. > > + (substitute* '("libyelp/yelp-man-parser.c" > > + "libyelp/yelp-uri.c") > > + (("\"man\"") > > + (string-append "\"" > > + (search-input-file inputs > > "bin/man") > > + "\"")) > > + (("G_SPAWN_SEARCH_PATH") > > + "0")))) > > + (add-after 'install 'help-man-find-its-dependencies > > + (lambda* (#:key inputs outputs #:allow-other- > > keys) > > + ;; XXX: Currently 'man' looks for 'groff' in > > $PATH in one > > + ;; case. This should be fixed in 'man-db' > > proper. > > + (wrap-program (string-append (assoc-ref outputs > > "out") > > + "/bin/yelp") > > + `("PATH" ":" prefix > > + (,(dirname (search-input-file inputs > > "bin/groff")))))))))) > > (native-inputs > > (list `(,glib "bin") ; for glib-genmarshal, etc. > > intltool > > @@ -7347,6 +7370,8 @@ (define-public yelp > > (list gsettings-desktop-schemas > > libhandy > > libxslt > > + man-db ;for URIs like > > "man:ls" > > + groff-minimal ;ditto > > sqlite > > webkitgtk > > yelp-xsl)) > > This v2 LGTM! Thanks for the fix. Also LGTM
Pushed, thanks!
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3b80692e90..36fe1a80a1 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -142,6 +142,7 @@ (define-module (gnu packages gnome) #:use-module (gnu packages geo) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) + #:use-module (gnu packages groff) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) @@ -7336,6 +7337,28 @@ (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 #:allow-other-keys) + ;; Invoke 'man' directly instead of searching $PATH. + (substitute* '("libyelp/yelp-man-parser.c" + "libyelp/yelp-uri.c") + (("\"man\"") + (string-append "\"" + (search-input-file inputs "bin/man") + "\"")) + (("G_SPAWN_SEARCH_PATH") + "0")))) + (add-after 'install 'help-man-find-its-dependencies + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; XXX: Currently 'man' looks for 'groff' in $PATH in one + ;; case. This should be fixed in 'man-db' proper. + (wrap-program (string-append (assoc-ref outputs "out") + "/bin/yelp") + `("PATH" ":" prefix + (,(dirname (search-input-file inputs "bin/groff")))))))))) (native-inputs (list `(,glib "bin") ; for glib-genmarshal, etc. intltool @@ -7347,6 +7370,8 @@ (define-public yelp (list gsettings-desktop-schemas libhandy libxslt + man-db ;for URIs like "man:ls" + groff-minimal ;ditto sqlite webkitgtk yelp-xsl))