From 0224a8f400278c0afafc0aa4d45ee5ee261df59b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 9 Jun 2023 10:09:21 +0200 Subject: guix: texlive importer: Fix build system and arguments for meta-packages. * guix/import/texlive.scm (tlpdb->package): Meta packages should use trivial build system and an appropriate builder. * tests/texlive.scm ("texlive->guix-package, meta-package"): ("texlive->guix-package, translate dependencies"): Update tests. --- guix/import/texlive.scm | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'guix/import') diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 3b0f5cf5c1..a39e327d45 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -342,24 +342,30 @@ (define (tlpdb->package name version package-database) ,@(if (assoc-ref data 'docfiles) '((outputs '("out" "doc"))) '()) - (build-system texlive-build-system) + (build-system ,(if meta-package? + 'trivial-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)))))) - '()) + ,@(cond + (meta-package? '((arguments (list #:builder #~(mkdir #$output))))) + ((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)))) + formats) + => + (lambda (formats) + `((arguments + (list #:create-formats #~(list ,@(reverse formats))))))) + (else '())) ;; 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)) -- cgit v1.2.3