Commit Graph

7 Commits (1c7a78f157062c796f6779da645be6212d6cd592)

Author SHA1 Message Date
Ludovic Courtès dc794a7238
gnu-maintenance: Replace 'find-packages' with 'find-package' (singular).
Fixes <http://bugs.gnu.org/23718>.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* guix/gnu-maintenance.scm (find-packages): Remove.
(find-package): New procedure.
* guix/import/gnu.scm (gnu->guix-package): Use 'find-package' instead of
'find-packages' and adjust accordingly.
2016-06-08 19:07:58 +02:00
Ludovic Courtès 149590380a
import: Gracefully report import failures.
Previously, something like 'guix import gnu which' would spit out a
backtrace if, say, the 'which' tarball could not be authenticated.

* guix/upstream.scm (download-tarball): Mention failure modes in
docstring.
* guix/import/gnu.scm (gnu-package->sexp): Return #f when
'download-tarball' returns #f.
* guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does
not return a (package ...) sexp.
2016-05-17 14:02:48 +02:00
Ludovic Courtès 3195e19de2 import: gnu: Update to the (guix upstream) API.
This is a followup to 0a7c5a0.

* guix/import/gnu.scm (preferred-archive-type): Use
  'upstream-source-archive-types' instead of 'gnu-release-archive-types'.
  (gnu-package->sexp): Use 'upstream-source-urls' et al.  Update call to
  'download-tarball'.
  (gnu->guix-package): Use <upstream-source> instead of <gnu-release>.
* guix/upstream.scm (upstream-source-archive-types): Export.
2015-11-03 00:59:28 +01:00
Eric Bavier 1ff2619bc1 import: Factorize utility functions.
* guix/import/pypi.scm (hash-table->alist, flatten, assoc-ref*,
  url-fetch, json-fetch): Pull procedures from here into...
* guix/import/utils.scm: Here and...
* guix/import/json.scm: Here.  New file.
* Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add it.
* guix/import/gnu.scm (file-sha256): Move from here to...
* guix/hash.scm: Here.
* tests/pypi.scm (pypi->guix-package): Update mock module reference.
2015-01-09 10:33:24 -06:00
Eric Bavier c6cb82f5d5 import: gnu: Propagate the key-download argument.
* guix/import/gnu.scm (gnu->guix-package): Pass the key-download
  argument on to gnu-package->sexp.
2015-01-09 10:33:24 -06:00
Ludovic Courtès 2cdda52b1a import: gnu: Write the hash in nix-base32 format.
* guix/import/gnu.scm (gnu-package->sexp): Use
  'bytevector->nix-base32-string', not 'bytevector->base32-string'.
2014-11-25 18:01:59 +01:00
Ludovic Courtès 7047133f07 import: Add GNU importer.
Suggested by Karl Berry <karl@gnu.org>
and Andreas Enge <andreas@enge.fr>.

* guix/import/gnu.scm, guix/scripts/import/gnu.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/scripts/import.scm (importers): Add "gnu".
* guix/gnu-maintenance.scm (gnu-release-archive-types): New procedure.
  (download-tarball): Export.
2014-11-11 15:31:35 +01:00