import/cran: Process all vignette builders.

* guix/import/cran.scm (needs-knitr?): Remove procedure.
(vignette-builders): New procedure.
(description->package): Use vignette-builders instead of needs-knitr?.
This commit is contained in:
Ricardo Wurmus 2023-02-17 22:22:42 +01:00
parent c0507e9f1e
commit 271c0bfcf2
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

View File

@ -502,8 +502,8 @@ by TARBALL?"
(source-dir->dependencies dir)))
(source-dir->dependencies source)))
(define (needs-knitr? meta)
(member "knitr" (listify meta "VignetteBuilder")))
(define (vignette-builders meta)
(map cran-guix-name (listify meta "VignetteBuilder")))
(define* (description->package repository meta #:key (license-prefix identity)
(download-source download))
@ -617,8 +617,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
,@(maybe-inputs (map cran-guix-name propagate) 'propagated-inputs)
,@(maybe-inputs
`(,@source-native-inputs
,@(if (needs-knitr? meta)
'("r-knitr") '()))
,@(vignette-builders meta))
'native-inputs)
(home-page ,(if (string-null? home-page)
(string-append base-url name)