From: ng0 <contact.ng0@cryptolab.net>
To: Catonano <catonano@gmail.com>
Cc: Dmitry Nikolaev <cameltheman@gmail.com>, help-guix <help-guix@gnu.org>
Subject: Re: guix hash of source from git repository.
Date: Tue, 21 Feb 2017 21:56:29 +0000 [thread overview]
Message-ID: <20170221215629.wqrvnhsmr4l5q7zs@wasp> (raw)
In-Reply-To: <CAJ98PDy7Yph4gzBbrxyGdLwsU1C5b1Gw38wu1-3NSGVir6q5iw@mail.gmail.com>
On 17-02-21 22:25:35, Catonano wrote:
> Hi Dmitry,
>
> 2017-02-21 22:19 GMT+01:00 Dmitry Nikolaev <cameltheman@gmail.com>:
>
> > 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...?
> >
> > Dmitry Nikolaev
> >
>
> You clone the git repository locally, then you use 'guix hash' as explained
> in this page of the manual (the option you want to use is "--recursive")
>
> https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-hash.html
Please avoid doing the way described below though. Calculating it in
advance is more secure and helps to prevent introducing errors. If
there's a mismatch it shows an error.
> Another option is to try to build the package with the wrong hash, wait for
> the error message and copy the right hash from within the error message
> itself. Lame, but hey
>
> Hope this helps !
>
> Ciao
next prev parent reply other threads:[~2017-02-21 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 21:19 guix hash of source from git repository Dmitry Nikolaev
2017-02-21 21:25 ` Catonano
2017-02-21 21:56 ` ng0 [this message]
2017-02-21 22:21 ` Leo Famulari
2017-03-06 10:55 ` Ludovic Courtès
2017-02-21 22:17 ` Leo Famulari
2017-02-22 8:23 ` Catonano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170221215629.wqrvnhsmr4l5q7zs@wasp \
--to=contact.ng0@cryptolab.net \
--cc=cameltheman@gmail.com \
--cc=catonano@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.