summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-24 22:21:24 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-24 22:30:58 +0200
commit9c1edabd8b95d698ba995653d465fcb70cd2409b (patch)
tree585fead8a546f2e6d9c9827434b0fb24807241de /guix/utils.scm
parent17bb886ff42afe7caa7b89878a563243239f9698 (diff)
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'.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 25a392e6a8..2478fb6939 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -57,6 +57,7 @@
gnu-triplet->nix-system
%current-system
+ %current-target-system
version-compare
version>?
package-name->name+version
@@ -310,6 +311,11 @@ returned by `config.guess'."
;; By default, this is equal to (gnu-triplet->nix-system %host-type).
(make-parameter %system))
+(define %current-target-system
+ ;; Either #f or a GNU triplet representing the target system we are
+ ;; cross-building to.
+ (make-parameter #f))
+
(define version-compare
(let ((strverscmp
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))