aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2016-03-22 22:38:54 -0500
committerEric Bavier <bavier@member.fsf.org>2016-03-30 23:19:24 -0500
commit2ae9c63f159c883f894d20cdcb222e96c3fa1802 (patch)
treea607736e7c2653aae79ff28f509b7a7bafc85af5
parentf9ea74ad043cb1982467ae21dd967ba98b9ecd04 (diff)
downloadpatches-2ae9c63f159c883f894d20cdcb222e96c3fa1802.tar
patches-2ae9c63f159c883f894d20cdcb222e96c3fa1802.tar.gz
import: hackage: Silence download output.
* guix/import/hackage.scm (hackage-fetch): Use http-fetch to avoid progress output from url-fetch.
-rw-r--r--guix/import/hackage.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index e79576207b..4f14df4d61 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -26,6 +26,7 @@
#:use-module ((guix utils) #:select (package-name->name+version
canonical-newline-port))
#:use-module (guix import utils)
+ #:use-module (guix http-client)
#:use-module (guix import cabal)
#:use-module (guix store)
#:use-module (guix hash)
@@ -92,13 +93,12 @@ version is returned."
"Return the Cabal file for the package NAME-VERSION, or #f on failure. If
the version part is omitted from the package name, then return the latest
version."
- (let*-values (((name version) (package-name->name+version name-version))
- ((url) (hackage-cabal-url name version)))
- (call-with-temporary-output-file
- (lambda (temp port)
- (and (url-fetch url temp)
- (call-with-input-file temp
- (compose read-cabal canonical-newline-port)))))))
+ (let-values (((name version) (package-name->name+version name-version)))
+ (let* ((url (hackage-cabal-url name version))
+ (port (http-fetch url))
+ (result (read-cabal (canonical-newline-port port))))
+ (close-port port)
+ result)))
(define string->license
;; List of valid values from