guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: texlive: Fix 'texmf-local' search path.


From: Federico Beffa
Subject: Re: [PATCH] gnu: texlive: Fix 'texmf-local' search path.
Date: Mon, 20 Jun 2016 18:48:47 +0200

On Mon, Jun 20, 2016 at 10:58 AM, Andreas Enge <address@hidden> wrote:
> Hello Fede,
>
> apologies for not coming back to you earlier, I have little occasion to
> work on Guix right now.
>
> On Sun, Jun 12, 2016 at 10:56:40AM +0200, Federico Beffa wrote:
>>                  (substitute* texmfcnf
>>                    (("TEXMFROOT = \\$SELFAUTOPARENT")
>> -                  (string-append "TEXMFROOT = " share)))
>> +                   (string-append "TEXMFROOT = " share))
>> +                  (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
>> +                   "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
>> +                  (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
>
> As said before, this change should be benign, but also without effect:
> It still points to some place in the store, actually to the directory
>    /gnu/store/...-texlive-2015/share/texmf-local ,
> which does not exist.

Hi Andreas,

you are right, TEXMFLOCAL does still point to a nonexistent store
directory, but it is the "right" directory inside of the texlive
package tree. Without this it points to a location outside of every
package/profile tree.  Consider it an aesthetics improvement ;-)

> If we keep it, for clarity I would use
>    TEXMFLOCAL = $TEXMFROOT/texmf-local
> (as for the other variables defined around it), and add a comment that this
> declaration does not actually come into effect.

I think $SELFAUTODIR is the recommended way (in the TeXLive doc and in
comments inside of texmfcnf), but if you prefer we can use TEXMFROOT.

Note that the last entry in 'substitute*' is not just cosmetic: It
instructs TeX & friends not to look for ls-r databases, but to scan
the directory tree. If we would keep the '!!' prefixes to TEXMFLOCAL,
it would not work without adding a profile hook to generate the ls-r
database. As long as we do not have a large set of packages installing
into share/texmf-local, the speed penalty should be essentially
unnoticeable.

> I agree that this is a cleaner solution; maybe texmfcnf.lua needs to be
> adapted as well?

I have no idea about the purpose of this file. I don't find it
mentioned in the documentation
https://www.tug.org/texlive/doc/texlive-en/texlive-en.pdf. What is it
for?

>> +   (native-search-paths
>> +    (list (search-path-specification
>> +            (variable "TEXMFLOCAL")
>> +            (files '("share/texmf-local")))))
>
> This seems to be the main goal of your patch: By redefining TEXMFLOCAL in the
> profile, it will point to $HOME/.guix-profile/share/texmf-local. So if we add
> packages to the distribution that put data there, it should be available to
> texlive. Do you have an example package in mind? Does it work? Currently
> I cannot test it on my machine.

Yes, correct. However, as explained before, it only works in
conjunction with the removal of the '!!' prefix in texmfcnf.

The attached file includes a package called 'chez-web' which installs
a TeX macro. The package 'chez-sockets' makes use of the former and
does work as expected.

>
> There would be an alternative for people running Guix on top of another
> distro: We could set TEXMFLOCAL to /usr/share/texmf; then system installed
> texlive data could be used. This would work as long as the search path is
> not overwritten by a Guix installed package (which we do not have so far).

Personally I would prefer to avoid explicit cross-referencing between
Guix packages and non-Guix ones.

Regards,
Fede

P.S.: I have the package definitions in a local module. If you want to
try the packages I can share it with you. In the future I may send
patches to include them in Guix proper.

Attachment: example.scm
Description: Text Data


reply via email to

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