doc: Use a minimal texlive profile in build.scm.

* doc/build.scm (pdf-manual) <texinfo-profile>: New variable.
<PATH>: Define in terms of the above.
<GUIX_TEXMF>: New environment variable.
This commit is contained in:
Maxim Cournoyer 2022-06-15 17:08:31 -04:00
parent 5c0ef02db9
commit 1cde647cc0
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 23 additions and 22 deletions

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -30,6 +31,7 @@
(guix gexp) (guix gexp)
(guix git) (guix git)
(guix git-download) (guix git-download)
(guix profiles)
(guix utils) (guix utils)
(git) (git)
(gnu packages base) (gnu packages base)
@ -890,14 +892,22 @@ makeinfo OPTIONS."
#:languages languages #:languages languages
#:date date)) #:date date))
;; FIXME: This union works, except for the table of contents of non-English (define texinfo-profile
;; manuals, which contains escape sequences like "^^ca^^fe" instead of (profile
;; accented letters. (content (packages->manifest
;; ;; texi2dvi requires various command line tools.
;; (define texlive (list coreutils
;; (texlive-updmap.cfg (list texlive-tex-texinfo diffutils
;; texlive-generic-epsf gawk
;; texlive-fonts-ec))) grep
sed
tar
texinfo
texlive-base
texlive-bin ;for GUIX_TEXMF
texlive-epsf
texlive-fonts-ec
texlive-tex-texinfo)))))
(define build (define build
(with-imported-modules '((guix build utils)) (with-imported-modules '((guix build utils))
@ -914,21 +924,12 @@ makeinfo OPTIONS."
(string-downcase language))) (string-downcase language)))
;; Install a UTF-8 locale so that 'makeinfo' is at ease. ;; Install a UTF-8 locale so that 'makeinfo' is at ease.
(setenv "GUIX_LOCPATH" (setenv "GUIX_LOCPATH" #+(file-append glibc-utf8-locales
#+(file-append glibc-utf8-locales "/lib/locale")) "/lib/locale"))
(setenv "LC_ALL" "en_US.utf8") (setenv "LC_ALL" "en_US.utf8")
(setenv "PATH" (setenv "PATH" #+(file-append texinfo-profile "/bin"))
(string-append #+(file-append texlive "/bin") ":" (setenv "GUIX_TEXMF" #+(file-append texinfo-profile
#+(file-append texinfo "/bin") ":" "/share/texmf-dist"))
;; Below are command-line tools needed by
;; 'texi2dvi' and friends.
#+(file-append sed "/bin") ":"
#+(file-append grep "/bin") ":"
#+(file-append coreutils "/bin") ":"
#+(file-append gawk "/bin") ":"
#+(file-append tar "/bin") ":"
#+(file-append diffutils "/bin")))
(setvbuf (current-output-port) 'line) (setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line) (setvbuf (current-error-port) 'line)