aboutsummaryrefslogtreecommitdiff
path: root/doc/guix-cookbook.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2020-06-22 16:40:18 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-23 00:03:08 +0200
commit2f562699ea936f9639ccf5deef2e7b458a7426bf (patch)
tree751eb1e768875f694febee98ba2071d98faccdfa /doc/guix-cookbook.texi
parentab83e1f054ef8c9ce1486a56f2484430630d42a3 (diff)
downloadguix-2f562699ea936f9639ccf5deef2e7b458a7426bf.tar
guix-2f562699ea936f9639ccf5deef2e7b458a7426bf.tar.gz
doc: cookbook: Mention "guix hash -rx" for Git checkouts.
* doc/guix-cookbook.texi (Extended example): Mention "guix hash -rx ."
Diffstat (limited to 'doc/guix-cookbook.texi')
-rw-r--r--doc/guix-cookbook.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index 31c4cd4121..efafbd9d93 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -852,6 +852,24 @@ version when packaging programs for a specific commit, following the
Guix contributor guidelines (@pxref{Version Numbers,,, guix, GNU Guix
Reference Manual}).
+How does one obtain the @code{sha256} hash that's in there, you ask? By
+invoking @command{guix hash} on a checkout of the desired commit, along
+the lines:
+
+@example
+git clone https://github.com/libgit2/libgit2/
+cd libgit2
+git checkout v0.26.6
+guix hash -rx .
+@end example
+
+@command{guix hash -rx} computes a SHA256 hash over the whole directory,
+excluding the @file{.git} sub-directory (@pxref{Invoking guix hash,,,
+guix, GNU Guix Reference Manual}).
+
+In the future, @command{guix download} will hopefully be able to do
+these steps for you, just like it does for regular downloads.
+
@subsubsection Snippets
Snippets are quoted (i.e. non-evaluated) Scheme code that are a means of patching