Subject: bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa)

From: Marius Bakke <[email-masked]>
Date: Sat, 22 Apr 2017 12:16:26 +0200

Hi Maxim,

Maxim Cournoyer <[email-masked]> writes:

> Hello Marius,
>
> Marius Bakke <[email-masked]> writes:
>> [...]
>> +         (add-before 'build 'locate-catalog-files
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
>> +                                          "/xml/dtd/docbook"))
>> +                   (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
>> +                                          "/xml/xsl/docbook-xsl-"
>> +                                          ,(package-version docbook-xsl))))
>> +               (for-each (lambda (file)
>> +                           (substitute* file
>> +                             (("http://.*/docbookx\\.dtd")
>> +                              (string-append xmldoc "/docbookx.dtd"))))
>> +                         (find-files "scripts/desc" "\\.xml$"))
>> +               (substitute* "scripts/Makefile"
>> +                 ;; Apparently `xmlto' does not bother to looks up the stylesheets
>> +                 ;; specified in the XML, unlike the above substitition. Instead it
>> +                 ;; uses a hard-coded URL. Work around it here, but if this is
>> +                 ;; common perhaps we should hardcode this path in xmlto itself.
>> +                 (("\\$\\(XMLTO\\) man")
>> +                  (string-append "$(XMLTO) -x " xsldoc
>> +                                 "/manpages/docbook.xsl man")))
>
> Have you tried setting the XML_CATALOG_FILES variable? You might be able
> to get rid of the substitutions by using it. You can simply add libxml2
> as an input, which will define such variable for you (thanks to Ludovic
> for pointing this out previously!).

I tried now to add libxml2, and also set XML_CATALOG_FILES manually (and
both :)), but no luck. Thanks for the tip, though. Would be good to find
out why it doesn't work for this case.