summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-06-11 23:02:39 +0200
committerLudovic Courtès <ludo@gnu.org>2012-06-11 23:02:39 +0200
commit0e383c76ce4fb94b47bd69f493ac3e1858b879f0 (patch)
treeaae9dc5a0a713ac4d438a688d2948e27ecf9ee67 /tests
parent9809055707de8c518e928e09ea76dd10fbc19a6a (diff)
downloadpatches-0e383c76ce4fb94b47bd69f493ac3e1858b879f0.tar
patches-0e383c76ce4fb94b47bd69f493ac3e1858b879f0.tar.gz
Fix the `build-expression->derivation' fixed-output test.
* tests/derivations.scm ("build-expression->derivation"): Fix the builder to actually pass a bytevector to `put-bytevector'.
Diffstat (limited to 'tests')
-rw-r--r--tests/derivations.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm
index b4e4ccea8e..ec48f44420 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -214,14 +214,15 @@
(test-assert "build-expression->derivation for fixed-output derivation"
(let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
- (builder `(begin
- (use-modules (web client) (web uri)
- (rnrs io ports))
- (let ((bv (http-get (string->uri ,url)
- #:decode-body? #f)))
- (call-with-output-file %output
- (lambda (p)
- (put-bytevector p bv))))))
+ (builder
+ `(begin
+ (use-modules (web client) (web uri)
+ (rnrs io ports) (srfi srfi-11))
+ (let-values (((resp bv)
+ (http-get (string->uri ,url) #:decode-body? #f)))
+ (call-with-output-file %output
+ (lambda (p)
+ (put-bytevector p bv))))))
(drv-path (build-expression->derivation
%store "hello-2.8.tar.gz" (%current-system) builder '()
#:hash (nix-base32-string->bytevector