summaryrefslogtreecommitdiff
path: root/guix/import/texlive.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import/texlive.scm')
-rw-r--r--guix/import/texlive.scm20
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))