xdg-open
We're looking at adopting the 1.2 release in nixpkgs and noticed that the line below (https://gitlab.freedesktop.org/xdg/xdg-utils/-/blame/master/scripts/desc/xdg-open.xml#L157, added in 56ee8b38) is causing a little trouble:
In case the command <code>xdg-mime query default "$(xdg-mime query filetype troublesome file)"</code> names the program responsible for any unexpected behaviour you can fix that by setting a different handler. (If the program is broken let the developers know)
This gets rendered out into the unquoted _MANUALPAGE here document, so the Shell evaluates the command substitution in it when we run xdg-open --manual
:
$ result/bin/xdg-open --manual
xdg-mime: FILE argument missing
Try 'xdg-mime --help' for more information.
result/bin/xdg-open: line 39: troublesome: command not found
Name
xdg-open - opens a file or URL in the user's preferred application
...
(I think this process is also line-wrapping the text, which coincidentally splits the command substitution and causes the troublesome: command not found
.)
We can work around this by just patching << _MANUALPAGE
to << '_MANUALPAGE'
, but I imagine the proper fix may have to do with the process that renders out the doc escaping this.