gnu: simple-texlive-package: Turn it into a stub.

No texlive package makes use of #:TRIVIAL? keyword anymore. This function now
always use TEXLIVE-BUILD-SYSTEM until is can be completely removed.

* gnu/packages/tex.scm (simple-texlive-package): Always use TEXLIVE-BUILD-SYSTEM.
This commit is contained in:
Nicolas Goaziou 2023-05-18 11:30:19 +02:00
parent 8b2d1a9347
commit 12a22bfdb5
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -107,8 +107,7 @@ (define* (simple-texlive-package name locations hash
#:key trivial?) #:key trivial?)
"Return a template for a simple TeX Live package with the given NAME, "Return a template for a simple TeX Live package with the given NAME,
downloading from a list of LOCATIONS in the TeX Live repository, and expecting downloading from a list of LOCATIONS in the TeX Live repository, and expecting
the provided output HASH. If TRIVIAL? is provided, all files will simply be the provided output HASH. The TRIVIAL? keyword is not used."
copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
(set! locations (set! locations
;; Some locations may be manually inserted, so be tolerant with ;; Some locations may be manually inserted, so be tolerant with
;; leading slashes. Ignore them consistently. ;; leading slashes. Ignore them consistently.
@ -124,47 +123,8 @@ (define with-documentation?
(name name) (name name)
(version (number->string %texlive-revision)) (version (number->string %texlive-revision))
(source (texlive-origin name version locations hash)) (source (texlive-origin name version locations hash))
(outputs (if with-documentation? (outputs (if with-documentation? '("out" "doc") '("out")))
'("out" "doc") (build-system texlive-build-system)
'("out")))
(build-system (if trivial?
gnu-build-system
texlive-build-system))
(arguments
(let ((copy-files
`(lambda* (#:key outputs inputs tex-directory #:allow-other-keys)
(let (,@(if with-documentation?
`((doc (string-append (assoc-ref outputs "doc")
"/share/texmf-dist")))
'())
(source (assoc-ref inputs "source"))
(out (string-append (assoc-ref outputs "out")
"/share/texmf-dist")))
,@(if with-documentation?
'((mkdir-p doc)
(copy-recursively
(string-append source "/doc")
(string-append doc "/doc")))
'())
(mkdir-p out)
(copy-recursively "." out)
;; In any case, if documentation exists, it is already in the
;; "doc" output, so remove it from regular one.
(let ((doc (string-append out "/doc")))
(when (file-exists? doc)
(delete-file-recursively doc)))
;; Also remove all source files.
(let ((srcfiles (string-append out "/source")))
(when (file-exists? srcfiles)
(delete-file-recursively srcfiles)))))))
(if trivial?
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(replace 'build (const #t))
(replace 'install ,copy-files)))
`())))
(home-page #f) (home-page #f)
(synopsis #f) (synopsis #f)
(description #f) (description #f)