Merge branch 'wip-texlive'

This commit is contained in:
Ricardo Wurmus 2019-09-18 15:35:17 +02:00
commit cf48ea9539
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
2 changed files with 296 additions and 213 deletions

View File

@ -2554,3 +2554,67 @@ Emacsy. It has a small C layer and most browser features are fully
programmable in Guile. It has hooks, keymaps, and self documentation programmable in Guile. It has hooks, keymaps, and self documentation
features.") features.")
(license license:gpl3+))) (license license:gpl3+)))
(define-public guile-cv
(package
(name "guile-cv")
(version "0.2.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/guile-cv/guile-cv-"
version ".tar.gz"))
(sha256
(base32
"0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'prepare-build
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "configure"
(("SITEDIR=\"\\$datadir/guile-cv\"")
"SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
(("SITECCACHEDIR=\"\\$libdir/guile-cv/")
"SITECCACHEDIR=\"$libdir/"))
(substitute* "cv/init.scm"
(("\\(dynamic-link \"libvigra_c\"\\)")
(string-append "(dynamic-link \""
(assoc-ref inputs "vigra-c")
"/lib/libvigra_c\")"))
(("\\(dynamic-link \"libguile-cv\"\\)")
(format #f "~s"
`(dynamic-link
(format #f "~alibguile-cv"
(if (getenv "GUILE_CV_UNINSTALLED")
""
,(format #f "~a/lib/"
(assoc-ref outputs "out"))))))))
(setenv "GUILE_CV_UNINSTALLED" "1")
;; Only needed to satisfy the configure script.
(setenv "LD_LIBRARY_PATH"
(string-append (assoc-ref inputs "vigra-c") "/lib"))
#t)))))
(inputs
`(("vigra" ,vigra)
("vigra-c" ,vigra-c)
("guile" ,guile-2.2)))
(native-inputs
`(("texlive" ,(texlive-union (list texlive-booktabs
texlive-lm
texlive-siunitx
texlive-standalone
texlive-xcolor
texlive-fonts-iwona)))
("pkg-config" ,pkg-config)))
(propagated-inputs
`(("guile-lib" ,guile-lib)))
(home-page "https://www.gnu.org/software/guile-cv/")
(synopsis "Computer vision library for Guile")
(description "Guile-CV is a Computer Vision functional programming library
for the Guile Scheme language. It is based on Vigra (Vision with Generic
Algorithms), a C++ image processing and analysis library. Guile-CV contains
bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
enriched with pure Guile Scheme algorithms, all accessible through a nice,
clean and easy to use high level API.")
(license license:gpl3+)))

View File

@ -2508,214 +2508,213 @@ formats.")
(license license:lppl))) (license license:lppl)))
(define-public texlive-latex-base (define-public texlive-latex-base
(package (let ((template (simple-texlive-package
(name "texlive-latex-base") "texlive-latex-base"
(version (number->string %texlive-revision)) (list "/doc/latex/base/"
(source (texlive-origin "/source/latex/base/"
name version ;; Almost all files in /tex/latex/base are generated, but
(list "/doc/latex/base/" ;; these are not:
"/source/latex/base/" "/tex/latex/base/idx.tex"
;; Almost all files in /tex/latex/base are generated, but "/tex/latex/base/lablst.tex"
;; these are not: "/tex/latex/base/lppl.tex"
"/tex/latex/base/idx.tex" "/tex/latex/base/ltnews.cls"
"/tex/latex/base/lablst.tex" "/tex/latex/base/ltxcheck.tex"
"/tex/latex/base/lppl.tex" "/tex/latex/base/ltxguide.cls"
"/tex/latex/base/ltnews.cls" "/tex/latex/base/minimal.cls"
"/tex/latex/base/ltxcheck.tex" "/tex/latex/base/sample2e.tex"
"/tex/latex/base/ltxguide.cls" "/tex/latex/base/small2e.tex"
"/tex/latex/base/minimal.cls" "/tex/latex/base/source2e.tex"
"/tex/latex/base/sample2e.tex" "/tex/latex/base/testpage.tex"
"/tex/latex/base/small2e.tex" "/tex/latex/base/texsys.cfg")
"/tex/latex/base/source2e.tex" (base32
"/tex/latex/base/testpage.tex" "0f8d41wk1gb7i6xq1a10drwhhayc50pg9nwzjkrqnxrv0pcc08w5")
"/tex/latex/base/texsys.cfg") #:trivial? #t)))
(base32 (package
"0f8d41wk1gb7i6xq1a10drwhhayc50pg9nwzjkrqnxrv0pcc08w5"))) (inherit template)
(build-system gnu-build-system) (arguments
(arguments (substitute-keyword-arguments (package-arguments template)
`(#:modules ((guix build gnu-build-system) ((#:modules modules '())
(guix build utils) '((guix build gnu-build-system)
(ice-9 match) (guix build utils)
(srfi srfi-26)) (ice-9 match)
#:tests? #f ; no tests (srfi srfi-26)))
#:phases ((#:phases phases)
(modify-phases %standard-phases `(modify-phases ,phases
(delete 'configure) (replace 'build
(replace 'build (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) ;; Find required fonts
;; Find required fonts (setenv "TFMFONTS"
(setenv "TFMFONTS" (string-join
(string-join (map (match-lambda
(map (match-lambda ((pkg-name . dir)
((pkg-name . dir) (string-append
(string-append (assoc-ref inputs pkg-name)
(assoc-ref inputs pkg-name) "/share/texmf-dist/fonts/tfm/public"
"/share/texmf-dist/fonts/tfm/public" dir)))
dir))) '(("texlive-etex" . "/etex")
'(("texlive-etex" . "/etex") ("texlive-cm" . "/cm")
("texlive-cm" . "/cm") ("texlive-fonts-latex" . "/latex-fonts")
("texlive-fonts-latex" . "/latex-fonts") ("texlive-fonts-knuth-lib" . "/knuth-lib")))
("texlive-fonts-knuth-lib" . "/knuth-lib"))) ":"))
":")) (let ((cwd (getcwd)))
(let ((cwd (getcwd))) (setenv "TEXINPUTS"
(setenv "TEXINPUTS" (string-append
(string-append cwd "//:"
cwd "//:" cwd "/source/latex/base//:"
cwd "/source/latex/base//:" cwd "/build:"
cwd "/build:" (string-join
(string-join (map (match-lambda ((_ . dir) dir)) inputs)
(map (match-lambda ((_ . dir) dir)) inputs) "//:"))))
"//:"))))
;; This is the actual build step. ;; This is the actual build step.
(mkdir "build") (mkdir "build")
(invoke "tex" "-ini" "-interaction=scrollmode" (invoke "tex" "-ini" "-interaction=scrollmode"
"-output-directory=build" "unpack.ins") "-output-directory=build" "unpack.ins")
;; XXX: We can't build all formats at this point, nor are they ;; XXX: We can't build all formats at this point, nor are they
;; part of the LaTeX base, so we disable them. Actually, we ;; part of the LaTeX base, so we disable them. Actually, we
;; should be running this all in a profile hook, so that only ;; should be running this all in a profile hook, so that only
;; selected formats and hyphenation patterns are included, but it ;; selected formats and hyphenation patterns are included, but it
;; takes long and TeX Live isn't designed to be modular like ;; takes long and TeX Live isn't designed to be modular like
;; that. Everything operates on a shared directory, which we ;; that. Everything operates on a shared directory, which we
;; would only have at profile generation time. ;; would only have at profile generation time.
(let ((disabled-formats (let ((disabled-formats
'("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex" '("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex" "eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex" "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex" "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex" "pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex" "mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
"amstex pdftex" "pdfcslatex pdftex" "lollipop tex" "amstex pdftex" "pdfcslatex pdftex" "lollipop tex"
"xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex" "xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex"
"texsis pdftex" "mltex pdftex" "utf8mex pdftex"))) "texsis pdftex" "mltex pdftex" "utf8mex pdftex")))
(mkdir "web2c") (mkdir "web2c")
(install-file (string-append (install-file (string-append
(assoc-ref inputs "texlive-kpathsea") (assoc-ref inputs "texlive-kpathsea")
"/share/texmf-dist/web2c/fmtutil.cnf") "/share/texmf-dist/web2c/fmtutil.cnf")
"web2c") "web2c")
(make-file-writable "web2c/fmtutil.cnf") (make-file-writable "web2c/fmtutil.cnf")
(substitute* "web2c/fmtutil.cnf" (substitute* "web2c/fmtutil.cnf"
(((string-append "^(" (string-join disabled-formats "|") ")") m) (((string-append "^(" (string-join disabled-formats "|") ")") m)
(string-append "#! " m)))) (string-append "#! " m))))
(invoke "fmtutil-sys" "--all" (invoke "fmtutil-sys" "--all"
"--fmtdir=web2c" "--fmtdir=web2c"
(string-append "--cnffile=web2c/fmtutil.cnf")) (string-append "--cnffile=web2c/fmtutil.cnf"))
;; We don't actually want to install it. ;; We don't actually want to install it.
(delete-file "web2c/fmtutil.cnf") (delete-file "web2c/fmtutil.cnf")
#t)) #t))
(replace 'install (add-after 'install 'install-more
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(root (string-append out "/share/texmf-dist")) (root (string-append out "/share/texmf-dist"))
(target (string-append root "/tex/latex/base")) (target (string-append root "/tex/latex/base"))
(web2c (string-append root "/web2c")) (web2c (string-append root "/web2c"))
(makeindex (string-append root "/makeindex/latex"))) (makeindex (string-append root "/makeindex/latex")))
(for-each delete-file (find-files "." "\\.(log|aux)$")) (for-each delete-file (find-files "." "\\.(log|aux)$"))
;; The usedir directive in docstrip.ins is ignored, so these ;; The usedir directive in docstrip.ins is ignored, so these
;; two files end up in the wrong place. Move them. ;; two files end up in the wrong place. Move them.
(mkdir-p makeindex) (mkdir-p makeindex)
(for-each (lambda (file) (for-each (lambda (file)
(install-file file makeindex) (install-file file makeindex)
(delete-file file)) (delete-file file))
'("build/gglo.ist" '("build/gglo.ist"
"build/gind.ist")) "build/gind.ist"))
(for-each (cut install-file <> target) (for-each (cut install-file <> target)
(find-files "build" ".*")) (find-files "build" ".*"))
(for-each (cut install-file <> web2c) (for-each (cut install-file <> web2c)
(find-files "web2c" ".*")) (find-files "web2c" ".*"))
#t)))))) #t)))))))
(native-inputs (native-inputs
`(("texlive-bin" ,texlive-bin) `(("texlive-bin" ,texlive-bin)
("texlive-tex-ini-files" ,texlive-tex-ini-files) ("texlive-tex-ini-files" ,texlive-tex-ini-files)
("texlive-tex-plain" ,texlive-tex-plain) ("texlive-tex-plain" ,texlive-tex-plain)
("texlive-kpathsea" ,texlive-kpathsea) ("texlive-kpathsea" ,texlive-kpathsea)
("texlive-cm" ,texlive-cm) ("texlive-cm" ,texlive-cm)
("texlive-fonts-latex" ,texlive-fonts-latex) ("texlive-fonts-latex" ,texlive-fonts-latex)
("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib) ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
("texlive-luatexconfig" ("texlive-luatexconfig"
,(texlive-origin ,(texlive-origin
"texlive-luatexconfig" (number->string %texlive-revision) "texlive-luatexconfig" (number->string %texlive-revision)
(list "/tex/generic/config/luatex-unicode-letters.tex" (list "/tex/generic/config/luatex-unicode-letters.tex"
"/tex/generic/config/luatexiniconfig.tex" "/tex/generic/config/luatexiniconfig.tex"
"/web2c/texmfcnf.lua") "/web2c/texmfcnf.lua")
(base32 (base32
"0cs67a8wwh4s5p5gn8l49jyccgy7glw8mfq5klgn3dfsl2fdlhk7"))))) "0cs67a8wwh4s5p5gn8l49jyccgy7glw8mfq5klgn3dfsl2fdlhk7")))))
(propagated-inputs (propagated-inputs
`(("texlive-dehyph-exptl" ,texlive-dehyph-exptl) `(("texlive-dehyph-exptl" ,texlive-dehyph-exptl)
("texlive-etex" ,texlive-etex) ("texlive-etex" ,texlive-etex)
("texlive-hyph-utf8" ,texlive-hyph-utf8) ("texlive-hyph-utf8" ,texlive-hyph-utf8)
("texlive-hyphen-base" ,texlive-hyphen-base) ("texlive-hyphen-base" ,texlive-hyphen-base)
("texlive-hyphen-afrikaans" ,texlive-hyphen-afrikaans) ("texlive-hyphen-afrikaans" ,texlive-hyphen-afrikaans)
("texlive-hyphen-ancientgreek" ,texlive-hyphen-ancientgreek) ("texlive-hyphen-ancientgreek" ,texlive-hyphen-ancientgreek)
("texlive-hyphen-armenian" ,texlive-hyphen-armenian) ("texlive-hyphen-armenian" ,texlive-hyphen-armenian)
("texlive-hyphen-basque" ,texlive-hyphen-basque) ("texlive-hyphen-basque" ,texlive-hyphen-basque)
("texlive-hyphen-belarusian" ,texlive-hyphen-belarusian) ("texlive-hyphen-belarusian" ,texlive-hyphen-belarusian)
("texlive-hyphen-bulgarian" ,texlive-hyphen-bulgarian) ("texlive-hyphen-bulgarian" ,texlive-hyphen-bulgarian)
("texlive-hyphen-catalan" ,texlive-hyphen-catalan) ("texlive-hyphen-catalan" ,texlive-hyphen-catalan)
("texlive-hyphen-chinese" ,texlive-hyphen-chinese) ("texlive-hyphen-chinese" ,texlive-hyphen-chinese)
("texlive-hyphen-churchslavonic" ,texlive-hyphen-churchslavonic) ("texlive-hyphen-churchslavonic" ,texlive-hyphen-churchslavonic)
("texlive-hyphen-coptic" ,texlive-hyphen-coptic) ("texlive-hyphen-coptic" ,texlive-hyphen-coptic)
("texlive-hyphen-croatian" ,texlive-hyphen-croatian) ("texlive-hyphen-croatian" ,texlive-hyphen-croatian)
("texlive-hyphen-czech" ,texlive-hyphen-czech) ("texlive-hyphen-czech" ,texlive-hyphen-czech)
("texlive-hyphen-danish" ,texlive-hyphen-danish) ("texlive-hyphen-danish" ,texlive-hyphen-danish)
("texlive-hyphen-dutch" ,texlive-hyphen-dutch) ("texlive-hyphen-dutch" ,texlive-hyphen-dutch)
("texlive-hyphen-english" ,texlive-hyphen-english) ("texlive-hyphen-english" ,texlive-hyphen-english)
("texlive-hyphen-esperanto" ,texlive-hyphen-esperanto) ("texlive-hyphen-esperanto" ,texlive-hyphen-esperanto)
("texlive-hyphen-estonian" ,texlive-hyphen-estonian) ("texlive-hyphen-estonian" ,texlive-hyphen-estonian)
("texlive-hyphen-ethiopic" ,texlive-hyphen-ethiopic) ("texlive-hyphen-ethiopic" ,texlive-hyphen-ethiopic)
("texlive-hyphen-finnish" ,texlive-hyphen-finnish) ("texlive-hyphen-finnish" ,texlive-hyphen-finnish)
("texlive-hyphen-french" ,texlive-hyphen-french) ("texlive-hyphen-french" ,texlive-hyphen-french)
("texlive-hyphen-friulan" ,texlive-hyphen-friulan) ("texlive-hyphen-friulan" ,texlive-hyphen-friulan)
("texlive-hyphen-galician" ,texlive-hyphen-galician) ("texlive-hyphen-galician" ,texlive-hyphen-galician)
("texlive-hyphen-georgian" ,texlive-hyphen-georgian) ("texlive-hyphen-georgian" ,texlive-hyphen-georgian)
("texlive-hyphen-german" ,texlive-hyphen-german) ("texlive-hyphen-german" ,texlive-hyphen-german)
("texlive-hyphen-greek" ,texlive-hyphen-greek) ("texlive-hyphen-greek" ,texlive-hyphen-greek)
("texlive-hyphen-hungarian" ,texlive-hyphen-hungarian) ("texlive-hyphen-hungarian" ,texlive-hyphen-hungarian)
("texlive-hyphen-icelandic" ,texlive-hyphen-icelandic) ("texlive-hyphen-icelandic" ,texlive-hyphen-icelandic)
("texlive-hyphen-indic" ,texlive-hyphen-indic) ("texlive-hyphen-indic" ,texlive-hyphen-indic)
("texlive-hyphen-indonesian" ,texlive-hyphen-indonesian) ("texlive-hyphen-indonesian" ,texlive-hyphen-indonesian)
("texlive-hyphen-interlingua" ,texlive-hyphen-interlingua) ("texlive-hyphen-interlingua" ,texlive-hyphen-interlingua)
("texlive-hyphen-irish" ,texlive-hyphen-irish) ("texlive-hyphen-irish" ,texlive-hyphen-irish)
("texlive-hyphen-italian" ,texlive-hyphen-italian) ("texlive-hyphen-italian" ,texlive-hyphen-italian)
("texlive-hyphen-kurmanji" ,texlive-hyphen-kurmanji) ("texlive-hyphen-kurmanji" ,texlive-hyphen-kurmanji)
("texlive-hyphen-latin" ,texlive-hyphen-latin) ("texlive-hyphen-latin" ,texlive-hyphen-latin)
("texlive-hyphen-latvian" ,texlive-hyphen-latvian) ("texlive-hyphen-latvian" ,texlive-hyphen-latvian)
("texlive-hyphen-lithuanian" ,texlive-hyphen-lithuanian) ("texlive-hyphen-lithuanian" ,texlive-hyphen-lithuanian)
("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian) ("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian)
("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian) ("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian)
("texlive-hyphen-occitan" ,texlive-hyphen-occitan) ("texlive-hyphen-occitan" ,texlive-hyphen-occitan)
("texlive-hyphen-piedmontese" ,texlive-hyphen-piedmontese) ("texlive-hyphen-piedmontese" ,texlive-hyphen-piedmontese)
("texlive-hyphen-polish" ,texlive-hyphen-polish) ("texlive-hyphen-polish" ,texlive-hyphen-polish)
("texlive-hyphen-portuguese" ,texlive-hyphen-portuguese) ("texlive-hyphen-portuguese" ,texlive-hyphen-portuguese)
("texlive-hyphen-romanian" ,texlive-hyphen-romanian) ("texlive-hyphen-romanian" ,texlive-hyphen-romanian)
("texlive-hyphen-romansh" ,texlive-hyphen-romansh) ("texlive-hyphen-romansh" ,texlive-hyphen-romansh)
("texlive-hyphen-russian" ,texlive-hyphen-russian) ("texlive-hyphen-russian" ,texlive-hyphen-russian)
("texlive-hyphen-sanskrit" ,texlive-hyphen-sanskrit) ("texlive-hyphen-sanskrit" ,texlive-hyphen-sanskrit)
("texlive-hyphen-serbian" ,texlive-hyphen-serbian) ("texlive-hyphen-serbian" ,texlive-hyphen-serbian)
("texlive-hyphen-slovak" ,texlive-hyphen-slovak) ("texlive-hyphen-slovak" ,texlive-hyphen-slovak)
("texlive-hyphen-slovenian" ,texlive-hyphen-slovenian) ("texlive-hyphen-slovenian" ,texlive-hyphen-slovenian)
("texlive-hyphen-spanish" ,texlive-hyphen-spanish) ("texlive-hyphen-spanish" ,texlive-hyphen-spanish)
("texlive-hyphen-swedish" ,texlive-hyphen-swedish) ("texlive-hyphen-swedish" ,texlive-hyphen-swedish)
("texlive-hyphen-thai" ,texlive-hyphen-thai) ("texlive-hyphen-thai" ,texlive-hyphen-thai)
("texlive-hyphen-turkish" ,texlive-hyphen-turkish) ("texlive-hyphen-turkish" ,texlive-hyphen-turkish)
("texlive-hyphen-turkmen" ,texlive-hyphen-turkmen) ("texlive-hyphen-turkmen" ,texlive-hyphen-turkmen)
("texlive-hyphen-ukrainian" ,texlive-hyphen-ukrainian) ("texlive-hyphen-ukrainian" ,texlive-hyphen-ukrainian)
("texlive-hyphen-uppersorbian" ,texlive-hyphen-uppersorbian) ("texlive-hyphen-uppersorbian" ,texlive-hyphen-uppersorbian)
("texlive-hyphen-welsh" ,texlive-hyphen-welsh) ("texlive-hyphen-welsh" ,texlive-hyphen-welsh)
("texlive-unicode-data" ,texlive-unicode-data) ("texlive-unicode-data" ,texlive-unicode-data)
("texlive-ukrhyph" ,texlive-ukrhyph) ("texlive-ukrhyph" ,texlive-ukrhyph)
("texlive-ruhyphen" ,texlive-ruhyphen) ("texlive-ruhyphen" ,texlive-ruhyphen)
("texlive-latexconfig" ,texlive-latexconfig))) ("texlive-latexconfig" ,texlive-latexconfig)))
(home-page "https://www.ctan.org/pkg/latex-base") (home-page "https://www.ctan.org/pkg/latex-base")
(synopsis "Base sources of LaTeX") (synopsis "Base sources of LaTeX")
(description (description
"This bundle comprises the source of LaTeX itself, together with several "This bundle comprises the source of LaTeX itself, together with several
packages which are considered \"part of the kernel\". This bundle, together packages which are considered \"part of the kernel\". This bundle, together
with the required packages, constitutes what every LaTeX distribution should with the required packages, constitutes what every LaTeX distribution should
contain.") contain.")
(license license:lppl1.3c+))) (license license:lppl1.3c+))))
(define-public texlive-latex-filecontents (define-public texlive-latex-filecontents
(package (package
@ -3568,7 +3567,10 @@ standard LaTeX packages."
;; the updmap.cfg file) ;; the updmap.cfg file)
(match (filter (match-lambda (match (filter (match-lambda
((name . _) ((name . _)
(not (member name '("bash" "updmap.cfg"))))) (not (member name '("bash"
"coreutils"
"sed"
"updmap.cfg")))))
%build-inputs) %build-inputs)
(((names . directories) ...) (((names . directories) ...)
(union-build (assoc-ref %outputs "out") (union-build (assoc-ref %outputs "out")
@ -3588,6 +3590,7 @@ standard LaTeX packages."
(setenv "PATH" (string-append (setenv "PATH" (string-append
(assoc-ref %build-inputs "bash") "/bin:" (assoc-ref %build-inputs "bash") "/bin:"
(assoc-ref %build-inputs "coreutils") "/bin:" (assoc-ref %build-inputs "coreutils") "/bin:"
(assoc-ref %build-inputs "sed") "/bin:"
(string-append out "/bin"))) (string-append out "/bin")))
(for-each (for-each
(cut wrap-program <> (cut wrap-program <>
@ -3596,16 +3599,32 @@ standard LaTeX packages."
(find-files (string-append out "/bin") ".*")) (find-files (string-append out "/bin") ".*"))
;; Remove invalid maps from config file. ;; Remove invalid maps from config file.
(let ((port (open-pipe* OPEN_WRITE "updmap-sys" (let ((web2c (string-append out "/share/texmf-config/web2c/"))
"--syncwithtrees" (maproot (string-append out "/share/texmf-dist/fonts/map/")))
"--nohash" (mkdir-p web2c)
(assoc-ref %build-inputs "updmap.cfg")))) (copy-file
(display "Y\n" port) (assoc-ref %build-inputs "updmap.cfg")
(when (not (zero? (status:exit-val (close-pipe port)))) (string-append web2c "updmap.cfg"))
(error "failed to filter updmap.cfg"))) (make-file-writable (string-append web2c "updmap.cfg"))
;; Generate maps.
(invoke "updmap-sys" "--force" (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
(string-append out "/share/texmf-config/web2c/updmap.cfg")) "--syncwithtrees"
"--nohash"
(string-append "--cnffile=" web2c "updmap.cfg"))))
(display "Y\n" port)
(when (not (zero? (status:exit-val (close-pipe port))))
(error "failed to filter updmap.cfg")))
;; Generate maps.
(invoke "updmap-sys"
(string-append "--cnffile=" web2c "updmap.cfg")
(string-append "--dvipdfmxoutputdir="
maproot "dvipdfmx/updmap/")
(string-append "--dvipsoutputdir="
maproot "dvips/updmap/")
(string-append "--pdftexoutputdir="
maproot "pdftex/updmap/"))
;; Having this file breaks all file lookups later.
(delete-file (string-append out "/share/texmf-dist/ls-R")))
#t)))) #t))))
(inputs (inputs
`(("bash" ,bash) `(("bash" ,bash)