mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: texlive-libkpathsea: Enforce ls-R usage by default.
Fixes: https://issues.guix.gnu.org/75893 * gnu/packages/tex.scm (texlive-libkpathsea): Set TEXMF so that ls-R database is mandatory and must contain the file looked after in the TeX Live tree. * guix/build/texlive-build-system.scm (configure-texmf): Relax requirements for "ls-R" database. Renamed from `set-texmfvar'. (%standard-phases): Apply phase renaming. * gnu/packages/python-xyz.scm (python-nbconvert)[native-inputs]: Add TeX Live packages required for tests to pass since propagated packages are no longer accessible during build. * gnu/packages/books.scm (book-sparc)[inputs]: Move TeX Live related inputs to... [native-inputs]: ... here, and wrap them within texlive-local-tree for the same reason as above. Change-Id: I3430bc84ce35f4aa8f0537b512f472ef88f8e5e9
This commit is contained in:
parent
4e04035d36
commit
f6d9057ff2
4 changed files with 98 additions and 76 deletions
|
@ -63,70 +63,69 @@
|
||||||
lilypond
|
lilypond
|
||||||
perl
|
perl
|
||||||
python-pygments
|
python-pygments
|
||||||
|
(texlive-local-tree
|
||||||
|
(list texlive-acronym
|
||||||
|
texlive-adjustbox
|
||||||
|
texlive-biblatex
|
||||||
|
texlive-bibtex
|
||||||
|
texlive-bibtexperllibs
|
||||||
|
texlive-bigfoot
|
||||||
|
texlive-chngcntr
|
||||||
|
texlive-circuitikz
|
||||||
|
texlive-collection-langcyrillic
|
||||||
|
texlive-csquotes
|
||||||
|
texlive-fancyvrb
|
||||||
|
texlive-fontspec
|
||||||
|
texlive-glossaries
|
||||||
|
texlive-glossaries-english
|
||||||
|
texlive-glossaries-extra
|
||||||
|
texlive-koma-script
|
||||||
|
texlive-lilyglyphs
|
||||||
|
texlive-minted
|
||||||
|
texlive-multirow
|
||||||
|
texlive-pgf
|
||||||
|
texlive-pgfplots
|
||||||
|
texlive-subfiles
|
||||||
|
texlive-svg
|
||||||
|
texlive-t1utils
|
||||||
|
texlive-textpos
|
||||||
|
texlive-transparent
|
||||||
|
texlive-trimspaces
|
||||||
|
texlive-upquote
|
||||||
|
texlive-xetex))
|
||||||
which))
|
which))
|
||||||
(inputs
|
(inputs (list font-liberation git))
|
||||||
(list font-liberation
|
(arguments
|
||||||
git
|
(list #:tests? #f ; no tests
|
||||||
texlive-acronym
|
#:modules (append %default-gnu-imported-modules
|
||||||
texlive-adjustbox
|
'((ice-9 regex)
|
||||||
texlive-biblatex
|
(srfi srfi-1)))
|
||||||
texlive-bibtex
|
#:phases #~(modify-phases %standard-phases
|
||||||
texlive-bibtexperllibs
|
(add-before 'build 'configure-environment
|
||||||
texlive-bigfoot
|
(lambda* (#:key inputs make-flags parallel-build?
|
||||||
texlive-chngcntr
|
#:allow-other-keys)
|
||||||
texlive-circuitikz
|
(let* ((src (assoc-ref inputs "source"))
|
||||||
texlive-collection-langcyrillic
|
(rx (make-regexp "/gnu/store/(.*)-book-sparc-.*"))
|
||||||
texlive-csquotes
|
(src-hash (match:substring (regexp-exec rx src) 1))
|
||||||
texlive-fancyvrb
|
(random-seed
|
||||||
texlive-fontspec
|
(fold (lambda (ch prev)
|
||||||
texlive-glossaries
|
(+ (char->integer ch)
|
||||||
texlive-glossaries-english
|
prev))
|
||||||
texlive-glossaries-extra
|
0
|
||||||
texlive-koma-script
|
(string->list src-hash))))
|
||||||
texlive-lilyglyphs
|
(setenv "RANDOMSEED" (number->string random-seed))
|
||||||
texlive-minted
|
(setenv "REPRODUCIBILITY" "yes"))))
|
||||||
texlive-multirow
|
(replace 'install
|
||||||
texlive-pgf
|
(lambda _
|
||||||
texlive-pgfplots
|
(let ((doc-dir (string-append #$output
|
||||||
texlive-subfiles
|
"/share/doc/sparc/")))
|
||||||
texlive-svg
|
(mkdir-p doc-dir)
|
||||||
texlive-t1utils
|
(copy-file "sparc.ru.pdf"
|
||||||
texlive-textpos
|
(string-append doc-dir
|
||||||
texlive-transparent
|
"sparc.ru.pdf"))
|
||||||
texlive-trimspaces
|
(copy-file "sparc.en.pdf"
|
||||||
texlive-upquote
|
(string-append doc-dir
|
||||||
texlive-xetex))
|
"sparc.en.pdf"))))))))
|
||||||
(arguments
|
|
||||||
(list #:tests? #f ; no tests
|
|
||||||
#:modules (append %default-gnu-imported-modules
|
|
||||||
'((ice-9 regex)
|
|
||||||
(srfi srfi-1)))
|
|
||||||
#:phases #~(modify-phases %standard-phases
|
|
||||||
(add-before 'build 'configure-environment
|
|
||||||
(lambda* (#:key inputs make-flags parallel-build?
|
|
||||||
#:allow-other-keys)
|
|
||||||
(let* ((src (assoc-ref inputs "source"))
|
|
||||||
(rx (make-regexp "/gnu/store/(.*)-book-sparc-.*"))
|
|
||||||
(src-hash (match:substring (regexp-exec rx src) 1))
|
|
||||||
(random-seed
|
|
||||||
(fold (lambda (ch prev)
|
|
||||||
(+ (char->integer ch)
|
|
||||||
prev))
|
|
||||||
0
|
|
||||||
(string->list src-hash))))
|
|
||||||
(setenv "RANDOMSEED" (number->string random-seed))
|
|
||||||
(setenv "REPRODUCIBILITY" "yes"))))
|
|
||||||
(replace 'install
|
|
||||||
(lambda _
|
|
||||||
(let ((doc-dir (string-append #$output
|
|
||||||
"/share/doc/sparc/")))
|
|
||||||
(mkdir-p doc-dir)
|
|
||||||
(copy-file "sparc.ru.pdf"
|
|
||||||
(string-append doc-dir
|
|
||||||
"sparc.ru.pdf"))
|
|
||||||
(copy-file "sparc.en.pdf"
|
|
||||||
(string-append doc-dir
|
|
||||||
"sparc.en.pdf"))))))))
|
|
||||||
(home-page "https://github.com/artyom-poptsov/SPARC")
|
(home-page "https://github.com/artyom-poptsov/SPARC")
|
||||||
(synopsis "Book on combining art and technology")
|
(synopsis "Book on combining art and technology")
|
||||||
(description
|
(description
|
||||||
|
|
|
@ -19352,7 +19352,28 @@ time.")
|
||||||
;; Adding ipywidgets would create a cycle.
|
;; Adding ipywidgets would create a cycle.
|
||||||
;;python-ipywidgets
|
;;python-ipywidgets
|
||||||
python-pytest
|
python-pytest
|
||||||
python-pytest-xdist))
|
python-pytest-xdist
|
||||||
|
(texlive-local-tree
|
||||||
|
(list texlive-adjustbox
|
||||||
|
texlive-booktabs
|
||||||
|
texlive-caption
|
||||||
|
texlive-enumitem
|
||||||
|
texlive-eurosym
|
||||||
|
texlive-fancyvrb
|
||||||
|
texlive-float
|
||||||
|
texlive-fontspec
|
||||||
|
texlive-grffile
|
||||||
|
texlive-jknapltx
|
||||||
|
texlive-parskip
|
||||||
|
texlive-pdfcol
|
||||||
|
texlive-rsfs
|
||||||
|
texlive-soul
|
||||||
|
texlive-tcolorbox
|
||||||
|
texlive-titling
|
||||||
|
texlive-ulem
|
||||||
|
texlive-unicode-math
|
||||||
|
texlive-upquote
|
||||||
|
texlive-xetex))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-beautifulsoup4
|
(list python-beautifulsoup4
|
||||||
python-bleach
|
python-bleach
|
||||||
|
|
|
@ -326,12 +326,9 @@ should not be installed in a profile.")
|
||||||
(("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n")
|
(("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n")
|
||||||
(("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n")
|
(("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n")
|
||||||
;; "ls-R" files are to be expected only in the TEXMFDIST
|
;; "ls-R" files are to be expected only in the TEXMFDIST
|
||||||
;; directories. However, those are not always present, e.g.,
|
;; directories.
|
||||||
;; when building a package with `texlive-build-system' or when
|
|
||||||
;; generating a profile. Since both situations need to be
|
|
||||||
;; handled, drop the "!!" prefixes.
|
|
||||||
(("^TEXMF = .*")
|
(("^TEXMF = .*")
|
||||||
"TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\n")
|
"TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,!!$TEXMFDIST}\n")
|
||||||
(("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
|
(("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
|
||||||
;; Ignore system-wide cache, which is not writable. Use local
|
;; Ignore system-wide cache, which is not writable. Use local
|
||||||
;; one instead, i.e. "$HOME/.texliveYYYY/texmf-var/".
|
;; one instead, i.e. "$HOME/.texliveYYYY/texmf-var/".
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
|
;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
|
||||||
;;; Copyright © 2023, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2023-2025 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -91,11 +91,16 @@ runfile to replace. If a file has no matching runfile, it is ignored."
|
||||||
((command-regexp _ command)
|
((command-regexp _ command)
|
||||||
(which command))))))
|
(which command))))))
|
||||||
|
|
||||||
(define* (set-texmfvar #:rest _)
|
(define* (configure-texmf #:rest _)
|
||||||
"Set TEXMFVAR to a writable location."
|
"Ensure TEXMFVAR is writable and \"ls-R\" database is not required."
|
||||||
;; Default value is relative to $HOME, which is not set during build. This
|
;; Default TEXMFVAR value is relative to $HOME, which is not set during
|
||||||
;; location is used for generating font metrics or building documentation.
|
;; build. This location is used for generating font metrics or building
|
||||||
(setenv "TEXMFVAR" (string-append (getcwd) "/texmf-var")))
|
;; documentation.
|
||||||
|
(setenv "TEXMFVAR" (string-append (getcwd) "/texmf-var"))
|
||||||
|
;; By default, a "ls-R" file must exist in TEXMFDIST. However, it isn't
|
||||||
|
;; generated in the TeX Live tree used to build a package. Consequently,
|
||||||
|
;; relax this requirement.
|
||||||
|
(setenv "TEXMF" "{$TEXMFSYSVAR,$TEXMFDIST}"))
|
||||||
|
|
||||||
(define* (delete-drv-files #:rest _)
|
(define* (delete-drv-files #:rest _)
|
||||||
"Delete pre-generated \".drv\" files in order to prevent build failures."
|
"Delete pre-generated \".drv\" files in order to prevent build failures."
|
||||||
|
@ -297,7 +302,7 @@ runfile to replace. If a file has no matching runfile, it is ignored."
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
(add-after 'unpack 'patch-shell-scripts patch-shell-scripts)
|
(add-after 'unpack 'patch-shell-scripts patch-shell-scripts)
|
||||||
(add-before 'build 'set-texmfvar set-texmfvar)
|
(add-before 'build 'configure-texmf configure-texmf)
|
||||||
(add-before 'build 'delete-drv-files delete-drv-files)
|
(add-before 'build 'delete-drv-files delete-drv-files)
|
||||||
(add-after 'delete-drv-files 'generate-font-metrics generate-font-metrics)
|
(add-after 'delete-drv-files 'generate-font-metrics generate-font-metrics)
|
||||||
(replace 'build build)
|
(replace 'build build)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue