gnu: Simplify texlive-default-updmap.cfg.

* gnu/packages/tex.scm (texlive-default-updmap.cfg): Use TEXLIVE-ORIGIN.
(texlive-updmap.cfg):
* guix/profiles.scm (texlive-font-maps): Update accordingly.
This commit is contained in:
Nicolas Goaziou 2023-06-12 10:30:11 +02:00
parent 36d7acf003
commit 0d7e2380b6
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D
2 changed files with 28 additions and 42 deletions

View file

@ -4136,16 +4136,11 @@ part of the LaTeX required set of packages.")
(define-deprecated-package texlive-latex-psnfss texlive-psnfss) (define-deprecated-package texlive-latex-psnfss texlive-psnfss)
(define-public texlive-default-updmap.cfg (define-public texlive-default-updmap.cfg
(origin (texlive-origin
(method url-fetch) "updmap.cfg" (number->string %texlive-revision)
(uri (string-append "https://tug.org/svn/texlive/tags/" (list "web2c/updmap.cfg")
%texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
"?revision=" (number->string %texlive-revision)))
(file-name (string-append "updmap.cfg-"
(number->string %texlive-revision)))
(sha256
(base32 (base32
"0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c")))) "1bb9nmvr14f3lam627mq030hh08h7wsy8i6884q2kvppbpf2a3mf")))
(define-public texlive-updmap.cfg (define-public texlive-updmap.cfg
(lambda* (#:optional (packages '())) (lambda* (#:optional (packages '()))
@ -4172,16 +4167,7 @@ configuration of a base set of packages plus PACKAGES."
texlive-tools))) texlive-tools)))
(package (package
(version (number->string %texlive-revision)) (version (number->string %texlive-revision))
(source (origin (source texlive-default-updmap.cfg)
(method url-fetch)
(uri (string-append "https://tug.org/svn/texlive/tags/"
%texlive-tag
"/Master/texmf-dist/web2c/updmap.cfg"
"?revision=" version))
(file-name "updmap.cfg")
(sha256
(base32
"0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
(name "texlive-updmap.cfg") (name "texlive-updmap.cfg")
(build-system copy-build-system) (build-system copy-build-system)
(arguments (arguments
@ -4189,12 +4175,13 @@ configuration of a base set of packages plus PACKAGES."
(guix build utils) (guix build utils)
(ice-9 popen) (ice-9 popen)
(ice-9 textual-ports)) (ice-9 textual-ports))
#:install-plan '(("updmap.cfg" "share/texmf-config/web2c/") #:install-plan '(("web2c/updmap.cfg" "share/texmf-config/web2c/")
("map" "share/texmf-dist/fonts/map")) ("web2c/map" "share/texmf-dist/fonts/map"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'install 'regenerate-updmap.cfg (add-before 'install 'regenerate-updmap.cfg
(lambda _ (lambda _
(with-directory-excursion "web2c"
(make-file-writable "updmap.cfg") (make-file-writable "updmap.cfg")
;; Disable unavailable map files. ;; Disable unavailable map files.
@ -4215,7 +4202,7 @@ configuration of a base set of packages plus PACKAGES."
"--cnffile" "updmap.cfg" "--cnffile" "updmap.cfg"
"--dvipdfmxoutputdir" "map/dvipdfmx/updmap/" "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
"--dvipsoutputdir" "map/dvips/updmap/" "--dvipsoutputdir" "map/dvips/updmap/"
"--pdftexoutputdir" "map/pdftex/updmap/")))))) "--pdftexoutputdir" "map/pdftex/updmap/")))))))
(propagated-inputs (map (lambda (package) (propagated-inputs (map (lambda (package)
(list (package-name package) package)) (list (package-name package) package))
(append default-packages packages))) (append default-packages packages)))

View file

@ -1831,8 +1831,7 @@ MANIFEST."
(let* ((web2c (string-append #$output "/share/texmf-dist/web2c/")) (let* ((web2c (string-append #$output "/share/texmf-dist/web2c/"))
(maproot (string-append #$output "/share/texmf-dist/fonts/map/")) (maproot (string-append #$output "/share/texmf-dist/fonts/map/"))
(updmap.cfg (string-append web2c "updmap.cfg"))) (updmap.cfg (string-append web2c "updmap.cfg")))
(mkdir-p web2c) (install-file #$(file-append updmap.cfg "/web2c/updmap.cfg") web2c)
(copy-file #$updmap.cfg updmap.cfg)
(make-file-writable updmap.cfg) (make-file-writable updmap.cfg)
(let* ((port (open-pipe* OPEN_WRITE (let* ((port (open-pipe* OPEN_WRITE
#$(file-append texlive-bin "/bin/updmap-sys") #$(file-append texlive-bin "/bin/updmap-sys")