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

Change `build-expression->derivation' to support sub-derivation inputs.

* guix/derivations.scm (build-expression->derivation): Change to expect
  INPUTS to have the form (NAME DRV-PATH SUB-DRV) or (NAME DRV-PATH),
  instead of (NAME . DRV-PATH).  Update callers accordingly.

* guix/gnu-build-system.scm, tests/builders.scm, tests/derivations.scm:
  Update accordingly.
This commit is contained in:
Ludovic Courtès
2012-06-13 17:21:27 +02:00
parent c36db98c8e
commit 2acb2cb6d0
4 changed files with 25 additions and 20 deletions

View File

@@ -47,7 +47,7 @@
"0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))
(tarball (http-fetch %store url 'sha256 hash))
(build (gnu-build %store "hello-2.8" tarball
`(("gawk" . ,(nixpkgs-derivation "gawk"))))))
`(("gawk" ,(nixpkgs-derivation "gawk"))))))
(and (build-derivations %store (list (pk 'hello-drv build)))
(file-exists? (string-append (derivation-path->output-path build)
"/bin/hello")))))

View File

@@ -211,7 +211,7 @@
"uname" "-a")))))
(drv-path (build-expression->derivation %store "uname" (%current-system)
builder
`(("cu" . ,%coreutils))))
`(("cu" ,%coreutils))))
(succeeded? (build-derivations %store (list drv-path))))
(and succeeded?
(let ((p (derivation-path->output-path drv-path)))