Commit Graph

13 Commits

Author SHA1 Message Date
Eric Bavier ff55fe5599
import: cpan: Add updater.
* guix/import/cpan.scm (module->dist-name): Fetch the field of interest.
(cpan-fetch): Accept release name rather than module name.
(fix-source-url): Rename to ...
(cpan-source-url): ... this.  Take metadata as parameter.
(package->upstream-name, cpan-version, cpan-package?, latest-release):
New procedures.
(cpan-module->sexp): Use cpan-version and cpan-source-url.
(%cpan-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %CPAN-UPDATER.
2016-12-12 22:22:33 -06:00
Eric Bavier d391ad57d6
import: cpan: Move core-module? to top-level.
* guix/import/cpan.scm (cpan-module->sexp): Move local core-module?
procedure to ...
(core-module?): ... here.
2016-12-12 22:22:33 -06:00
Alex Sassmannshausen c91b368e96
import/cpan: Maybe coerce version to string.
* guix/import/cpan.scm (cpan-module->sexp) <version>: Test if version in
  meta is string or number.  If it is number, coerce to string.
2016-11-14 00:06:09 +01:00
ng0 7a62263ee5
import: cpan: Use tls to query api.metacpan.org.
* guix/import/cpan.scm (module->dist-name, cpan-fetch-module): Use tls
for api.metacpan.org.

Signed-off-by: Eric Bavier <bavier@member.fsf.org>
2016-08-30 13:21:07 -05:00
Alex Sassmannshausen 5b8e564ccd
import: cpan: Use our mirrors for 'https' URLs.
* guix/import/cpan.scm (fix-source-url): New procedure.
  (cpan-module->sexp): Use it to construct our source-url.
* tests/cpan.scm: Add tests for fix-source-url.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-07-03 23:58:29 +02:00
Eric Bavier b77d17d023 import: cpan: check version bounds on core modules.
Modules may be removed from Perl's core, so we must check for a removal
version.

* guix/import/cpan.scm (cpan-module->sexp)[core-module?]: Also check
version upper bound.
2016-04-25 18:31:45 -05:00
Eric Bavier 47945cf353 import: cpan: Fix license string for Artistic license.
* guix/import/cpan.scm (string->license): Remove extraneous "_0"
  suffix for Artistics licenses.
2015-04-19 19:48:52 -05:00
Mark H Weaver 431b28d9dc import: cpan: Change %corelist into a promise.
Fixes compilation failures in 'guix pull'.

* guix/import/cpan.scm (%corelist): Change it to a promise by wrapping it with
  'delay'.
  (cpan-module->sexp): Adapt uses of %corelist by wrapping with 'force'.
2015-02-20 16:28:05 -05:00
Eric Bavier e92a4ad928 import: cpan: Use cpan mirror url.
* guix/import/cpan.scm (cpan-module->sexp)[source-url]: Substitute cpan mirror
  url.
2015-02-18 23:53:46 -06:00
Eric Bavier a0c2c4b45b import: cpan: Sort inputs.
* guix/import/cpan.scm (cpan-module->sexp)[convert-inputs]: Sort returned list
  of inputs.
2015-02-18 23:53:46 -06:00
Eric Bavier 2491d58962 import: cpan: Adjust licenses.
* guix/import/cpan.scm (string->license): Add artistic2.0.  Use
  '(package-license perl) for "perl_5" as is our convention.
2015-02-18 23:53:46 -06:00
Eric Bavier 66392e475d import: cpan: Use corelist to filter dependencies.
* guix/import/cpan.scm (%corelist): New variable.
  (module->dist-name, core-module?): New procedures.
  (cpan-module->sexp)[convert-inputs]: Use them.  Include "test" dependencies
  in converted inputs.
* doc/guix.texi (Invoking guix import)[cpan]: Mention corelist filtering.
2015-02-18 23:53:46 -06:00
Eric Bavier d45dc6da5c import: Add CPAN importer.
* guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm:
  New files.
* Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them.
* guix/scripts/import.scm (importers): Add cpan.
* doc/guix.texi (Requirements): Mention `guix import cpan` as a user
  of guile-json.
  (Invoking guix import): Document new `guix import cpan` command.
2015-01-09 10:38:26 -06:00