diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e7f1826542d..d39d4c9aa22 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -10184,6 +10184,7 @@ because CHICKEN doesn't embed absolute references in compiled eggs. | |||
| 10184 | Test dependencies should go to @code{native-inputs}, as usual. | 10184 | Test dependencies should go to @code{native-inputs}, as usual. |
| 10185 | @end defvar | 10185 | @end defvar |
| 10186 | 10186 | ||
| 10187 | @anchor{copy-build-system} | ||
| 10187 | @defvar copy-build-system | 10188 | @defvar copy-build-system |
| 10188 | This variable is exported by @code{(guix build-system copy)}. It | 10189 | This variable is exported by @code{(guix build-system copy)}. It |
| 10189 | supports builds of simple packages that don't require much compiling, | 10190 | supports builds of simple packages that don't require much compiling, |
| @@ -11275,18 +11276,39 @@ dependencies. | |||
| 11275 | 11276 | ||
| 11276 | @end defvar | 11277 | @end defvar |
| 11277 | 11278 | ||
| 11278 | Lastly, for packages that do not need anything as sophisticated, a | ||
| 11279 | ``trivial'' build system is provided. It is trivial in the sense that | ||
| 11280 | it provides basically no support: it does not pull any implicit inputs, | ||
| 11281 | and does not have a notion of build phases. | ||
| 11282 | |||
| 11283 | @defvar trivial-build-system | 11279 | @defvar trivial-build-system |
| 11284 | This variable is exported by @code{(guix build-system trivial)}. | 11280 | This variable is exported by @code{(guix build-system trivial)}. |
| 11285 | 11281 | ||
| 11286 | This build system requires a @code{#:builder} argument. This argument | 11282 | This build system requires a @code{#:builder} argument; it is |
| 11287 | must be a Scheme expression that builds the package output(s)---as | 11283 | ``trivial'' in the sense that it does nothing but what @code{#:builder} |
| 11288 | with @code{build-expression->derivation} (@pxref{Derivations, | 11284 | specifies, and in particular it lacks the notion of build phases |
| 11289 | @code{build-expression->derivation}}). | 11285 | commonly found in other build systems and provides zero implicit inputs. |
| 11286 | The @code{#:builder} argument must be a gexp that builds the package | ||
| 11287 | output(s) (@pxref{G-Expressions}). | ||
| 11288 | |||
| 11289 | The example below produces an empty package: | ||
| 11290 | |||
| 11291 | @lisp | ||
| 11292 | (package | ||
| 11293 | (name "empty") | ||
| 11294 | (version "0") | ||
| 11295 | (source #f) ;no source | ||
| 11296 | (build-system trivial-build-system) | ||
| 11297 | (arguments | ||
| 11298 | ;; Create the output directory and nothing more. | ||
| 11299 | (list #:builder #~(mkdir #$output))) | ||
| 11300 | ;; @dots{} | ||
| 11301 | (license #f)) | ||
| 11302 | @end lisp | ||
| 11303 | |||
| 11304 | @cindex meta-package, with @code{trivial-build-system} | ||
| 11305 | This build system is useful to create @dfn{meta-packages} as empty | ||
| 11306 | packages that propagate a number of packages---thus installing one such | ||
| 11307 | meta-package in a profile also installs all these other packages. | ||
| 11308 | |||
| 11309 | @xref{copy-build-system, @code{copy-build-system}}, for a slightly more | ||
| 11310 | elaborate build system that makes it easy to copy files from package | ||
| 11311 | source to package output. | ||
| 11290 | @end defvar | 11312 | @end defvar |
| 11291 | 11313 | ||
| 11292 | @defvar channel-build-system | 11314 | @defvar channel-build-system |
