aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2019-03-12 15:50:13 +0100
committerLudovic Courtès <ludo@gnu.org>2019-03-17 22:55:01 +0100
commit880916ac5228b9cfd6e65ac243d17f6bd12edaf9 (patch)
treed8327e89d0856c7699698dd3620e494286297201 /doc
parent55da450a1fc9969d9e791d7d94da90df3aa284db (diff)
downloadguix-880916ac5228b9cfd6e65ac243d17f6bd12edaf9.tar
guix-880916ac5228b9cfd6e65ac243d17f6bd12edaf9.tar.gz
guix build: Add '--with-git-url'.
* guix/scripts/build.scm (%not-equal): New variable. (evaluate-git-replacement-specs): Use it instead of local variable 'not-equal'. (transform-package-source-git-url): New procedure. (%transformations): Add 'with-git-url'. (%transformation-options, show-transformation-options-help): Add '--with-git-url'. * tests/scripts-build.scm ("options->transformation, with-git-url"): New test.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi34
1 files changed, 23 insertions, 11 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 5bbd0ee7f0..139a09d1bc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7780,22 +7780,18 @@ must be compatible. If @var{replacement} is somehow incompatible with
@var{package}, then the resulting package may be unusable. Use with
care!
-@item --with-branch=@var{package}=@var{branch}
+@item --with-git-url=@var{package}=@var{url}
@cindex Git, using the latest commit
@cindex latest commit, building
-Build @var{package} from the latest commit of @var{branch}. The @code{source}
-field of @var{package} must be an origin with the @code{git-fetch} method
-(@pxref{origin Reference}) or a @code{git-checkout} object; the repository URL
-is taken from that @code{source}. Git sub-modules of the repository are
-fetched, recursively.
+Build @var{package} from the latest commit of the @code{master} branch of the
+Git repository at @var{url}.
-For instance, the following command builds @code{guile-sqlite3} from the
-latest commit of its @code{master} branch, and then builds @code{guix} (which
-depends on it) and @code{cuirass} (which depends on @code{guix}) against this
-specific @code{guile-sqlite3} build:
+For example, the following commands builds the GNU C Library (glibc) straight
+from its Git repository instead of building the currently-packaged release:
@example
-guix build --with-branch=guile-sqlite3=master cuirass
+guix build glibc \
+ --with-git-url=glibc=git://sourceware.org/git/glibc.git
@end example
@cindex continuous integration
@@ -7809,6 +7805,22 @@ Checkouts are kept in a cache under @file{~/.cache/guix/checkouts} to speed up
consecutive accesses to the same repository. You may want to clean it up once
in a while to save disk space.
+@item --with-branch=@var{package}=@var{branch}
+Build @var{package} from the latest commit of @var{branch}. The @code{source}
+field of @var{package} must be an origin with the @code{git-fetch} method
+(@pxref{origin Reference}) or a @code{git-checkout} object; the repository URL
+is taken from that @code{source}. Git sub-modules of the repository are
+fetched, recursively.
+
+For instance, the following command builds @code{guile-sqlite3} from the
+latest commit of its @code{master} branch, and then builds @code{guix} (which
+depends on it) and @code{cuirass} (which depends on @code{guix}) against this
+specific @code{guile-sqlite3} build:
+
+@example
+guix build --with-branch=guile-sqlite3=master cuirass
+@end example
+
@item --with-commit=@var{package}=@var{commit}
This is similar to @code{--with-branch}, except that it builds from
@var{commit} rather than the tip of a branch. @var{commit} must be a valid