mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 22:26:40 -05:00
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".
This commit is contained in:
parent
9d86052c22
commit
e761ed7384
1 changed files with 9 additions and 1 deletions
|
@ -367,6 +367,14 @@ (define invalid-packages
|
|||
"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 @@ (define (description->package repository meta)
|
|||
`((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?)))
|
||||
|
|
Loading…
Reference in a new issue