me
/
guix
Archived
1
0
Fork 0

import: cran: Emit new-style package inputs.

* 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.
master
Ludovic Courtès 2021-06-30 15:42:09 +02:00
parent 52a9a0712a
commit aa6921634b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 6 additions and 12 deletions

View File

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
@ -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=")

View File

@ -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