aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 1319bf8634..ff23a7bf41 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -95,6 +95,25 @@
(equal? '(hello guix)
(call-with-input-file (string-append p "/test") read))))))
+(test-assert "trivial with system-dependent input"
+ (let* ((p (package (inherit (dummy-package "trivial-system-dependent-input"))
+ (build-system trivial-build-system)
+ (source #f)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:builder
+ (let ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash")))
+ (zero? (system* bash "-c"
+ (format #f "echo hello > ~a" out))))))
+ (inputs `(("bash" ,(lambda (system)
+ (search-bootstrap-binary "bash"
+ system)))))))
+ (d (package-derivation %store p)))
+ (and (build-derivations %store (list d))
+ (let ((p (pk 'drv d (derivation-path->output-path d))))
+ (eq? 'hello (call-with-input-file p read))))))
+
(test-assert "GNU Hello"
(let ((hello (package-with-explicit-inputs hello %bootstrap-inputs
#:guile %bootstrap-guile)))