all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Texlive
@ 2013-02-03 16:56 Andreas Enge
  2013-02-03 18:30 ` Texlive Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Andreas Enge @ 2013-02-03 16:56 UTC (permalink / raw)
  To: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 1301 bytes --]

Hello,

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.

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". 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.)

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?

Andreas

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

[-- Attachment #1.2: Type: text/html, Size: 3766 bytes --]

[-- Attachment #2: texlive.scm --]
[-- Type: text/x-scheme, Size: 8848 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages texlive)
;;   #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages freetype)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages libpng)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages zip))

(define texlive-extra-src
  (origin
    (method url-fetch)
    (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
    (sha256 (base32
              "0cb8fnv4x281gy5ka779f00ssdmdpjj4x3pkh9j9vq45hrwg3522"))))

(define texlive-texmf-src
  (origin
    (method url-fetch)
    (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
    (sha256 (base32
              "1fn1dg9k7pnh8a80j23zfkbrfnqyc4c2w4ss30dpkqj490nxsywq"))))

(define-public texlive
  (package
   (name "texlive")
   (version "2012")
   (source (origin
            (method url-fetch)
            (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
            (sha256 (base32
                     "10bcrdfsqnc6y3gqcb8ndnjy07i5kz63as39irbq4gmcbmyn2rln"))))
   (build-system gnu-build-system)
   (inputs `(("texlive-extra-src" ,texlive-extra-src)
             ("texlive-texmf-src" ,texlive-texmf-src)
             ("fontconfig" ,fontconfig)
             ("freetype" ,freetype)
             ("icu4c" ,icu4c)
             ("ghostscript" ,ghostscript)
             ("libpng" ,libpng)
             ("perl" ,perl)
             ("poppler" ,poppler)
             ("pkg-config" ,pkg-config)
             ;; FIXME: Add interpreters csh, fontforge and ruby,
             ;; once they are available.
             ("python" ,python)
             ("teckit" ,teckit)
             ("t1lib" ,t1lib)
             ("zlib" ,zlib)
             ("zziplib" ,zziplib)))
   (outputs '("share" "out"))
   (arguments
    `(#:out-of-source? #t
      #:configure-flags
       '("--disable-native-texlive-build"
         "--without-x" ; FIXME: Drop as soon as X is available.
         "--with-system-freetype2"
         ;; "--with-system-gd"
         ;; "--with-system-graphite"
         "--with-system-icu"
         "--with-system-libgs"
         "--with-system-libpng"
         "--with-system-poppler"
         "--with-system-t1lib"
         "--with-system-teckit"
         "--with-system-xpdf"
         "--with-system-zlib"
         "--with-system-zziplib")
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key outputs #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure))
               (share (assoc-ref outputs "share")))
           (substitute* "utils/psutils/Makefile.in"
             (("/usr/bin/env perl") (which "perl")))
           ;; Correct targets for symbolic links of binaries.
           (substitute* '("texk/texlive/linked_scripts/Makefile.in"
                          "texk/texlive/linked_scripts/Makefile.in"
                          "texk/tetex/Makefile.in"
                          "texk/tex4htk/Makefile.in"
                          "utils/psutils/Makefile.in"
                          "utils/chktex/Makefile.in"
                          "utils/mtx/Makefile.in"
                          "utils/pmx/Makefile.in"
                          "utils/ps2eps/Makefile.in")
            (("\\$\\$REL/") (string-append share "/")))
           (apply configure args)))
       (alist-cons-after 'install 'postinst
         (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
           (let ((texlive-extra (assoc-ref inputs "texlive-extra-src"))
                 (texlive-texmf (assoc-ref inputs "texlive-texmf-src"))
                 (out (assoc-ref outputs "out"))
                 (share (assoc-ref outputs "share"))
                 (unpack (assoc-ref %standard-phases 'unpack))
                 (patch-source-shebangs
                   (assoc-ref %standard-phases 'patch-source-shebangs)))
             ;; 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")))
             ;; Create the output directory for the shared data
             ;; tlpkg, texmf and texmf-dist.
             (mkdir share)
             ;; Unpack texlive-extra and install tlpkg.
             (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 "../..")
             ;; Unpack and install texlive-texmf.
             (mkdir "texlive-texmf")
             (chdir "texlive-texmf")
             (apply unpack (list #:source texlive-texmf))
             (apply patch-source-shebangs (list #:source texlive-texmf))
             ;; Register "share" for kpathsea in texmf.cnf.
             (substitute* "texmf/web2c/texmf.cnf"
               (("TEXMFROOT = \\$SELFAUTOPARENT")
               (string-append "TEXMFROOT = " share)))
             (system* "mv" "texmf" share)
             (system* "mv" "texmf-dist" share)
             (chdir "../..")
             ;; Delete (most of) texmf and texmf-dist for "out", since they
             ;; are now in "share" from texlive-texmf; the purpose of this
             ;; procedure is to avoid installing them in the user profile.
             ;; But texmf.cnf must be placed in "out", since kpsewhich does
             ;; not know about "share" until it has found this file.
             (system* "rm" "-r" (string-append out "/share/texmf"))
             (system* "rm" "-r" (string-append out "/share/texmf-dist"))
             (mkdir (string-append out "/share/texmf"))
             (mkdir (string-append out "/share/texmf/web2c"))
             (copy-file (string-append share "/texmf/web2c/texmf.cnf")
               (string-append out "/share/texmf/web2c/texmf.cnf"))))
       (alist-cons-after 'patch-shebangs 'texconfig
         (lambda* (#:key outputs #:allow-other-keys)
           (let ((out (assoc-ref outputs "out")))
             ;; 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"))
             (system* "updmap-sys" "--nohash" "--syncwithtrees")
             (system* "mktexlsr")
             (system* "fmtutil-sys" "--all")))
       %standard-phases)))))
   (synopsis "Tex Live, a package of the TeX typesetting system")
   (description
    "TeX Live provides a comprehensive TeX document production system.
It includes all the major TeX-related programs, macro packages, and fonts
that are free software, including support for many languages around the
world.")
   (license "other")
   (home-page "http://www.tug.org/texlive/")))

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-03 16:56 Texlive Andreas Enge
@ 2013-02-03 18:30 ` Ludovic Courtès
  2013-02-05 17:04   ` Texlive Andreas Enge
  2013-02-05 19:30   ` Texlive Andreas Enge
  0 siblings, 2 replies; 22+ messages in thread
From: Ludovic Courtès @ 2013-02-03 18:30 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

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’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-03 18:30 ` Texlive Ludovic Courtès
@ 2013-02-05 17:04   ` Andreas Enge
  2013-02-05 17:11     ` Texlive Andreas Enge
  2013-02-05 21:03     ` Texlive Ludovic Courtès
  2013-02-05 19:30   ` Texlive Andreas Enge
  1 sibling, 2 replies; 22+ messages in thread
From: Andreas Enge @ 2013-02-05 17:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]

Am Sonntag, 3. Februar 2013 schrieb Ludovic Courtès:
> OK.  So the catalogs are built once for all during the build, right?

Yes, over the full content of the texlive distribution.

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

Okay, why not; I used "share" because normally the subdirectories end up in 
"share".

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

This would be an opportunity to ask him a few questions, so why not.

> > 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.

Or we could leave it empty in some way; just call it "free"? It is clear 
that we will only package free software; so a license field that can only 
state "a collection of free licenses, for details, see the source" conveys 
really no information at all. So I do not see what to construct here. My 
suggestion:

(define fsf
  (license "fsf"
           "http://www.gnu.org/licenses/"
           "A collection of free licenses according to the FSF, see the 
source for details."))

> 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.  :-)

After looking at it, my impression is that at least the build process 
should be much easier (once the right order of installation determined).

> > (define-public texlive
> > 
> >   (package
> >   
> >    (name "texlive")
> >    (version "2012")
> Should be 20120701 no?

There is one edition per year, commonly refered to as "TeX Live 20YY"; so 
there is no reason to go into more datails.

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

Very elegant, thanks for the suggestion! But actually, this manual symlink 
phase has become superfluous by some directoty related configure flags I 
just added.

> >              (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.

Okay. Here it is less useful, since "unpack" changes directories, so a 
"chdir ".."" will remain in any case.

Andreas

[-- Attachment #2: Type: text/html, Size: 12681 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-05 17:04   ` Texlive Andreas Enge
@ 2013-02-05 17:11     ` Andreas Enge
  2013-02-05 21:03     ` Texlive Ludovic Courtès
  1 sibling, 0 replies; 22+ messages in thread
From: Andreas Enge @ 2013-02-05 17:11 UTC (permalink / raw)
  To: bug-guix

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Am Dienstag, 5. Februar 2013 schrieb Andreas Enge:
> Am Sonntag, 3. Februar 2013 schrieb Ludovic Courtès:
> >   (with-directory-excursion bin
> >     (for-each symlink
> >               '("pdftex" "pdftex" "xetex" "luatex" "luatex.1")
> >               '("latex" "pdflatex" "xelatex" "lualatex"
> >               "lualatex.1")))
> Very elegant, thanks for the suggestion! But actually, this manual
> symlink phase has become superfluous by some directoty related
> configure flags I just added.

Sorry, I was mixing things up; my comment refers to another place, so this 
is still useful.

Andreas

[-- Attachment #2: Type: text/html, Size: 3244 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-03 18:30 ` Texlive Ludovic Courtès
  2013-02-05 17:04   ` Texlive Andreas Enge
@ 2013-02-05 19:30   ` Andreas Enge
  2013-02-05 21:11     ` Texlive Ludovic Courtès
  1 sibling, 1 reply; 22+ messages in thread
From: Andreas Enge @ 2013-02-05 19:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 107 bytes --]

Hello,

attached what I think could be the final version, once the license question 
is decided.

Andreas


[-- Attachment #1.2: Type: text/html, Size: 1478 bytes --]

[-- Attachment #2: texlive.scm --]
[-- Type: text/x-scheme, Size: 7986 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages texlive)
  #:use-module ((guix licenses)
                #:renamer (symbol-prefix-proc 'license:))
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages freetype)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages libpng)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages zip))

(define texlive-extra-src
  (origin
    (method url-fetch)
    (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
    (sha256 (base32
              "0cb8fnv4x281gy5ka779f00ssdmdpjj4x3pkh9j9vq45hrwg3522"))))

(define texlive-texmf-src
  (origin
    (method url-fetch)
    (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
    (sha256 (base32
              "1fn1dg9k7pnh8a80j23zfkbrfnqyc4c2w4ss30dpkqj490nxsywq"))))

(define-public texlive
  (package
   (name "texlive")
   (version "2012")
   (source (origin
            (method url-fetch)
            (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
            (sha256 (base32
                     "10bcrdfsqnc6y3gqcb8ndnjy07i5kz63as39irbq4gmcbmyn2rln"))))
   (build-system gnu-build-system)
   (inputs `(("texlive-extra-src" ,texlive-extra-src)
             ("texlive-texmf-src" ,texlive-texmf-src)
             ("fontconfig" ,fontconfig)
             ("freetype" ,freetype)
             ("icu4c" ,icu4c)
             ("ghostscript" ,ghostscript)
             ("libpng" ,libpng)
             ("perl" ,perl)
             ("poppler" ,poppler)
             ("pkg-config" ,pkg-config)
             ;; FIXME: Add interpreters csh, fontforge and ruby,
             ;; once they are available.
             ("python" ,python)
             ("teckit" ,teckit)
             ("t1lib" ,t1lib)
             ("zlib" ,zlib)
             ("zziplib" ,zziplib)))
   (outputs '("out" "data"))
   (arguments
    `(#:out-of-source? #t
      #:configure-flags
       `("--disable-native-texlive-build"
         ;; Although the texmf and texmf-dist data is taken from
         ;; texlive-texmf, setting datarootdir is still useful:
         ;; "make install" creates symbolic links to scripts in this place.
         ,(string-append "--datarootdir=" (assoc-ref %outputs "data"))
         ,(string-append "--infodir=" (assoc-ref %outputs "out") "/share/info")
         ,(string-append "--mandir=" (assoc-ref %outputs "out") "/share/man")
         "--without-x" ; FIXME: Drop as soon as X is available.
         "--with-system-freetype2"
         ;; "--with-system-gd"
         ;; "--with-system-graphite"
         "--with-system-icu"
         "--with-system-libgs"
         "--with-system-libpng"
         "--with-system-poppler"
         "--with-system-t1lib"
         "--with-system-teckit"
         "--with-system-xpdf"
         "--with-system-zlib"
         "--with-system-zziplib")
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key outputs #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           (substitute* "utils/psutils/Makefile.in"
             (("/usr/bin/env perl") (which "perl")))
           (apply configure args)))
       (alist-cons-after
        'install 'postinst
         (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
           (let ((texlive-extra (assoc-ref inputs "texlive-extra-src"))
                 (texlive-texmf (assoc-ref inputs "texlive-texmf-src"))
                 (out (assoc-ref outputs "out"))
                 (data (assoc-ref outputs "data"))
                 (unpack (assoc-ref %standard-phases 'unpack))
                 (patch-source-shebangs
                   (assoc-ref %standard-phases 'patch-source-shebangs)))
             ;; Create symbolic links for the latex variants and their
             ;; man pages.
             (with-directory-excursion (string-append out "/bin/")
               (for-each symlink
               '("pdftex" "pdftex"   "xetex"   "luatex")
               '("latex"  "pdflatex" "xelatex" "lualatex")))
             (with-directory-excursion (string-append out "/share/man/man1/")
               (symlink "luatex.1" "lualatex.1"))
             ;; Delete texmf and texmf-dist from "data", since they
             ;; will be reinstalled from texlive-texmf.
             (system* "rm" "-r" (string-append data "/texmf"))
             (system* "rm" "-r" (string-append data "/texmf-dist"))
             ;; Unpack texlive-extra and install tlpkg.
             (mkdir "texlive-extra")
             (with-directory-excursion "texlive-extra"
               (apply unpack (list #:source texlive-extra))
               (apply patch-source-shebangs (list #:source texlive-extra))
               (system* "mv" "tlpkg" data)
               (chdir ".."))
             ;; Unpack and install texlive-texmf.
             (mkdir "texlive-texmf")
             (with-directory-excursion "texlive-texmf"
               (apply unpack (list #:source texlive-texmf))
               (apply patch-source-shebangs (list #:source texlive-texmf))
               ;; Register "data" for kpathsea in texmf.cnf.
               (substitute* "texmf/web2c/texmf.cnf"
                 (("TEXMFROOT = \\$SELFAUTOPARENT")
                 (string-append "TEXMFROOT = " data)))
               (system* "mv" "texmf" data)
               (system* "mv" "texmf-dist" data)
               (chdir ".."))
             ;; texmf.cnf must also be placed in "out", since kpsewhich does
             ;; not know about "data" until it has found this file.
             (mkdir (string-append out "/share/texmf"))
             (mkdir (string-append out "/share/texmf/web2c"))
             (copy-file (string-append data "/texmf/web2c/texmf.cnf")
               (string-append out "/share/texmf/web2c/texmf.cnf"))))
       (alist-cons-after 'patch-shebangs 'texconfig
         (lambda* (#:key outputs #:allow-other-keys)
           (let ((out (assoc-ref outputs "out")))
             ;; Configure the texlive system; inspired from
             ;; http://slackbuilds.org/repository/13.37/office/texlive/
             (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
             (system* "updmap-sys" "--nohash" "--syncwithtrees")
             (system* "mktexlsr")
             (system* "fmtutil-sys" "--all")))
       %standard-phases)))))
   (synopsis "Tex Live, a package of the TeX typesetting system")
   (description
    "TeX Live provides a comprehensive TeX document production system.
It includes all the major TeX-related programs, macro packages, and fonts
that are free software, including support for many languages around the
world.")
   (license license:fsf)
   (home-page "http://www.tug.org/texlive/")))

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-05 17:04   ` Texlive Andreas Enge
  2013-02-05 17:11     ` Texlive Andreas Enge
@ 2013-02-05 21:03     ` Ludovic Courtès
  2013-02-05 22:03       ` Texlive Andreas Enge
  1 sibling, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2013-02-05 21:03 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Sonntag, 3. Februar 2013 schrieb Ludovic Courtès:

[...]

>> 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.
>
> Or we could leave it empty in some way; just call it "free"? It is clear 
> that we will only package free software; so a license field that can only 
> state "a collection of free licenses, for details, see the source" conveys 
> really no information at all. So I do not see what to construct here. My 
> suggestion:
>
> (define fsf
>   (license "fsf"
>            "http://www.gnu.org/licenses/"
>            "A collection of free licenses according to the FSF, see the 
> source for details."))

Well, for licenses that we fail to classify, I think we should at least
provide a URL or file name to look at, along with an indication of
whether it’s copyleft.

Similar to ‘bsd-style’, what about adding:

  (define (copyleft url #:optional (comment "")) ...)
  (define (fsf-free url #:optional (comment "")) ...)

For TeX Live, we’d use

  (fsf-free "http://tug.org/texlive/copying.html")

WDYT?

>> > (define-public texlive
>> > 
>> >   (package
>> >   
>> >    (name "texlive")
>> >    (version "2012")
>> Should be 20120701 no?
>
> There is one edition per year, commonly refered to as "TeX Live 20YY"; so 
> there is no reason to go into more datails.

OK (I was wondering because the tarball name contains additional digits.)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-05 19:30   ` Texlive Andreas Enge
@ 2013-02-05 21:11     ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2013-02-05 21:11 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Looks good to me!

Andreas Enge <andreas@enge.fr> skribis:

>             (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")

While looking for mirrors at
<http://tug.org/texlive/acquire-netinstall.html>, I noticed that mirrors
usually have a slightly older version–e.g.,
<http://osl.ugr.es/CTAN/systems/texlive/Source/texlive-20120628-source.tar.xz>.

Perhaps we should just stick to tug.org.

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-05 21:03     ` Texlive Ludovic Courtès
@ 2013-02-05 22:03       ` Andreas Enge
  2013-02-05 22:51         ` Texlive Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Andreas Enge @ 2013-02-05 22:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]

Am Dienstag, 5. Februar 2013 schrieb Ludovic Courtès:
> Similar to ‘bsd-style’, what about adding:
>   (define (copyleft url #:optional (comment "")) ...)
>   (define (fsf-free url #:optional (comment "")) ...)

Not sure if we need two of them. Is the attached patch okay?

Andreas

[-- Attachment #1.2: Type: text/html, Size: 1968 bytes --]

[-- Attachment #2: 0001-licenses-Add-new-meta-license-fsf-free.patch --]
[-- Type: text/x-patch, Size: 1227 bytes --]

From e3603d27c42d15e7c90f5130a83b15d5a11239aa Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Tue, 5 Feb 2013 23:01:14 +0100
Subject: [PATCH] licenses: Add new meta-license fsf-free.

* guix/licenses.scm (fsf-free): New record with constructor.
---
 guix/licenses.scm |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/guix/licenses.scm b/guix/licenses.scm
index c636cc5..1b149b5 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -39,7 +39,8 @@
             qpl
             vim
             x11
-            zlib))
+            zlib
+            fsf-free))
 
 (define-record-type <license>
   (license name uri comment)
@@ -234,4 +235,11 @@ which may be a file:// URI pointing the package's tree."
            "http://www.gzip.org/zlib/zlib_license.html"
            "https://www.gnu.org/licenses/license-list#ZLib"))
 
+(define* (fsf-free uri #:optional (comment ""))
+  "Return a license that does not fit any of the ones above or a collection
+of licenses, approved as free by the FSF.  More details can be found at URI."
+  (license "FSF-free"
+           uri
+           comment))
+
 ;;; licenses.scm ends here
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: Texlive
  2013-02-05 22:03       ` Texlive Andreas Enge
@ 2013-02-05 22:51         ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2013-02-05 22:51 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Dienstag, 5. Februar 2013 schrieb Ludovic Courtès:
>> Similar to ‘bsd-style’, what about adding:
>>   (define (copyleft url #:optional (comment "")) ...)
>>   (define (fsf-free url #:optional (comment "")) ...)
>
> Not sure if we need two of them. Is the attached patch okay?

Yes, please apply.

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Texlive
@ 2015-03-14 21:54 Andreas Enge
  2015-03-14 23:43 ` Texlive Daniel Pimentel
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Andreas Enge @ 2015-03-14 21:54 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Hello,

the attached patch does what its commit message says. It is the fruit of many
trials and discussions with Ludovic. The tricky thing was to link to the
kpsewhich binary in texlive-bin, but to make it take its configuration file
texmf.cnf from texlive-data. I ended up wrapping all binaries and providing
them with the suitable value of TEXMFCNF.

The real goal of the patch is to make it easy to create a second package
texlive-small in a second step. This package shall inherit from texlive,
but have as input texlive-texmf-small, which is created as texlive-texmf,
but after deleting a big chunk of data; I would say, all the documentation
and most of the fonts. Such a smaller package could be a native input for
packages creating their documentation from a latex source, for instance.

Andreas


[-- Attachment #2: 0001-gnu-texlive-Make-the-package-structure-more-modular.patch --]
[-- Type: text/plain, Size: 14646 bytes --]

From 57f19f831c4b5df30b80e58066f0c4f1fd4ac9fb Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Sat, 14 Mar 2015 22:42:41 +0100
Subject: [PATCH] gnu: texlive: Make the package structure more modular.

* gnu/packages/texlive.scm (texlive-bin, texlive-texmf): New variables.
  The first one contains the binaries; the second one the texmf tree.
  (texlive): Drop output "data". Create the output "out" as the union
  of the suitable subdirectories of texlive-bin and texlive-texmf, and
  wrap the binaries, setting TEXMFCNF to the value corresponding to
  texlive-texmf.
---
 gnu/packages/texlive.scm | 248 +++++++++++++++++++++++++++++++----------------
 1 file changed, 166 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/texlive.scm b/gnu/packages/texlive.scm
index f757350..a4cb0f9 100644
--- a/gnu/packages/texlive.scm
+++ b/gnu/packages/texlive.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;;
@@ -23,7 +23,9 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
@@ -31,6 +33,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -57,54 +60,48 @@
     (sha256 (base32
               "0qsr55ms1278dhmgixs5qqwd4fxhh369ihkki6wgh8xaqm8p48p0"))))
 
-(define-public texlive
+(define-public texlive-bin
   (package
-   (name "texlive")
+   (name "texlive-bin")
    (version "2014")
-   (source (origin
-            (method url-fetch)
-            (uri "ftp://tug.org/historic/systems/texlive/2014/texlive-20140525-source.tar.xz")
-            (sha256 (base32
-                     "1glmaw2jv42grbsn05kay825j66scimjqqc32776bb1356q4xfq8"))))
+   (source
+    (origin
+     (method url-fetch)
+      (uri "ftp://tug.org/historic/systems/texlive/2014/texlive-20140525-source.tar.xz")
+      (sha256 (base32
+               "1glmaw2jv42grbsn05kay825j66scimjqqc32776bb1356q4xfq8"))))
    (build-system gnu-build-system)
-   (inputs `(("texlive-extra-src" ,texlive-extra-src)
-             ("texlive-texmf-src" ,texlive-texmf-src)
-             ("cairo" ,cairo)
-             ("fontconfig" ,fontconfig)
-             ("fontforge" ,fontforge)
-             ("freetype" ,freetype)
-             ("gd" ,gd)
-             ("ghostscript" ,ghostscript)
-             ("graphite2" ,graphite2)
-             ("harfbuzz" ,harfbuzz)
-             ("icu4c" ,icu4c)
-             ("libpaper" ,libpaper)
-             ("libpng" ,libpng)
-             ("libxaw" ,libxaw)
-             ("libxt" ,libxt)
-             ("perl" ,perl)
-             ("pixman" ,pixman)
-             ("poppler" ,poppler)
-             ("potrace" ,potrace)
-             ("python" ,python-2) ; incompatible with Python 3 (print syntax)
-             ("ruby" ,ruby)
-             ("tcsh" ,tcsh)
-             ("teckit" ,teckit)
-             ("zlib" ,zlib)
-             ("zziplib" ,zziplib)))
+   (inputs
+    `(("texlive-extra-src" ,texlive-extra-src)
+      ("cairo" ,cairo)
+      ("fontconfig" ,fontconfig)
+      ("fontforge" ,fontforge)
+      ("freetype" ,freetype)
+      ("gd" ,gd)
+      ("ghostscript" ,ghostscript)
+      ("graphite2" ,graphite2)
+      ("harfbuzz" ,harfbuzz)
+      ("icu4c" ,icu4c)
+      ("libpaper" ,libpaper)
+      ("libpng" ,libpng)
+      ("libxaw" ,libxaw)
+      ("libxt" ,libxt)
+      ("perl" ,perl)
+      ("pixman" ,pixman)
+      ("poppler" ,poppler)
+      ("potrace" ,potrace)
+      ("python" ,python-2) ; incompatible with Python 3 (print syntax)
+      ("ruby" ,ruby)
+      ("tcsh" ,tcsh)
+      ("teckit" ,teckit)
+      ("zlib" ,zlib)
+      ("zziplib" ,zziplib)))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
-   (outputs '("out" "data"))
    (arguments
     `(#:out-of-source? #t
       #:configure-flags
        `("--disable-native-texlive-build"
-         ;; Although the texmf-dist data is taken from texlive-texmf,
-         ;; setting datarootdir is still useful:
-         ;; "make install" creates symbolic links to scripts in this place.
-         ,(string-append "--datarootdir=" (assoc-ref %outputs "data"))
-         ,(string-append "--infodir=" (assoc-ref %outputs "out") "/share/info")
-         ,(string-append "--mandir=" (assoc-ref %outputs "out") "/share/man")
          "--with-system-cairo"
          "--with-system-freetype2"
          "--with-system-gd"
@@ -124,70 +121,157 @@
 
       ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
       ;; XXX FIXME fix luajit properly on mips64.
-      #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
+      #:tests? ,(not (equal? "mips64el-linux" (or (%current-target-system)
                                                   (%current-system))))
       #:phases
        (alist-cons-after
         'install 'postinst
          (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-           (let ((texlive-extra (assoc-ref inputs "texlive-extra-src"))
-                 (texlive-texmf (assoc-ref inputs "texlive-texmf-src"))
-                 (out (assoc-ref outputs "out"))
-                 (data (assoc-ref outputs "data"))
-                 (unpack (assoc-ref %standard-phases 'unpack))
-                 (patch-source-shebangs
-                   (assoc-ref %standard-phases 'patch-source-shebangs)))
+           (let* ((out (assoc-ref outputs "out"))
+                  (share (string-append out "/share"))
+                  (texlive-extra (assoc-ref inputs "texlive-extra-src"))
+                  (unpack (assoc-ref %standard-phases 'unpack))
+                  (patch-source-shebangs
+                    (assoc-ref %standard-phases 'patch-source-shebangs)))
              ;; Create symbolic links for the latex variants and their
              ;; man pages.
              (with-directory-excursion (string-append out "/bin/")
                (for-each symlink
                '("pdftex" "pdftex"   "xetex"   "luatex")
                '("latex"  "pdflatex" "xelatex" "lualatex")))
-             (with-directory-excursion (string-append out "/share/man/man1/")
+             (with-directory-excursion (string-append share "/man/man1/")
                (symlink "luatex.1" "lualatex.1"))
-             ;; Delete texmf-dist from "data", since it will be reinstalled
-             ;; from texlive-texmf.
-             (system* "rm" "-r" (string-append data "/texmf-dist"))
              ;; Unpack texlive-extra and install tlpkg.
              (mkdir "texlive-extra")
              (with-directory-excursion "texlive-extra"
                (apply unpack (list #:source texlive-extra))
                (apply patch-source-shebangs (list #:source texlive-extra))
-               (system* "mv" "tlpkg" data)
-               (chdir ".."))
-             ;; Unpack and install texlive-texmf.
-             (mkdir "texlive-texmf")
-             (with-directory-excursion "texlive-texmf"
-               (apply unpack (list #:source texlive-texmf))
-               (apply patch-source-shebangs (list #:source texlive-texmf))
-               ;; Register "data" for kpathsea in texmf.cnf.
-               (substitute* "texmf-dist/web2c/texmf.cnf"
-                 (("TEXMFROOT = \\$SELFAUTOPARENT")
-                 (string-append "TEXMFROOT = " data)))
-               (system* "mv" "texmf-dist" data)
-               (chdir ".."))
-             ;; texmf.cnf must also be placed in "out", since kpsewhich does
-             ;; not know about "data" until it has found this file.
-             (mkdir (string-append out "/share/texmf-dist"))
-             (mkdir (string-append out "/share/texmf-dist/web2c"))
-             (copy-file (string-append data "/texmf-dist/web2c/texmf.cnf")
-               (string-append out "/share/texmf-dist/web2c/texmf.cnf"))))
-       (alist-cons-after 'patch-shebangs 'texconfig
+               (system* "mv" "tlpkg" share))))
+        %standard-phases)))
+   (synopsis "TeX Live, a package of the TeX typesetting system")
+   (description
+    "TeX Live provides a comprehensive TeX document production system.
+It includes all the major TeX-related programs, macro packages, and fonts
+that are free software, including support for many languages around the
+world.
+
+This package contains the binaries.")
+   (license (license:fsf-free "http://tug.org/texlive/copying.html"))
+   (home-page "http://www.tug.org/texlive/")))
+
+(define-public texlive-texmf
+  (package
+   (name "texlive-texmf")
+   (version "2014")
+   (source texlive-texmf-src)
+   (build-system gnu-build-system)
+   (inputs
+    `(("texlive-bin" ,texlive-bin)
+      ("lua" ,lua)
+      ("perl" ,perl)
+      ("python" ,python-2) ; incompatible with Python 3 (print syntax)
+      ("ruby" ,ruby)
+      ("tcsh" ,tcsh)))
+   (arguments
+    `(#:modules ((guix build gnu-build-system)
+                 (guix build utils)
+                 (srfi srfi-26))
+      #:imported-modules ((guix build gnu-build-system)
+                          (guix build utils))
+      #:phases
+        (alist-cons-before
+         'texmf-config 'install
          (lambda* (#:key outputs #:allow-other-keys)
-           (let ((out (assoc-ref outputs "out")))
-             ;; Configure the texlive system; inspired from
-             ;; http://slackbuilds.org/repository/13.37/office/texlive/
-             (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
-             (system* "updmap-sys" "--nohash" "--syncwithtrees")
-             (system* "mktexlsr")
-             (system* "fmtutil-sys" "--all")))
-       %standard-phases))))
-   (synopsis "Tex Live, a package of the TeX typesetting system")
+           (let ((share (string-append (assoc-ref outputs "out") "/share")))
+             (mkdir-p share)
+             (system* "mv" "texmf-dist" share)))
+         (alist-cons-after
+          'patch-source-shebangs 'texmf-config
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((share (string-append (assoc-ref outputs "out") "/share"))
+                   (texmfroot (string-append share "/texmf-dist/web2c"))
+                   (texmfcnf (string-append texmfroot "/texmf.cnf"))
+                   (texbin (string-append (assoc-ref inputs "texlive-bin")
+                            "/bin")))
+              ;; Register SHARE as TEXMFROOT in texmf.cnf.
+              (substitute* texmfcnf
+                (("TEXMFROOT = \\$SELFAUTOPARENT")
+                (string-append "TEXMFROOT = " share)))
+              ;; Configure the texmf-dist tree; inspired from
+              ;; http://slackbuilds.org/repository/13.37/office/texlive/
+              (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
+              (setenv "TEXMFCNF" texmfroot)
+              (system* "updmap-sys" "--nohash" "--syncwithtrees")
+              (system* "mktexlsr")
+              (system* "fmtutil-sys" "--all")))
+          (map (cut assq <> %standard-phases)
+               '(set-paths unpack patch-source-shebangs))))))
+   (synopsis "TeX Live, a package of the TeX typesetting system")
    (description
     "TeX Live provides a comprehensive TeX document production system.
 It includes all the major TeX-related programs, macro packages, and fonts
 that are free software, including support for many languages around the
-world.")
+world.
+
+This package contains the complete tree of texmf-dist data.")
+   (license (license:fsf-free "http://tug.org/texlive/copying.html"))
+   (home-page "http://www.tug.org/texlive/")))
+
+(define-public texlive
+  (package
+   (name "texlive")
+   (version "2014")
+   (source #f)
+   (build-system trivial-build-system)
+   (inputs `(("bash" ,bash) ; for wrap-program
+             ("texlive-bin" ,texlive-bin)
+             ("texlive-texmf" ,texlive-texmf)))
+   (arguments
+    `(#:modules ((guix build utils))
+      #:builder
+        ;; Build the union of texlive-bin and texlive-texmf, but take the
+        ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
+        (begin
+          (use-modules (guix build utils))
+          (let ((out (assoc-ref %outputs "out"))
+                (bin (assoc-ref %build-inputs "texlive-bin"))
+                (texmf (assoc-ref %build-inputs "texlive-texmf"))
+                (bash (assoc-ref %build-inputs "bash")))
+               (mkdir out)
+               (with-directory-excursion out
+                 (for-each
+                   (lambda (name)
+                     (symlink (string-append bin "/" name) name))
+                   '("include" "lib"))
+                 (mkdir "bin")
+                 (with-directory-excursion "bin"
+                   (setenv "PATH" (string-append bash "/bin"))
+                   (for-each
+                     (lambda (name)
+                       (symlink name (basename name))
+                       (wrap-program
+                         (basename name)
+                         `("TEXMFCNF" =
+                           (,(string-append texmf "/share/texmf-dist/web2c")))))
+                     (find-files (string-append bin "/bin/") "")))
+                 (mkdir "share")
+                 (with-directory-excursion "share"
+                   (for-each
+                     (lambda (name)
+                       (symlink (string-append bin "/share/" name) name))
+                     '("info" "man" "tlpkg"))
+                   (for-each
+                     (lambda (name)
+                       (symlink (string-append texmf "/share/" name) name))
+                     '("texmf-dist" "texmf-var"))))))))
+   (synopsis "TeX Live, a package of the TeX typesetting system")
+   (description
+    "TeX Live provides a comprehensive TeX document production system.
+It includes all the major TeX-related programs, macro packages, and fonts
+that are free software, including support for many languages around the
+world.
+
+This package contains the complete TeX Live distribution.")
    (license (license:fsf-free "http://tug.org/texlive/copying.html"))
    (home-page "http://www.tug.org/texlive/")))
 
-- 
2.2.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-14 21:54 Texlive Andreas Enge
@ 2015-03-14 23:43 ` Daniel Pimentel
  2015-03-15 15:33 ` Texlive Mark H Weaver
  2015-03-16 16:54 ` Texlive Ludovic Courtès
  2 siblings, 0 replies; 22+ messages in thread
From: Daniel Pimentel @ 2015-03-14 23:43 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, guix-devel-bounces+d4n1=opmbx.org

On 2015-03-14 18:54, Andreas Enge wrote:
> Hello,
> 
> the attached patch does what its commit message says. It is the fruit 
> of many
> trials and discussions with Ludovic. The tricky thing was to link to 
> the
> kpsewhich binary in texlive-bin, but to make it take its configuration 
> file
> texmf.cnf from texlive-data. I ended up wrapping all binaries and 
> providing
> them with the suitable value of TEXMFCNF.
> 
> The real goal of the patch is to make it easy to create a second 
> package
> texlive-small in a second step. This package shall inherit from 
> texlive,
> but have as input texlive-texmf-small, which is created as 
> texlive-texmf,
> but after deleting a big chunk of data; I would say, all the 
> documentation
> and most of the fonts. Such a smaller package could be a native input 
> for
> packages creating their documentation from a latex source, for 
> instance.
> 
> Andreas
I'm use latex in some presentation and academic area. But there're some 
much dependencies in Texlive, I have install it but your size is bigger 
(2gb+-), the texlive-small is a great idea. Usualy I'm use pdflatex and 
bibtex to some references, I like bemmer too.
There're a lout package, is smallest that livetext, but there're some 
much papers in academic that use latex :(
I use lout in some presentation and other.
Thanks,
-- 
Daniel Pimentel (d4n1)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Texlive
@ 2015-03-15  9:50 Federico Beffa
  2015-03-15 10:48 ` Texlive Andreas Enge
  2015-03-16 16:51 ` Texlive Ludovic Courtès
  0 siblings, 2 replies; 22+ messages in thread
From: Federico Beffa @ 2015-03-15  9:50 UTC (permalink / raw)
  To: andreas; +Cc: Guix-devel

Andreas Enge <andreas@enge.fr> writes:

> Hello,
>
> the attached patch does what its commit message says. It is the fruit of many
> trials and discussions with Ludovic. The tricky thing was to link to the
> kpsewhich binary in texlive-bin, but to make it take its configuration file
> texmf.cnf from texlive-data. I ended up wrapping all binaries and providing
> them with the suitable value of TEXMFCNF.
>
> The real goal of the patch is to make it easy to create a second package
> texlive-small in a second step. This package shall inherit from texlive,
> but have as input texlive-texmf-small, which is created as texlive-texmf,
> but after deleting a big chunk of data; I would say, all the documentation
> and most of the fonts. Such a smaller package could be a native input for
> packages creating their documentation from a latex source, for instance.

If I understand correctly then the two packages, texlive and
texlive-small, will essentially be independent.

It would be nice to have an incremental strategy with a hierarchy, say
texlive-base, texlive-common, texlive-extra, texlive-all, where each
package is non-overlapping with other ones. Then a new functionality to
aggregate packages into a new package where you specify which packages
to include. Something like

guix package --aggregate texlive --with texlive-base texlive-common ...

This would be useful for packages with plug-ins, to bundle compilers with
a selection of libraries, ...

Regards,
Fede

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-15  9:50 Texlive Federico Beffa
@ 2015-03-15 10:48 ` Andreas Enge
  2015-03-15 11:16   ` Texlive Federico Beffa
  2015-03-16 16:51 ` Texlive Ludovic Courtès
  1 sibling, 1 reply; 22+ messages in thread
From: Andreas Enge @ 2015-03-15 10:48 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

On Sun, Mar 15, 2015 at 10:50:05AM +0100, Federico Beffa wrote:
> If I understand correctly then the two packages, texlive and
> texlive-small, will essentially be independent.

Yes, and mutually exclusive: If you install both, then there will be lots
of collisions with an unpredictable outcome.

> It would be nice to have an incremental strategy with a hierarchy, say
> texlive-base, texlive-common, texlive-extra, texlive-all, where each
> package is non-overlapping with other ones. Then a new functionality to
> aggregate packages into a new package where you specify which packages
> to include. Something like
> guix package --aggregate texlive --with texlive-base texlive-common ...

I agree, but did not find a way of doing it. The problem with texlive is
that part of the aggregation takes place in the install location (which for
us would be the store).

For instance, "mktexlsr" creates a file
  /gnu/store/pvhfl19r2v7fn00g45jkv32n211bk90h-texlive-2014/share/texmf-dist/ls-R
(after applying the patch), which contains the result of running "ls -R"
inside the directory. This could be done inside the user profile, but not
with the current setup, where
  $HOME/.guix-profile/share/texmf-dist is a link to the store directory
(which is a useful feature we added at some point in time, since it avoids
the need for symlinking the thousands of files inside this directory tree),
so that the ls-R file would be tried to be created in the store.

Then there are the calls to updmap-sys and fmtutil-sys, which I did not
look at in more detail. The latter seems to create files
texmf-var/web2c/*.fmt; it may be possible to create them by chunks and to
merge them in the profile (and then do the "ls -R"-business).

In non-functional (:-)) distributions, the problem is solved by recreating
a global configuration upon installation of an additional package.

So there may be better ways, and anybody is welcome to look into them!
My patch makes a first step by separating things better.

Andreas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-15 10:48 ` Texlive Andreas Enge
@ 2015-03-15 11:16   ` Federico Beffa
  2015-03-16 18:54     ` Texlive Andreas Enge
  0 siblings, 1 reply; 22+ messages in thread
From: Federico Beffa @ 2015-03-15 11:16 UTC (permalink / raw)
  To: Andreas Enge; +Cc: Guix-devel

On Sun, Mar 15, 2015 at 11:48 AM, Andreas Enge <andreas@enge.fr> wrote:
>> It would be nice to have an incremental strategy with a hierarchy, say
>> texlive-base, texlive-common, texlive-extra, texlive-all, where each
>> package is non-overlapping with other ones. Then a new functionality to
>> aggregate packages into a new package where you specify which packages
>> to include. Something like
>> guix package --aggregate texlive --with texlive-base texlive-common ...
>
> I agree, but did not find a way of doing it. The problem with texlive is
> that part of the aggregation takes place in the install location (which for
> us would be the store).
>
> For instance, "mktexlsr" creates a file
>   /gnu/store/pvhfl19r2v7fn00g45jkv32n211bk90h-texlive-2014/share/texmf-dist/ls-R
> (after applying the patch), which contains the result of running "ls -R"
> inside the directory. This could be done inside the user profile, but not
> with the current setup, where
>   $HOME/.guix-profile/share/texmf-dist is a link to the store directory
> (which is a useful feature we added at some point in time, since it avoids
> the need for symlinking the thousands of files inside this directory tree),
> so that the ls-R file would be tried to be created in the store.

Just to clarify: the idea would be that the "--aggregate" command
would produce a new package in the store. The new in store package
would inherit the content of the "--with" packages, but with the
possibility to replace some parts (e.g. ls-R, ...) with the help of
some phase. The new parts would only be residing in the new aggregate
and the user would install the new aggregate instead of the other
individual parts.

I understand that this is currently not possible, but, from my point
of view, would be useful functionality for the future.

> My patch makes a first step by separating things better.

Sure it is!

Regards,
Fede

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-14 21:54 Texlive Andreas Enge
  2015-03-14 23:43 ` Texlive Daniel Pimentel
@ 2015-03-15 15:33 ` Mark H Weaver
  2015-03-15 19:14   ` Texlive Andreas Enge
  2015-03-16 16:54 ` Texlive Ludovic Courtès
  2 siblings, 1 reply; 22+ messages in thread
From: Mark H Weaver @ 2015-03-15 15:33 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

> @@ -124,70 +121,157 @@
>  
>        ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
>        ;; XXX FIXME fix luajit properly on mips64.
> -      #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
> +      #:tests? ,(not (equal? "mips64el-linux" (or (%current-target-system)
>                                                    (%current-system))))

What is the rationale for this change?

Contrary to what one might expect based on the names of those procedures
and the frequent pattern

  (or (%current-target-system) (%current-system))

(%current-target-system) returns a GNU triplet whereas (%current-system)
returns a Nix system.  A GNU triplet for MIPS64 will start with "mips64"
but is unlikely to be "mips64el-linux".

     Mark

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-15 15:33 ` Texlive Mark H Weaver
@ 2015-03-15 19:14   ` Andreas Enge
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Enge @ 2015-03-15 19:14 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Sun, Mar 15, 2015 at 11:33:45AM -0400, Mark H Weaver wrote:
> > -      #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
> > +      #:tests? ,(not (equal? "mips64el-linux" (or (%current-target-system)
> What is the rationale for this change?

None. I see you made a change on January 6. I have been working on texlive
before, so probably things merged strangely.

Thanks for spotting this!

Andreas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-15  9:50 Texlive Federico Beffa
  2015-03-15 10:48 ` Texlive Andreas Enge
@ 2015-03-16 16:51 ` Ludovic Courtès
  2015-03-23 11:06   ` Texlive Federico Beffa
  1 sibling, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2015-03-16 16:51 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> It would be nice to have an incremental strategy with a hierarchy, say
> texlive-base, texlive-common, texlive-extra, texlive-all, where each
> package is non-overlapping with other ones. Then a new functionality to
> aggregate packages into a new package where you specify which packages
> to include. Something like
>
> guix package --aggregate texlive --with texlive-base texlive-common ...
>
> This would be useful for packages with plug-ins, to bundle compilers with
> a selection of libraries, ...

I think the problem here is really that TeX Live is monolithic, and I
don’t think that should be addressed by the packaging tools themselves.

My 2¢,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-14 21:54 Texlive Andreas Enge
  2015-03-14 23:43 ` Texlive Daniel Pimentel
  2015-03-15 15:33 ` Texlive Mark H Weaver
@ 2015-03-16 16:54 ` Ludovic Courtès
  2015-03-16 18:37   ` Texlive Andreas Enge
  2 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2015-03-16 16:54 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> the attached patch does what its commit message says. It is the fruit of many
> trials and discussions with Ludovic. The tricky thing was to link to the
> kpsewhich binary in texlive-bin, but to make it take its configuration file
> texmf.cnf from texlive-data. I ended up wrapping all binaries and providing
> them with the suitable value of TEXMFCNF.

I don’t want to spoil the party ;-), but could it be that there are
programs outside of TeX Live that use libkpathsea & co.?

> The real goal of the patch is to make it easy to create a second package
> texlive-small in a second step. This package shall inherit from texlive,
> but have as input texlive-texmf-small, which is created as texlive-texmf,
> but after deleting a big chunk of data; I would say, all the documentation
> and most of the fonts. Such a smaller package could be a native input for
> packages creating their documentation from a latex source, for instance.

That would be nice.

Thanks for your hard work on this!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-16 16:54 ` Texlive Ludovic Courtès
@ 2015-03-16 18:37   ` Andreas Enge
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Enge @ 2015-03-16 18:37 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Mar 16, 2015 at 05:54:22PM +0100, Ludovic Courtès wrote:
> I don’t want to spoil the party ;-), but could it be that there are
> programs outside of TeX Live that use libkpathsea & co.?

Theoretically yes, but practically I do not think so.

Andreas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-15 11:16   ` Texlive Federico Beffa
@ 2015-03-16 18:54     ` Andreas Enge
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Enge @ 2015-03-16 18:54 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

On Sun, Mar 15, 2015 at 12:16:58PM +0100, Federico Beffa wrote:
> Just to clarify: the idea would be that the "--aggregate" command
> would produce a new package in the store. The new in store package
> would inherit the content of the "--with" packages, but with the
> possibility to replace some parts (e.g. ls-R, ...) with the help of
> some phase. The new parts would only be residing in the new aggregate
> and the user would install the new aggregate instead of the other
> individual parts.

I see. As mentioned by Ludovic, this seems like a big hammer to solve a
smallish problem. Something easier could be done in the texlive module
already. I considered something along the following lines:
- Write a procedure that takes a (possibly empty) list of subdirectories to
  delete from texlive-texmf, and that returns the corresponding package.
  For the current texlive-texmf, one would pass an empty list, for
  texlive-texmf-small, it could be a list containing "doc", for instance.
- Write a procedure that takes a texlive-texmf type input and creates
  a corresponding texlive package, and use it for texlive and texlive-small.
This would be theoretically very flexible, but I think we want to limit the
number of texlive packages exposed to the public; personally, I would say
to two...

Andreas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-16 16:51 ` Texlive Ludovic Courtès
@ 2015-03-23 11:06   ` Federico Beffa
  2015-03-25 21:17     ` Texlive Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Federico Beffa @ 2015-03-23 11:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

On Mon, Mar 16, 2015 at 5:51 PM, Ludovic Courtès <ludo@gnu.org> wrote:

> I think the problem here is really that TeX Live is monolithic, and I
> don’t think that should be addressed by the packaging tools themselves.

The main TeX Live installer may make it look like it is monolithic,
but it isn't monolithic at all. It is very configurable and every user
can add his own classes, fonts, packages, ... wherever he wants even
using central installations on traditional UNIX systems. TeX Live has
its own management tool 'tlmgr', but underneath it makes use of
established Web2C tools.

As one example, setting
export TEXINPUTS=~/.guix-profile/share/texmf:

all the files in the personal profile would be found (on top of the
ones in the central installation configuration files). You can even
specify if you want to make use of files databases (ls-R), or not (and
that for each directory tree individually). See, e.g.,

http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-540007

Making the various TeX tools find components (classes, fonts, ...) in
"extra" store locations may be tricky, but making it find them once
installed in a user profile should be easy.

Maybe finding files in "extra" store directories could be achieved by
making use of variables expansion, something like
"!!/gnu/store//share/texmf" (note the double slash and exclamation
marks), in the central configuration file. (See above document.)

I think that working out the proper way to install it on Guix may be
tricky, but, given the flexibility, a good hierarchical solution
should be possible.

Regards,
Fede

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Texlive
  2015-03-23 11:06   ` Texlive Federico Beffa
@ 2015-03-25 21:17     ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2015-03-25 21:17 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> As one example, setting
> export TEXINPUTS=~/.guix-profile/share/texmf:
>
> all the files in the personal profile would be found (on top of the
> ones in the central installation configuration files). You can even
> specify if you want to make use of files databases (ls-R), or not (and
> that for each directory tree individually). See, e.g.,
>
> http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-540007

OK, interesting.

> Making the various TeX tools find components (classes, fonts, ...) in
> "extra" store locations may be tricky, but making it find them once
> installed in a user profile should be easy.
>
> Maybe finding files in "extra" store directories could be achieved by
> making use of variables expansion, something like
> "!!/gnu/store//share/texmf" (note the double slash and exclamation
> marks), in the central configuration file. (See above document.)
>
> I think that working out the proper way to install it on Guix may be
> tricky, but, given the flexibility, a good hierarchical solution
> should be possible.

IMO the ideal would have to have it split into a bunch of packages or
package outputs, like “core”, “doc”, “extra.”  Ideally, users could
choose to install 1, 2, or 3 of these and things would just work.

I’m not really knowledgeable but that seemed extremely difficult to
achieve (Andreas might want to share his sufferings ;-)).  Part of the
reason is that there’s no simple search path mechanism, and instead
something sophisticated that includes texmf.cnf and a couple of
libraries and commands to deal with search paths.

The latter prevents the addition of a “doc” output, for instance,
because the ‘texdoc’ command (in “out”) needs to refer to the “doc”
output, and vice versa (there cannot be circular references among
outputs of a derivation.)

Anyway, I think everyone would love a better solution, so if you have
ideas, do not hesitate.  :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-03-25 21:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15  9:50 Texlive Federico Beffa
2015-03-15 10:48 ` Texlive Andreas Enge
2015-03-15 11:16   ` Texlive Federico Beffa
2015-03-16 18:54     ` Texlive Andreas Enge
2015-03-16 16:51 ` Texlive Ludovic Courtès
2015-03-23 11:06   ` Texlive Federico Beffa
2015-03-25 21:17     ` Texlive Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2015-03-14 21:54 Texlive Andreas Enge
2015-03-14 23:43 ` Texlive Daniel Pimentel
2015-03-15 15:33 ` Texlive Mark H Weaver
2015-03-15 19:14   ` Texlive Andreas Enge
2015-03-16 16:54 ` Texlive Ludovic Courtès
2015-03-16 18:37   ` Texlive Andreas Enge
2013-02-03 16:56 Texlive Andreas Enge
2013-02-03 18:30 ` Texlive Ludovic Courtès
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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.