import cran: Ignore default R packages.
* guix/import/cran.scm (default-r-packages): New variable. (description->package): Drop default R packages from list of inputs.
This commit is contained in:
parent
ad68f7fa58
commit
b26abe4f14
|
@ -149,6 +149,38 @@ empty list when the FIELD cannot be found."
|
||||||
(string-any char-set:whitespace item)))
|
(string-any char-set:whitespace item)))
|
||||||
(map string-trim-both items))))))
|
(map string-trim-both items))))))
|
||||||
|
|
||||||
|
(define default-r-packages
|
||||||
|
(list "KernSmooth"
|
||||||
|
"MASS"
|
||||||
|
"Matrix"
|
||||||
|
"base"
|
||||||
|
"boot"
|
||||||
|
"class"
|
||||||
|
"cluster"
|
||||||
|
"codetools"
|
||||||
|
"compiler"
|
||||||
|
"datasets"
|
||||||
|
"foreign"
|
||||||
|
"grDevices"
|
||||||
|
"graphics"
|
||||||
|
"grid"
|
||||||
|
"lattice"
|
||||||
|
"methods"
|
||||||
|
"mgcv"
|
||||||
|
"nlme"
|
||||||
|
"nnet"
|
||||||
|
"parallel"
|
||||||
|
"rpart"
|
||||||
|
"spatial"
|
||||||
|
"splines"
|
||||||
|
"stats"
|
||||||
|
"stats4"
|
||||||
|
"survival"
|
||||||
|
"tcltk"
|
||||||
|
"tools"
|
||||||
|
"translations"
|
||||||
|
"utils"))
|
||||||
|
|
||||||
(define (guix-name name)
|
(define (guix-name name)
|
||||||
"Return a Guix package name for a given R package name."
|
"Return a Guix package name for a given R package name."
|
||||||
(string-append "r-" (string-map (match-lambda
|
(string-append "r-" (string-map (match-lambda
|
||||||
|
@ -180,11 +212,13 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
|
||||||
(_ #f)))
|
(_ #f)))
|
||||||
(tarball (with-store store (download-to-store store source-url)))
|
(tarball (with-store store (download-to-store store source-url)))
|
||||||
(sysdepends (map string-downcase (listify meta "SystemRequirements")))
|
(sysdepends (map string-downcase (listify meta "SystemRequirements")))
|
||||||
(propagate (lset-union equal?
|
(propagate (filter (lambda (name)
|
||||||
(listify meta "Imports")
|
(not (member name default-r-packages)))
|
||||||
(listify meta "LinkingTo")
|
(lset-union equal?
|
||||||
(delete "R"
|
(listify meta "Imports")
|
||||||
(listify meta "Depends")))))
|
(listify meta "LinkingTo")
|
||||||
|
(delete "R"
|
||||||
|
(listify meta "Depends"))))))
|
||||||
(values
|
(values
|
||||||
`(package
|
`(package
|
||||||
(name ,(guix-name name))
|
(name ,(guix-name name))
|
||||||
|
|
Loading…
Reference in New Issue