summaryrefslogtreecommitdiff
path: root/guix/import/cran.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-10 20:50:02 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-10 20:50:02 +0100
commit50b99c90c87642f664f9c9523a6e40fc8542ddcf (patch)
tree9fc8845e93ba913730e5fb92bbad158716d84e74 /guix/import/cran.scm
parentbda4b5e0453e4c8feda24306b4aa76ad5406eb7d (diff)
parent21656ffa3b6d78a610f0befced20cc9b4b3baab6 (diff)
downloadguix-patches-50b99c90c87642f664f9c9523a6e40fc8542ddcf.tar
guix-patches-50b99c90c87642f664f9c9523a6e40fc8542ddcf.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/import/cran.scm')
-rw-r--r--guix/import/cran.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index bcb37ed250..bb8226f714 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
@@ -385,6 +385,9 @@ reference the pkg-config tool."
(tarball-needs-pkg-config? thing)
(directory-needs-pkg-config? thing)))
+(define (needs-knitr? meta)
+ (member "knitr" (listify meta "VignetteBuilder")))
+
;; XXX adapted from (guix scripts hash)
(define (file-hash file select? recursive?)
;; Compute the hash of FILE.
@@ -486,7 +489,9 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
`(,@(if (needs-fortran? source (not git?))
'("gfortran") '())
,@(if (needs-pkg-config? source (not git?))
- '("pkg-config") '()))
+ '("pkg-config") '())
+ ,@(if (needs-knitr? meta)
+ '("r-knitr") '()))
'native-inputs)
(home-page ,(if (string-null? home-page)
(string-append base-url name)