diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-10-03 18:06:16 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-10-05 21:58:42 +0200 |
| commit | 0d5a559f0f81e14c695e5aab178b30edf66088f3 (patch) | |
| tree | fe43647edc18b8a85885436f9a40a6ff4281e19f /tests | |
| parent | 2348fd0f51b6eeabde2e384ef495b3a0adbd6bfb (diff) | |
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/builders.scm | 9 | ||||
| -rw-r--r-- | tests/packages.scm | 15 |
2 files changed, 14 insertions, 10 deletions
diff --git a/tests/builders.scm b/tests/builders.scm index a2f500a94d9..579246d04d5 100644 --- a/tests/builders.scm +++ b/tests/builders.scm | |||
| @@ -92,8 +92,7 @@ | |||
| 92 | (valid-path? %store out)))) | 92 | (valid-path? %store out)))) |
| 93 | 93 | ||
| 94 | (test-assert "gnu-build-system" | 94 | (test-assert "gnu-build-system" |
| 95 | (and (build-system? gnu-build-system) | 95 | (build-system? gnu-build-system)) |
| 96 | (eq? gnu-build (build-system-builder gnu-build-system)))) | ||
| 97 | 96 | ||
| 98 | (unless network-reachable? (test-skip 1)) | 97 | (unless network-reachable? (test-skip 1)) |
| 99 | (test-assert "gnu-build" | 98 | (test-assert "gnu-build" |
| @@ -102,9 +101,9 @@ | |||
| 102 | "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")) | 101 | "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")) |
| 103 | (tarball (url-fetch %store url 'sha256 hash | 102 | (tarball (url-fetch %store url 'sha256 hash |
| 104 | #:guile %bootstrap-guile)) | 103 | #:guile %bootstrap-guile)) |
| 105 | (build (gnu-build %store "hello-2.8" tarball | 104 | (build (gnu-build %store "hello-2.8" |
| 106 | %bootstrap-inputs | 105 | `(("source" ,tarball) |
| 107 | #:implicit-inputs? #f | 106 | ,@%bootstrap-inputs) |
| 108 | #:guile %bootstrap-guile | 107 | #:guile %bootstrap-guile |
| 109 | #:search-paths %bootstrap-search-paths)) | 108 | #:search-paths %bootstrap-search-paths)) |
| 110 | (out (derivation->output-path build))) | 109 | (out (derivation->output-path build))) |
diff --git a/tests/packages.scm b/tests/packages.scm index 16e65619bce..6deb21c3312 100644 --- a/tests/packages.scm +++ b/tests/packages.scm | |||
| @@ -279,11 +279,16 @@ | |||
| 279 | (test-assert "search paths" | 279 | (test-assert "search paths" |
| 280 | (let* ((p (make-prompt-tag "return-search-paths")) | 280 | (let* ((p (make-prompt-tag "return-search-paths")) |
| 281 | (s (build-system | 281 | (s (build-system |
| 282 | (name "raw") | 282 | (name 'raw) |
| 283 | (description "Raw build system with direct store access") | 283 | (description "Raw build system with direct store access") |
| 284 | (build (lambda* (store name source inputs | 284 | (lower (lambda* (name #:key source inputs #:allow-other-keys) |
| 285 | #:key outputs system search-paths) | 285 | (bag |
| 286 | search-paths)))) | 286 | (name name) |
| 287 | (build-inputs inputs) | ||
| 288 | (build | ||
| 289 | (lambda* (store name inputs | ||
| 290 | #:key outputs system search-paths) | ||
| 291 | search-paths))))))) | ||
| 287 | (x (list (search-path-specification | 292 | (x (list (search-path-specification |
| 288 | (variable "GUILE_LOAD_PATH") | 293 | (variable "GUILE_LOAD_PATH") |
| 289 | (directories '("share/guile/site/2.0"))) | 294 | (directories '("share/guile/site/2.0"))) |
| @@ -326,7 +331,7 @@ | |||
| 326 | 331 | ||
| 327 | (test-assert "package-cross-derivation, no cross builder" | 332 | (test-assert "package-cross-derivation, no cross builder" |
| 328 | (let* ((b (build-system (inherit trivial-build-system) | 333 | (let* ((b (build-system (inherit trivial-build-system) |
| 329 | (cross-build #f))) | 334 | (lower (const #f)))) |
| 330 | (p (package (inherit (dummy-package "p")) | 335 | (p (package (inherit (dummy-package "p")) |
| 331 | (build-system b)))) | 336 | (build-system b)))) |
| 332 | (guard (c ((package-cross-build-system-error? c) | 337 | (guard (c ((package-cross-build-system-error? c) |
