diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-06-04 13:15:27 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-18 18:12:49 +0200 |
commit | 47913ab45276ff45ab47687e1b67b5bc103089df (patch) | |
tree | f1d9d194876cd7172cd5759f268beaa02f8983ec /guix | |
parent | 7ce20143a7ccddf54b878f51ef856ea3e717587f (diff) |
guix: Let texlive importer suggest format creation.
* guix/import/texlive.scm (tlpdb): Store "execute" entries.
(tlpdb->package): Add #:CREATE-FORMATS argument when there is an AddFormat
execute action.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"): New tests.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/texlive.scm | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index da58c8d13f..36c6f3efb1 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -156,7 +156,8 @@ (srcfiles . list) (runfiles . list) (docfiles . list) - (depend . simple-list))) + (depend . simple-list) + (execute . simple-list))) (record (lambda* (key value alist #:optional (type 'string)) (let ((new @@ -319,6 +320,23 @@ of those files are returned that are unexpectedly installed." '((outputs '("out" "doc"))) '()) (build-system texlive-build-system) + ;; Translate AddFormat execute actions into a `#:create-formats' + ;; argument. + ,@(or (and-let* + ((actions (assoc-ref data 'execute)) + (formats + (delete-duplicates + (filter-map (lambda (action) + (match (string-split action #\space) + (("AddFormat" name . _) + (string-drop name + (string-length "name="))) + ( #f))) + actions))) + ((not (null? formats)))) + `((arguments + (list #:create-formats #~(list ,@(reverse formats)))))) + '()) ;; Texlive build system generates font metrics whenever a font ;; metrics file has the same base name as a Metafont file. ,@(or (and-let* ((runfiles (assoc-ref data 'runfiles)) |