aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-08-17 20:56:47 +0200
committerLudovic Courtès <ludo@gnu.org>2014-08-17 20:58:58 +0200
commit4231f05bbc29e4e3deffc9106a5faf14920979d3 (patch)
tree70e0d25011624721d1c5f853180cfe3c58fbe482 /tests
parent65f88b20857b2358cf228a4b0794d2c42f70f84f (diff)
downloadguix-4231f05bbc29e4e3deffc9106a5faf14920979d3.tar
guix-4231f05bbc29e4e3deffc9106a5faf14920979d3.tar.gz
monads: Add 'package->cross-derivation' and #:target for 'package-file'.
* guix/monads.scm (package-file): Add #:target keyword parameter and honor it. (package->cross-derivation): New procedure. * tests/monads.scm ("package-file + package->cross-derivation"): New test. * doc/guix.texi (The Store Monad): Update 'package-file' documentation. Add 'package->cross-derivation'.
Diffstat (limited to 'tests')
-rw-r--r--tests/monads.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/monads.scm b/tests/monads.scm
index ea3e4006ab..78a014ea6a 100644
--- a/tests/monads.scm
+++ b/tests/monads.scm
@@ -24,6 +24,7 @@
#:select (package-derivation %current-system))
#:use-module (gnu packages)
#:use-module (gnu packages bootstrap)
+ #:use-module ((gnu packages base) #:select (coreutils))
#:use-module (ice-9 match)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
@@ -108,6 +109,16 @@
guile)))
#:guile-for-build (package-derivation %store %bootstrap-guile)))
+(test-assert "package-file + package->cross-derivation"
+ (run-with-store %store
+ (mlet* %store-monad ((file (package-file coreutils "bin/ls"
+ #:target "foo64-gnu"))
+ (xcu (package->cross-derivation coreutils
+ "foo64-gnu")))
+ (let ((output (derivation->output-path xcu)))
+ (return (string=? file (string-append output "/bin/ls")))))
+ #:guile-for-build (package-derivation %store %bootstrap-guile)))
+
(test-assert "interned-file"
(run-with-store %store
(mlet* %store-monad ((file -> (search-path %load-path "guix.scm"))