[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
211/211: import/cran: description->package: Use COND and computed boolea
From: |
guix-commits |
Subject: |
211/211: import/cran: description->package: Use COND and computed booleans. |
Date: |
Tue, 20 Sep 2022 06:24:46 -0400 (EDT) |
rekado pushed a commit to branch wip-r
in repository guix.
commit ffca69565b25809f5d52ddfcb62403ed4a887e39
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Aug 12 19:59:50 2022 +0200
import/cran: description->package: Use COND and computed booleans.
* guix/import/cran.scm (description->package): Use COND with previously
computed booleans instead of using CASE on REPOSITORY.
---
guix/import/cran.scm | 62 ++++++++++++++++++++++++++--------------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 69d01b5f7c..d7f6945675 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -516,32 +516,32 @@ from the alist META, which was derived from the R
package's DESCRIPTION file."
(package
`(package
(name ,(cran-guix-name name))
- (version ,(case repository
- ((git)
- `(git-version ,version revision commit))
- ((hg)
- `(string-append ,version "-" revision "."
changeset))
- (else version)))
+ (version ,(cond
+ (git?
+ `(git-version ,version revision commit))
+ (hg?
+ `(string-append ,version "-" revision "." changeset))
+ (else version)))
(source (origin
(method ,(cond
(git? 'git-fetch)
(hg? 'hg-fetch)
(else 'url-fetch)))
- (uri ,(case repository
- ((git)
- `(git-reference
- (url ,(assoc-ref meta 'git))
- (commit commit)))
- ((hg)
- `(hg-reference
- (url ,(assoc-ref meta 'hg))
- (changeset changeset)))
- (else
- `(,(procedure-name uri-helper) ,name version
- ,@(or (and=> (assoc-ref meta
'bioconductor-type)
- (lambda (type)
- (list (list 'quote type))))
- '())))))
+ (uri ,(cond
+ (git?
+ `(git-reference
+ (url ,(assoc-ref meta 'git))
+ (commit commit)))
+ (hg?
+ `(hg-reference
+ (url ,(assoc-ref meta 'hg))
+ (changeset changeset)))
+ (else
+ `(,(procedure-name uri-helper) ,name version
+ ,@(or (and=> (assoc-ref meta
'bioconductor-type)
+ (lambda (type)
+ (list (list 'quote type))))
+ '())))))
,@(cond
(git?
'((file-name (git-file-name name version))))
@@ -576,16 +576,16 @@ from the alist META, which was derived from the R
package's DESCRIPTION file."
"")))
(license ,license))))
(values
- (case repository
- ((git)
- `(let ((commit ,(assoc-ref meta 'git-commit))
- (revision "1"))
- ,package))
- ((hg)
- `(let ((changeset ,(assoc-ref meta 'hg-changeset))
- (revision "1"))
- ,package))
- (else package))
+ (cond
+ (git?
+ `(let ((commit ,(assoc-ref meta 'git-commit))
+ (revision "1"))
+ ,package))
+ (hg?
+ `(let ((changeset ,(assoc-ref meta 'hg-changeset))
+ (revision "1"))
+ ,package))
+ (else package))
propagate)))
(define cran->guix-package
- 184/211: gnu: r-stringr: Update to 1.4.1., (continued)
- 184/211: gnu: r-stringr: Update to 1.4.1., guix-commits, 2022/09/20
- 189/211: gnu: r-rversions: Update to 2.1.2., guix-commits, 2022/09/20
- 195/211: gnu: r-rcpparmadillo: Update to 0.11.2.4.0., guix-commits, 2022/09/20
- 196/211: gnu: r-rmarkdown: Update to 2.16., guix-commits, 2022/09/20
- 202/211: gnu: r-hmisc: Update to 4.7-1., guix-commits, 2022/09/20
- 207/211: gnu: r-forcats: Update to 0.5.2., guix-commits, 2022/09/20
- 201/211: gnu: r-base64: Update to 2.0.1., guix-commits, 2022/09/20
- 87/211: gnu: r-als: Update to 0.0.7., guix-commits, 2022/09/20
- 200/211: gnu: r-tidyr: Update to 1.2.1., guix-commits, 2022/09/20
- 191/211: gnu: r-openssl: Update to 2.0.3., guix-commits, 2022/09/20
- 211/211: import/cran: description->package: Use COND and computed booleans.,
guix-commits <=
- 192/211: gnu: r-httr: Update to 1.4.4., guix-commits, 2022/09/20
- 198/211: gnu: r-rsqlite: Update to 2.2.17., guix-commits, 2022/09/20
- 197/211: gnu: r-gtable: Update to 0.3.1., guix-commits, 2022/09/20
- 209/211: gnu: r-desctools: Update to 0.99.46., guix-commits, 2022/09/20
- 210/211: import/cran: download: Accept optional REF argument., guix-commits, 2022/09/20
- 203/211: gnu: r-statmod: Update to 1.4.37., guix-commits, 2022/09/20
- 193/211: gnu: r-rstudioapi: Update to 0.14., guix-commits, 2022/09/20
- 199/211: gnu: r-viridislite: Update to 0.4.1., guix-commits, 2022/09/20
- 206/211: gnu: r-sn: Update to 2.1.0., guix-commits, 2022/09/20
- 96/211: gnu: r-gamlss-dist: Update to 6.0-5., guix-commits, 2022/09/20