diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-06-26 12:22:32 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-18 18:16:08 +0200 |
commit | 3f8b75b35ca553c46cde34736f57b52aad02af72 (patch) | |
tree | e9028ee0896f30138dfb39b550803abe805891d2 | |
parent | 19fd1004138b60c4479d7516aa0cee261c0b6b57 (diff) | |
download | guix-3f8b75b35ca553c46cde34736f57b52aad02af72.tar.gz guix-3f8b75b35ca553c46cde34736f57b52aad02af72.zip |
gnu: Remove texlive-default-updmap.cfg.
* gnu/packages/tex.scm (texlive-scripts): Provide "updmap.cfg", along with
other similar files.
(texlive-default-updmap.cfg): Remove variable.
(texlive-updmap.cfg)[source]: Use TEXLIVE-SCRIPTS source.
[arguments]: Use G-expressions. Adapt #:INSTALL-PLAN according to source change.
* guix/profiles.scm (texlive-font-maps): Use "updmap.cfg" provided by
TEXLIVE-SCRIPTS instead of now defunct TEXLIVE-DEFAULT-UPDMAP.CFG.
-rw-r--r-- | gnu/packages/tex.scm | 73 | ||||
-rw-r--r-- | guix/profiles.scm | 9 |
2 files changed, 40 insertions, 42 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index e6ad2746aa..1efa5f6f4b 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -260,6 +260,7 @@ of user-specified directories similar to how shells look up executables.") "texmf-dist/scripts/texlive/updmap.pl" "texmf-dist/web2c/fmtutil-hdr.cnf" "texmf-dist/web2c/updmap-hdr.cfg" + "texmf-dist/web2c/updmap.cfg" "tlpkg/gpg/" "tlpkg/installer/config.guess" "tlpkg/installer/curl/curl-ca-bundle.crt" @@ -267,7 +268,7 @@ of user-specified directories similar to how shells look up executables.") "tlpkg/texlive.tlpdb")) (revision %texlive-revision))) (sha256 - "191p4rznf19wl9sbjm61v143wap3izhsql6s1bpq1nnbf1p4bakq"))) + "0sqbg5kjpzkpm1fq2c9hpf4f21bvjs3xas944dlbqp44lsqhcmsk"))) (outputs '("out" "doc")) (build-system copy-build-system) (arguments @@ -4948,13 +4949,6 @@ part of the LaTeX required set of packages.") (define-deprecated-package texlive-latex-psnfss texlive-psnfss) -(define-public texlive-default-updmap.cfg - (texlive-origin - "updmap.cfg" (number->string %texlive-revision) - (list "web2c/updmap.cfg") - (base32 - "10b9il84x6vwfns7cvf8jv0bfcjr7icph3mhci9cq088v216k3kb"))) - (define-public texlive-updmap.cfg (lambda* (#:optional (packages '())) "Return a 'texlive-updmap.cfg' package which contains the fonts map @@ -4978,42 +4972,45 @@ configuration of a base set of packages plus PACKAGES." texlive-tools))) (package (version (number->string %texlive-revision)) - (source texlive-default-updmap.cfg) + (source (package-source texlive-scripts)) (name "texlive-updmap.cfg") (build-system copy-build-system) (arguments - '(#:modules ((guix build copy-build-system) + (list + #:modules '((guix build copy-build-system) (guix build utils) (ice-9 popen) (ice-9 textual-ports)) - #:install-plan '(("web2c/updmap.cfg" "share/texmf-config/web2c/") - ("web2c/map" "share/texmf-dist/fonts/map")) - #:phases - (modify-phases %standard-phases - (add-before 'install 'regenerate-updmap.cfg - (lambda _ - (with-directory-excursion "web2c" - (make-file-writable "updmap.cfg") - - ;; Disable unavailable map files. - (let* ((port (open-pipe* OPEN_WRITE "updmap-sys" - "--syncwithtrees" - "--nohash" - "--cnffile" "updmap.cfg"))) - (display "Y\n" port) - (when (not (zero? (status:exit-val (close-pipe port)))) - (error "failed to filter updmap.cfg"))) - - ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails - ;; if it cannot create its log file there. - (setenv "TEXMFSYSVAR" (getcwd)) - - ;; Generate maps. - (invoke "updmap-sys" - "--cnffile" "updmap.cfg" - "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/" - "--dvipsoutputdir" "map/dvips/updmap/" - "--pdftexoutputdir" "map/pdftex/updmap/"))))))) + #:install-plan + #~'(("texmf-dist/web2c/updmap.cfg" "share/texmf-config/web2c/") + ("texmf-dist/web2c/map" "share/texmf-dist/fonts/map")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'regenerate-updmap.cfg + (lambda _ + (with-directory-excursion "texmf-dist/web2c" + (make-file-writable "updmap.cfg") + + ;; Disable unavailable map files. + (let* ((port (open-pipe* OPEN_WRITE "updmap-sys" + "--syncwithtrees" + "--nohash" + "--cnffile" "updmap.cfg"))) + (display "Y\n" port) + (when (not (zero? (status:exit-val (close-pipe port)))) + (error "failed to filter updmap.cfg"))) + + ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails + ;; if it cannot create its log file there. + (setenv "TEXMFSYSVAR" (getcwd)) + + ;; Generate maps. + (invoke "updmap-sys" + "--cnffile" "updmap.cfg" + "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/" + "--dvipsoutputdir" "map/dvips/updmap/" + "--pdftexoutputdir" "map/pdftex/updmap/"))))))) + (native-inputs (list texlive-scripts)) (propagated-inputs (map (lambda (package) (list (package-name package) package)) (append default-packages packages))) diff --git a/guix/profiles.scm b/guix/profiles.scm index 75ce2b4d08..d0006dc2bf 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1799,9 +1799,6 @@ MANIFEST." (module-ref (resolve-interface '(gnu packages base)) 'grep)) (define sed (module-ref (resolve-interface '(gnu packages base)) 'sed)) - (define updmap.cfg - (module-ref (resolve-interface '(gnu packages tex)) - 'texlive-default-updmap.cfg)) (define build (with-imported-modules '((guix build utils) (guix build union)) @@ -1835,7 +1832,9 @@ MANIFEST." (let* ((web2c (string-append #$output "/share/texmf-dist/web2c/")) (maproot (string-append #$output "/share/texmf-dist/fonts/map/")) (updmap.cfg (string-append web2c "updmap.cfg"))) - (install-file #$(file-append updmap.cfg "/web2c/updmap.cfg") web2c) + (install-file #$(file-append texlive-scripts + "/share/texmf-dist/web2c/updmap.cfg") + web2c) (make-file-writable updmap.cfg) (let* ((port (open-pipe* OPEN_WRITE #$(file-append texlive-scripts "/bin/updmap-sys") @@ -1867,6 +1866,8 @@ MANIFEST." (let ((a (string-append #$output "/share/texmf-dist")) (b "/tmp/texlive/share/texmf-dist") (mktexlsr #$(file-append texlive-scripts "/bin/mktexlsr"))) + ;; Ignore original "updmap.cfg" from texlive-scripts input. + (delete-file "/tmp/texlive/share/texmf-dist/web2c/updmap.cfg") (copy-recursively a b) (invoke mktexlsr b) (install-file (string-append b "/ls-R") a)))))) |