Subject: [PATCH v2 14/16] import: cran: Emit new-style package inputs.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 30 Jun 2021 22:48:30 +0200

* guix/import/cran.scm (format-inputs): Emit symbols or
'specification->package' calls.
(maybe-inputs): Wrap in 'list' instead of 'quasiquote'.
* tests/cran.scm ("description->package"): Adjust accordingly.
---
 guix/import/cran.scm |  8 ++++----
 tests/cran.scm       | 10 ++--------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index f649928c5a..510882bc00 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <[email-masked]>
-;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2020 Martin Becze <[email-masked]>
 ;;;
@@ -135,9 +135,9 @@
   (map (lambda (name)
          (case (%input-style)
            ((specification)
-            (list name (list 'unquote (list 'specification->package name))))
+            `(specification->package ,name))
            (else
-            (list name (list 'unquote (string->symbol name))))))
+            (string->symbol name))))
        (sort names string-ci<?)))
 
 (define* (maybe-inputs package-inputs #:optional (type 'inputs))
@@ -147,7 +147,7 @@ package definition."
     (()
      '())
     ((package-inputs ...)
-     `((,type (,'quasiquote ,(format-inputs package-inputs)))))))
+     `((,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=")
diff --git a/tests/cran.scm b/tests/cran.scm
index 70d2277198..e59b7daef7 100644
--- a/tests/cran.scm
+++ b/tests/cran.scm
@@ -117,15 +117,9 @@ Date/Publication: 2015-07-14 14:15:16
                       (? string? hash)))))
          ('properties ('quasiquote (('upstream-name . "My-Example"))))
          ('build-system 'r-build-system)
-         ('inputs
-          ('quasiquote
-           (("cairo" ('unquote 'cairo)))))
+         ('inputs ('list 'cairo))
          ('propagated-inputs
-          ('quasiquote
-           (("r-bh" ('unquote 'r-bh))
-            ("r-proto" ('unquote 'r-proto))
-            ("r-rcpp" ('unquote 'r-rcpp))
-            ("r-scales" ('unquote 'r-scales)))))
+          ('list 'r-bh 'r-proto 'r-rcpp 'r-scales))
          ('home-page "http://gnu.org/s/my-example")
          ('synopsis "Example package")
          ('description
-- 
2.32.0