summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorJames Richardson <james@jamestechnotes.com>2017-06-03 14:37:54 -0400
committerLudovic Courtès <ludo@gnu.org>2017-06-07 15:06:34 +0200
commit4679dd6967c21e21c740cd88e17191b8e2aac5ee (patch)
tree87d1793761be814be908384f1024da69acc56b25 /guix/import
parentfe4e0b0ae7ecd87272cc0f5b5e9c0802e7aeb39f (diff)
downloadgnu-guix-4679dd6967c21e21c740cd88e17191b8e2aac5ee.tar
gnu-guix-4679dd6967c21e21c740cd88e17191b8e2aac5ee.tar.gz
import: cpan: Update CPAN importer to use MetaCPAN v1 API.
* guix/import/cpan.scm (module->dist-name, cpan-fetch): Use metacpan.org URLs. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/cpan.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 32c5c310e1..a41f918049 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -88,7 +88,7 @@
"Return the base distribution module for a given module. E.g. the 'ok'
module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would
return \"Test-Simple\""
- (assoc-ref (json-fetch (string-append "https://api.metacpan.org/module/"
+ (assoc-ref (json-fetch (string-append "https://fastapi.metacpan.org/v1/module/"
module
"?fields=distribution"))
"distribution"))
@@ -113,7 +113,7 @@ return \"Test-Simple\""
"Return an alist representation of the CPAN metadata for the perl module MODULE,
or #f on failure. MODULE should be e.g. \"Test::Script\""
;; This API always returns the latest release of the module.
- (json-fetch (string-append "https://api.metacpan.org/release/" name)))
+ (json-fetch (string-append "https://fastapi.metacpan.org/v1/release/" name)))
(define (cpan-home name)
(string-append "http://search.cpan.org/dist/" name))