[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/09: import/cran: Use multiple values instead of a list of lists.
From: |
guix-commits |
Subject: |
09/09: import/cran: Use multiple values instead of a list of lists. |
Date: |
Sat, 31 Dec 2022 08:49:56 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit d4ed8dc3c5743aac6766da0e54e0c969386ed8ac
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sat Dec 31 14:40:13 2022 +0100
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.
---
guix/import/cran.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index e10ada49c7..d33f909369 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -33,6 +33,7 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 receive)
#:use-module (web uri)
#:use-module (guix memoization)
@@ -473,13 +474,13 @@ the pkg-config tool."
"(Makevars.*|configure.*)"))
(define (source-dir->dependencies dir)
- "Guess dependencies of R package source in DIR and return (INPUTS
-NATIVE-INPUTS)."
- (list
- (if (directory-needs-zlib? dir) '("zlib") '())
- (append
- (if (directory-needs-pkg-config? dir) '("pkg-config") '())
- (if (directory-needs-fortran? dir) '("gfortran") '()))))
+ "Guess dependencies of R package source in DIR and return two values: a list
+of package names for INPUTS and another list of names of NATIVE-INPUTS."
+ (values
+ (if (directory-needs-zlib? dir) '("zlib") '())
+ (append
+ (if (directory-needs-pkg-config? dir) '("pkg-config") '())
+ (if (directory-needs-fortran? dir) '("gfortran") '()))))
(define (source->dependencies source tarball?)
"SOURCE-DIR->DEPENDENCIES, but for directories and tarballs as indicated
@@ -543,9 +544,8 @@ from the alist META, which was derived from the R package's
DESCRIPTION file."
(hg? 'hg)
(else #f))))
(tarball? (not (or git? hg?)))
- (source-inputs-all (source->dependencies source tarball?))
- (source-inputs (car source-inputs-all))
- (source-native-inputs (cadr source-inputs-all))
+ (source-inputs source-native-inputs
+ (source->dependencies source tarball?))
(sysdepends (append
source-inputs
(filter (lambda (name)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 09/09: import/cran: Use multiple values instead of a list of lists.,
guix-commits <=