Subject: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths

From: Ludovic Courtès <[email-masked]>
Date: Thu, 10 Feb 2022 21:30:39 +0100

Hi Maxime,

Maxime Devos <[email-masked]> skribis:

> Ludovic Courtès schreef op vr 28-01-2022 om 23:34 [+0100]:

[...]

>> An option we’ve used before, in fact to work around
>> <https://issues.guix.gnu.org/22138>, is to define certain variables
>> globally; on Guix System, you’ll see this in /etc/profile:
>> 
>> --8<---------------cut here---------------start------------->8---
>> # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to
>> # find dictionaries.
>> export DICPATH=\
>> "$HOME/.guix-profile/share/hunspell\
>> :/run/current-system/profile/share/hunspell"
>> 
>> # Allow GStreamer-based applications to find plugins.
>> export GST_PLUGIN_PATH=\
>> "$HOME/.guix-profile/lib/gstreamer-1.0"
>> --8<---------------cut here---------------end--------------->8---
>> 
>> We should probably do the same for ‘TERMINFO_DIRS’.

[...]

> Ok, this could work with things in the user profile, but it's a rather
> ad-hoc solution and won't work with "guix shell", so I would prefer
> adding it to 'etc/profile'.

Yeah; like I wrote, it’s a workaround, but it solves the most common
issues.

> One option is to modify 'build-etc/profile' to always add
> 'TERMINFO_DIRS' (and maybe DICPATH, GUIX_LOCPATH and
> SSL_CERT_DIR/FILE?) to the list of search paths.

That’s not appealing to me; the way I see it, that’s going a bit too far
in the direction of dismissing per-package search paths in favor of
hard-coded lists of search paths.

>> (Of course that that doesn’t help on foreign distros, but maybe
>> ‘TERMINFO_DIRS’ is already set there?)
>
> I'm currently on Debian+Guix.  $TERMINFO_DIRS is not set here.
> Even if it was, I doubt you'd find the files for 'foot' in there
> unless 'foot' is installed with the foreign distro's installer
> -- AFAICT, 'foot' is not present in ncurses' terminfos.

Oh wait, I just realized that ‘foot’ comes with its own terminfo files.

In that case, the solution would be to wrap it so that it systematically
adds itself to TERMINFO_DIRS.  That’s the go-to solution in such
situations.

WDYT?

Ludo’.