From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix hash of source from git repository. Date: Mon, 06 Mar 2017 11:55:13 +0100 Message-ID: <8760jmvfn2.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckqIS-0007uX-Mc for help-guix@gnu.org; Mon, 06 Mar 2017 05:55:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckqIO-0005oF-Mk for help-guix@gnu.org; Mon, 06 Mar 2017 05:55:20 -0500 In-Reply-To: (catonano@gmail.com's message of "Tue, 21 Feb 2017 22:25:35 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Catonano Cc: Dmitry Nikolaev , help-guix Catonano skribis: > Hi Dmitry, > > 2017-02-21 22:19 GMT+01:00 Dmitry Nikolaev : > >> 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 ta= ke >> ;; 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 explain= ed > 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 Specifically, =E2=80=98guix hash -rx .=E2=80=99 on a fresh clone, as shown = at the bottom of this page. Ludo=E2=80=99.