[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
71/81: import/cran: Restore format-inputs.
From: |
guix-commits |
Subject: |
71/81: import/cran: Restore format-inputs. |
Date: |
Mon, 1 Jan 2024 08:55:19 -0500 (EST) |
rekado pushed a commit to branch r-updates
in repository guix.
commit 513994aead5a5da6cdec51931bc8b624c66678e1
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Dec 28 10:15:45 2023 +0100
import/cran: Restore format-inputs.
This fixes a regression introduced in commit
e6223017d95bc615b2648f0798d9a3904d5b5f57 causing the selected input style to
be ignored.
* guix/import/cran.scm (format-inputs): New procedure.
(maybe-inputs): Use it.
Change-Id: I0d36f972fcb9888ed2be4ec9360bbcab13c25c5d
---
guix/import/cran.scm | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index e06001cdb7..fe1d32d79a 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -85,6 +85,21 @@
(define %input-style
(make-parameter 'variable)) ; or 'specification
+(define (format-inputs inputs)
+ "Generate a sorted list of package inputs from a list of upstream inputs."
+ (map (lambda (input)
+ (case (%input-style)
+ ((specification)
+ `(specification->package ,(upstream-input-name input)))
+ (else
+ ((compose string->symbol
+ upstream-input-downstream-name)
+ input))))
+ (sort inputs
+ (lambda (a b)
+ (string-ci<? (upstream-input-name a)
+ (upstream-input-name b))))))
+
(define (string->licenses license-string license-prefix)
(let ((licenses
(map string-trim-both
@@ -177,9 +192,7 @@ package definition."
(()
'())
((package-inputs ...)
- `((,input-type (list ,@(map (compose string->symbol
- upstream-input-downstream-name)
- package-inputs)))))))
+ `((,input-type (list ,@(format-inputs package-inputs)))))))
(define %cran-url "https://cran.r-project.org/web/packages/")
(define %cran-canonical-url "https://cran.r-project.org/package=")
- 65/81: gnu: r-brew: Update to 1.0-10., (continued)
- 65/81: gnu: r-brew: Update to 1.0-10., guix-commits, 2024/01/01
- 38/81: gnu: r-ggeffects: Update to 1.3.4., guix-commits, 2024/01/01
- 52/81: gnu: r-tidygraph: Update to 1.3.0., guix-commits, 2024/01/01
- 57/81: gnu: r-mlr3: Update to 0.17.1., guix-commits, 2024/01/01
- 59/81: gnu: r-ragg: Update to 1.2.7., guix-commits, 2024/01/01
- 68/81: gnu: r-vipor: Update to 0.4.7., guix-commits, 2024/01/01
- 32/81: gnu: r-magick: Update to 2.8.2., guix-commits, 2024/01/01
- 55/81: gnu: r-rcdd: Update to 1.6., guix-commits, 2024/01/01
- 62/81: gnu: r-stringi: Update to 1.8.3., guix-commits, 2024/01/01
- 61/81: gnu: r-mgcv: Update to 1.9-1., guix-commits, 2024/01/01
- 71/81: import/cran: Restore format-inputs.,
guix-commits <=
- 79/81: gnu: r-genomeinfodb: Update to 1.38.5., guix-commits, 2024/01/01
- 78/81: gnu: r-seuratdisk: Update to 0.0.0.9021-1.877d4e1., guix-commits, 2024/01/01
- 35/81: gnu: r-sandwich: Update to 3.1-0., guix-commits, 2024/01/01
- 37/81: gnu: r-tmb: Update to 1.9.10., guix-commits, 2024/01/01
- 40/81: gnu: r-rnaturalearth: Update to 1.0.1., guix-commits, 2024/01/01
- 54/81: gnu: r-rsconnect: Update to 1.2.0., guix-commits, 2024/01/01
- 58/81: gnu: r-mlr3learners: Update to 0.5.8., guix-commits, 2024/01/01
- 63/81: gnu: r-dbi: Update to 1.2.0., guix-commits, 2024/01/01
- 64/81: gnu: r-yaml: Update to 2.3.8., guix-commits, 2024/01/01
- 66/81: gnu: r-segmented: Update to 2.0-1., guix-commits, 2024/01/01