Previous: package Reference, Up: Defining Packages [Contents][Index]
origin
ReferenceThis section summarizes all the options available in origin
declarations (see Defining Packages).
This is the data type representing a source code origin.
uri
An object containing the URI of the source. The object type depends on
the method
(see below). For example, when using the
url-fetch method of (guix download)
, the valid uri
values are: a URL represented as a string, or a list thereof.
method
A procedure that will handle the URI.
Examples include:
(guix download)
download a file the HTTP, HTTPS, or FTP URL specified in the
uri
field;
(guix git-download)
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 "git://git.debian.org/git/pkg-shadow/shadow") (commit "v4.1.5.1"))
sha256
A bytevector containing the SHA-256 hash of the source. Typically the
base32
form is used here to generate the bytevector from a
base-32 string.
file-name
(default: #f
)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’s recommended to provide the
file name explicitly because the default is not very descriptive.
patches
(default: '()
)A list of file names containing patches to be applied to the source.
snippet
(default: #f
)A quoted piece of code that will be run in the source directory to make any modifications, which is sometimes more convenient than a patch.
patch-flags
(default: '("-p1")
)A list of command-line flags that should be passed to the patch
command.
patch-inputs
(default: #f
)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.
modules
(default: '()
)A list of Guile modules that should be loaded during the patching
process and while running the code in the snippet
field.
imported-modules
(default: '()
)The list of Guile modules to import in the patch derivation, for use by
the snippet
.
patch-guile
(default: #f
)The Guile package that should be used in the patching process. When
this is #f
, a sensible default is used.
Previous: package Reference, Up: Defining Packages [Contents][Index]