Skip to content
Snippets Groups Projects
Unverified Commit 2f562699 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

doc: cookbook: Mention "guix hash -rx" for Git checkouts.

* doc/guix-cookbook.texi (Extended example): Mention "guix hash -rx ."
parent ab83e1f0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment