aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-11 22:08:40 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-12 00:22:41 +0100
commit7f3673f21d1bf1d40a587ffbca7ced7de33a8535 (patch)
treeb879b9ce78296723a28cb518c9b84b94d946643a /doc
parentd91a879121485b079796ab5174468bf4c034ae40 (diff)
downloadpatches-7f3673f21d1bf1d40a587ffbca7ced7de33a8535.tar
patches-7f3673f21d1bf1d40a587ffbca7ced7de33a8535.tar.gz
guix build: Add '--with-source'.
* guix/scripts/build.scm (package-with-source): New procedure. (show-help): Add '--with-source'. (%options): Likewise. (options->derivations): Call 'options/with-source' and 'options/resolve-packages'. (options/resolve-packages, options/with-source): New procedures. * doc/guix.texi (Invoking guix build): Document '--with-source'.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 701b5400f8..d2a21a0f4a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1840,6 +1840,34 @@ Cross-build for @var{triplet}, which must be a valid GNU triplet, such
as @code{"mips64el-linux-gnu"} (@pxref{Configuration Names, GNU
configuration triplets,, configure, GNU Configure and Build System}).
+@item --with-source=@var{source}
+Use @var{source} as the source of the corresponding package.
+@var{source} must be a file name or a URL, as for @command{guix
+download} (@pxref{Invoking guix download}).
+
+The ``corresponding package'' is taken to be one specified on the
+command line whose name matches the base of @var{source}---e.g., if
+@var{source} is @code{/src/guile-2.0.10.tar.gz}, the corresponding
+package is @code{guile}. Likewise, the version string is inferred from
+@var{source}; in the previous example, it's @code{2.0.10}.
+
+This option allows users to try out versions of packages other than the
+one provided by the distribution. The example below downloads
+@file{ed-1.7.tar.gz} from a GNU mirror and uses that as the source for
+the @code{ed} package:
+
+@example
+guix build ed --with-source=mirror://gnu/ed/ed-1.7.tar.gz
+@end example
+
+As a developer, @code{--with-source} makes it easy to test release
+candidates:
+
+@example
+guix build guile --with-source=../guile-2.0.9.219-e1bb7.tar.xz
+@end example
+
+
@item --derivations
@itemx -d
Return the derivation paths, not the output paths, of the given