mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
import/cran: Use multiple values instead of a list of lists.
* guix/import/cran.scm (source-dir->dependencies): Return multiple values. (description->package): Bind two values.
This commit is contained in:
parent
4046405f73
commit
d4ed8dc3c5
1 changed files with 10 additions and 10 deletions
|
@ -33,6 +33,7 @@ (define-module (guix import cran)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (srfi srfi-34)
|
#:use-module (srfi srfi-34)
|
||||||
#:use-module (srfi srfi-35)
|
#:use-module (srfi srfi-35)
|
||||||
|
#:use-module (srfi srfi-71)
|
||||||
#:use-module (ice-9 receive)
|
#:use-module (ice-9 receive)
|
||||||
#:use-module (web uri)
|
#:use-module (web uri)
|
||||||
#:use-module (guix memoization)
|
#:use-module (guix memoization)
|
||||||
|
@ -473,13 +474,13 @@ (define (directory-needs-pkg-config? dir)
|
||||||
"(Makevars.*|configure.*)"))
|
"(Makevars.*|configure.*)"))
|
||||||
|
|
||||||
(define (source-dir->dependencies dir)
|
(define (source-dir->dependencies dir)
|
||||||
"Guess dependencies of R package source in DIR and return (INPUTS
|
"Guess dependencies of R package source in DIR and return two values: a list
|
||||||
NATIVE-INPUTS)."
|
of package names for INPUTS and another list of names of NATIVE-INPUTS."
|
||||||
(list
|
(values
|
||||||
(if (directory-needs-zlib? dir) '("zlib") '())
|
(if (directory-needs-zlib? dir) '("zlib") '())
|
||||||
(append
|
(append
|
||||||
(if (directory-needs-pkg-config? dir) '("pkg-config") '())
|
(if (directory-needs-pkg-config? dir) '("pkg-config") '())
|
||||||
(if (directory-needs-fortran? dir) '("gfortran") '()))))
|
(if (directory-needs-fortran? dir) '("gfortran") '()))))
|
||||||
|
|
||||||
(define (source->dependencies source tarball?)
|
(define (source->dependencies source tarball?)
|
||||||
"SOURCE-DIR->DEPENDENCIES, but for directories and tarballs as indicated
|
"SOURCE-DIR->DEPENDENCIES, but for directories and tarballs as indicated
|
||||||
|
@ -543,9 +544,8 @@ (define* (description->package repository meta #:key (license-prefix identity)
|
||||||
(hg? 'hg)
|
(hg? 'hg)
|
||||||
(else #f))))
|
(else #f))))
|
||||||
(tarball? (not (or git? hg?)))
|
(tarball? (not (or git? hg?)))
|
||||||
(source-inputs-all (source->dependencies source tarball?))
|
(source-inputs source-native-inputs
|
||||||
(source-inputs (car source-inputs-all))
|
(source->dependencies source tarball?))
|
||||||
(source-native-inputs (cadr source-inputs-all))
|
|
||||||
(sysdepends (append
|
(sysdepends (append
|
||||||
source-inputs
|
source-inputs
|
||||||
(filter (lambda (name)
|
(filter (lambda (name)
|
||||||
|
|
Loading…
Reference in a new issue