Subject: [bug#60820] [PATCH] Add 'totpages' latex package.

From: Nicolas Goaziou <[email-masked]>
Date: Tue, 24 Jan 2023 14:16:29 +0100

Hello,

[email-masked] writes:

>> > +(define-public texlive-latex-totpages
>
>> The name should be texlive-totpages.
>
> Is there a reason why? The package lives under the latex/ directory, like the hyphenat and totpages package, which have latex- in their name.

Guix dropped the directory part in package names months ago. It doesn't
always make sense: some packages install files in more than one
top-level directory. Also, it was decided packages should follow TeXLive
naming scheme, as used in "texlive.tlpdb".

As another data point, if you import hyphenat

  guix shell subversion -- import texlive hyphenat

you can see the suggested name is "texlive-hyphenat":

  (... (simple-texlive-package "texlive-hyphenat" ...))

Note also that a number of deprecation functions in "tex.scm" already
move packages to the suggested naming scheme, e.g.:

  (define-deprecated-package texlive-latex-beamer texlive-beamer)

It is unfortunate that hyphenat package was pushed with the wrong name.
It will need a deprecation notice at some point.

>> > +  (package
>> > +    (inherit (simple-texlive-package "texlive-latex-totpages"
>> > +                                     (list "doc/latex/totpages/"
>> > +                                           "source/latex/totpages/"
>> > +                                           "tex/latex/totpages/")
>> > +                                     (base32
>> > +                                      "1mmya2fqdskyavw3hvdiygfyp9cll7bl4lpi7pl2jf9s7ds49j5a")
>> > +                                     #:trivial? #t))
>
> I am confused. The hyphenat package also has a .ins in its archive,
> and it is defined as a trivial package.

Again, current hyphenat package is wrong. You should not consider it as
an example. It simply does not install enough files.

Guix provides an helper function to determine if a TeXLive package is
complete or not, `files-differ?' in (guix import texlive):

  $ guix repl
  scheme@(guix-user)> ,use (guix import texlive)
  scheme@(guix-user)> (files-differ? "/gnu/store/n7pbka00i9y7jvbvqpm2jzf961cmlyya-texlive-latex-hyphenat-59745/share" "hyphenat")
  $1 = ("texmf-dist/source/latex/hyphenat/hyphenat.ins" "texmf-dist/source/latex/hyphenat/hyphenat.dtx")

It means that hyphenat package doesn't install its sources. Not good.

> Maybe I need to just remove source/latex/totpages from the list?

Please don't. I already suggested how to deal with the issue. Do not
hesitate to ping me if you have troubles with what I suggest.

Regards,
-- 
Nicolas Goaziou