Andreas Enge <andr...@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’.