mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
import: crate: Separate crates.io API from actual conversion.
This provides a clean separation between bindings to the https://crates.io/api/v1 API and actual conversion to Guix package sexps. As a side-effect, it fixes things like "guix import blake2-rfc", "guix refresh -t crates", etc. * guix/import/crate.scm (<crate>, <crate-version>, <crate-dependency>): New record types. (lookup-crate, crate-version-dependencies): New procedures. (crate-fetch): Remove. (crate->guix-package): Rewrite to use the new API. (latest-release): Likewise. * guix/build-system/cargo.scm (%crate-base-url): New variable. * tests/crate.scm (test-crate): Update accordingly. fixlet
This commit is contained in:
+12
-1
@@ -1,6 +1,7 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014 David Thompson <davet@gnu.org>
|
||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -32,10 +33,20 @@
|
||||
\"crate\": {
|
||||
\"max_version\": \"1.0.0\",
|
||||
\"name\": \"foo\",
|
||||
\"license\": \"MIT/Apache-2.0\",
|
||||
\"description\": \"summary\",
|
||||
\"homepage\": \"http://example.com\",
|
||||
\"repository\": \"http://example.com\",
|
||||
\"keywords\": [\"dummy\" \"test\"],
|
||||
\"categories\": [\"test\"]
|
||||
\"actual_versions\": [
|
||||
{ \"id\": \"foo\",
|
||||
\"num\": \"1.0.0\",
|
||||
\"license\": \"MIT/Apache-2.0\",
|
||||
\"links\": {
|
||||
\"dependencies\": \"/api/v1/crates/foo/1.0.0/dependencies\"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user