Toggle diff (478 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index bf294046db..ed9994a41b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4958,60 +4958,57 @@ Inferiors
The @code{(guix inferior)} module provides the following procedures to open an
inferior:
-@deffn {Scheme Procedure} inferior-for-channels @var{channels} @
- [#:cache-directory] [#:ttl]
+@defun inferior-for-channels channels [#:cache-directory] [#:ttl]
Return an inferior for @var{channels}, a list of channels. Use the cache at
@var{cache-directory}, where entries can be reclaimed after @var{ttl} seconds.
This procedure opens a new connection to the build daemon.
As a side effect, this procedure may build or substitute binaries for
@var{channels}, which can take time.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} open-inferior @var{directory} @
- [#:command "bin/guix"]
+@defun open-inferior directory [#:command "bin/guix"]
Open the inferior Guix in @var{directory}, running
@code{@var{directory}/@var{command} repl} or equivalent. Return @code{#f} if
the inferior could not be launched.
-@end deffn
+@end defun
@cindex inferior packages
The procedures listed below allow you to obtain and manipulate inferior
packages.
-@deffn {Scheme Procedure} inferior-packages @var{inferior}
+@defun inferior-packages inferior
Return the list of packages known to @var{inferior}.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} lookup-inferior-packages @var{inferior} @var{name} @
- [@var{version}]
+@defun lookup-inferior-packages inferior name [version]
Return the sorted list of inferior packages matching @var{name} in
@var{inferior}, with highest version numbers first. If @var{version} is true,
return only packages with a version number prefixed by @var{version}.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} inferior-package? @var{obj}
+@defun inferior-package? obj
Return true if @var{obj} is an inferior package.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} inferior-package-name @var{package}
-@deffnx {Scheme Procedure} inferior-package-version @var{package}
-@deffnx {Scheme Procedure} inferior-package-synopsis @var{package}
-@deffnx {Scheme Procedure} inferior-package-description @var{package}
-@deffnx {Scheme Procedure} inferior-package-home-page @var{package}
-@deffnx {Scheme Procedure} inferior-package-location @var{package}
-@deffnx {Scheme Procedure} inferior-package-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-native-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-propagated-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-transitive-propagated-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-native-search-paths @var{package}
-@deffnx {Scheme Procedure} inferior-package-transitive-native-search-paths @var{package}
-@deffnx {Scheme Procedure} inferior-package-search-paths @var{package}
+@defun inferior-package-name package
+@defunx inferior-package-version package
+@defunx inferior-package-synopsis package
+@defunx inferior-package-description package
+@defunx inferior-package-home-page package
+@defunx inferior-package-location package
+@defunx inferior-package-inputs package
+@defunx inferior-package-native-inputs package
+@defunx inferior-package-propagated-inputs package
+@defunx inferior-package-transitive-propagated-inputs package
+@defunx inferior-package-native-search-paths package
+@defunx inferior-package-transitive-native-search-paths package
+@defunx inferior-package-search-paths package
These procedures are the counterpart of package record accessors
(@pxref{package Reference}). Most of them work by querying the inferior
@var{package} comes from, so the inferior must still be live when you call
these procedures.
-@end deffn
+@end defun
Inferior packages can be used transparently like any other package or
file-like object in G-expressions (@pxref{G-Expressions}). They are also
@@ -7575,7 +7572,7 @@ Defining Packages
The build actions it prescribes may then be realized by using the
@code{build-derivations} procedure (@pxref{The Store}).
-@deffn {Scheme Procedure} package-derivation @var{store} @var{package} [@var{system}]
+@defun package-derivation store package [system]
Return the @code{<derivation>} object of @var{package} for @var{system}
(@pxref{Derivations}).
@@ -7584,22 +7581,21 @@ Defining Packages
@code{"x86_64-linux"} for an x86_64 Linux-based GNU system. @var{store}
must be a connection to the daemon, which operates on the store
(@pxref{The Store}).
-@end deffn
+@end defun
@noindent
@cindex cross-compilation
Similarly, it is possible to compute a derivation that cross-builds a
package for some other system:
-@deffn {Scheme Procedure} package-cross-derivation @var{store} @
- @var{package} @var{target} [@var{system}]
+@defun package-cross-derivation store package target [system]
Return the @code{<derivation>} object of @var{package} cross-built from
@var{system} to @var{target}.
@var{target} must be a valid GNU triplet denoting the target hardware
and operating system, such as @code{"aarch64-linux-gnu"}
(@pxref{Specifying Target Triplets,,, autoconf, Autoconf}).
-@end deffn
+@end defun
Once you have package definitions, you can easily define @emph{variants}
of those packages. @xref{Defining Package Variants}, for more on that.
@@ -7810,10 +7806,10 @@ package Reference
The following helper procedures are provided to help deal with package
inputs.
-@deffn {Scheme Procedure} lookup-package-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-native-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-propagated-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-direct-input @var{package} @var{name}
+@defun lookup-package-input package name
+@defunx lookup-package-native-input package name
+@defunx lookup-package-propagated-input package name
+@defunx lookup-package-direct-input package name
Look up @var{name} among @var{package}'s inputs (or native, propagated,
or direct inputs). Return it if found, @code{#f} otherwise.
@@ -7829,7 +7825,7 @@ package Reference
In this example we obtain the @code{gmp} package that is among the
direct inputs of @code{coreutils}.
-@end deffn
+@end defun
@cindex development inputs, of a package
@cindex implicit inputs, of a package
@@ -7838,8 +7834,7 @@ package Reference
package is compiled. This is what the @code{package-development-inputs}
procedure returns.
-@deffn {Scheme Procedure} package-development-inputs @var{package} @
- [@var{system}] [#:target #f]
+@defun package-development-inputs package [system] [#:target #f]
Return the list of inputs required by @var{package} for development
purposes on @var{system}. When @var{target} is true, return the inputs
needed to cross-compile @var{package} from @var{system} to
@@ -7870,7 +7865,7 @@ package Reference
gzip, GCC, libc, Bash, and more. To visualize it, @command{guix graph
hello} would show you explicit inputs, whereas @command{guix graph -t
bag hello} would include implicit inputs (@pxref{Invoking guix graph}).
-@end deffn
+@end defun
Because packages are regular Scheme objects that capture a complete
dependency graph and associated build procedures, it is often useful to
@@ -7878,7 +7873,7 @@ package Reference
thereof according to some parameters. Below are a few examples.
@cindex tool chain, choosing a package's tool chain
-@deffn {Scheme Procedure} package-with-c-toolchain @var{package} @var{toolchain}
+@defun package-with-c-toolchain package toolchain
Return a variant of @var{package} that uses @var{toolchain} instead of
the default GNU C/C++ toolchain. @var{toolchain} must be a list of
inputs (label/package tuples) providing equivalent functionality, such
@@ -7899,7 +7894,7 @@ package Reference
procedure works by changing the build system of @var{package} so that it
pulls in @var{toolchain} instead of the defaults. @ref{Build Systems},
for more on build systems.
-@end deffn
+@end defun
@node origin Reference
@subsection @code{origin} Reference
@@ -8016,8 +8011,7 @@ origin Reference
download)} module provides the most common method, @code{url-fetch},
described below.
-@deffn {Scheme Procedure} url-fetch @var{url} @var{hash-algo} @var{hash} @
- [name] [#:executable? #f]
+@defun url-fetch url hash-algo hash [name] [#:executable? #f]
Return a fixed-output derivation that fetches data from @var{url} (a
string, or a list of strings denoting alternate URLs), which is expected
to have hash @var{hash} of type @var{hash-algo} (a symbol). By default,
@@ -8030,19 +8024,19 @@ origin Reference
Alternatively, when URL starts with @code{file://}, return the
corresponding file name in the store.
-@end deffn
+@end defun
Likewise, the @code{(guix git-download)} module defines the
@code{git-fetch} origin method, which fetches data from a Git version
control repository, and the @code{git-reference} data type to describe
the repository and revision to fetch.
-@deffn {Scheme Procedure} git-fetch @var{ref} @var{hash-algo} @var{hash}
+@defun git-fetch ref hash-algo hash
Return a fixed-output derivation that fetches @var{ref}, a
@code{<git-reference>} object. The output is expected to have recursive
hash @var{hash} of type @var{hash-algo} (a symbol). Use @var{name} as
the file name, or a generic name if @code{#f}.
-@end deffn
+@end defun
@deftp {Data Type} git-reference
This data type represents a Git reference for @code{git-fetch} to
@@ -8085,13 +8079,12 @@ origin Reference
the @code{hg-fetch} origin method and @code{hg-reference} data type for
support of the Mercurial version control system.
-@deffn {Scheme Procedure} hg-fetch @var{ref} @var{hash-algo} @var{hash} @
- [name]
+@defun hg-fetch ref hash-algo hash [name]
Return a fixed-output derivation that fetches @var{ref}, a
@code{<hg-reference>} object. The output is expected to have recursive
hash @var{hash} of type @var{hash-algo} (a symbol). Use @var{name} as
the file name, or a generic name if @code{#false}.
-@end deffn
+@end defun
@node Defining Package Variants
@section Defining Package Variants
@@ -8242,7 +8235,7 @@ Defining Package Variants
that directly maps to the more sophisticated package transformation
options (@pxref{Package Transformation Options}):
-@deffn {Scheme Procedure} options->transformation @var{opts}
+@defun options->transformation opts
Return a procedure that, when passed an object to build (package,
derivation, etc.), applies the transformations specified by @var{opts} and returns
the resulting objects. @var{opts} must be a list of symbol/string pairs such as:
@@ -8254,7 +8247,7 @@ Defining Package Variants
Each symbol names a transformation and the corresponding string is an argument
to that transformation.
-@end deffn
+@end defun
For instance, a manifest equivalent to this command:
@@ -8293,8 +8286,7 @@ Defining Package Variants
graph, is what the @code{package-input-rewriting} procedure in
@code{(guix packages)} implements.
-@deffn {Scheme Procedure} package-input-rewriting @var{replacements} @
- [@var{rewrite-name}] [#:deep? #t]
+@defun package-input-rewriting replacements [rewrite-name] [#:deep? #t]
Return a procedure that, when passed a package, replaces its direct and
indirect dependencies, including implicit inputs when @var{deep?} is
true, according to @var{replacements}. @var{replacements} is a list of
@@ -8303,7 +8295,7 @@ Defining Package Variants
Optionally, @var{rewrite-name} is a one-argument procedure that takes
the name of a package and returns its new name after rewrite.
-@end deffn
+@end defun
@noindent
Consider this example:
@@ -8328,14 +8320,14 @@ Defining Package Variants
The following variant of @code{package-input-rewriting} can match packages to
be replaced by name rather than by identity.
-@deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements} [#:deep? #t]
+@defun package-input-rewriting/spec replacements [#:deep? #t]
Return a procedure that, given a package, applies the given
@var{replacements} to all the package graph, including implicit inputs
unless @var{deep?} is false. @var{replacements} is a list of
spec/procedures pair; each spec is a package specification such as
@code{"gcc"} or @code{"guile@@2"}, and each procedure takes a matching
package and returns a replacement for that package.
-@end deffn
+@end defun
The example above could be rewritten this way:
@@ -8353,12 +8345,12 @@ Defining Package Variants
@code{package-mapping}: it supports arbitrary changes to nodes in the
graph.
-@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}] [#:deep? #f]
+@defun package-mapping proc [cut?] [#:deep? #f]
Return a procedure that, given a package, applies @var{proc} to all the packages
depended on and returns the resulting package. The procedure stops recursion
when @var{cut?} returns true for a given package. When @var{deep?} is true, @var{proc} is
applied to implicit inputs as well.
-@end deffn
+@end defun
@node Writing Manifests
@section Writing Manifests
@@ -8563,15 +8555,14 @@ Writing Manifests
@end table
@end deftp
-@deffn {Scheme Procedure} concatenate-manifests @var{lst}
+@defun concatenate-manifests lst
Concatenate the manifests listed in @var{lst} and return the resulting
manifest.
-@end deffn
+@end defun
@c TODO: <manifest-pattern>, manifest-lookup, manifest-remove, etc.
-@deffn {Scheme Procedure} package->manifest-entry @var{package} @
- [@var{output}] [#:properties]
+@defun package->manifest-entry package [output] [#:properties]
Return a manifest entry for the @var{output} of package @var{package},
where @var{output} defaults to @code{"out"}, and with the given
@var{properties}. By default @var{properties} is the empty list or, if
@@ -8589,9 +8580,9 @@ Writing Manifests
(manifest (list (package->manifest-entry git)
(package->manifest-entry git "send-email")))
@end lisp
-@end deffn
+@end defun
-@deffn {Scheme Procedure} packages->manifest @var{packages}
+@defun packages->manifest packages
Return a list of manifest entries, one for each item listed in
@var{packages}. Elements of @var{packages} can be either package
objects or package/string tuples denoting a specific output of a
@@ -8605,11 +8596,10 @@ Writing Manifests
(packages->manifest (list git `(,git "send-email")))
@end lisp
-@end deffn
+@end defun
@anchor{package-development-manifest}
-@deffn {Scheme Procedure} package->development-manifest @var{package} @
- [@var{system}] [#:target]
+@defun package->development-manifest package [system] [#:target]
Return a manifest for the @dfn{development inputs} of @var{package} for
@var{system}, optionally when cross-compiling to @var{target}.
Development inputs include both explicit and implicit inputs of
@@ -8637,7 +8627,7 @@ Writing Manifests
(GCC), the many supporting libraries (Boost, GLib, GTK, etc.), and a
couple of additional development tools---these are the dependencies
@command{guix show inkscape} lists.
-@end deffn
+@end defun
@c TODO: Move (gnu packages) interface to a section of its own.
@@ -8645,7 +8635,7 @@ Writing Manifests
to build manifests. In particular, it lets you look up packages by
name---see below.
-@deffn {Scheme Procedure} specifications->manifest @var{specs}
+@defun specifications->manifest specs
Given @var{specs}, a list of specifications such as @code{"emacs@@25.2"}
or @code{"guile:debug"}, return a manifest. Specs have the format that
command-line tools such as @command{guix install} and @command{guix
@@ -8662,7 +8652,7 @@ Writing Manifests
the right set of modules, and referring to the right variables.
Instead, we directly refer to packages in the same way as on the command
line, which can often be more convenient.
-@end deffn
+@end defun
@c TODO: specifications->package, etc.
@@ -10114,54 +10104,54 @@ Build Utilities
This section documents procedures that deal with store file names.
-@deffn {Scheme Procedure} %store-directory
+@defun %store-directory
Return the directory name of the store.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} store-file-name? @var{file}
+@defun store-file-name? file
Return true if @var{file} is in the store.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} strip-store-file-name @var{file}
+@defun strip-store-file-name file
Strip the @file{/gnu/store} and hash from @var{file}, a store file name.
The result is typically a @code{"@var{package}-@var{version}"} string.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} package-name->name+version @var{name}
+@defun package-name->name+version name
Given @var{name}, a package name like @code{"foo-0.9.1b"}, return two
values: @code{"foo"} and @code{"0.9.1b"}. When the version part is
unavailable, @var{name} and @code{#f} are returned. The first hyphen
followed by a digit is considered to introduce the version part.
-@end deffn
+@end defun
@subsection File Types
The procedures below deal with files and file types.
-@deffn {Scheme Procedure} directory-exists? @var{dir}
+@defun directory-exists? dir
Return @code{#t} if @var{dir} exists and is a directory.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} executable-file? @var{file}
+@defun executable-file? file
Return @code{#t} if @var{file} exists and is executable.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} symbolic-link? @var{file}
+@defun symbolic-link? file
Return @code{#t} if @var{file} is a symbolic link (aka. a ``symlink'').
-@end deffn
+@end defun
-@deffn {Scheme Procedure} elf-file? @var{file}
-@deffnx {Scheme Procedure} ar-file? @var{file}
-@deffnx {Scheme Procedure} gzip-file? @var{file}
+@defun elf-file? file
+@defunx ar-file? file
+@defunx gzip-file? file
Return @code{#t} if @var{file} is, respectively, an ELF file, an
@code{ar} archive (such as a @file{.a} static library), or a gzip file.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} reset-gzip-timestamp @var{file} [#:keep-mtime? #t]
+@defun reset-gzip-timestamp file [#:keep-mtime? #t]
If @var{file} is a gzip file, reset its embedded timestamp (as with
@command{gzip --no-name}) and return true. Otherwise return @code{#f}.
When @var{keep-mtime?} is true, preserve @var{file}'s modification time.
-@end deffn
+@end defun
@subsection File Manipulation
@@ -10182,20 +10172,20 @@ Build Utilities
exception.
@end deffn
-@deffn {Scheme Procedure} mkdir-p @var{dir}
+@defun mkdir-p dir
Create directory @var{dir} and all its ancestors.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} install-file @var{file} @var{directory}
+@defun install-file file directory
Create @var{directory} if it does not exist and copy @var{file} in there
under the same name.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} make-file-writable @var{file}
+@defun make-file-writable file
Make @var{file} writable for its owner.
-@end deffn
+@end defun
-@deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
+@defun copy-recursively source destination @
[#:log (current-output-port)] [#:follow-symlinks? #f] @
[#:copy-file copy-file] [#:keep-mtime? #f] [#:keep-permissions? #t]
Copy @var{source} directory to @var{desti