import: crate: Deduplicate dependencies.

* guix/import/crate.scm (crate-version-dependencies): Deduplicate crate dependencies.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Martin Becze 2020-01-30 10:52:28 -05:00 committed by Ludovic Courtès
parent b488b64a3e
commit cf2b91aad0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -112,7 +112,7 @@ (define (crate-version-dependencies version)
(url (string-append (%crate-base-url) path)))
(match (assoc-ref (or (json-fetch url) '()) "dependencies")
((? vector? vector)
(map json->crate-dependency (vector->list vector)))
(delete-duplicates (map json->crate-dependency (vector->list vector))))
(_
'()))))