mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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>
This commit is contained in:
parent
fe4e0b0ae7
commit
4679dd6967
2 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue