This section summarizes all the options available in
declarations (see Defining Packages).
This is the data type representing a source code origin.
An object containing the URI of the source. The object type depends on
method (see below). For example, when using the
url-fetch method of
(guix download), the valid
values are: a URL represented as a string, or a list thereof.
A procedure that handles the URI.
download a file from the HTTP, HTTPS, or FTP URL specified in the
clone the Git version control repository, and check out the revision
specified in the
uri field as a
git-reference object; a
git-reference looks like this:
(git-reference (url "https://git.savannah.gnu.org/git/hello.git") (commit "v2.10"))
A bytevector containing the SHA-256 hash of the source. Typically the
base32 form is used here to generate the bytevector from a
You can obtain this information using
(see Invoking guix download) or
guix hash (see Invoking guix hash).
The file name under which the source code should be saved. When this is
#f, a sensible default value will be used in most cases. In case
the source is fetched from a URL, the file name from the URL will be
used. For version control checkouts, it is recommended to provide the
file name explicitly because the default is not very descriptive.
A list of file names, origins, or file-like objects (see file-like objects) pointing to patches to be applied to the source.
This list of patches must be unconditional. In particular, it cannot
depend on the value of
A G-expression (see G-Expressions) or S-expression that will be run in the source directory. This is a convenient way to modify the source, sometimes more convenient than a patch.
A list of command-line flags that should be passed to the
Input packages or derivations to the patching process. When this is
#f, the usual set of inputs necessary for patching are provided,
such as GNU Patch.
A list of Guile modules that should be loaded during the patching
process and while running the code in the
The Guile package that should be used in the patching process. When
#f, a sensible default is used.