1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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'.
This commit is contained in:
Ludovic Courtès
2013-05-24 22:21:24 +02:00
parent 17bb886ff4
commit 9c1edabd8b
4 changed files with 98 additions and 5 deletions

View File

@@ -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"