From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Texlive Date: Sun, 03 Feb 2013 19:30:14 +0100 Message-ID: <87ip691c95.fsf@gnu.org> References: <201302031756.11314.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U24Kw-0002Yk-DF for bug-guix@gnu.org; Sun, 03 Feb 2013 13:30:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U24Ku-0006UO-Q3 for bug-guix@gnu.org; Sun, 03 Feb 2013 13:30:42 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:27580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U24Ku-0006UE-G7 for bug-guix@gnu.org; Sun, 03 Feb 2013 13:30:40 -0500 In-Reply-To: <201302031756.11314.andreas@enge.fr> (Andreas Enge's message of "Sun, 3 Feb 2013 17:56:10 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > the idea of having two packages, one containing the data and invisible to= =20 > the user, and one containing the binaries and depending on the data did n= ot=20 > work: The binaries need to create an index of the data that is stored in= =20 > the data directory, but a package has no write rights in another one, whi= ch=20 > 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"; t= he=20 > user just installs the main package and has no reason to touch the "share= "=20 > part (which would not do any harm, either: installing it would create=20 > 100000 unused symlinks in the user profile...). Just in case you wonder,= =20 > the "out" part contains the man and info pages in a subdirectory named=20 > "share", while the "share" part contains three subdirectories not named=20 > "share". Perhaps =E2=80=9Cdata=E2=80=9D 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=E2=80=99ll 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"= =20 > or "fsf-free"? Or do you have a good suggestion? Yes, or we could just export the =E2=80=98license=E2=80=99 constructor from= (guix licenses). That would allow us to make a custom objects when needed, like here. > PS: So that I can fully drop my Debian packages, now we only need X.org t= o=20 > enable xdvi ;-) And the good thing is that now that you=E2=80=99ve done TeX Live and netpbm, you=E2=80=99ll 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 =E2=80=98a= =E2=80=99 of =E2=80=98alist-cons-after=E2=80=99? (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 =E2=80=98cd foo=E2=80=99 and =E2=80=98cd ..=E2=80=99, = you can instead use =E2=80=98with-directory-excursion=E2=80=99, 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 =E2=80=98display=E2=80=99 calls are debugging output that co= uld 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=E2=80=99.