mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
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'.
This commit is contained in:
parent
9809055707
commit
0e383c76ce
1 changed files with 9 additions and 8 deletions
|
@ -214,14 +214,15 @@ (define %coreutils
|
|||
|
||||
(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
|
||||
|
|
Loading…
Reference in a new issue