aboutsummaryrefslogtreecommitdiff
path: root/guix/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-02-11 23:17:00 +0100
committerLudovic Courtès <ludo@gnu.org>2022-02-11 23:51:39 +0100
commitbc1ad69605b6c3e2744694758d63dfc216107a82 (patch)
tree5eee850233d5f66a9addded1ef6ee3f69e78adc0 /guix/gexp.scm
parentc334b7c52fe77b68a90b23fbac5c9de7337e607b (diff)
downloadguix-bc1ad69605b6c3e2744694758d63dfc216107a82.tar
guix-bc1ad69605b6c3e2744694758d63dfc216107a82.tar.gz
tests: Pass #:guile to 'computed-file' & co.
Fixes a regression introduced in af57d1bf6c46f47d82dbc234dde1e16fa8634e9d whereby tests would end up building the world. * guix/gexp.scm (mixed-text-file): Add #:guile parameter and honor it. * tests/gexp.scm ("mixed-text-file"): Pass #:guile to 'mixed-text-file'. ("file-union"): Pass #:guile to 'file-union'. ("lower-object, computed-file"): Pass #:guile to 'computed-file'. ("lower-object, computed-file + grafts"): Likewise. * tests/packages.scm ("origin->derivation, single file with snippet"): Likewise. * tests/profiles.scm ("profile-derivation, ordering & collisions"): Likewise. * guix/tests.scm (test-file): Likewise.
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r--guix/gexp.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 8675e605a0..dfeadbd15d 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -2068,7 +2068,7 @@ resulting store file holds references to all these."
#:local-build? #t
#:substitutable? #f))
-(define* (mixed-text-file name #:rest text)
+(define* (mixed-text-file name #:key guile #:rest text)
"Return an object representing store file NAME containing TEXT. TEXT is a
sequence of strings and file-like objects, as in:
@@ -2077,12 +2077,13 @@ sequence of strings and file-like objects, as in:
This is the declarative counterpart of 'text-file*'."
(define build
- (gexp (call-with-output-file (ungexp output "out")
- (lambda (port)
- (set-port-encoding! port "UTF-8")
- (display (string-append (ungexp-splicing text)) port)))))
+ (let ((text (if guile (drop text 2) text)))
+ (gexp (call-with-output-file (ungexp output "out")
+ (lambda (port)
+ (set-port-encoding! port "UTF-8")
+ (display (string-append (ungexp-splicing text)) port))))))
- (computed-file name build))
+ (computed-file name build #:guile guile))
(define* (file-union name files #:key guile)
"Return a <computed-file> that builds a directory containing all of FILES.