diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-10-05 16:32:25 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-10-05 21:58:42 +0200 |
commit | d3d337d2d8f7152cb9ff3724f1cf240ce5ea5be2 (patch) | |
tree | 4b1c5c20515e88fdecf1626673d1f9864942ab1f /guix/build-system | |
parent | b4469d8c12905f07a6825654bc3313beb0563cad (diff) | |
download | gnu-guix-d3d337d2d8f7152cb9ff3724f1cf240ce5ea5be2.tar gnu-guix-d3d337d2d8f7152cb9ff3724f1cf240ce5ea5be2.tar.gz |
build-system: Bags record their system and target.
* guix/build-system.scm (<bag>)[system, target]: New fields.
(make-bag): Add #:system parameter and pass it to LOWER.
* gnu/packages/bootstrap.scm (make-raw-bag): Initialize 'system' field.
* guix/build-system/cmake.scm (lower): Likewise.
* guix/build-system/perl.scm (lower): Likewise.
* guix/build-system/python.scm (lower): Likewise.
* guix/build-system/ruby.scm (lower): Likewise.
* guix/build-system/trivial.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Initialize 'system' and 'target'
fields.
* guix/packages.scm (bag->derivation, bag->cross-derivation): New
procedures.
(package-derivation, package-cross-derivation): Use 'bag->derivation'.
* tests/packages.scm ("search paths"): Initialize 'system' and 'target'
fields.
("package->bag", "package->bag, cross-compilation", "bag->derivation",
"bag->derivation, cross-compilation"): New tests.
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/cmake.scm | 3 | ||||
-rw-r--r-- | guix/build-system/gnu.scm | 3 | ||||
-rw-r--r-- | guix/build-system/perl.scm | 4 | ||||
-rw-r--r-- | guix/build-system/python.scm | 3 | ||||
-rw-r--r-- | guix/build-system/ruby.scm | 3 | ||||
-rw-r--r-- | guix/build-system/trivial.scm | 3 |
6 files changed, 13 insertions, 6 deletions
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 0e750c0e11..85acc2d0b3 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -43,7 +43,7 @@ (module-ref module 'cmake))) (define* (lower name - #:key source inputs native-inputs outputs target + #:key source inputs native-inputs outputs system target (cmake (default-cmake)) #:allow-other-keys #:rest arguments) @@ -54,6 +54,7 @@ (and (not target) ;XXX: no cross-compilation (bag (name name) + (system system) (host-inputs `(,@(if source `(("source" ,source)) '()) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index c58dac10bb..d2c29d44b5 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -210,7 +210,7 @@ standard packages used as implicit inputs of the GNU build system." (define* (lower name #:key source inputs native-inputs outputs target (implicit-inputs? #t) (implicit-cross-inputs? #t) - (strip-binaries? #t) + (strip-binaries? #t) system #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -221,6 +221,7 @@ standard packages used as implicit inputs of the GNU build system." (bag (name name) + (system system) (target target) (build-inputs `(,@(if source `(("source" ,source)) '()) diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index 6cf8cbe13a..1a968f4150 100644 --- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -43,7 +43,8 @@ (module-ref module 'perl))) (define* (lower name - #:key source inputs native-inputs outputs target + #:key source inputs native-inputs outputs + system target (perl (default-perl)) #:allow-other-keys #:rest arguments) @@ -54,6 +55,7 @@ (and (not target) ;XXX: no cross-compilation (bag (name name) + (system system) (host-inputs `(,@(if source `(("source" ,source)) '()) diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index e28573bb05..3cd537c752 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -93,7 +93,7 @@ prepended to the name." (cut package-with-explicit-python <> (default-python2) "python-" "python2-")) (define* (lower name - #:key source inputs native-inputs outputs target + #:key source inputs native-inputs outputs system target (python (default-python)) #:allow-other-keys #:rest arguments) @@ -104,6 +104,7 @@ prepended to the name." (and (not target) ;XXX: no cross-compilation (bag (name name) + (system system) (host-inputs `(,@(if source `(("source" ,source)) '()) diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index 8312629fd8..e4e115f657 100644 --- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -35,7 +35,7 @@ (module-ref ruby 'ruby))) (define* (lower name - #:key source inputs native-inputs outputs target + #:key source inputs native-inputs outputs system target (ruby (default-ruby)) #:allow-other-keys #:rest arguments) @@ -46,6 +46,7 @@ (and (not target) ;XXX: no cross-compilation (bag (name name) + (system system) (host-inputs `(,@(if source `(("source" ,source)) '()) diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm index 1b07f14e63..839042aa2a 100644 --- a/guix/build-system/trivial.scm +++ b/guix/build-system/trivial.scm @@ -35,11 +35,12 @@ (package-derivation store guile system))))) (define* (lower name - #:key source inputs native-inputs outputs target + #:key source inputs native-inputs outputs system target guile builder modules) "Return a bag for NAME." (bag (name name) + (system system) (host-inputs `(,@(if source `(("source" ,source)) '()) |