2017-02-21 23:17 GMT+01:00 Leo Famulari : > On Wed, Feb 22, 2017 at 12:19:35AM +0300, Dmitry Nikolaev wrote: > > When writing package definition, what if I download sources from git > > repository? For example: > > > > (define-public libwebsockets > > (package > > (name "libwebsockets") > > (version "1.3") > > (source (origin > > ;; The project does not publish tarballs, so we have to > take > > ;; things from Git. > > (method git-fetch) > > (uri (git-reference > > (url "git://git.libwebsockets.org/libwebsockets") > > (commit (string-append "v" version > > "-chrome37-firefox30")))) > > (sha256 > > (base32 > > "12fqh2d2098mgf0ls19p9lzibpsqhv7mc5rn1yvrbfnazmcr40g4")) > > (file-name (string-append name "-" version)))) > > ... > > > > How do I calculate this 12fqh2d...? > > Clone the Git repository in the normal way, check out the Git commit you > want to base the Guix package on, and then do this: > > $ guix hash --recursive --exclude-vcs path/to/git-repo > > This is explained in the manual, section Invoking guix hash: > > https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-hash.html > > I apologize for the off the mark suggestion I thought it was just lame, I didn't consider it had even more shortcomings