diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-08-27 18:34:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-08-28 00:55:40 +0200 |
commit | 858e92823f3689d4d96464c254781de0803acb90 (patch) | |
tree | 768b67c9cb5e11b9b0b84e97a6c7133d3565d619 | |
parent | af807dea7f6382bbfa0db31f856529b23c29a43e (diff) | |
download | patches-858e92823f3689d4d96464c254781de0803acb90.tar patches-858e92823f3689d4d96464c254781de0803acb90.tar.gz |
derivations: Rename #:dependency-graphs to #:references-graphs.
* guix/derivations.scm (derivation, build-expression->derivation):
Rename #:dependency-graphs to #:references-graphs, for consistency in
the terminology.
* tests/derivations.scm: Adjust accordingly.
-rw-r--r-- | doc/guix.texi | 8 | ||||
-rw-r--r-- | guix/derivations.scm | 12 | ||||
-rw-r--r-- | tests/derivations.scm | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 8c7af49922..cda645f195 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1113,7 +1113,7 @@ derivations as Scheme objects, along with procedures to create and otherwise manipulate derivations. The lowest-level primitive to create a derivation is the @code{derivation} procedure: -@deffn {Scheme Procedure} derivation @var{store} @var{name} @var{builder} @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] [#:hash-mode #f] [#:inputs '()] [#:env-vars '()] [#:system (%current-system)] [#:dependency-graphs #f] +@deffn {Scheme Procedure} derivation @var{store} @var{name} @var{builder} @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] [#:hash-mode #f] [#:inputs '()] [#:env-vars '()] [#:system (%current-system)] [#:references-graphs #f] Build a derivation with the given arguments. Return the resulting store path and @code{<derivation>} object. @@ -1121,7 +1121,7 @@ When @var{hash}, @var{hash-algo}, and @var{hash-mode} are given, a @dfn{fixed-output derivation} is created---i.e., one whose result is known in advance, such as a file download. -When @var{dependency-graphs} is true, it must be a list of file +When @var{references-graphs} is true, it must be a list of file name/store path pairs. In that case, the reference graph of each store path is exported in the build environment in the corresponding file, in a simple text format. @@ -1153,7 +1153,7 @@ As can be guessed, this primitive is cumbersome to use directly. An improved variant is @code{build-expression->derivation}, which allows the caller to directly pass a Guile expression as the build script: -@deffn {Scheme Procedure} build-expression->derivation @var{store} @var{name} @var{system} @var{exp} @var{inputs} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] [#:env-vars '()] [#:modules '()] [#:dependency-graphs #f] [#:guile-for-build #f] +@deffn {Scheme Procedure} build-expression->derivation @var{store} @var{name} @var{system} @var{exp} @var{inputs} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] [#:env-vars '()] [#:modules '()] [#:references-graphs #f] [#:guile-for-build #f] Return a derivation that executes Scheme expression @var{exp} as a builder for derivation @var{name}. @var{inputs} must be a list of @code{(name drv-path sub-drv)} tuples; when @var{sub-drv} is omitted, @@ -1175,7 +1175,7 @@ terminates by passing the result of @var{exp} to @code{exit}; thus, when @var{guile-for-build} is omitted or is @code{#f}, the value of the @code{%guile-for-build} fluid is used instead. -See the @code{derivation} procedure for the meaning of @var{dependency-graphs}. +See the @code{derivation} procedure for the meaning of @var{references-graphs}. @end deffn @noindent diff --git a/guix/derivations.scm b/guix/derivations.scm index 56a5466d9d..59a3957149 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -502,13 +502,13 @@ the derivation called NAME with hash HASH." (system (%current-system)) (env-vars '()) (inputs '()) (outputs '("out")) hash hash-algo hash-mode - dependency-graphs) + references-graphs) "Build a derivation with the given arguments. Return the resulting store path and <derivation> object. When HASH, HASH-ALGO, and HASH-MODE are given, a fixed-output derivation is created---i.e., one whose result is known in advance, such as a file download. -When DEPENDENCY-GRAPHS is true, it must be a list of file name/store path +When REFERENCES-GRAPHS is true, it must be a list of file name/store path pairs. In that case, the reference graph of each store path is exported in the build environment in the corresponding file, in a simple text format." (define direct-store-path? @@ -549,7 +549,7 @@ the build environment in the corresponding file, in a simple text format." ;; Some options are passed to the build daemon via the env. vars of ;; derivations (urgh!). We hide that from our API, but here is the place ;; where we kludgify those options. - (match dependency-graphs + (match references-graphs (((file . path) ...) (let ((value (map (cut string-append <> " " <>) file path))) @@ -744,7 +744,7 @@ they can refer to each other." (env-vars '()) (modules '()) guile-for-build - dependency-graphs) + references-graphs) "Return a derivation that executes Scheme expression EXP as a builder for derivation NAME. INPUTS must be a list of (NAME DRV-PATH SUB-DRV) tuples; when SUB-DRV is omitted, \"out\" is assumed. MODULES is a list @@ -763,7 +763,7 @@ EXP returns #f, the build is considered to have failed. EXP is built using GUILE-FOR-BUILD (a derivation). When GUILE-FOR-BUILD is omitted or is #f, the value of the `%guile-for-build' fluid is used instead. -See the `derivation' procedure for the meaning of DEPENDENCY-GRAPHS." +See the `derivation' procedure for the meaning of REFERENCES-GRAPHS." (define guile-drv (or guile-for-build (%guile-for-build))) @@ -881,4 +881,4 @@ See the `derivation' procedure for the meaning of DEPENDENCY-GRAPHS." #:hash hash #:hash-algo hash-algo #:outputs outputs - #:dependency-graphs dependency-graphs))) + #:references-graphs references-graphs))) diff --git a/tests/derivations.scm b/tests/derivations.scm index f9e6c28ec8..9092e3acd6 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -296,7 +296,7 @@ (and (valid-path? %store p) (equal? '(one two) (call-with-input-file p read))))))) -(test-assert "derivation with #:dependency-graphs" +(test-assert "derivation with #:references-graphs" (let* ((input1 (add-text-to-store %store "foo" "hello" (list %bash))) (input2 (add-text-to-store %store "bar" @@ -312,7 +312,7 @@ (list %mkdir))) (drv (derivation %store "closure-graphs" %bash `(,builder) - #:dependency-graphs + #:references-graphs `(("bash" . ,%bash) ("input1" . ,input1) ("input2" . ,input2)) @@ -652,14 +652,14 @@ Deriver: ~a~%" (derivation-path->output-path final2)) (build-derivations %store (list final1 final2))))) -(test-assert "build-expression->derivation with #:dependency-graphs" +(test-assert "build-expression->derivation with #:references-graphs" (let* ((input (add-text-to-store %store "foo" "hello" (list %bash %mkdir))) (builder '(copy-file "input" %output)) - (drv (build-expression->derivation %store "dependency-graphs" + (drv (build-expression->derivation %store "references-graphs" (%current-system) builder '() - #:dependency-graphs + #:references-graphs `(("input" . ,input)))) (out (derivation-path->output-path drv))) (define (deps path . deps) |