diff options
| -rw-r--r-- | doc/guix.texi | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 38205fe3fa3..456dfb264d0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -7308,6 +7308,84 @@ Coreutils, Bash, Make, Diffutils, grep, and sed (see the @code{(guix | |||
| 7308 | build-system gnu)} module for a complete list). We call these the | 7308 | build-system gnu)} module for a complete list). We call these the |
| 7309 | @dfn{implicit inputs} of a package, because package definitions do not | 7309 | @dfn{implicit inputs} of a package, because package definitions do not |
| 7310 | have to mention them. | 7310 | have to mention them. |
| 7311 | |||
| 7312 | This build system supports a number of keyword arguments, which can be | ||
| 7313 | passed @i{via} the @code{arguments} field of a package. Here are some | ||
| 7314 | of the main parameters: | ||
| 7315 | |||
| 7316 | @table @code | ||
| 7317 | @item #:phases | ||
| 7318 | This argument specifies build-side code that evaluates to an alist of | ||
| 7319 | build phases. @xref{Build Phases}, for more information. | ||
| 7320 | |||
| 7321 | @item #:configure-flags | ||
| 7322 | This is a list of flags (strings) passed to the @command{configure} | ||
| 7323 | script. @xref{Defining Packages}, for an example. | ||
| 7324 | |||
| 7325 | @item #:make-flags | ||
| 7326 | This list of strings contains flags passed as arguments to | ||
| 7327 | @command{make} invocations in the @code{build}, @code{check}, and | ||
| 7328 | @code{install} phases. | ||
| 7329 | |||
| 7330 | @item #:out-of-source? | ||
| 7331 | This Boolean, @code{#f} by default, indicates whether to run builds in a | ||
| 7332 | build directory separate from the source tree. | ||
| 7333 | |||
| 7334 | When it is true, the @code{configure} phase creates a separate build | ||
| 7335 | directory, changes to that directory, and runs the @code{configure} | ||
| 7336 | script from there. This is useful for packages that require it, such as | ||
| 7337 | @code{glibc}. | ||
| 7338 | |||
| 7339 | @item #:tests? | ||
| 7340 | This Boolean, @code{#t} by default, indicates whether the @code{check} | ||
| 7341 | phase should run the package's test suite. | ||
| 7342 | |||
| 7343 | @item #:test-target | ||
| 7344 | This string, @code{"check"} by default, gives the name of the makefile | ||
| 7345 | target used by the @code{check} phase. | ||
| 7346 | |||
| 7347 | @item #:parallel-build? | ||
| 7348 | @itemx #:parallel-tests? | ||
| 7349 | These Boolean values specify whether to build, respectively run the test | ||
| 7350 | suite, in parallel, with the @code{-j} flag of @command{make}. When | ||
| 7351 | they are true, @code{make} is passed @code{-j@var{n}}, where @var{n} is | ||
| 7352 | the number specified as the @option{--cores} option of | ||
| 7353 | @command{guix-daemon} or that of the @command{guix} client command | ||
| 7354 | (@pxref{Common Build Options, @option{--cores}}). | ||
| 7355 | |||
| 7356 | @cindex RUNPATH, validation | ||
| 7357 | @item #:validate-runpath? | ||
| 7358 | This Boolean, @code{#t} by default, determines whether to ``validate'' | ||
| 7359 | the @code{RUNPATH} of ELF binaries (@code{.so} shared libraries as well | ||
| 7360 | as executables) previously installed by the @code{install} phase. | ||
| 7361 | |||
| 7362 | This validation step consists in making sure that all the shared | ||
| 7363 | libraries needed by an ELF binaries, which are listed as | ||
| 7364 | @code{DT_NEEDED} entries in its @code{PT_DYNAMIC} segment, appear in the | ||
| 7365 | @code{DT_RUNPATH} entry of that binary. In other words, it ensures that | ||
| 7366 | running or using those binaries will not result in a ``file not found'' | ||
| 7367 | error at run time. @xref{Options, @option{-rpath},, ld, The GNU | ||
| 7368 | Linker}, for more information on @code{RUNPATH}. | ||
| 7369 | |||
| 7370 | @item #:substitutable? | ||
| 7371 | This Boolean, @code{#t} by default, tells whether the package outputs | ||
| 7372 | should be substitutable---i.e., whether users should be able to obtain | ||
| 7373 | substitutes for them instead of building locally (@pxref{Substitutes}). | ||
| 7374 | |||
| 7375 | @item #:allowed-references | ||
| 7376 | @itemx #:disallowed-references | ||
| 7377 | When true, these arguments must be a list of dependencies that must not | ||
| 7378 | appear among the references of the build results. If, upon build | ||
| 7379 | completion, some of these references are retained, the build process | ||
| 7380 | fails. | ||
| 7381 | |||
| 7382 | This is useful to ensure that a package does not erroneously keep a | ||
| 7383 | reference to some of it build-time inputs, in cases where doing so | ||
| 7384 | would, for example, unnecessarily increase its size (@pxref{Invoking | ||
| 7385 | guix size}). | ||
| 7386 | @end table | ||
| 7387 | |||
| 7388 | Most other build systems support these keyword arguments. | ||
| 7311 | @end defvr | 7389 | @end defvr |
| 7312 | 7390 | ||
| 7313 | Other @code{<build-system>} objects are defined to support other | 7391 | Other @code{<build-system>} objects are defined to support other |
