* bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 14:45 ` Ludovic Courtès
2017-06-09 10:45 ` bug#27296: [PATCH 03/35] gnu: Add texlive-dvips Ricardo Wurmus
` (33 subsequent siblings)
34 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* guix/licenses.scm (knuth, lppl, lppl1.0+, lppl1.2, lppl1.2+, lppl1.3,
lppl1.3+, lppl1.3a, lppl1.3a+, lppl1.3b, lppl1.3b+, lppl1.3c, lppl1.3c+): New
variables.
---
guix/licenses.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/guix/licenses.scm b/guix/licenses.scm
index 6845b89d9..1bed56af2 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -60,7 +60,13 @@
ibmpl1.0
imlib2
ipa
+ knuth
lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
+ lppl lppl1.0+ lppl1.2 lppl1.2+
+ lppl1.3 lppl1.3+
+ lppl1.3a lppl1.3a+
+ lppl1.3b lppl1.3b+
+ lppl1.3c lppl1.3c+
mpl1.0 mpl1.1 mpl2.0
ms-pl
ncsa
@@ -351,6 +357,11 @@ at URI, which may be a file:// URI pointing the package's tree."
"http://directory.fsf.org/wiki/License:IPA_Font_License"
"https://www.gnu.org/licenses/license-list#IPAFONT"))
+(define knuth
+ (license "Donald Knuth's license for TeX"
+ "http://www.ctan.org/license/knuth"
+ "Modification are only permitted under a different name."))
+
(define lgpl2.0
(license "LGPL 2.0"
"https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
@@ -381,6 +392,66 @@ at URI, which may be a file:// URI pointing the package's tree."
"https://www.gnu.org/licenses/lgpl.html"
"https://www.gnu.org/licenses/license-list#LGPLv3"))
+(define lppl
+ (license "LPPL (any version)"
+ "https://www.latex-project.org/lppl/lppl-1-0/"
+ "LaTeX Project Public License 1.0"))
+
+(define lppl1.0+
+ (license "LPPL 1.0+"
+ "https://www.latex-project.org/lppl/lppl-1-0/"
+ "LaTeX Project Public License 1.0"))
+
+(define lppl1.2
+ (license "LPPL 1.2"
+ "http://directory.fsf.org/wiki/License:LPPLv1.2"
+ "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
+
+(define lppl1.2+
+ (license "LPPL 1.2+"
+ "http://directory.fsf.org/wiki/License:LPPLv1.2"
+ "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
+
+(define lppl1.3
+ (license "LPPL 1.3"
+ "https://www.latex-project.org/lppl/lppl-1-3/"
+ "LaTeX Project Public License 1.3"))
+
+(define lppl1.3+
+ (license "LPPL 1.3+"
+ "https://www.latex-project.org/lppl/lppl-1-3/"
+ "LaTeX Project Public License 1.3+"))
+
+(define lppl1.3a
+ (license "LPPL 1.3a"
+ "http://directory.fsf.org/wiki/License:LPPLv1.3a"
+ "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
+
+(define lppl1.3a+
+ (license "LPPL 1.3a+"
+ "http://directory.fsf.org/wiki/License:LPPLv1.3a"
+ "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
+
+(define lppl1.3b
+ (license "LPPL 1.3b"
+ "https://www.latex-project.org/lppl/lppl-1-3b/"
+ "LaTeX Project Public License 1.3b"))
+
+(define lppl1.3b+
+ (license "LPPL 1.3b+"
+ "https://www.latex-project.org/lppl/lppl-1-3b/"
+ "LaTeX Project Public License 1.3b or later"))
+
+(define lppl1.3c
+ (license "LPPL 1.3c"
+ "https://www.latex-project.org/lppl/lppl-1-3c/"
+ "LaTeX Project Public License 1.3c"))
+
+(define lppl1.3c+
+ (license "LPPL 1.3c+"
+ "https://www.latex-project.org/lppl/lppl-1-3c/"
+ "LaTeX Project Public License 1.3c or later"))
+
(define mpl1.0
(license "MPL 1.0"
"http://www.mozilla.org/MPL/1.0/"
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses.
2017-06-09 10:45 ` bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses Ricardo Wurmus
@ 2017-06-09 14:45 ` Ludovic Courtès
2017-06-10 2:15 ` Arun Isaac
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 14:45 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * guix/licenses.scm (knuth, lppl, lppl1.0+, lppl1.2, lppl1.2+, lppl1.3,
> lppl1.3+, lppl1.3a, lppl1.3a+, lppl1.3b, lppl1.3b+, lppl1.3c, lppl1.3c+): New
> variables.
LGTM! (I’d use “licenses:” as the prefix in the subject line.)
> +(define knuth
> + (license "Donald Knuth's license for TeX"
> + "http://www.ctan.org/license/knuth"
> + "Modification are only permitted under a different name."))
Weird that this one is not on license-list.html.
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses.
2017-06-09 14:45 ` Ludovic Courtès
@ 2017-06-10 2:15 ` Arun Isaac
0 siblings, 0 replies; 53+ messages in thread
From: Arun Isaac @ 2017-06-10 2:15 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Ricardo Wurmus, 27296
Ludovic Courtès writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * guix/licenses.scm (knuth, lppl, lppl1.0+, lppl1.2, lppl1.2+, lppl1.3,
>> lppl1.3+, lppl1.3a, lppl1.3a+, lppl1.3b, lppl1.3b+, lppl1.3c, lppl1.3c+): New
>> variables.
Actually, even among this, only lppl1.3a and lppl1.2 are on the
license-list.html at gnu.org. I mailed them a few weeks back asking them
to consider adding the other licenses to the list. They replied saying
that license review is a resource intesive project, and that they will
*eventually* have it on the list. That may not be any time soon, I
guess.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 03/35] gnu: Add texlive-dvips.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 04/35] gnu: Add texlive-generic-unicode-data Ricardo Wurmus
` (32 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (%texlive-tag, %texlive-revision, texlive-dvips): New
variables.
---
gnu/packages/tex.scm | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7839e16b2..b1adec5d9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +32,7 @@
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (guix git-download)
+ #:use-module (guix svn-download)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
@@ -179,6 +180,44 @@ This package contains the binaries.")
(license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "https://www.tug.org/texlive/")))
+;; These variables specify the SVN tag and the matching SVN revision.
+(define %texlive-tag "texlive-2017.0")
+(define %texlive-revision 44445)
+
+(define-public texlive-dvips
+ (package
+ (name "texlive-dvips")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/dvips"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1k11yvz4q95bxyxczwvd4r177h6a2gg03xmf51kmgjgz8an2gq2w"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/dvips")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "http://www.ctan.org/pkg/dvips")
+ (synopsis "DVI to PostScript drivers")
+ (description "This package provides files needed for converting DVI files
+to PostScript.")
+ ;; Various free software licenses apply to individual files.
+ (license (list license:lppl1.3c+
+ license:expat
+ license:lgpl3+))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 04/35] gnu: Add texlive-generic-unicode-data.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 02/35] guix: Add common TeX and LaTeX licenses Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 03/35] gnu: Add texlive-dvips Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 05/35] gnu: Add texlive-generic-dehyph-exptl Ricardo Wurmus
` (31 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-generic-unicode-date): New variable.
---
gnu/packages/tex.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b1adec5d9..9e05eee51 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -218,6 +218,44 @@ to PostScript.")
license:expat
license:lgpl3+))))
+(define-public texlive-generic-unicode-data
+ (package
+ (name "texlive-generic-unicode-data")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/generic/unicode-data"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/generic/unicode-data")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "http://www.ctan.org/pkg/unicode-data")
+ (synopsis "Unicode data and loaders for TeX")
+ (description "This bundle provides generic access to Unicode Consortium
+data for TeX use. It contains a set of text files provided by the Unicode
+Consortium which are currently all from Unicode 8.0.0, with the exception of
+@code{MathClass.txt} which is not currently part of the Unicode Character
+Database. Accompanying these source data are generic TeX loader files
+allowing this data to be used as part of TeX runs, in particular in building
+format files. Currently there are two loader files: one for general character
+set up and one for initializing XeTeX character classes as has been carried
+out to date by @code{unicode-letters.tex}. ")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 05/35] gnu: Add texlive-generic-dehyph-exptl.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (2 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 04/35] gnu: Add texlive-generic-unicode-data Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 06/35] gnu: Add texlive-generic-tex-ini-files Ricardo Wurmus
` (30 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-generic-dehyph-exptl): New variable.
---
gnu/packages/tex.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9e05eee51..7e4d29be5 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -256,6 +256,41 @@ set up and one for initializing XeTeX character classes as has been carried
out to date by @code{unicode-letters.tex}. ")
(license license:lppl1.3c+)))
+(define-public texlive-generic-dehyph-exptl
+ (package
+ (name "texlive-generic-dehyph-exptl")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/generic/dehyph-exptl"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/generic/dehyph-exptl")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "http://projekte.dante.de/Trennmuster/WebHome")
+ (synopsis "Hyphenation patterns for German")
+ (description "The package provides experimental hyphenation patterns for
+the German language, covering both traditional and reformed orthography. The
+patterns can be used with packages Babel and hyphsubst from the Oberdiek
+bundle.")
+ ;; Hyphenation patterns are under the Expat license; documentation is
+ ;; under LPPL.
+ (license (list license:expat license:lppl))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 06/35] gnu: Add texlive-generic-tex-ini-files.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (3 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 05/35] gnu: Add texlive-generic-dehyph-exptl Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 07/35] gnu: Add texlive-generic-hyph-utf8 Ricardo Wurmus
` (29 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-generic-tex-ini-files): New variable.
---
gnu/packages/tex.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7e4d29be5..b798590fe 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -291,6 +291,40 @@ bundle.")
;; under LPPL.
(license (list license:expat license:lppl))))
+(define-public texlive-generic-tex-ini-files
+ (package
+ (name "texlive-generic-tex-ini-files")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/generic/tex-ini-files"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/generic/tex-ini-files")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "http://ctan.org/pkg/tex-ini-files")
+ (synopsis "Files for creating TeX formats")
+ (description "This bundle provides a collection of model \".ini\" files
+for creating TeX formats. These files are commonly used to introduced
+distribution-dependent variations in formats. They are also used to
+allow existing format source files to be used with newer engines, for example
+to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
+ (license license:public-domain)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 07/35] gnu: Add texlive-generic-hyph-utf8.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (4 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 06/35] gnu: Add texlive-generic-tex-ini-files Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 08/35] gnu: Add texlive-metafont-base Ricardo Wurmus
` (28 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-generic-hyph-utf8): New variable.
---
gnu/packages/tex.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b798590fe..20b5a35ba 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -325,6 +325,62 @@ allow existing format source files to be used with newer engines, for example
to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
(license license:public-domain)))
+(define-public texlive-generic-hyph-utf8
+ (package
+ (name "texlive-generic-hyph-utf8")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/generic/hyph-utf8"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/generic/hyph-utf8")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "http://ctan.org/pkg/hyph-utf8")
+ (synopsis "Hyphenation patterns expressed in UTF-8")
+ (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
+hyphenation patterns in UTF-8 format, whereas older systems require
+hyphenation patterns in the 8-bit encoding of the font in use (such encodings
+are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
+etc). The present package offers a collection of conversions of existing
+patterns to UTF-8 format, together with converters for use with 8-bit fonts in
+older systems. Since hyphenation patterns for Knuthian-style TeX systems are
+only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
+converters, will completely supplant the older patterns.")
+ ;; Individual files each have their own license. Most of these files are
+ ;; independent hyphenation patterns.
+ (license (list license:lppl1.0+
+ license:lppl1.2+
+ license:lppl1.3
+ license:lppl1.3+
+ license:lppl1.3a+
+ license:lgpl2.1
+ license:lgpl2.1+
+ license:lgpl3+
+ license:gpl2+
+ license:gpl3+
+ license:mpl1.1
+ license:asl2.0
+ license:expat
+ license:bsd-3
+ license:cc0
+ license:public-domain
+ license:wtfpl2))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 08/35] gnu: Add texlive-metafont-base.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (5 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 07/35] gnu: Add texlive-generic-hyph-utf8 Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm Ricardo Wurmus
` (27 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-metafont-base): New variable.
---
gnu/packages/tex.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 20b5a35ba..5a92b3ed1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -381,6 +381,57 @@ converters, will completely supplant the older patterns.")
license:public-domain
license:wtfpl2))))
+(define-public texlive-metafont-base
+ (package
+ (name "texlive-metafont-base")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/metafont"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test target
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((cwd (getcwd)))
+ (setenv "MFINPUTS"
+ (string-append cwd "/base:"
+ cwd "/misc:"
+ cwd "/roex:"
+ cwd "/feynmf:"
+ cwd "/mfpic:"
+ cwd "/config")))
+ (mkdir "build")
+ (with-directory-excursion "build"
+ (zero? (system* "inimf" "mf.mf")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (base (string-append out "/share/texmf-dist/web2c"))
+ (mf (string-append out "/share/texmf-dist/metafont/base")))
+ (mkdir-p base)
+ (mkdir-p mf)
+ (install-file "build/mf.base" base)
+ (copy-recursively "base" mf)
+ #t))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)))
+ (home-page "http://www.ctan.org/pkg/metafont")
+ (synopsis "Metafont base files")
+ (description "This package provides the Metafont base files needed to
+build fonts using the Metafont system.")
+ (license license:knuth)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (6 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 08/35] gnu: Add texlive-metafont-base Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 14:41 ` Ludovic Courtès
2017-06-09 10:45 ` bug#27296: [PATCH 10/35] gnu: Add texlive-fonts-knuth-lib Ricardo Wurmus
` (26 subsequent siblings)
34 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-fonts-cm): New variable.
---
gnu/packages/tex.scm | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 5a92b3ed1..201e0da78 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -432,6 +432,91 @@ converters, will completely supplant the older patterns.")
build fonts using the Metafont system.")
(license license:knuth)))
+(define-public texlive-fonts-cm
+ (package
+ (name "texlive-fonts-cm")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/fonts/source/public/cm"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ ;; Tell mf where to find mf.base
+ (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
+ ;; Tell mf where to look for source files
+ (setenv "MFINPUTS"
+ (string-append (getcwd) ":"
+ mf "/share/texmf-dist/metafont/base")))
+ (mkdir "build")
+ (every (lambda (font)
+ (format #t "building font ~a\n" font)
+ (zero? (system* "mf" "-progname=mf"
+ "-output-directory=build"
+ (string-append "\\"
+ "mode:=ljfour; "
+ "mag:=1; "
+ "batchmode; "
+ "input " font))))
+ '("cmb10" "cmbcsc10" "cmbsy10" "cmbtex10"
+ "cmbtt8" "cmbtt9" "cmbtt10"
+ "cmbx5" "cmbx6" "cmbx7" "cmbx8" "cmbx9" "cmbx10" "cmbx12"
+ "cmbxsl10" "cmbxti10" "cmcsc10" "cmdunh10"
+ "cmex10" "cmexb10" "cmff10" "cmfi10" "cmfib8"
+ "cminch"
+ "cmmi5" "cmmi6" "cmmi7" "cmmi8" "cmmi9" "cmmi10" "cmmi12"
+ "cmmib10" "cmitt10"
+ "cmr5" "cmr6" "cmr7" "cmr8" "cmr9" "cmr10" "cmr12" "cmr17"
+ "cmsl8" "cmsl9" "cmsl10" "cmsl12" "cmsltt10"
+ "cmss8" "cmss9" "cmss10" "cmss12" "cmss17"
+ "cmssbx10" "cmssdc10"
+ "cmssi8" "cmssi9" "cmssi10" "cmssi12" "cmssi17"
+ "cmssq8" "cmssqi8"
+ "cmsy5" "cmsy6" "cmsy7" "cmsy8" "cmsy9" "cmsy10"
+ "cmtcsc10" "cmtex8" "cmtex9" "cmtex10"
+ "cmti7" "cmti8" "cmti9" "cmti10" "cmti12"
+ "cmtt8" "cmtt9" "cmtt10" "cmtt12"
+ "cmttb10" "cmu10" "cmvtt10"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tfm (string-append
+ out "/share/texmf-dist/fonts/tfm/public/cm"))
+ (mf (string-append
+ out "/share/texmf-dist/fonts/source/public/cm")))
+ (for-each (cut install-file <> tfm)
+ (find-files "build" "\\.*"))
+ (for-each (cut install-file <> mf)
+ (find-files "." "\\.mf"))
+ #t))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-metafont-base" ,texlive-metafont-base)))
+ (home-page "http://www.ctan.org/pkg/cm")
+ (synopsis "Computer Modern fonts for TeX")
+ (description "This package provides the Computer Modern fonts by Donald
+Knuth. The Computer Modern font family is a large collection of text,
+display, and mathematical fonts in a range of styles, based on Monotype Modern
+8A.")
+ (license license:knuth)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm.
2017-06-09 10:45 ` bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm Ricardo Wurmus
@ 2017-06-09 14:41 ` Ludovic Courtès
2017-06-09 15:00 ` Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 14:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * gnu/packages/tex.scm (texlive-fonts-cm): New variable.
[...]
> + (every (lambda (font)
> + (format #t "building font ~a\n" font)
> + (zero? (system* "mf" "-progname=mf"
> + "-output-directory=build"
> + (string-append "\\"
> + "mode:=ljfour; "
> + "mag:=1; "
> + "batchmode; "
> + "input " font))))
> + '("cmb10" "cmbcsc10" "cmbsy10" "cmbtex10"
> + "cmbtt8" "cmbtt9" "cmbtt10"
> + "cmbx5" "cmbx6" "cmbx7" "cmbx8" "cmbx9" "cmbx10" "cmbx12"
> + "cmbxsl10" "cmbxti10" "cmcsc10" "cmdunh10"
> + "cmex10" "cmexb10" "cmff10" "cmfi10" "cmfib8"
> + "cminch"
> + "cmmi5" "cmmi6" "cmmi7" "cmmi8" "cmmi9" "cmmi10" "cmmi12"
> + "cmmib10" "cmitt10"
> + "cmr5" "cmr6" "cmr7" "cmr8" "cmr9" "cmr10" "cmr12" "cmr17"
> + "cmsl8" "cmsl9" "cmsl10" "cmsl12" "cmsltt10"
> + "cmss8" "cmss9" "cmss10" "cmss12" "cmss17"
> + "cmssbx10" "cmssdc10"
> + "cmssi8" "cmssi9" "cmssi10" "cmssi12" "cmssi17"
> + "cmssq8" "cmssqi8"
> + "cmsy5" "cmsy6" "cmsy7" "cmsy8" "cmsy9" "cmsy10"
> + "cmtcsc10" "cmtex8" "cmtex9" "cmtex10"
> + "cmti7" "cmti8" "cmti9" "cmti10" "cmti12"
> + "cmtt8" "cmtt9" "cmtt10" "cmtt12"
> + "cmttb10" "cmu10" "cmvtt10"))))
It doesn’t sound reasonable to hard-code this list. :-)
Looks like there’s a pattern here that should allow us to generate it,
WDYT? ‘unfold’, ‘iota’, and all that.
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm.
2017-06-09 14:41 ` Ludovic Courtès
@ 2017-06-09 15:00 ` Ricardo Wurmus
0 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 15:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * gnu/packages/tex.scm (texlive-fonts-cm): New variable.
>
> [...]
>
>> + (every (lambda (font)
>> + (format #t "building font ~a\n" font)
>> + (zero? (system* "mf" "-progname=mf"
>> + "-output-directory=build"
>> + (string-append "\\"
>> + "mode:=ljfour; "
>> + "mag:=1; "
>> + "batchmode; "
>> + "input " font))))
>> + '("cmb10" "cmbcsc10" "cmbsy10" "cmbtex10"
>> + "cmbtt8" "cmbtt9" "cmbtt10"
>> + "cmbx5" "cmbx6" "cmbx7" "cmbx8" "cmbx9" "cmbx10" "cmbx12"
>> + "cmbxsl10" "cmbxti10" "cmcsc10" "cmdunh10"
>> + "cmex10" "cmexb10" "cmff10" "cmfi10" "cmfib8"
>> + "cminch"
>> + "cmmi5" "cmmi6" "cmmi7" "cmmi8" "cmmi9" "cmmi10" "cmmi12"
>> + "cmmib10" "cmitt10"
>> + "cmr5" "cmr6" "cmr7" "cmr8" "cmr9" "cmr10" "cmr12" "cmr17"
>> + "cmsl8" "cmsl9" "cmsl10" "cmsl12" "cmsltt10"
>> + "cmss8" "cmss9" "cmss10" "cmss12" "cmss17"
>> + "cmssbx10" "cmssdc10"
>> + "cmssi8" "cmssi9" "cmssi10" "cmssi12" "cmssi17"
>> + "cmssq8" "cmssqi8"
>> + "cmsy5" "cmsy6" "cmsy7" "cmsy8" "cmsy9" "cmsy10"
>> + "cmtcsc10" "cmtex8" "cmtex9" "cmtex10"
>> + "cmti7" "cmti8" "cmti9" "cmti10" "cmti12"
>> + "cmtt8" "cmtt9" "cmtt10" "cmtt12"
>> + "cmttb10" "cmu10" "cmvtt10"))))
>
> It doesn’t sound reasonable to hard-code this list. :-)
I agree, but there are quite a few files there that do not describe
fonts. Maybe it would be simpler to write a pattern of files that
shouldn’t be built.
> Looks like there’s a pattern here that should allow us to generate it,
> WDYT? ‘unfold’, ‘iota’, and all that.
I’ll give it a try.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 10/35] gnu: Add texlive-fonts-knuth-lib.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (7 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 09/35] gnu: Add texlive-fonts-cm Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 11/35] gnu: Add texlive-fonts-latex Ricardo Wurmus
` (25 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-fonts-knuth-lib): New variable.
---
gnu/packages/tex.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 201e0da78..dca01f90b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -517,6 +517,69 @@ display, and mathematical fonts in a range of styles, based on Monotype Modern
8A.")
(license license:knuth)))
+(define-public texlive-fonts-knuth-lib
+ (package
+ (name "texlive-fonts-knuth-lib")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/fonts/source/public/knuth-lib"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-26))
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ ;; Tell mf where to find mf.base
+ (setenv "MFBASES"
+ (string-append mf "/share/texmf-dist/web2c"))
+ ;; Tell mf where to look for source files
+ (setenv "MFINPUTS"
+ (string-append (getcwd) ":"
+ mf "/share/texmf-dist/metafont/base")))
+ (mkdir "build")
+ (zero? (system* "mf" "-progname=mf"
+ "-output-directory=build"
+ (string-append "\\"
+ "mode:=ljfour; "
+ "mag:=1; "
+ "batchmode; "
+ "input manfnt")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tfm (string-append
+ out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
+ (mf (string-append
+ out "/share/texmf-dist/fonts/source/public/knuth-lib")))
+ (for-each (cut install-file <> tfm)
+ (find-files "build" "\\.*"))
+ (for-each (cut install-file <> mf)
+ (find-files "." "\\.mf"))
+ #t))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-metafont-base" ,texlive-metafont-base)))
+ (home-page "https://www.ctan.org/pkg/knuth-lib")
+ (synopsis "Small library of METAFONT sources")
+ (description "This is a collection of core TeX and METAFONT macro files
+from Donald Knuth, including the plain format, plain base, and the MF logo
+fonts.")
+ (license license:knuth)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 11/35] gnu: Add texlive-fonts-latex.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (8 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 10/35] gnu: Add texlive-fonts-knuth-lib Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 12/35] gnu: Add texlive-tex-plain Ricardo Wurmus
` (24 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-fonts-latex): New variable.
---
gnu/packages/tex.scm | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index dca01f90b..0a59417f2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -580,6 +580,80 @@ from Donald Knuth, including the plain format, plain base, and the MF logo
fonts.")
(license license:knuth)))
+(define-public texlive-fonts-latex
+ (package
+ (name "texlive-fonts-latex")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/fonts/source/public/latex-fonts"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ ;; Tell mf where to find mf.base
+ (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
+ ;; Tell mf where to look for source files
+ (setenv "MFINPUTS"
+ (string-append (getcwd) ":"
+ mf "/share/texmf-dist/metafont/base:"
+ (assoc-ref inputs "texlive-fonts-cm")
+ "/share/texmf-dist/fonts/source/public/cm")))
+ (mkdir "build")
+ (every (lambda (font)
+ (format #t "building font ~a\n" font)
+ (zero? (system* "mf" "-progname=mf"
+ "-output-directory=build"
+ (string-append "\\"
+ "mode:=ljfour; "
+ "mag:=1; "
+ "batchmode; "
+ "input " font))))
+ '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
+ "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
+ "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
+ "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
+ "line10" "linew10"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tfm (string-append
+ out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
+ (mf (string-append
+ out "/share/texmf-dist/fonts/source/public/latex-fonts")))
+ (for-each (cut install-file <> tfm)
+ (find-files "build" "\\.*"))
+ (for-each (cut install-file <> mf)
+ (find-files "." "\\.mf"))
+ #t))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-metafont-base" ,texlive-metafont-base)
+ ("texlive-fonts-cm" ,texlive-fonts-cm)))
+ (home-page "http://www.ctan.org/pkg/latex-fonts")
+ (synopsis "Collection of fonts used in LaTeX distributions")
+ (description "This is a collection of fonts for use with standard LaTeX
+packages and classes. It includes invisible fonts (for use with the slides
+class), line and circle fonts (for use in the picture environment) and LaTeX
+symbol fonts.")
+ (license license:lppl1.2+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 12/35] gnu: Add texlive-tex-plain.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (9 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 11/35] gnu: Add texlive-fonts-latex Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 13/35] gnu: Add texlive-latex-base Ricardo Wurmus
` (23 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-tex-plain): New variable.
---
gnu/packages/tex.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0a59417f2..c9d6d058e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -654,6 +654,41 @@ class), line and circle fonts (for use in the picture environment) and LaTeX
symbol fonts.")
(license license:lppl1.2+)))
+;; This provides etex.src which is needed to build various formats, including
+;; luatex.fmt and pdflatex.fmt
+(define-public texlive-tex-plain
+ (package
+ (name "texlive-tex-plain")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/plain"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1ifmbyl3ir8k0v1g25xjb5rcyy5vhj8a3fa2088nczga09hna5vn"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/plain")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "https://www.ctan.org/pkg/plain")
+ (synopsis "Plain TeX format and supporting files")
+ (description
+ "Contains files used to build the Plain TeX format, as described in the
+TeXbook, together with various supporting files (some also discussed in the
+book).")
+ (license license:knuth)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 13/35] gnu: Add texlive-latex-base.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (10 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 12/35] gnu: Add texlive-tex-plain Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 14/35] build-system: Add 'texlive-build-system' Ricardo Wurmus
` (22 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-base): New variable.
(texlive-ref): New procedure.
---
gnu/packages/tex.scm | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c9d6d058e..9ff0f234e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -689,6 +689,153 @@ TeXbook, together with various supporting files (some also discussed in the
book).")
(license license:knuth)))
+(define (texlive-ref component id)
+ "Return a <svn-reference> object for the package ID, which is part of the
+given Texlive COMPONENT."
+ (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "source/" component "/" id))
+ (revision %texlive-revision)))
+
+(define-public texlive-latex-base
+ (let ((texlive-dir
+ (lambda (dir hash)
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ dir))
+ (revision %texlive-revision)))
+ (sha256 (base32 hash))))))
+ (package
+ (name "texlive-latex-base")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "base"))
+ (sha256
+ (base32
+ "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 match)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Find required fonts
+ (setenv "TFMFONTS"
+ (string-append (assoc-ref inputs "texlive-fonts-cm")
+ "/share/texmf-dist/fonts/tfm/public/cm:"
+ (assoc-ref inputs "texlive-fonts-latex")
+ "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
+ (assoc-ref inputs "texlive-fonts-knuth-lib")
+ "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
+ (setenv "TEXINPUTS"
+ (string-append
+ (getcwd) ":"
+ (getcwd) "/build:"
+ (string-join
+ (append-map (match-lambda
+ ((_ . dir)
+ (find-files dir
+ (lambda (_ stat)
+ (eq? 'directory (stat:type stat)))
+ #:directories? #t
+ #:stat stat)))
+ inputs)
+ ":")))
+
+ ;; Create an empty texsys.cfg, because latex.ltx wants to include
+ ;; it. This file must exist and it's fine if it's empty.
+ (with-output-to-file "texsys.cfg"
+ (lambda _ (format #t "%")))
+
+ (mkdir "build")
+ (mkdir "web2c")
+ (and (zero? (system* "luatex" "-ini" "-interaction=batchmode"
+ "-output-directory=build"
+ "unpack.ins"))
+ ;; LaTeX and XeTeX require e-TeX, which is enabled only in
+ ;; extended mode (activated with a leading asterisk). We
+ ;; should not use luatex here, because that would make the
+ ;; generated format files incompatible with any other TeX
+ ;; engine.
+
+ ;; FIXME: XeTeX fails to build because neither
+ ;; \XeTeXuseglyphmetrics nor \XeTeXdashbreakstate are
+ ;; defined.
+ (every
+ (lambda (format)
+ (zero? (system* "latex" "-ini" "-interaction=batchmode"
+ "-output-directory=web2c"
+ "-translate-file=cp227.tcx"
+ (string-append "*" format ".ini"))))
+ '("latex" ;"xetex"
+ ))
+ (every
+ (lambda (format)
+ (zero? (system* "luatex" "-ini" "-interaction=batchmode"
+ "-output-directory=web2c"
+ (string-append format ".ini"))))
+ '("dviluatex" "dvilualatex" "luatex" "lualatex" "xelatex")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (target (string-append
+ out "/share/texmf-dist/tex/latex/base"))
+ (web2c (string-append
+ out "/share/texmf-dist/web2c")))
+ (mkdir-p target)
+ (mkdir-p web2c)
+ (for-each delete-file (find-files "." "\\.(log|aux)$"))
+ (for-each (cut install-file <> target)
+ (find-files "build" ".*"))
+ (for-each (cut install-file <> web2c)
+ (find-files "web2c" ".*"))
+ #t))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
+ ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
+ ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
+ ("texlive-latex-latexconfig"
+ ,(texlive-dir "tex/latex/latexconfig/"
+ "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
+ ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)
+ ("texlive-generic-hyphen"
+ ,(texlive-dir "tex/generic/hyphen/"
+ "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
+ ("texlive-generic-ruhyphen"
+ ,(texlive-dir "tex/generic/ruhyphen/"
+ "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
+ ("texlive-generic-ukrhyph"
+ ,(texlive-dir "tex/generic/ukrhyph/"
+ "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
+ ("texlive-generic-config"
+ ,(texlive-dir "tex/generic/config/"
+ "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s"))
+ ("texlive-tex-plain" ,texlive-tex-plain)
+ ("texlive-fonts-cm" ,texlive-fonts-cm)
+ ("texlive-fonts-latex" ,texlive-fonts-latex)
+ ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
+ (home-page "http://www.ctan.org/pkg/latex-base")
+ (synopsis "Base sources of LaTeX")
+ (description
+ "This bundle comprises the source of LaTeX itself, together with several
+packages which are considered \"part of the kernel\". This bundle, together
+with the required packages, constitutes what every LaTeX distribution should
+contain.")
+ (license license:lppl1.3c+))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 14/35] build-system: Add 'texlive-build-system'.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (11 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 13/35] gnu: Add texlive-latex-base Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 14:50 ` Ludovic Courtès
2017-06-09 10:45 ` bug#27296: [PATCH 15/35] gnu: Add texlive-latex-filecontents Ricardo Wurmus
` (21 subsequent siblings)
34 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* guix/build-system/texlive.scm: New file.
* guix/build/texlive-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document it.
* gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
(texlife-ref): Remove procedure.
---
Makefile.am | 3 +
doc/guix.texi | 19 +++++
gnu/packages/tex.scm | 14 +--
guix/build-system/texlive.scm | 165 ++++++++++++++++++++++++++++++++++++
guix/build/texlive-build-system.scm | 89 +++++++++++++++++++
5 files changed, 277 insertions(+), 13 deletions(-)
create mode 100644 guix/build-system/texlive.scm
create mode 100644 guix/build/texlive-build-system.scm
diff --git a/Makefile.am b/Makefile.am
index 3925f3e2d..c10dffb44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,7 @@
# Copyright © 2016, 2017 Mark H Weaver <mhw@netris.org>
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017 Leo Famulari <leo@famulari.name>
+# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
#
# This file is part of GNU Guix.
#
@@ -87,6 +88,7 @@ MODULES = \
guix/build-system/waf.scm \
guix/build-system/r.scm \
guix/build-system/ruby.scm \
+ guix/build-system/texlive.scm \
guix/build-system/trivial.scm \
guix/ftp-client.scm \
guix/http-client.scm \
@@ -114,6 +116,7 @@ MODULES = \
guix/build/ocaml-build-system.scm \
guix/build/r-build-system.scm \
guix/build/ruby-build-system.scm \
+ guix/build/texlive-build-system.scm \
guix/build/waf-build-system.scm \
guix/build/haskell-build-system.scm \
guix/build/store-copy.scm \
diff --git a/doc/guix.texi b/doc/guix.texi
index 87aaae854..f1b2d4612 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3575,6 +3575,25 @@ are run after installation using the R function
@code{tools::testInstalledPackage}.
@end defvr
+@defvr {Scheme Variable} texlive-build-system
+This variable is exported by @code{(guix build-system texlive)}. It is
+used to build TeX packages in batch mode with a specified engine. The
+build system sets the @code{TEXINPUTS} variable to find all TeX source
+files in the inputs.
+
+By default it runs @code{luatex} on all files ending on @code{ins}. A
+different engine and format can be specified with the
+@code{#:tex-format} argument. Different build targets can be specified
+with the @code{#:build-targets} argument, which expects a list of file
+names. The build system adds only @code{texlive-bin} and
+@code{texlive-latex-base} (both from @code{(gnu packages tex}) to the
+inputs. Both can be overridden with the arguments @code{#:texlive-bin}
+and @code{#:texlive-latex-base}, respectively.
+
+The @code{#:tex-directory} tells the build system where to install the
+built files under the texmf tree.
+@end defvr
+
@defvr {Scheme Variable} ruby-build-system
This variable is exported by @code{(guix build-system ruby)}. It
implements the RubyGems build procedure used by Ruby packages, which
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9ff0f234e..5cb4ec6ab 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -30,6 +30,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system texlive)
#:use-module (guix utils)
#:use-module (guix git-download)
#:use-module (guix svn-download)
@@ -180,10 +181,6 @@ This package contains the binaries.")
(license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "https://www.tug.org/texlive/")))
-;; These variables specify the SVN tag and the matching SVN revision.
-(define %texlive-tag "texlive-2017.0")
-(define %texlive-revision 44445)
-
(define-public texlive-dvips
(package
(name "texlive-dvips")
@@ -689,15 +686,6 @@ TeXbook, together with various supporting files (some also discussed in the
book).")
(license license:knuth)))
-(define (texlive-ref component id)
- "Return a <svn-reference> object for the package ID, which is part of the
-given Texlive COMPONENT."
- (svn-reference
- (url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "source/" component "/" id))
- (revision %texlive-revision)))
-
(define-public texlive-latex-base
(let ((texlive-dir
(lambda (dir hash)
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
new file mode 100644
index 000000000..6a0d48b4e
--- /dev/null
+++ b/guix/build-system/texlive.scm
@@ -0,0 +1,165 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; 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 (guix build-system texlive)
+ #:use-module (guix store)
+ #:use-module (guix utils)
+ #:use-module (guix packages)
+ #:use-module (guix derivations)
+ #:use-module (guix search-paths)
+ #:use-module (guix build-system)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix svn-download)
+ #:use-module (ice-9 match)
+ #:export (%texlive-build-system-modules
+ texlive-build
+ texlive-build-system
+ texlive-ref
+ %texlive-tag
+ %texlive-revision))
+
+;; Commentary:
+;;
+;; Standard build procedure for Texlive packages.
+;;
+;; Code:
+
+;; These variables specify the SVN tag and the matching SVN revision.
+(define %texlive-tag "texlive-2017.0")
+(define %texlive-revision 44445)
+
+(define (texlive-ref component id)
+ "Return a <svn-reference> object for the package ID, which is part of the
+given Texlive COMPONENT."
+ (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "source/" component "/" id))
+ (revision %texlive-revision)))
+
+(define %texlive-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build texlive-build-system)
+ ,@%gnu-build-system-modules))
+
+(define (default-texlive-bin)
+ "Return the default texlive-bin package."
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((tex-mod (resolve-interface '(gnu packages tex))))
+ (module-ref tex-mod 'texlive-bin)))
+
+(define (default-texlive-latex-base)
+ "Return the default texlive-latex-base package."
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((tex-mod (resolve-interface '(gnu packages tex))))
+ (module-ref tex-mod 'texlive-latex-base)))
+
+(define* (lower name
+ #:key
+ source inputs native-inputs outputs
+ system target
+ (texlive-latex-base (default-texlive-latex-base))
+ (texlive-bin (default-texlive-bin))
+ #:allow-other-keys
+ #:rest arguments)
+ "Return a bag for NAME."
+ (define private-keywords
+ '(#:source #:target #:inputs #:native-inputs
+ #:texlive-latex-base #:texlive-bin))
+
+ (and (not target) ;XXX: no cross-compilation
+ (bag
+ (name name)
+ (system system)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@inputs
+
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (build-inputs `(("texlive-bin" ,texlive-bin)
+ ("texlive-latex-base" ,texlive-latex-base)
+ ,@native-inputs))
+ (outputs outputs)
+ (build texlive-build)
+ (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (texlive-build store name inputs
+ #:key
+ (tests? #f)
+ tex-directory
+ (build-targets #f)
+ (tex-format "luatex")
+ (phases '(@ (guix build texlive-build-system)
+ %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (substitutable? #t)
+ (imported-modules %texlive-build-system-modules)
+ (modules '((guix build texlive-build-system)
+ (guix build utils))))
+ "Build SOURCE with INPUTS."
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (texlive-build #:name ,name
+ #:source ,(match (assoc-ref inputs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:tex-directory ,tex-directory
+ #:build-targets ,build-targets
+ #:tex-format ,tex-format
+ #:system ,system
+ #:tests? ,tests?
+ #:phases ,phases
+ #:outputs %outputs
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:inputs %build-inputs)))
+
+ (define guile-for-build
+ (match guile
+ ((? package?)
+ (package-derivation store guile system #:graft? #f))
+ (#f ; the default
+ (let* ((distro (resolve-interface '(gnu packages commencement)))
+ (guile (module-ref distro 'guile-final)))
+ (package-derivation store guile system #:graft? #f)))))
+
+ (build-expression->derivation store name builder
+ #:inputs inputs
+ #:system system
+ #:modules imported-modules
+ #:outputs outputs
+ #:guile-for-build guile-for-build
+ #:substitutable? substitutable?))
+
+(define texlive-build-system
+ (build-system
+ (name 'texlive)
+ (description "The build system for Texlive packages")
+ (lower lower)))
+
+;;; texlive.scm ends here
diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm
new file mode 100644
index 000000000..af6fa82b4
--- /dev/null
+++ b/guix/build/texlive-build-system.scm
@@ -0,0 +1,89 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; 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 (guix build texlive-build-system)
+ #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases
+ texlive-build))
+
+;; Commentary:
+;;
+;; Builder-side code of the standard build procedure for Texlive packages.
+;;
+;; Code:
+
+(define (compile-with-latex format file)
+ (zero? (system* format
+ "-interaction=batchmode"
+ "-output-directory=build"
+ (string-append "&" format)
+ file)))
+
+(define* (build #:key inputs build-targets tex-format #:allow-other-keys)
+ ;; Find additional tex and sty files
+ (setenv "TEXINPUTS"
+ (string-append
+ (getcwd) ":" (getcwd) "/build:"
+ (string-join
+ (append-map (match-lambda
+ ((_ . dir)
+ (find-files dir
+ (lambda (_ stat)
+ (eq? 'directory (stat:type stat)))
+ #:directories? #t
+ #:stat stat)))
+ inputs)
+ ":")))
+ (setenv "TEXFORMATS"
+ (string-append (assoc-ref inputs "texlive-latex-base")
+ "/share/texmf-dist/web2c/"))
+ (setenv "LUAINPUTS"
+ (string-append (assoc-ref inputs "texlive-latex-base")
+ "/share/texmf-dist/tex/latex/base/"))
+ (mkdir "build")
+ (every (cut compile-with-latex tex-format <>)
+ (if build-targets build-targets
+ (find-files "." "\\.ins$"))))
+
+(define* (install #:key outputs tex-directory #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (target (string-append
+ out "/share/texmf-dist/tex/" tex-directory)))
+ (mkdir-p target)
+ (for-each delete-file (find-files "." "\\.(log|aux)$"))
+ (for-each (cut install-file <> target)
+ (find-files "build" ".*"))
+ #t))
+
+(define %standard-phases
+ (modify-phases gnu:%standard-phases
+ (delete 'configure)
+ (replace 'build build)
+ (delete 'check)
+ (replace 'install install)))
+
+(define* (texlive-build #:key inputs (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given Texlive package, applying all of PHASES in order."
+ (apply gnu:gnu-build #:inputs inputs #:phases phases args))
+
+;;; texlive-build-system.scm ends here
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 14/35] build-system: Add 'texlive-build-system'.
2017-06-09 10:45 ` bug#27296: [PATCH 14/35] build-system: Add 'texlive-build-system' Ricardo Wurmus
@ 2017-06-09 14:50 ` Ludovic Courtès
2017-06-14 7:24 ` [bug#27296] " Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 14:50 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * guix/build-system/texlive.scm: New file.
> * guix/build/texlive-build-system.scm: New file.
> * Makefile.am (MODULES): Add them.
> * doc/guix.texi (Build Systems): Document it.
> * gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
> (texlife-ref): Remove procedure.
[...]
> +@defvr {Scheme Variable} texlive-build-system
> +This variable is exported by @code{(guix build-system texlive)}. It is
> +used to build TeX packages in batch mode with a specified engine. The
> +build system sets the @code{TEXINPUTS} variable to find all TeX source
> +files in the inputs.
> +
> +By default it runs @code{luatex} on all files ending on @code{ins}. A
> +different engine and format can be specified with the
> +@code{#:tex-format} argument. Different build targets can be specified
> +with the @code{#:build-targets} argument, which expects a list of file
> +names. The build system adds only @code{texlive-bin} and
> +@code{texlive-latex-base} (both from @code{(gnu packages tex}) to the
> +inputs. Both can be overridden with the arguments @code{#:texlive-bin}
> +and @code{#:texlive-latex-base}, respectively.
> +
> +The @code{#:tex-directory} tells the build system where to install the
^
Missing word: “parameter”.
> +(define* (lower name
> + #:key
> + source inputs native-inputs outputs
> + system target
> + (texlive-latex-base (default-texlive-latex-base))
> + (texlive-bin (default-texlive-bin))
> + #:allow-other-keys
> + #:rest arguments)
> + "Return a bag for NAME."
> + (define private-keywords
> + '(#:source #:target #:inputs #:native-inputs
> + #:texlive-latex-base #:texlive-bin))
> +
> + (and (not target) ;XXX: no cross-compilation
> + (bag
> + (name name)
> + (system system)
If the result is architecture-independent (is it?), we could do the same
thing regardless of whether TARGET is true.
> +(define texlive-build-system
> + (build-system
> + (name 'texlive)
> + (description "The build system for Texlive packages")
“TeX Live”
> +(define* (build #:key inputs build-targets tex-format #:allow-other-keys)
> + ;; Find additional tex and sty files
> + (setenv "TEXINPUTS"
> + (string-append
> + (getcwd) ":" (getcwd) "/build:"
> + (string-join
> + (append-map (match-lambda
> + ((_ . dir)
> + (find-files dir
> + (lambda (_ stat)
> + (eq? 'directory (stat:type stat)))
> + #:directories? #t
> + #:stat stat)))
> + inputs)
> + ":")))
> + (setenv "TEXFORMATS"
> + (string-append (assoc-ref inputs "texlive-latex-base")
> + "/share/texmf-dist/web2c/"))
> + (setenv "LUAINPUTS"
> + (string-append (assoc-ref inputs "texlive-latex-base")
> + "/share/texmf-dist/tex/latex/base/"))
Should these variables be declared as search paths somewhere?
Otherwise LGTM, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* [bug#27296] [PATCH 14/35] build-system: Add 'texlive-build-system'.
2017-06-09 14:50 ` Ludovic Courtès
@ 2017-06-14 7:24 ` Ricardo Wurmus
2017-06-14 7:41 ` Ludovic Courtès
0 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-14 7:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * guix/build-system/texlive.scm: New file.
>> * guix/build/texlive-build-system.scm: New file.
>> * Makefile.am (MODULES): Add them.
>> * doc/guix.texi (Build Systems): Document it.
>> * gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
>> (texlife-ref): Remove procedure.
>
> [...]
>
[…]
>> +(define* (build #:key inputs build-targets tex-format #:allow-other-keys)
>> + ;; Find additional tex and sty files
>> + (setenv "TEXINPUTS"
>> + (string-append
>> + (getcwd) ":" (getcwd) "/build:"
>> + (string-join
>> + (append-map (match-lambda
>> + ((_ . dir)
>> + (find-files dir
>> + (lambda (_ stat)
>> + (eq? 'directory (stat:type stat)))
>> + #:directories? #t
>> + #:stat stat)))
>> + inputs)
>> + ":")))
>> + (setenv "TEXFORMATS"
>> + (string-append (assoc-ref inputs "texlive-latex-base")
>> + "/share/texmf-dist/web2c/"))
>> + (setenv "LUAINPUTS"
>> + (string-append (assoc-ref inputs "texlive-latex-base")
>> + "/share/texmf-dist/tex/latex/base/"))
>
> Should these variables be declared as search paths somewhere?
I don’t think they should. There are many more environment variables
needed by a usual TeX Live installation, but they are usually configured
in “texmf.cnf” and with special syntax e.g. to permit recursive
traversal (ending on “//”). These three variables are just the bare
minimum I needed to run “latex” or “luatex” on the packages up to this
point.
If we really do need more in the future it might be better to create a
custom “texmf.cnf” and set the TEXMFCNF variable to use it.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* [bug#27296] [PATCH 14/35] build-system: Add 'texlive-build-system'.
2017-06-14 7:24 ` [bug#27296] " Ricardo Wurmus
@ 2017-06-14 7:41 ` Ludovic Courtès
0 siblings, 0 replies; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-14 7:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> * guix/build-system/texlive.scm: New file.
>>> * guix/build/texlive-build-system.scm: New file.
>>> * Makefile.am (MODULES): Add them.
>>> * doc/guix.texi (Build Systems): Document it.
>>> * gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
>>> (texlife-ref): Remove procedure.
>>
>> [...]
>>
> […]
>>> +(define* (build #:key inputs build-targets tex-format #:allow-other-keys)
>>> + ;; Find additional tex and sty files
>>> + (setenv "TEXINPUTS"
>>> + (string-append
>>> + (getcwd) ":" (getcwd) "/build:"
>>> + (string-join
>>> + (append-map (match-lambda
>>> + ((_ . dir)
>>> + (find-files dir
>>> + (lambda (_ stat)
>>> + (eq? 'directory (stat:type stat)))
>>> + #:directories? #t
>>> + #:stat stat)))
>>> + inputs)
>>> + ":")))
>>> + (setenv "TEXFORMATS"
>>> + (string-append (assoc-ref inputs "texlive-latex-base")
>>> + "/share/texmf-dist/web2c/"))
>>> + (setenv "LUAINPUTS"
>>> + (string-append (assoc-ref inputs "texlive-latex-base")
>>> + "/share/texmf-dist/tex/latex/base/"))
>>
>> Should these variables be declared as search paths somewhere?
>
> I don’t think they should. There are many more environment variables
> needed by a usual TeX Live installation, but they are usually configured
> in “texmf.cnf” and with special syntax e.g. to permit recursive
> traversal (ending on “//”). These three variables are just the bare
> minimum I needed to run “latex” or “luatex” on the packages up to this
> point.
>
> If we really do need more in the future it might be better to create a
> custom “texmf.cnf” and set the TEXMFCNF variable to use it.
OK, makes sense.
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 15/35] gnu: Add texlive-latex-filecontents.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (12 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 14/35] build-system: Add 'texlive-build-system' Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 16/35] gnu: Add texlive-generic-ifxetex Ricardo Wurmus
` (20 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-filecontents): New variable.
---
gnu/packages/tex.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 5cb4ec6ab..0a4894d8b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -824,6 +824,30 @@ with the required packages, constitutes what every LaTeX distribution should
contain.")
(license license:lppl1.3c+))))
+(define-public texlive-latex-filecontents
+ (package
+ (name "texlive-latex-filecontents")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "filecontents"))
+ (sha256
+ (base32
+ "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
+ (build-system texlive-build-system)
+ (arguments '(#:tex-directory "latex/filecontents"))
+ (home-page "http://www.ctan.org/pkg/filecontents")
+ (synopsis "Extended filecontents and filecontents* environments")
+ (description
+ "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
+enable a LaTeX source file to generate external files as it runs through
+LaTeX. However, there are two limitations of these environments: they refuse
+to overwrite existing files, and they can only be used in the preamble of a
+document. The filecontents package removes these limitations, letting you
+overwrite existing files and letting you use @code{filecontents} /
+@code{filecontents*} anywhere.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 16/35] gnu: Add texlive-generic-ifxetex.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (13 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 15/35] gnu: Add texlive-latex-filecontents Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 17/35] gnu: Add texlive-latex-fancyvrb Ricardo Wurmus
` (19 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-generic-ifxetex): New variable.
---
gnu/packages/tex.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0a4894d8b..7ff0322de 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -848,6 +848,30 @@ overwrite existing files and letting you use @code{filecontents} /
@code{filecontents*} anywhere.")
(license license:lppl1.3c+)))
+(define-public texlive-generic-ifxetex
+ (package
+ (name "texlive-generic-ifxetex")
+ (version "0.6")
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "generic" "ifxetex"))
+ (sha256
+ (base32
+ "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "generic/ifxetex"
+ #:tex-format "xelatex"))
+ (inputs
+ `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
+ (home-page "http://www.ctan.org/pkg/ifxetex")
+ (synopsis "Am I running under XeTeX?")
+ (description
+ "This is a simple package which provides an @code{\\ifxetex} conditional,
+so that other code can determine that it is running under XeTeX. The package
+requires the etexe-TeX extensions to the TeX primitive set.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 17/35] gnu: Add texlive-latex-fancyvrb.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (14 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 16/35] gnu: Add texlive-generic-ifxetex Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 18/35] gnu: Add texlive-latex-graphics Ricardo Wurmus
` (18 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-fancyvrb): New variable.
---
gnu/packages/tex.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7ff0322de..cf961d9a1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -872,6 +872,33 @@ so that other code can determine that it is running under XeTeX. The package
requires the etexe-TeX extensions to the TeX primitive set.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-fancyvrb
+ (package
+ (name "texlive-latex-fancyvrb")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "fancyvrb"))
+ (sha256
+ (base32
+ "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/fancyvrb"
+ ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and
+ ;; thus texlive-luatex-lualibs.
+ #:build-targets '("fancyvrb.ins")))
+ (home-page "http://www.ctan.org/pkg/fancyvrb")
+ (synopsis "Sophisticated verbatim text")
+ (description
+ "This package provides tools for the flexible handling of verbatim text
+including: verbatim commands in footnotes; a variety of verbatim environments
+with many parameters; ability to define new customized verbatim environments;
+save and restore verbatim text and environments; write and read files in
+verbatim mode; build \"example\" environments (showing both result and
+verbatim source).")
+ (license license:lppl1.0+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 18/35] gnu: Add texlive-latex-graphics.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (15 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 17/35] gnu: Add texlive-latex-fancyvrb Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 19/35] gnu: Add texlive-latex-xcolor Ricardo Wurmus
` (17 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-graphics): New variable.
---
gnu/packages/tex.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index cf961d9a1..cced5d8cc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -899,6 +899,70 @@ verbatim mode; build \"example\" environments (showing both result and
verbatim source).")
(license license:lppl1.0+)))
+(define-public texlive-latex-graphics
+ (package
+ (name "texlive-latex-graphics")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "graphics"))
+ (sha256
+ (base32
+ "17ka701xr9nqsjlhz30hphr8d9j4zzwgv5zl5r2f118yzqh9c34v"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/graphics"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-config
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((cfg (assoc-ref inputs "graphics-cfg"))
+ (target (string-append (assoc-ref outputs "out")
+ "/share/texmf-dist/tex/latex/graphics-cfg")))
+ (mkdir-p target)
+ (install-file (string-append cfg "/graphics.cfg") target)
+ (install-file (string-append cfg "/color.cfg") target)
+ #t)))
+ (add-after 'install 'install-defs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((def (assoc-ref inputs "graphics-def"))
+ (target (string-append (assoc-ref outputs "out")
+ "/share/texmf-dist/tex/latex/graphics-def")))
+ (mkdir-p target)
+ (copy-recursively def target)
+ #t))))))
+ (native-inputs
+ `(("graphics-cfg"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/latex3/graphics-cfg.git")
+ (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
+ (sha256
+ (base32
+ "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
+ ("graphics-def"
+ ,(origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/latex/graphics-def"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "1q5l0x3jsy74v0zq4c9g0x0rb9jfzf7cbhdzkbchyydv49iav802"))))))
+ (home-page "http://www.ctan.org/pkg/latex-graphics")
+ (synopsis "LaTeX standard graphics bundle")
+ (description
+ "This is a collection of LaTeX packages for producing color, including
+graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
+documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
+keyval, and lscape.")
+ ;; The configuration files are released under CC0.
+ (license (list license:lppl1.3c+
+ license:cc0))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 19/35] gnu: Add texlive-latex-xcolor.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (16 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 18/35] gnu: Add texlive-latex-graphics Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 20/35] gnu: Add texlive-latex-hyperref Ricardo Wurmus
` (16 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-xcolor): New variable.
---
gnu/packages/tex.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index cced5d8cc..2b7d32bb1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -963,6 +963,30 @@ keyval, and lscape.")
(license (list license:lppl1.3c+
license:cc0))))
+(define-public texlive-latex-xcolor
+ (package
+ (name "texlive-latex-xcolor")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "xcolor"))
+ (sha256
+ (base32
+ "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
+ (build-system texlive-build-system)
+ (arguments '(#:tex-directory "latex/xcolor"))
+ (home-page "http://www.ctan.org/pkg/xcolor")
+ (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
+ (description
+ "The package starts from the basic facilities of the colorcolor package,
+and provides easy driver-independent access to several kinds of color tints,
+shades, tones, and mixes of arbitrary colors. It allows a user to select a
+document-wide target color model and offers complete tools for conversion
+between eight color models. Additionally, there is a command for alternating
+row colors plus repeated non-aligned material (like horizontal lines) in
+tables.")
+ (license license:lppl1.2+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 20/35] gnu: Add texlive-latex-hyperref.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (17 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 19/35] gnu: Add texlive-latex-xcolor Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 21/35] gnu: Add texlive-latex-oberdiek Ricardo Wurmus
` (15 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-hyperref): New variable.
---
gnu/packages/tex.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2b7d32bb1..7d76dee44 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -987,6 +987,34 @@ row colors plus repeated non-aligned material (like horizontal lines) in
tables.")
(license license:lppl1.2+)))
+(define-public texlive-latex-hyperref
+ (package
+ (name "texlive-latex-hyperref")
+ (version "6.84a2")
+ ;; The sources in the Texlive SVN repository do not contain hluatex.dtx,
+ ;; so we fetch the release from GitHub.
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ho-tex/hyperref/"
+ "archive/release-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
+ (build-system texlive-build-system)
+ (arguments '(#:tex-directory "latex/hyperref"))
+ (home-page "http://www.ctan.org/pkg/hyperref")
+ (synopsis "Extensive support for hypertext in LaTeX")
+ (description
+ "The hyperref package is used to handle cross-referencing commands in
+LaTeX to produce hypertext links in the document. The package provides
+backends for the special set defined for HyperTeX DVI processors; for embedded
+pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for
+dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX
+pdf and HTML backends. The package is distributed with the backref and
+nameref packages, which make use of the facilities of hyperref.")
+ (license license:lppl1.3+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 21/35] gnu: Add texlive-latex-oberdiek.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (18 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 20/35] gnu: Add texlive-latex-hyperref Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 22/35] gnu: Add texlive-latex-tools Ricardo Wurmus
` (14 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-oberdiek): New variable.
---
gnu/packages/tex.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7d76dee44..7f4c81c56 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1015,6 +1015,35 @@ pdf and HTML backends. The package is distributed with the backref and
nameref packages, which make use of the facilities of hyperref.")
(license license:lppl1.3+)))
+(define-public texlive-latex-oberdiek
+ (package
+ (name "texlive-latex-oberdiek")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "oberdiek"))
+ (sha256
+ (base32
+ "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/oberdiek"
+ #:phases
+ (modify-phases %standard-phases
+ ;; "ifpdf.ins" is not generated, so we cannot process it.
+ (add-after 'unpack 'do-not-process-ifpdf.ins
+ (lambda _
+ (substitute* "oberdiek.ins"
+ (("\\\\batchinput\\{ifpdf.ins\\}") ""))
+ #t)))))
+ (home-page "http://www.ctan.org/pkg/oberdiek")
+ (synopsis "Bundle of packages submitted by Heiko Oberdiek")
+ (description
+ "The bundle comprises various LaTeX packages, providing among others:
+better accessibility support for PDF files; extensible chemists reaction
+arrows; record information about document class(es) used; and many more.")
+ (license license:lppl1.3+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 22/35] gnu: Add texlive-latex-tools.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (19 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 21/35] gnu: Add texlive-latex-oberdiek Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 23/35] gnu: Add texlive-latex-url Ricardo Wurmus
` (13 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-tools): New variable.
---
gnu/packages/tex.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7f4c81c56..e6d07b766 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1044,6 +1044,31 @@ better accessibility support for PDF files; extensible chemists reaction
arrows; record information about document class(es) used; and many more.")
(license license:lppl1.3+)))
+(define-public texlive-latex-tools
+ (package
+ (name "texlive-latex-tools")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "tools"))
+ (sha256
+ (base32
+ "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/tools"
+ #:build-targets '("tools.ins")))
+ (home-page "http://www.ctan.org/pkg/latex-tools")
+ (synopsis "LaTeX standard tools bundle")
+ (description
+ "This package is a collection of (variously) simple tools provided as
+part of the LaTeX required tools distribution, comprising the following
+packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
+fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
+rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
+xr, and xspace.")
+ (license license:lppl1.3+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 23/35] gnu: Add texlive-latex-url.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (20 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 22/35] gnu: Add texlive-latex-tools Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 24/35] gnu: Add texlive-latex-l3kernel Ricardo Wurmus
` (12 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-url): New variable.
---
gnu/packages/tex.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e6d07b766..113938bc5 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1069,6 +1069,45 @@ rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
xr, and xspace.")
(license license:lppl1.3+)))
+(define-public texlive-latex-url
+ (package
+ (name "texlive-latex-url")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/tex/latex/url"))
+ (revision %texlive-revision)))
+ (sha256
+ (base32
+ "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((target (string-append (assoc-ref %outputs "out")
+ "/share/texmf-dist/tex/latex/url")))
+ (mkdir-p target)
+ (copy-recursively (assoc-ref %build-inputs "source") target)
+ #t))))
+ (home-page "https://www.ctan.org/pkg/url")
+ (synopsis "Verbatim with URL-sensitive line breaks")
+ (description "The command @code{\\url} is a form of verbatim command that
+allows linebreaks at certain characters or combinations of characters, accepts
+reconfiguration, and can usually be used in the argument to another command.
+The command is intended for email addresses, hypertext links,
+directories/paths, etc., which normally have no spaces, so by default the
+package ignores spaces in its argument. However, a package option allows
+spaces, which is useful for operating systems where spaces are a common part
+of file names.")
+ ;; The license header states that it is under LPPL version 2 or later, but
+ ;; the latest version is 1.3c.
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 24/35] gnu: Add texlive-latex-l3kernel.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (21 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 23/35] gnu: Add texlive-latex-url Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 25/35] gnu: Add texlive-latex-l3packages Ricardo Wurmus
` (11 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-l3kernel): New variable.
---
gnu/packages/tex.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 113938bc5..7cdda92cc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1108,6 +1108,29 @@ of file names.")
;; the latest version is 1.3c.
(license license:lppl1.3c+)))
+(define-public texlive-latex-l3kernel
+ (package
+ (name "texlive-latex-l3kernel")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "l3kernel"))
+ (sha256
+ (base32
+ "0ndqw0flhl20f4ny5lssp8rqpnj5kglyg59whbdrxbh2zc7w7j0b"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/l3kernel"))
+ (home-page "http://www.ctan.org/pkg/l3kernel")
+ (synopsis "LaTeX3 programmers’ interface")
+ (description
+ "The l3kernel bundle provides an implementation of the LaTeX3
+programmers’ interface, as a set of packages that run under LaTeX 2e. The
+interface provides the foundation on which the LaTeX3 kernel and other future
+code are built: it is an API for TeX programmers. The packages are set up so
+that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 25/35] gnu: Add texlive-latex-l3packages.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (22 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 24/35] gnu: Add texlive-latex-l3kernel Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 26/35] gnu: Add texlive-latex-fontspec Ricardo Wurmus
` (10 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-l3packages): New variable.
---
gnu/packages/tex.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7cdda92cc..e4d29a817 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1131,6 +1131,53 @@ code are built: it is an API for TeX programmers. The packages are set up so
that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-l3packages
+ (package
+ (name "texlive-latex-l3packages")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "l3packages"))
+ (sha256
+ (base32
+ "1p1y9my6ccmp2ab91fzqqgih8ifrk4y3wyh397kagiq9f6a6v91f"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/l3packages"
+ #:phases
+ (modify-phases %standard-phases
+ ;; All package sources are in sub-directories, so we need to add them
+ ;; to TEXINPUTS.
+ (add-after 'unpack 'set-TEXINPUTS
+ (lambda _
+ (let ((cwd (getcwd)))
+ (setenv "TEXINPUTS"
+ (string-append cwd "/l3keys2e:"
+ cwd "/xparse:"
+ cwd "/xfrac:"
+ cwd "/xfp:"
+ cwd "/xtemplate")))
+ #t)))))
+ (inputs
+ `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
+ (home-page "http://www.ctan.org/pkg/l3packages")
+ (synopsis "High-level LaTeX3 concepts")
+ (description
+ "This bundle holds prototype implementations of concepts for a LaTeX
+designer interface, to be used with the experimental LaTeX kernel as
+programming tools and kernel support. Packages provided in this release are:
+
+@enumerate
+@item l3keys2e, which makes the facilities of the kernel module l3keys
+ available for use by LaTeX 2e packages;
+@item xfrac, which provides flexible splitlevel fractions;
+@item xparse, which provides a high-level interface for declaring document
+ commands; and
+@item xtemplate, which provides a means of defining generic functions using a
+ key-value syntax.
+@end enumerate\n")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 26/35] gnu: Add texlive-latex-fontspec.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (23 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 25/35] gnu: Add texlive-latex-l3packages Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 27/35] gnu: Add texlive-luatex-lualibs Ricardo Wurmus
` (9 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-fontspec): New variable.
---
gnu/packages/tex.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e4d29a817..73db72145 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1178,6 +1178,31 @@ programming tools and kernel support. Packages provided in this release are:
@end enumerate\n")
(license license:lppl1.3c+)))
+(define-public texlive-latex-fontspec
+ (package
+ (name "texlive-latex-fontspec")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "fontspec"))
+ (sha256
+ (base32
+ "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/fontspec"
+ #:build-targets '("fontspec.dtx")))
+ (inputs
+ `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
+ (home-page "http://www.ctan.org/pkg/fontspec")
+ (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
+ (description
+ "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
+automatic and unified interface to feature-rich AAT and OpenType fonts through
+the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
+the l3kernel and xparse bundles from the LaTeX 3 development team.")
+ (license license:lppl1.3+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 27/35] gnu: Add texlive-luatex-lualibs.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (24 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 26/35] gnu: Add texlive-latex-fontspec Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 28/35] gnu: Add texlive-latex-amsmath Ricardo Wurmus
` (8 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-luatex-lualibs): New variable.
---
gnu/packages/tex.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 73db72145..3af340d53 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -61,7 +61,7 @@
#:use-module (gnu packages zip)
#:autoload (gnu packages texinfo) (texinfo)
#:use-module (ice-9 ftw)
- #:use-module (srfi srfi-1))
+ #:use-module ((srfi srfi-1) #:hide (zip)))
(define texlive-extra-src
(origin
@@ -1203,6 +1203,43 @@ the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
the l3kernel and xparse bundles from the LaTeX 3 development team.")
(license license:lppl1.3+)))
+;; The SVN directory contains little more than a dtx file that generates three
+;; of the many lua files that should be installed as part of this package.
+;; This is why we take the release from GitHub instead.
+(define-public texlive-luatex-lualibs
+ (package
+ (name "texlive-luatex-lualibs")
+ (version "2.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/lualatex/lualibs/"
+ "releases/download/v"
+ version "/lualibs.zip"))
+ (sha256
+ (base32
+ "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list (string-append "DESTDIR="
+ (assoc-ref %outputs "out")
+ "/share/texmf-dist"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("unzip" ,unzip)
+ ("zip" ,zip)))
+ (home-page "https://github.com/lualatex/lualibs")
+ (synopsis "Lua modules for general programming (in the (La)TeX world)")
+ (description
+ "Lualibs is a collection of Lua modules useful for general programming.
+The bundle is based on Lua modules shipped with ConTeXt, and made available in
+this bundle for use independent of ConTeXt.")
+ ;; GPL version 2 only
+ (license license:gpl2)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 28/35] gnu: Add texlive-latex-amsmath.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (25 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 27/35] gnu: Add texlive-luatex-lualibs Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 29/35] gnu: Add texlive-latex-amscls Ricardo Wurmus
` (7 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-amsmath): New variable.
---
gnu/packages/tex.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3af340d53..ff9d177d0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1240,6 +1240,34 @@ this bundle for use independent of ConTeXt.")
;; GPL version 2 only
(license license:gpl2)))
+(define-public texlive-latex-amsmath
+ (package
+ (name "texlive-latex-amsmath")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "amsmath"))
+ (sha256
+ (base32
+ "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba"))))
+ (build-system texlive-build-system)
+ (arguments '(#:tex-directory "latex/amsmath"))
+ (home-page "http://www.ctan.org/pkg/amsmath")
+ (synopsis "AMS mathematical facilities for LaTeX")
+ (description
+ "This is the principal package in the AMS-LaTeX distribution. It adapts
+for use in LaTeX most of the mathematical features found in AMS-TeX; it is
+highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
+When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
+symbols), @code{amsopnamsopn} (for operator names) and
+@code{amstextamstext} (for text embedded in mathematics) are also loaded.
+This package is part of the LaTeX required distribution; however, several
+contributed packages add still further to its appeal; examples are
+@code{empheqempheq}, which provides functions for decorating and highlighting
+mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
+definitions.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 29/35] gnu: Add texlive-latex-amscls.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (26 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 28/35] gnu: Add texlive-latex-amsmath Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 30/35] gnu: Add texlive-latex-babel Ricardo Wurmus
` (6 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-amscls): New variable.
---
gnu/packages/tex.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ff9d177d0..48d924689 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1268,6 +1268,29 @@ mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
definitions.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-amscls
+ (package
+ (name "texlive-latex-amscls")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "amscls"))
+ (sha256
+ (base32
+ "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j"))))
+ (build-system texlive-build-system)
+ (arguments
+ `(#:tex-directory "latex/amscls"))
+ (home-page "http://www.ctan.org/pkg/amscls")
+ (synopsis "AMS document classes for LaTeX")
+ (description
+ "This bundle contains three AMS classes: @code{amsartamsart} (for writing
+articles for the AMS), @code{amsbookamsbook} (for books) and
+@code{amsprocamsproc} (for proceedings), together with some supporting
+material. The material is made available as part of the AMS-LaTeX
+distribution.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 30/35] gnu: Add texlive-latex-babel.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (27 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 29/35] gnu: Add texlive-latex-amscls Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 31/35] gnu: texlive-latex-cyrillic Ricardo Wurmus
` (5 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-babel): New variable.
---
gnu/packages/tex.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 48d924689..98816f59e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1291,6 +1291,40 @@ material. The material is made available as part of the AMS-LaTeX
distribution.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-babel
+ (package
+ (name "texlive-latex-babel")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "babel"))
+ (sha256
+ (base32
+ "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/babel"
+ #:phases
+ (modify-phases %standard-phases
+ ;; This package tries to produce babel.aux twice but refuses to
+ ;; overwrite the first one.
+ (add-before 'build 'fix-ins
+ (lambda _
+ (substitute* "babel.ins"
+ (("askonceonly") "askforoverwritefalse"))
+ #t)))))
+ (home-page "http://www.ctan.org/pkg/babel")
+ (synopsis "Multilingual support for Plain TeX or LaTeX")
+ (description
+ "The package manages culturally-determined typographical (and other)
+rules, and hyphenation patterns for a wide range of languages. A document may
+select a single language to be supported, or it may select several, in which
+case the document may switch from one language to another in a variety of
+ways. Babel uses contributed configuration files that provide the detail of
+what has to be done for each language. Users of XeTeX are advised to use the
+polyglossia package rather than Babel.")
+ (license license:lppl1.3+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 31/35] gnu: texlive-latex-cyrillic.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (28 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 30/35] gnu: Add texlive-latex-babel Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 32/35] gnu: Add texlive-latex-psnfss Ricardo Wurmus
` (4 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-cyrillic): New variable.
---
gnu/packages/tex.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 98816f59e..55bd3e34d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1325,6 +1325,28 @@ what has to be done for each language. Users of XeTeX are advised to use the
polyglossia package rather than Babel.")
(license license:lppl1.3+)))
+(define-public texlive-latex-cyrillic
+ (package
+ (name "texlive-latex-cyrillic")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "cyrillic"))
+ (sha256
+ (base32
+ "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/cyrillic"))
+ (home-page "http://www.ctan.org/pkg/latex-cyrillic")
+ (synopsis "Support for Cyrillic fonts in LaTeX")
+ (description
+ "This bundle of macros files provides macro support (including font
+encoding macros) for the use of Cyrillic characters in fonts encoded under the
+T2* and X2 encodings. These encodings cover (between them) pretty much every
+language that is written in a Cyrillic alphabet.")
+ (license license:lppl1.3c+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 32/35] gnu: Add texlive-latex-psnfss.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (29 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 31/35] gnu: texlive-latex-cyrillic Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 33/35] gnu: Add texlive-union Ricardo Wurmus
` (3 subsequent siblings)
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-latex-psnfss): New variable.
---
gnu/packages/tex.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 55bd3e34d..0f0c0b7ee 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1347,6 +1347,30 @@ T2* and X2 encodings. These encodings cover (between them) pretty much every
language that is written in a Cyrillic alphabet.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-psnfss
+ (package
+ (name "texlive-latex-psnfss")
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref "latex" "psnfss"))
+ (sha256
+ (base32
+ "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
+ (build-system texlive-build-system)
+ (arguments '(#:tex-directory "latex/psnfss"))
+ (home-page "http://www.ctan.org/pkg/psnfss")
+ (synopsis "Font support for common PostScript fonts")
+ (description
+ "The PSNFSS collection includes a set of files that provide a complete
+working setup of the LaTeX font selection scheme (NFSS2) for use with common
+PostScript fonts. It covers the so-called \"Base\" fonts (which are built
+into any Level 2 PostScript printing device and the Ghostscript interpreter)
+and a number of free fonts. It provides font definition files, macros and
+font metrics. The bundle as a whole is part of the LaTeX required set of
+packages.")
+ (license license:lppl1.2+)))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 33/35] gnu: Add texlive-union.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (30 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 32/35] gnu: Add texlive-latex-psnfss Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 14:57 ` Ludovic Courtès
2017-06-09 10:45 ` bug#27296: [PATCH 34/35] gnu: Add texlive-tiny Ricardo Wurmus
` (2 subsequent siblings)
34 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-union): New procedure.
---
gnu/packages/tex.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0f0c0b7ee..e4ac2f759 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1371,6 +1371,83 @@ font metrics. The bundle as a whole is part of the LaTeX required set of
packages.")
(license license:lppl1.2+)))
+(define-public texlive-union (lambda* (#:optional (packages '()))
+ "Return 'texlive-union' package which is a union of PACKAGES and the
+standard LaTeX packages."
+ (let ((default-packages
+ (list texlive-bin
+ texlive-dvips
+ texlive-fonts-cm
+ texlive-fonts-latex
+ texlive-metafont-base
+ texlive-latex-base
+ ;; LaTeX packages from the "required" set.
+ texlive-latex-amsmath
+ texlive-latex-amscls
+ texlive-latex-babel
+ texlive-latex-cyrillic
+ texlive-latex-graphics
+ texlive-latex-psnfss
+ texlive-latex-tools)))
+ (package
+ (name "texlive-union")
+ (version (number->string %texlive-revision))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build union)
+ (guix build utils)
+ (guix build texlive-build-system)
+ (guix build gnu-build-system)
+ (guix build gremlin)
+ (guix elf))
+ #:builder
+ (begin
+ (use-modules (ice-9 match)
+ (srfi srfi-26)
+ (guix build union)
+ (guix build utils)
+ (guix build texlive-build-system))
+ (let* ((out (assoc-ref %outputs "out"))
+ (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
+ ;; Build a modifiable union of all inputs (but exclude bash)
+ (match (filter (match-lambda
+ ((name . _)
+ (not (string=? "bash" name))))
+ %build-inputs)
+ (((names . directories) ...)
+ (union-build (assoc-ref %outputs "out")
+ directories
+ #:create-all-directories? #t)))
+
+ ;; The configuration file "texmf.cnf" is provided by the
+ ;; "texlive-bin" package. We take it and override only the
+ ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
+ ;; by default, though, so we still need to set TEXMFCNF.
+ (substitute* texmf.cnf
+ (("^TEXMFROOT = .*")
+ (string-append "TEXMFROOT = " out "/share\n"))
+ (("^TEXMF = .*")
+ "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
+ (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
+ "/bin"))
+ (for-each
+ (cut wrap-program <>
+ `("TEXMFCNF" ":" = (,(dirname texmf.cnf)))
+ `("TEXMF" ":" = (,(string-append out "/share/texmf-dist"))))
+ (find-files (string-append out "/bin") ".*"))
+ #t))))
+ (inputs
+ `(("bash" ,bash)
+ ,@(map (lambda (package)
+ (list (package-name package) package))
+ (append default-packages packages))))
+ (home-page (package-home-page texlive-bin))
+ (synopsis "Union of Texlive packages")
+ (description "This package provides a subset of the Texlive
+distribution.")
+ (license (map package-license (append default-packages packages)))))))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 33/35] gnu: Add texlive-union.
2017-06-09 10:45 ` bug#27296: [PATCH 33/35] gnu: Add texlive-union Ricardo Wurmus
@ 2017-06-09 14:57 ` Ludovic Courtès
2017-06-09 15:06 ` Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 14:57 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * gnu/packages/tex.scm (texlive-union): New procedure.
[...]
> +(define-public texlive-union (lambda* (#:optional (packages '()))
> + "Return 'texlive-union' package which is a union of PACKAGES and the
> +standard LaTeX packages."
> + (let ((default-packages
> + (list texlive-bin
> + texlive-dvips
> + texlive-fonts-cm
(Indentation is unusual here.)
Does ‘texlive-union’ become the user interface to install LaTeX, along
with ‘texlive-tiny’ and maybe a ‘texlive-full’ meta-package?
Do you think this could be turned into a profile hook, somehow, such
that users who install a bunch of ‘texlive-*’ packages would immediately
get something that works without having to write Scheme code that calls
‘texlive-union’?
> + (license (map package-license (append default-packages packages)))))))
‘package-license’ can return either a <license> or a list, so ideally
we’d concatenate the lists. :-)
(fold (lambda (package result)
(match (package-license package)
((lst ...)
(append lst result))
((? license? license)
(cons license result))))
'()
(append …))
Otherwise LGTM!
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 33/35] gnu: Add texlive-union.
2017-06-09 14:57 ` Ludovic Courtès
@ 2017-06-09 15:06 ` Ricardo Wurmus
2017-06-09 15:12 ` Ludovic Courtès
0 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 15:06 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * gnu/packages/tex.scm (texlive-union): New procedure.
>
> [...]
>
>> +(define-public texlive-union (lambda* (#:optional (packages '()))
>> + "Return 'texlive-union' package which is a union of PACKAGES and the
>> +standard LaTeX packages."
>> + (let ((default-packages
>> + (list texlive-bin
>> + texlive-dvips
>> + texlive-fonts-cm
>
> (Indentation is unusual here.)
>
> Does ‘texlive-union’ become the user interface to install LaTeX, along
> with ‘texlive-tiny’ and maybe a ‘texlive-full’ meta-package?
>
> Do you think this could be turned into a profile hook, somehow, such
> that users who install a bunch of ‘texlive-*’ packages would immediately
> get something that works without having to write Scheme code that calls
> ‘texlive-union’?
“texlive-union” is primarily for the benefit of package definitions that
currently use “texlive” as an input, as the alternative is for these
packages to set a lot of environment variables in build phases. I
reduced the number of variables by providing texmf.cnf, but at the very
least packages would have to set TEXMFCNF and provide their own
texmf.cnf to make the texlive binaries find packages, fonts,
configurations, etc.
A profile hook would be the best way to handle the installation of
packages into profiles. I just haven’t written it yet :)
>> + (license (map package-license (append default-packages packages)))))))
>
> ‘package-license’ can return either a <license> or a list, so ideally
> we’d concatenate the lists. :-)
Ouch! Yes, of course!
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 33/35] gnu: Add texlive-union.
2017-06-09 15:06 ` Ricardo Wurmus
@ 2017-06-09 15:12 ` Ludovic Courtès
2017-06-09 15:51 ` Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 15:12 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> * gnu/packages/tex.scm (texlive-union): New procedure.
>>
>> [...]
>>
>>> +(define-public texlive-union (lambda* (#:optional (packages '()))
>>> + "Return 'texlive-union' package which is a union of PACKAGES and the
>>> +standard LaTeX packages."
>>> + (let ((default-packages
>>> + (list texlive-bin
>>> + texlive-dvips
>>> + texlive-fonts-cm
>>
>> (Indentation is unusual here.)
>>
>> Does ‘texlive-union’ become the user interface to install LaTeX, along
>> with ‘texlive-tiny’ and maybe a ‘texlive-full’ meta-package?
>>
>> Do you think this could be turned into a profile hook, somehow, such
>> that users who install a bunch of ‘texlive-*’ packages would immediately
>> get something that works without having to write Scheme code that calls
>> ‘texlive-union’?
>
> “texlive-union” is primarily for the benefit of package definitions that
> currently use “texlive” as an input, as the alternative is for these
> packages to set a lot of environment variables in build phases. I
> reduced the number of variables by providing texmf.cnf, but at the very
> least packages would have to set TEXMFCNF and provide their own
> texmf.cnf to make the texlive binaries find packages, fonts,
> configurations, etc.
I see, that makes sense! So the ‘texmf.cnf’ file created by
‘texlive-union’ is automatically found, right?
> A profile hook would be the best way to handle the installation of
> packages into profiles. I just haven’t written it yet :)
Fair enough, no problem!
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 33/35] gnu: Add texlive-union.
2017-06-09 15:12 ` Ludovic Courtès
@ 2017-06-09 15:51 ` Ricardo Wurmus
0 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 15:51 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
[…]
>> “texlive-union” is primarily for the benefit of package definitions that
>> currently use “texlive” as an input, as the alternative is for these
>> packages to set a lot of environment variables in build phases. I
>> reduced the number of variables by providing texmf.cnf, but at the very
>> least packages would have to set TEXMFCNF and provide their own
>> texmf.cnf to make the texlive binaries find packages, fonts,
>> configurations, etc.
>
> I see, that makes sense! So the ‘texmf.cnf’ file created by
> ‘texlive-union’ is automatically found, right?
All executables in the texlive-union are wrapped with TEXMFCNF (and
TEXMF) so that they will use the correct texmf.cnf.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 34/35] gnu: Add texlive-tiny.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (31 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 33/35] gnu: Add texlive-union Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 10:45 ` bug#27296: [PATCH 35/35] guix: Add texlive importer Ricardo Wurmus
2017-06-09 14:38 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ludovic Courtès
34 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* gnu/packages/tex.scm (texlive-tiny): New variable.
---
gnu/packages/tex.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e4ac2f759..d87e1fa3a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1448,6 +1448,13 @@ standard LaTeX packages."
distribution.")
(license (map package-license (append default-packages packages)))))))
+(define-public texlive-tiny
+ (package
+ (inherit (texlive-union))
+ (name "texlive-tiny")
+ (description "This is a very limited subset of the Texlive distribution.
+It includes little more than the required set of LaTeX packages.")))
+
(define texlive-texmf
(package
(name "texlive-texmf")
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 35/35] guix: Add texlive importer.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (32 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 34/35] gnu: Add texlive-tiny Ricardo Wurmus
@ 2017-06-09 10:45 ` Ricardo Wurmus
2017-06-09 15:05 ` Ludovic Courtès
2017-06-09 14:38 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ludovic Courtès
34 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-09 10:45 UTC (permalink / raw)
To: 27296; +Cc: Ricardo Wurmus
* guix/import/texlive.scm: New file.
* guix/scripts/import/texlive.scm: New file.
* Makefile.am (MODULES): Add them.
* guix/scripts/import.scm (importers): Add texlive importer.
---
Makefile.am | 2 +
guix/import/texlive.scm | 181 ++++++++++++++++++++++++++++++++++++++++
guix/scripts/import.scm | 2 +-
guix/scripts/import/texlive.scm | 101 ++++++++++++++++++++++
4 files changed, 285 insertions(+), 1 deletion(-)
create mode 100644 guix/import/texlive.scm
create mode 100644 guix/scripts/import/texlive.scm
diff --git a/Makefile.am b/Makefile.am
index c10dffb44..df524e698 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,6 +145,7 @@ MODULES = \
guix/import/cran.scm \
guix/import/hackage.scm \
guix/import/elpa.scm \
+ guix/import/texlive.scm \
guix/scripts.scm \
guix/scripts/download.scm \
guix/scripts/perform-download.scm \
@@ -167,6 +168,7 @@ MODULES = \
guix/scripts/import/nix.scm \
guix/scripts/import/hackage.scm \
guix/scripts/import/elpa.scm \
+ guix/scripts/import/texlive.scm \
guix/scripts/environment.scm \
guix/scripts/publish.scm \
guix/scripts/edit.scm \
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
new file mode 100644
index 000000000..ef3facf0d
--- /dev/null
+++ b/guix/import/texlive.scm
@@ -0,0 +1,181 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; 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 (guix import texlive)
+ #:use-module (ice-9 match)
+ #:use-module (sxml simple)
+ #:use-module (sxml xpath)
+ #:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (web uri)
+ #:use-module (guix http-client)
+ #:use-module (guix hash)
+ #:use-module (guix memoization)
+ #:use-module (guix store)
+ #:use-module (guix base32)
+ #:use-module (guix serialization)
+ #:use-module (guix svn-download)
+ #:use-module (guix import utils)
+ #:use-module (guix utils)
+ #:use-module (guix upstream)
+ #:use-module (guix packages)
+ #:use-module (gnu packages)
+ #:use-module (guix build-system texlive)
+ #:export (texlive->guix-package))
+
+;;; Commentary:
+;;;
+;;; Generate a package declaration template for the latest version of a
+;;; package on CTAN, using the XML output produced by the XML API to the CTAN
+;;; database at http://www.ctan.org/xml/1.2/
+;;;
+;;; Instead of taking the packages from CTAN, however, we fetch the sources
+;;; from the SVN repository of the Texlive project. We do this because CTAN
+;;; only keeps a single version of each package whereas we can access any
+;;; version via SVN. Unfortunately, this means that the importer is really
+;;; just a Texlive importer, not a generic CTAN importer.
+;;;
+;;; Code:
+
+(define string->license
+ (match-lambda
+ ("artistic2" 'gpl3+)
+ ("gpl" 'gpl3+)
+ ("gpl1" 'gpl1)
+ ("gpl1+" 'gpl1+)
+ ("gpl2" 'gpl2)
+ ("gpl2+" 'gpl2+)
+ ("gpl3" 'gpl3)
+ ("gpl3+" 'gpl3+)
+ ("lgpl2.1" 'lgpl2.1)
+ ("lgpl3" 'lgpl3)
+ ("knuth" 'knuth)
+ ("pd" 'public-domain)
+ ("bsd2" 'bsd-2)
+ ("bsd3" 'bsd-3)
+ ("bsd4" 'bsd-4)
+ ("opl" 'opl1.0+)
+ ("ofl" 'silofl1.1)
+ ("lppl" 'lppl)
+ ("lppl1" 'lppl1.0+) ; usually means "or later"
+ ("lppl1.2" 'lppl1.2+) ; usually means "or later"
+ ("lppl1.3" 'lppl1.3+) ; usually means "or later"
+ ("lppl1.3a" 'lppl1.3a)
+ ("lppl1.3b" 'lppl1.3b)
+ ("lppl1.3c" 'lppl1.3c)
+ ("cc-by-2" 'cc-by-2.0)
+ ("cc-by-3" 'cc-by-3.0)
+ ("cc-by-sa-2" 'cc-by-sa2.0)
+ ("cc-by-sa-3" 'cc-by-sa3.0)
+ ("mit" 'expat)
+ ("fdl" 'fdl1.3+)
+ ("gfl" 'gfl1.0)
+
+ ;; These are known non-free licenses
+ ("noinfo" 'unknown)
+ ("nosell" 'non-free)
+ ("shareware" 'non-free)
+ ("nosource" 'non-free)
+ ("nocommercial" 'non-free)
+ ("cc-by-nc-nd-1" 'non-free)
+ ("cc-by-nc-nd-2" 'non-free)
+ ("cc-by-nc-nd-2.5" 'non-free)
+ ("cc-by-nc-nd-3" 'non-free)
+ ("cc-by-nc-nd-4" 'non-free)
+ ((x) (string->license x))
+ ((lst ...) `(list ,@(map string->license lst)))
+ (_ #f)))
+
+(define (fetch-sxml name)
+ "Return an sxml representation of the package information contained in the
+XML description of the CTAN package or #f in case of failure."
+ ;; This API always returns the latest release of the module.
+ (let ((url (string-append "http://www.ctan.org/xml/1.2/pkg/" name)))
+ (guard (c ((http-get-error? c)
+ (format (current-error-port)
+ "error: failed to retrieve package information \
+from ~s: ~a (~s)~%"
+ (uri->string (http-get-error-uri c))
+ (http-get-error-code c)
+ (http-get-error-reason c))
+ #f))
+ (xml->sxml (http-fetch url)
+ #:trim-whitespace? #t))))
+
+(define (guix-name component name)
+ "Return a Guix package name for a given Texlive package NAME."
+ (string-append "texlive-" component "-"
+ (string-map (match-lambda
+ (#\_ #\-)
+ (#\. #\-)
+ (chr (char-downcase chr)))
+ name)))
+
+(define* (sxml->package sxml #:optional (component "latex"))
+ "Return the `package' s-expression for a Texlive package from the SXML
+expression describing it."
+ (define (sxml-value path)
+ (match ((sxpath path) sxml)
+ (() #f)
+ ((val) val)))
+ (let* ((id (sxml-value '(entry @ id *text*)))
+ (synopsis (sxml-value '(entry caption *text*)))
+ (version (or (sxml-value '(entry version @ number *text*))
+ (sxml-value '(entry version @ date *text*))))
+ (license (string->license (sxml-value '(entry license @ type *text*))))
+ (home-page (string-append "http://www.ctan.org/pkg/" id))
+ (ref (texlive-ref component id))
+ (checkout (with-store store (download-svn-to-store store ref))))
+ `(package
+ (name ,(guix-name component id))
+ (version ,version)
+ (source (origin
+ (method svn-fetch)
+ (uri (texlive-ref ,component ,id))
+ (sha256
+ (base32
+ ,(bytevector->nix-base32-string
+ (let-values (((port get-hash) (open-sha256-port)))
+ (write-file checkout port)
+ (force-output port)
+ (get-hash)))))))
+ (build-system texlive-build-system)
+ (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/"))))
+ (home-page ,home-page)
+ (synopsis ,synopsis)
+ (description ,(string-trim-both
+ (string-join
+ (map string-trim-both
+ (string-split
+ (beautify-description
+ (sxml->string (or (sxml-value '(entry description))
+ '())))
+ #\newline)))))
+ (license ,license))))
+
+(define texlive->guix-package
+ (memoize
+ (lambda* (package-name #:optional (component "latex"))
+ "Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
+s-expression corresponding to that package, or #f on failure."
+ (and=> (fetch-sxml package-name)
+ (cut sxml->package <> component)))))
+
+;;; ctan.scm ends here
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index 203cda804..9bba074e8 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -74,7 +74,7 @@ rather than \\n."
;;;
(define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" "gem"
- "cran" "crate"))
+ "cran" "crate" "texlive"))
(define (resolve-importer name)
(let ((module (resolve-interface
diff --git a/guix/scripts/import/texlive.scm b/guix/scripts/import/texlive.scm
new file mode 100644
index 000000000..1cceee705
--- /dev/null
+++ b/guix/scripts/import/texlive.scm
@@ -0,0 +1,101 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; 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 (guix scripts import texlive)
+ #:use-module (guix ui)
+ #:use-module (guix utils)
+ #:use-module (guix scripts)
+ #:use-module (guix import texlive)
+ #:use-module (guix scripts import)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-37)
+ #:use-module (srfi srfi-41)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 format)
+ #:export (guix-import-texlive))
+
+\f
+;;;
+;;; Command-line options.
+;;;
+
+(define %default-options
+ '())
+
+(define (show-help)
+ (display (G_ "Usage: guix import texlive PACKAGE-NAME
+Import and convert the Texlive package for PACKAGE-NAME.\n"))
+ (display (G_ "
+ -a, --archive=ARCHIVE specify the archive repository"))
+ (display (G_ "
+ -h, --help display this help and exit"))
+ (display (G_ "
+ -V, --version display version information and exit"))
+ (newline)
+ (show-bug-report-information))
+
+(define %options
+ ;; Specification of the command-line options.
+ (cons* (option '(#\h "help") #f #f
+ (lambda args
+ (show-help)
+ (exit 0)))
+ (option '(#\V "version") #f #f
+ (lambda args
+ (show-version-and-exit "guix import texlive")))
+ (option '(#\a "archive") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'component arg
+ (alist-delete 'component result))))
+ %standard-import-options))
+
+\f
+;;;
+;;; Entry point.
+;;;
+
+(define (guix-import-texlive . args)
+ (define (parse-options)
+ ;; Return the alist of option values.
+ (args-fold* args %options
+ (lambda (opt name arg result)
+ (leave (G_ "~A: unrecognized option~%") name))
+ (lambda (arg result)
+ (alist-cons 'argument arg result))
+ %default-options))
+
+ (let* ((opts (parse-options))
+ (args (filter-map (match-lambda
+ (('argument . value)
+ value)
+ (_ #f))
+ (reverse opts))))
+ (match args
+ ((package-name)
+ (let ((sexp (texlive->guix-package package-name
+ (or (assoc-ref opts 'component)
+ "latex"))))
+ (unless sexp
+ (leave (G_ "failed to download description for package '~a'~%")
+ package-name))
+ sexp))
+ (()
+ (leave (G_ "too few arguments~%")))
+ ((many ...)
+ (leave (G_ "too many arguments~%"))))))
--
2.12.2
^ permalink raw reply related [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 35/35] guix: Add texlive importer.
2017-06-09 10:45 ` bug#27296: [PATCH 35/35] guix: Add texlive importer Ricardo Wurmus
@ 2017-06-09 15:05 ` Ludovic Courtès
2017-06-15 15:01 ` [bug#27296] " Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 15:05 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * guix/import/texlive.scm: New file.
> * guix/scripts/import/texlive.scm: New file.
> * Makefile.am (MODULES): Add them.
> * guix/scripts/import.scm (importers): Add texlive importer.
Could you add a note in guix.texi as well as a basic test (possibly
with mock of ‘http-get’) in tests/texlive.scm?
> +(define* (sxml->package sxml #:optional (component "latex"))
> + "Return the `package' s-expression for a Texlive package from the SXML
> +expression describing it."
> + (define (sxml-value path)
> + (match ((sxpath path) sxml)
> + (() #f)
> + ((val) val)))
> + (let* ((id (sxml-value '(entry @ id *text*)))
> + (synopsis (sxml-value '(entry caption *text*)))
> + (version (or (sxml-value '(entry version @ number *text*))
> + (sxml-value '(entry version @ date *text*))))
> + (license (string->license (sxml-value '(entry license @ type *text*))))
> + (home-page (string-append "http://www.ctan.org/pkg/" id))
> + (ref (texlive-ref component id))
‘sxml-match’ might work better for this, depending on the structure of
the XML tree.
> + (checkout (with-store store (download-svn-to-store store ref))))
Note that as soon as we leave the dynamic extent of ‘with-store’, the
checkout can be GC’d. Thus, it’s safer to wrap the whole body in
‘with-store’.
Otherwise LGTM.
Any plans for an updater in that module?
Woow, that’s an impressive piece of work, and that was fast! I only
commented on a couple of packages, the others look good to me.
I think we’ll probably want a ‘texlive-full’ meta-package equivalent to
our current ‘texlive’ package for some or our users (hi Andreas! :-)).
Apart from that it’ll be interesting to see how many of the packages
currently depending on ‘texlive’ can use ‘texlive-tiny’.
A big thank you for this change that we had all been waiting for!
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* [bug#27296] [PATCH 35/35] guix: Add texlive importer.
2017-06-09 15:05 ` Ludovic Courtès
@ 2017-06-15 15:01 ` Ricardo Wurmus
2017-06-16 15:06 ` Ludovic Courtès
0 siblings, 1 reply; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-15 15:01 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * guix/import/texlive.scm: New file.
>> * guix/scripts/import/texlive.scm: New file.
>> * Makefile.am (MODULES): Add them.
>> * guix/scripts/import.scm (importers): Add texlive importer.
>
> Could you add a note in guix.texi as well as a basic test (possibly
> with mock of ‘http-get’) in tests/texlive.scm?
Done.
>> + (checkout (with-store store (download-svn-to-store store ref))))
>
> Note that as soon as we leave the dynamic extent of ‘with-store’, the
> checkout can be GC’d. Thus, it’s safer to wrap the whole body in
> ‘with-store’.
Okay.
> Any plans for an updater in that module?
I wouldn’t know how. Updates are done by changing the variables
%texlive-tag and %texlive-revision in (guix build-system texlive) and
then changing the package expressions.
Since the version strings on CTAN differ from the revision of the TeX
Live SVN repo I don’t see how we can make this robust. For most
packages we use the SVN revision. This is much larger (“44445”) than
the version string for packages on CTAN (e.g. “2.6a”).
> I think we’ll probably want a ‘texlive-full’ meta-package equivalent to
> our current ‘texlive’ package for some or our users (hi Andreas! :-)).
Yes, we should package all the other TeX packages that are part of TeX
Live, including those that appear to be just supporting files (e.g. the
“generic” sub-directory).
> Apart from that it’ll be interesting to see how many of the packages
> currently depending on ‘texlive’ can use ‘texlive-tiny’.
I think we may need to enlarge “texlive-tiny” a little to make it more
useful. I’ve only tested it with fastcap, and noticed that it misses
some bibtex files.
Anyway, the foundation is there and I don’t think it would take too much
effort to get us to “texlive-full” soon.
I’m pushing this to master in a few minutes. Thanks for the review!
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* [bug#27296] [PATCH 35/35] guix: Add texlive importer.
2017-06-15 15:01 ` [bug#27296] " Ricardo Wurmus
@ 2017-06-16 15:06 ` Ludovic Courtès
2017-06-16 16:12 ` Ricardo Wurmus
0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-16 15:06 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> * guix/import/texlive.scm: New file.
>>> * guix/scripts/import/texlive.scm: New file.
>>> * Makefile.am (MODULES): Add them.
>>> * guix/scripts/import.scm (importers): Add texlive importer.
[...]
>> Any plans for an updater in that module?
>
> I wouldn’t know how. Updates are done by changing the variables
> %texlive-tag and %texlive-revision in (guix build-system texlive) and
> then changing the package expressions.
>
> Since the version strings on CTAN differ from the revision of the TeX
> Live SVN repo I don’t see how we can make this robust. For most
> packages we use the SVN revision. This is much larger (“44445”) than
> the version string for packages on CTAN (e.g. “2.6a”).
I see. Maybe something that updates the two %texlive-* variables and
the hashes would already be helpful. No idea how hard it would be.
> I think we may need to enlarge “texlive-tiny” a little to make it more
> useful. I’ve only tested it with fastcap, and noticed that it misses
> some bibtex files.
>
> Anyway, the foundation is there and I don’t think it would take too much
> effort to get us to “texlive-full” soon.
Excellent.
So how should we proceed now? Should we gradually replace references to
‘texlive’ with ‘texlive-tiny’ or similar, and eventually remove
‘texlive’ and ‘texlive-texmf’ and rename ‘texlive-full’ to ‘texlive’?
Also, what should we do about ‘texlive-bin’? Should it be built from
svn sources as well? Can it be split in smaller chunks?
Thank you for all this!
Ludo’.
^ permalink raw reply [flat|nested] 53+ messages in thread
* [bug#27296] [PATCH 35/35] guix: Add texlive importer.
2017-06-16 15:06 ` Ludovic Courtès
@ 2017-06-16 16:12 ` Ricardo Wurmus
0 siblings, 0 replies; 53+ messages in thread
From: Ricardo Wurmus @ 2017-06-16 16:12 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27296
Ludovic Courtès <ludo@gnu.org> writes:
>>> Any plans for an updater in that module?
>>
>> I wouldn’t know how. Updates are done by changing the variables
>> %texlive-tag and %texlive-revision in (guix build-system texlive) and
>> then changing the package expressions.
>>
>> Since the version strings on CTAN differ from the revision of the TeX
>> Live SVN repo I don’t see how we can make this robust. For most
>> packages we use the SVN revision. This is much larger (“44445”) than
>> the version string for packages on CTAN (e.g. “2.6a”).
>
> I see. Maybe something that updates the two %texlive-* variables and
> the hashes would already be helpful. No idea how hard it would be.
Hmm. I’ll add it to my TODO list. Maybe I’ll have an idea.
> So how should we proceed now? Should we gradually replace references to
> ‘texlive’ with ‘texlive-tiny’ or similar, and eventually remove
> ‘texlive’ and ‘texlive-texmf’ and rename ‘texlive-full’ to ‘texlive’?
Yes, it would be useful to find out what parts of texlive are needed by
the packages that currently use the big texlive package. Then we can
package these things first and replace references to the “texlive”
package one by one.
Eventually, we should remove “texlive-texmf” and make “texlive” an alias
for “texlive-full”. Packaging TeX Live things is pretty easy. I’ll try
to create some more packages for that soon.
> Also, what should we do about ‘texlive-bin’? Should it be built from
> svn sources as well? Can it be split in smaller chunks?
I’m not sure about this. I haven’t looked at texlive-bin closely
enough. I’m not sure if it can be split up easily, but I know that it
can be made a little more modular. For example, it bundles Lua 5.2,
which we should replace with our package.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 53+ messages in thread
* bug#27296: [PATCH 01/35] guix: Add download-svn-to-store.
2017-06-09 10:45 ` bug#27296: [PATCH 01/35] guix: Add download-svn-to-store Ricardo Wurmus
` (33 preceding siblings ...)
2017-06-09 10:45 ` bug#27296: [PATCH 35/35] guix: Add texlive importer Ricardo Wurmus
@ 2017-06-09 14:38 ` Ludovic Courtès
34 siblings, 0 replies; 53+ messages in thread
From: Ludovic Courtès @ 2017-06-09 14:38 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 27296
Ricardo Wurmus <rekado@elephly.net> skribis:
> * guix/svn-download.scm (download-svn-to-store): New procedure.
LGTM!
^ permalink raw reply [flat|nested] 53+ messages in thread