From 9c1edabd8b95d698ba995653d465fcb70cd2409b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 24 May 2013 22:21:24 +0200 Subject: packages: Implement `package-cross-derivation'. * guix/packages.scm (package-transitive-target-inputs, package-transitive-native-inputs): New procedures. (package-derivation): Parametrize `%current-target-system'. (package-cross-derivation): Implement. * guix/utils.scm (%current-target-system): New variable. * tests/packages.scm ("package-cross-derivation"): New test. * doc/guix.texi (Defining Packages): Document `package-cross-derivation'. --- tests/packages.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/packages.scm b/tests/packages.scm index 1dd7b91ae8..b439183eba 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -94,7 +94,7 @@ ("d" ,d) ("d/x" "something.drv")) (pk 'x (package-transitive-inputs e)))))) -(test-skip (if (not %store) 4 0)) +(test-skip (if (not %store) 5 0)) (test-assert "return values" (let-values (((drv-path drv) @@ -196,6 +196,13 @@ (equal? x (collect (package-derivation %store b))) (equal? x (collect (package-derivation %store c))))))) +(test-assert "package-cross-derivation" + (let-values (((drv-path drv) + (package-cross-derivation %store (dummy-package "p") + "mips64el-linux-gnu"))) + (and (derivation-path? drv-path) + (derivation? drv)))) + (unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)) (test-skip 1)) (test-assert "GNU Make, bootstrap" -- cgit 1.4.1