[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
211/214: import/cran: description->package: Use COND and computed boolea
From: |
guix-commits |
Subject: |
211/214: import/cran: description->package: Use COND and computed booleans. |
Date: |
Tue, 20 Sep 2022 11:07:39 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit ec92bcaaddbe205f439b7ec11825117515e3d07c
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
- 126/214: gnu: r-caret: Update to 6.0-93., (continued)
- 126/214: gnu: r-caret: Update to 6.0-93., guix-commits, 2022/09/20
- 132/214: gnu: r-matrixextra: Update to 0.1.13., guix-commits, 2022/09/20
- 22/214: gnu: r-ggpmisc: Update to 0.5.0., guix-commits, 2022/09/20
- 23/214: gnu: r-scales: Update to 1.2.1., guix-commits, 2022/09/20
- 52/214: gnu: r-arules: Update to 1.7-4., guix-commits, 2022/09/20
- 145/214: gnu: r-wdman: Update to 0.2.6., guix-commits, 2022/09/20
- 146/214: gnu: r-rselenium: Update to 1.7.9., guix-commits, 2022/09/20
- 163/214: gnu: r-mlr3: Update to 0.14.0., guix-commits, 2022/09/20
- 169/214: gnu: r-exactextractr: Update to 0.9.0., guix-commits, 2022/09/20
- 174/214: gnu: r-paws-compute: Update to 0.1.13., guix-commits, 2022/09/20
- 211/214: import/cran: description->package: Use COND and computed booleans.,
guix-commits <=
- 192/214: gnu: r-httr: Update to 1.4.4., guix-commits, 2022/09/20
- 194/214: gnu: r-hms: Update to 1.1.2., guix-commits, 2022/09/20
- 200/214: gnu: r-tidyr: Update to 1.2.1., guix-commits, 2022/09/20
- 115/214: gnu: r-patchwork: Update to 1.1.2., guix-commits, 2022/09/20
- 123/214: gnu: r-accsda: Update to 1.1.2., guix-commits, 2022/09/20
- 125/214: gnu: r-gdina: Update to 2.9.3., guix-commits, 2022/09/20
- 72/214: gnu: r-bayestestr: Update to 0.13.0., guix-commits, 2022/09/20
- 69/214: gnu: r-furrr: Update to 0.3.1., guix-commits, 2022/09/20
- 99/214: gnu: r-bookdown: Update to 0.29., guix-commits, 2022/09/20
- 34/214: gnu: r-palmerpenguins: Update to 0.1.1., guix-commits, 2022/09/20