aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-09-28 22:04:01 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-09-28 22:10:33 +0200
commite761ed7384a8a086c5fed95336123a0ba6fc0cb1 (patch)
tree98744c4d63f66eda42659b6bf2a94c987517541d
parent9d86052c2287533d231484a5061ad786e14c04d6 (diff)
downloadguix-e761ed7384a8a086c5fed95336123a0ba6fc0cb1.tar.gz
guix-e761ed7384a8a086c5fed95336123a0ba6fc0cb1.zip
import/cran: Transform external package names to Guix names.
* guix/import/cran.scm (transform-sysname): New procedure. (description->package): Use it on inputs that are derived from "sysdepends".
-rw-r--r--guix/import/cran.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index d60e9a3b1f..ec70370863 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -367,6 +367,14 @@ empty list when the FIELD cannot be found."
"xcode"
"xquartz"))
+(define (transform-sysname sysname)
+ "Return a Guix package name for the common package name SYSNAME."
+ (match sysname
+ ("java" "openjdk")
+ ("fftw3" "fftw")
+ ("tcl/tk" "tcl")
+ (_ sysname)))
+
(define cran-guix-name (cut guix-name "r-" <>))
(define (tarball-needs-fortran? tarball)
@@ -561,7 +569,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
`((properties ,`(,'quasiquote ((,'upstream-name . ,name)))))
'())
(build-system r-build-system)
- ,@(maybe-inputs sysdepends)
+ ,@(maybe-inputs (map transform-sysname sysdepends))
,@(maybe-inputs (map cran-guix-name propagate) 'propagated-inputs)
,@(maybe-inputs
`(,@(if (needs-fortran? source (not (or git? hg?)))