import: crate: Emit new-style package inputs.
* guix/import/crate.scm (maybe-cargo-development-inputs) (maybe-cargo-inputs): Wrap PACKAGE-INPUTS in unquoted 'list'. * tests/crate.scm ("crate->guix-package") ("cargo-recursive-import") ("cargo-recursive-import-honors-existing-packages"): Adjust accordingly. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I4dfb745272ecbc893926446872514fb815c07236
This commit is contained in:
parent
969fb0b2be
commit
b8af6694b9
@ -3,6 +3,7 @@
|
|||||||
;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
|
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
|
||||||
;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
|
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
||||||
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
|
;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
|
||||||
@ -146,14 +147,14 @@ record or #f if it was not found."
|
|||||||
(()
|
(()
|
||||||
'())
|
'())
|
||||||
((package-inputs ...)
|
((package-inputs ...)
|
||||||
`(#:cargo-inputs ,package-inputs))))
|
`(#:cargo-inputs (,'unquote (list ,@package-inputs))))))
|
||||||
|
|
||||||
(define (maybe-cargo-development-inputs package-names)
|
(define (maybe-cargo-development-inputs package-names)
|
||||||
(match (package-names->package-inputs package-names)
|
(match (package-names->package-inputs package-names)
|
||||||
(()
|
(()
|
||||||
'())
|
'())
|
||||||
((package-inputs ...)
|
((package-inputs ...)
|
||||||
`(#:cargo-development-inputs ,package-inputs))))
|
`(#:cargo-development-inputs (,'unquote (list ,@package-inputs))))))
|
||||||
|
|
||||||
(define (maybe-arguments arguments)
|
(define (maybe-arguments arguments)
|
||||||
(match arguments
|
(match arguments
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
||||||
|
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
||||||
;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
|
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
@ -500,7 +501,7 @@
|
|||||||
('quasiquote
|
('quasiquote
|
||||||
(#:skip-build? #t
|
(#:skip-build? #t
|
||||||
#:cargo-inputs
|
#:cargo-inputs
|
||||||
(("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7))))))
|
('unquote (list rust-leaf-alice-0.7)))))
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -606,7 +607,7 @@
|
|||||||
(string-append name "-" version ".tar.gz"))
|
(string-append name "-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
(? string? hash)))))
|
(? string? hash)))))
|
||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments ('quasiquote (#:skip-build? #t)))
|
(arguments ('quasiquote (#:skip-build? #t)))
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
@ -649,8 +650,7 @@
|
|||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:skip-build? #t
|
('quasiquote (#:skip-build? #t
|
||||||
#:cargo-inputs
|
#:cargo-inputs
|
||||||
(("rust-leaf-bob"
|
('unquote (list rust-leaf-bob-3)))))
|
||||||
('unquote rust-leaf-bob-3))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -672,12 +672,9 @@
|
|||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:skip-build? #t
|
('quasiquote (#:skip-build? #t
|
||||||
#:cargo-inputs
|
#:cargo-inputs
|
||||||
(("rust-intermediate-b"
|
('unquote (list rust-intermediate-b-1
|
||||||
('unquote rust-intermediate-b-1))
|
rust-leaf-alice-0.7
|
||||||
("rust-leaf-alice"
|
rust-leaf-bob-3)))))
|
||||||
('unquote 'rust-leaf-alice-0.7))
|
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote rust-leaf-bob-3))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -698,17 +695,12 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-inputs
|
('quasiquote (#:cargo-inputs
|
||||||
(("rust-intermediate-a"
|
('unquote (list rust-intermediate-a-1
|
||||||
('unquote rust-intermediate-a-1))
|
rust-intermediate-b-1
|
||||||
("rust-intermediate-b"
|
rust-leaf-alice-0.7
|
||||||
('unquote rust-intermediate-b-1))
|
rust-leaf-bob-3))
|
||||||
("rust-leaf-alice"
|
|
||||||
('unquote 'rust-leaf-alice-0.7))
|
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote rust-leaf-bob-3)))
|
|
||||||
#:cargo-development-inputs
|
#:cargo-development-inputs
|
||||||
(("rust-intermediate-c"
|
('unquote (list rust-intermediate-c-1)))))
|
||||||
('unquote rust-intermediate-c-1))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -736,8 +728,7 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-development-inputs
|
('quasiquote (#:cargo-development-inputs
|
||||||
(("rust-leaf-alice"
|
('unquote (list rust-leaf-alice-0.7)))))
|
||||||
('unquote rust-leaf-alice-0.7))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -816,12 +807,9 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-inputs
|
('quasiquote (#:cargo-inputs
|
||||||
(("rust-intermediate-b"
|
('unquote (list rust-intermediate-b-1
|
||||||
('unquote rust-intermediate-b-1))
|
rust-leaf-alice-0.7
|
||||||
("rust-leaf-alice"
|
rust-leaf-bob-3)))))
|
||||||
('unquote 'rust-leaf-alice-0.7))
|
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote rust-leaf-bob-3))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -842,17 +830,12 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-inputs
|
('quasiquote (#:cargo-inputs
|
||||||
(("rust-intermediate-a"
|
('unquote (list rust-intermediate-a-1
|
||||||
('unquote rust-intermediate-a-1))
|
rust-intermediate-b-1
|
||||||
("rust-intermediate-b"
|
rust-leaf-alice-0.7
|
||||||
('unquote rust-intermediate-b-1))
|
rust-leaf-bob-3))
|
||||||
("rust-leaf-alice"
|
|
||||||
('unquote 'rust-leaf-alice-0.7))
|
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote rust-leaf-bob-3)))
|
|
||||||
#:cargo-development-inputs
|
#:cargo-development-inputs
|
||||||
(("rust-intermediate-c"
|
('unquote (list rust-intermediate-c-1)))))
|
||||||
('unquote rust-intermediate-c-1))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -963,13 +946,10 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-inputs
|
('quasiquote (#:cargo-inputs
|
||||||
(("rust-leaf-bob"
|
('unquote (list rust-leaf-bob-3))
|
||||||
('unquote 'rust-leaf-bob-3)))
|
|
||||||
#:cargo-development-inputs
|
#:cargo-development-inputs
|
||||||
(("rust-leaf-bob"
|
('unquote (list rust-leaf-bob-3.0.2-yanked
|
||||||
('unquote 'rust-leaf-bob-3.0.2-yanked))
|
rust-leaf-bob-4.0.0-yanked)))))
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote 'rust-leaf-bob-4.0.0-yanked))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
@ -1094,13 +1074,10 @@
|
|||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
('quasiquote (#:cargo-inputs
|
('quasiquote (#:cargo-inputs
|
||||||
(("rust-leaf-bob"
|
('unquote (list rust-leaf-bob-3))
|
||||||
('unquote 'rust-leaf-bob-3)))
|
|
||||||
#:cargo-development-inputs
|
#:cargo-development-inputs
|
||||||
(("rust-leaf-bob"
|
('unquote (list rust-leaf-bob-3.0.2-yanked
|
||||||
('unquote 'rust-leaf-bob-3.0.2-yanked))
|
rust-leaf-bob-4.0.0-yanked)))))
|
||||||
("rust-leaf-bob"
|
|
||||||
('unquote 'rust-leaf-bob-4.0.0-yanked))))))
|
|
||||||
(home-page "http://example.com")
|
(home-page "http://example.com")
|
||||||
(synopsis "summary")
|
(synopsis "summary")
|
||||||
(description "This package provides summary.")
|
(description "This package provides summary.")
|
||||||
|
Loading…
Reference in New Issue
Block a user