summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-12-22 23:40:57 +0100
committerLudovic Courtès <ludo@gnu.org>2017-12-23 00:05:05 +0100
commit3e30cdf1c35ebeb52630ec19b3b43b9e6d5ffb81 (patch)
tree988f723b064898342fe0211141974ec11466261b /doc
parent85f075a05777309f73d495830aabae70c119e840 (diff)
downloadpatches-3e30cdf1c35ebeb52630ec19b3b43b9e6d5ffb81.tar
patches-3e30cdf1c35ebeb52630ec19b3b43b9e6d5ffb81.tar.gz
guix build: Support '--with-source=PACKAGE@VERSION=URI'.
* guix/scripts/build.scm (numeric-extension?, tarball-base-name): New procedures, formerly in 'package-with-source'. (transform-package-source)[new-sources]: Look for '=' in URI. Each element of the list of now a (PKG VERSION SOURCE) tuple. Pass VERSION to 'package-with-source'. (package-with-source): Add 'version' parameter and honor it. * tests/scripts-build.scm ("options->transformation, with-source, PKG=URI") ("options->transformation, with-source, PKG@VER=URI"): New tests. * doc/guix.texi (Package Transformation Options): Document the new forms.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 94d4d8f92d..4e83c76be7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5430,14 +5430,20 @@ without having to type in the definitions of package variants
@table @code
@item --with-source=@var{source}
-Use @var{source} as the source of the corresponding package.
+@itemx --with-source=@var{package}=@var{source}
+@itemx --with-source=@var{package}@@@var{version}=@var{source}
+Use @var{source} as the source of @var{package}, and @var{version} as
+its version number.
@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 the one specified on the
-command line the name of which matches the base of @var{source}---e.g.,
+When @var{package} is omitted,
+it is taken to be the package name specified on the
+command line that 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
+package is @code{guile}.
+
+Likewise, when @var{version} is omitted, the version string is inferred from
@var{source}; in the previous example, it is @code{2.0.10}.
This option allows users to try out versions of packages other than the
@@ -5460,7 +5466,7 @@ guix build guile --with-source=../guile-2.0.9.219-e1bb7.tar.xz
@example
$ git clone git://git.sv.gnu.org/guix.git
-$ guix build guix --with-source=./guix
+$ guix build guix --with-source=guix@@1.0=./guix
@end example
@item --with-input=@var{package}=@var{replacement}