From 31cd9a50402ac64e83fce35a7c789613d6ad156a Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 19 May 2023 23:27:38 +0200 Subject: guix: import: Handle native inputs in texlive importer. * guix/import/texlive.scm (tlpdb->package): Add TEXLIVE-METAFONT as a native input whenever font metrics are to be generated. * tests/texlive.scm (%fake-tlpdb): Add test data. ("texlive->guix-package, with METAFONT files"): New test. --- guix/import/texlive.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'guix') diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 33a0e7d1d9..fd772d3133 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -315,6 +315,21 @@ of those files are returned that are unexpectedly installed." '((outputs '("out" "doc"))) '()) (build-system texlive-build-system) + ;; 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)) + (metrics + (filter-map (lambda (f) + (and (string-suffix? ".tfm" f) + (basename f ".tfm"))) + runfiles)) + ((not (null? metrics))) + ((any (lambda (f) + (and (string-suffix? ".mf" f) + (member (basename f ".mf") metrics))) + runfiles))) + '((native-inputs (list texlive-metafont)))) + '()) ,@(match filtered-depends (() '()) (inputs -- cgit 1.4.1