unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas@enge.fr>
Cc: bug-guix@gnu.org
Subject: Re: Texlive
Date: Sun, 03 Feb 2013 19:30:14 +0100	[thread overview]
Message-ID: <87ip691c95.fsf@gnu.org> (raw)
In-Reply-To: <201302031756.11314.andreas@enge.fr> (Andreas Enge's message of "Sun, 3 Feb 2013 17:56:10 +0100")

Andreas Enge <andreas@enge.fr> skribis:

> the idea of having two packages, one containing the data and invisible to 
> the user, and one containing the binaries and depending on the data did not 
> work: The binaries need to create an index of the data that is stored in 
> the data directory, but a package has no write rights in another one, which 
> is coherent with the functional approach of guix.

OK.  So the catalogs are built once for all during the build, right?

> So I ended up creating one package with two outputs, "out" and "share"; the 
> user just installs the main package and has no reason to touch the "share" 
> part (which would not do any harm, either: installing it would create 
> 100000 unused symlinks in the user profile...). Just in case you wonder, 
> the "out" part contains the man and info pages in a subdirectory named 
> "share", while the "share" part contains three subdirectories not named 
> "share".

Perhaps “data” would be a (slightly) more descriptive name?

Looks like your approach works fine, but maybe we could still ask Karl
Berry to see what he thinks?

> The file is attached, and nitpicking is welcome. (Caveat: As said
> before, there are 1.5GB to download, and about 3GB to install, plus
> the same during unpacking.)

I’ll try once I have real network access.  :-)

> Concerning the license, there is not only one, see
>    http://www.tug.org/texlive/copying.html .
> But everything is FSF and Debian free. How about adding a license "mixed" 
> or "fsf-free"? Or do you have a good suggestion?

Yes, or we could just export the ‘license’ constructor from (guix
licenses).  That would allow us to make a custom <license> objects when
needed, like here.

> PS: So that I can fully drop my Debian packages, now we only need X.org to 
> enable xdvi ;-)

And the good thing is that now that you’ve done TeX Live and netpbm,
you’ll find that Xorg is really piece of cake.  :-)

Some nitpicking, since you asked:  ;-)

> (define-public texlive
>   (package
>    (name "texlive")
>    (version "2012")

Should be 20120701 no?

>        (alist-cons-after 'install 'postinst
>          (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)

Could you maybe move 'install to the next line, aligned with the ‘a’ of
‘alist-cons-after’?  (Otherwise Emacs/Paredit will mess up with the
indentation since it would do it like that.)

>              ;; Create symbolic links for the latex variants and their
>              ;; man pages.
>              (let ((bin (string-append out "/bin/"))
>                    (man (string-append out "/share/man/man1/")))
>                (symlink (string-append bin "pdftex")
>                         (string-append bin "latex"))
>                (symlink (string-append bin "pdftex")
>                         (string-append bin "pdflatex"))
>                (symlink (string-append bin "xetex")
>                         (string-append bin "xelatex"))
>                (symlink (string-append bin "luatex")
>                         (string-append bin "lualatex"))
>                (symlink (string-append man "luatex.1")
>                         (string-append man "lualatex.1")))

Rather:

  (with-directory-excursion bin
    (for-each symlink
              '("pdftex" "pdftex" "xetex" "luatex" "luatex.1")
              '("latex" "pdflatex" "xelatex" "lualatex" "lualatex.1")))

>              (mkdir "texlive-extra")
>              (chdir "texlive-extra")
>              (apply unpack (list #:source texlive-extra))
>              (apply patch-source-shebangs (list #:source texlive-extra))
>              (system* "mv" "tlpkg" share)
>              (chdir "../..")

When you have paired ‘cd foo’ and ‘cd ..’, you can instead use
‘with-directory-excursion’, as shown above.

>              (system* "mv" "texmf" share)
>              (system* "mv" "texmf-dist" share)
>              (chdir "../..")

Likewise.

>              ;; Configure the texlive system; inspired from
>              ;; http://slackbuilds.org/repository/13.37/office/texlive/
>              (display (string-append (getcwd) "\n"))
>              (display (string-append out "\n"))
>              (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
>              (display (string-append (getenv "PATH") "\n"))

Looks like the ‘display’ calls are debugging output that could be
removed?

If you want to keep them, write it like:

  (format #t "PATH set to `~a'~%" (getenv "PATH"))

Other than that, impressive work, Sir!

Ludo’.

  reply	other threads:[~2013-02-03 18:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 16:56 Texlive Andreas Enge
2013-02-03 18:30 ` Ludovic Courtès [this message]
2013-02-05 17:04   ` Texlive Andreas Enge
2013-02-05 17:11     ` Texlive Andreas Enge
2013-02-05 21:03     ` Texlive Ludovic Courtès
2013-02-05 22:03       ` Texlive Andreas Enge
2013-02-05 22:51         ` Texlive Ludovic Courtès
2013-02-05 19:30   ` Texlive Andreas Enge
2013-02-05 21:11     ` Texlive Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ip691c95.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=andreas@enge.fr \
    --cc=bug-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).