aboutsummaryrefslogtreecommitdiff
path: root/tests/crate.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-09-01 16:20:36 +0200
committerLudovic Courtès <ludo@gnu.org>2019-09-04 13:02:27 +0200
commit2791870d09afd247a011bc8cb6cf88661729bd98 (patch)
treed069abca3e7c28fcd47bad911fb5d399476833c7 /tests/crate.scm
parenta85a74ce6c9ff36ccd6ef50216ba8515723f3a62 (diff)
downloadguix-2791870d09afd247a011bc8cb6cf88661729bd98.tar
guix-2791870d09afd247a011bc8cb6cf88661729bd98.tar.gz
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
Diffstat (limited to 'tests/crate.scm')
-rw-r--r--tests/crate.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/crate.scm b/tests/crate.scm
index 72c3a13350..8a232ba06c 100644
--- a/tests/crate.scm
+++ b/tests/crate.scm
@@ -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\"
+ }
+ }
+ ]
}
}")