From 513994aead5a5da6cdec51931bc8b624c66678e1 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 28 Dec 2023 10:15:45 +0100 Subject: 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(-) (limited to 'guix') 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-cilicenses 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=") -- cgit v1.2.3