diff options
author | Ludovic Courtès <[email protected]> | 2012-12-04 23:51:31 +0100 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2012-12-04 23:51:31 +0100 |
commit | 5f25049e9c2002eb808d2f15306d0ac102f05415 (patch) | |
tree | a587cff1c805c20f45fd7e7f235d60c6d1ab7ac7 /tests/packages.scm | |
parent | b49ffe2d678b5df4192fb9be4ad50bed9d6d5b7f (diff) | |
parent | c7bdb1b9d1c0071e9a61a7bbdb8051a9b1620822 (diff) |
Merge branch 'master' into nix-integration
Diffstat (limited to 'tests/packages.scm')
-rw-r--r-- | tests/packages.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index cb69e4be4e..c89f6e7721 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -29,6 +29,7 @@ #:use-module (distro packages bootstrap) #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) + #:use-module (rnrs io ports) #:use-module (ice-9 match)) ;; Test the high-level packaging layer. @@ -89,6 +90,22 @@ (equal? '(hello guix) (call-with-input-file (string-append p "/test") read)))))) +(test-assert "trivial with local file as input" + (let* ((i (search-path %load-path "ice-9/boot-9.scm")) + (p (package (inherit (dummy-package "trivial-with-input-file")) + (build-system trivial-build-system) + (source #f) + (arguments + `(#:guile ,%bootstrap-guile + #:builder (copy-file (assoc-ref %build-inputs "input") + %output))) + (inputs `(("input" ,i))))) + (d (package-derivation %store p))) + (and (build-derivations %store (list d)) + (let ((p (pk 'drv d (derivation-path->output-path d)))) + (equal? (call-with-input-file p get-bytevector-all) + (call-with-input-file i get-bytevector-all)))))) + (test-assert "trivial with system-dependent input" (let* ((p (package (inherit (dummy-package "trivial-system-dependent-input")) (build-system trivial-build-system) |