[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix hash of source from git repository.

From: Catonano
Subject: Re: guix hash of source from git repository.
Date: Wed, 22 Feb 2017 09:23:03 +0100

2017-02-21 23:17 GMT+01:00 Leo Famulari <address@hidden>:
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://")
>                     (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:

I apologize for the off the mark suggestion

I thought it was just lame, I didn't consider it had even more shortcomings

reply via email to

[Prev in Thread] Current Thread [Next in Thread]