aboutsummaryrefslogtreecommitdiff
path: root/guix/import/gnu.scm
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2015-01-08 14:38:54 -0600
committerEric Bavier <bavier@member.fsf.org>2015-01-09 10:33:24 -0600
commit1ff2619bc114aface6b7b9d818f7208f9af677df (patch)
tree499f0d9f102b05bbb26e14a7a8e7b431231be509 /guix/import/gnu.scm
parentc6cb82f5d5739fcc84281e5dc91076c37f1db89c (diff)
downloadgnu-guix-1ff2619bc114aface6b7b9d818f7208f9af677df.tar
gnu-guix-1ff2619bc114aface6b7b9d818f7208f9af677df.tar.gz
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.
Diffstat (limited to 'guix/import/gnu.scm')
-rw-r--r--guix/import/gnu.scm5
1 files changed, 1 insertions, 4 deletions
diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm
index b5f67bd2d4..7160fcf7ba 100644
--- a/guix/import/gnu.scm
+++ b/guix/import/gnu.scm
@@ -18,6 +18,7 @@
(define-module (guix import gnu)
#:use-module (guix gnu-maintenance)
+ #:use-module (guix import utils)
#:use-module (guix utils)
#:use-module (guix store)
#:use-module (guix hash)
@@ -38,10 +39,6 @@
;;;
;;; Code:
-(define (file-sha256 file)
- "Return the SHA256 hash of FILE as a bytevector."
- (call-with-input-file file port-sha256))
-
(define (qualified-url url)
"Return a fully-qualified URL based on URL."
(if (string-prefix? "/" url)