Hello Zimoun! On 3/10/21 9:19 PM, zimoun wrote: > On Wed, 10 Mar 2021 at 14:21, Leo Famulari <l...@famulari.name> wrote: >> On Wed, Mar 10, 2021 at 08:14:43PM +0100, Zelphir Kaltstahl wrote: >>> How does one calculate the hash for a package one wants to add to GNU Guix? >>> >>> I know 2 ways, giving me different results. One is for the repository >>> folder and >>> one is for the tarball: >>> >>> ~~~~ >>> guix hash --exclude-vcs --recursive . >>> guix hash PACKAGE-VERSION-tar.gz # a tarball created by guile-hall >> Can you clarify your question? >> >> It seems to me that you already know the answer: You use the method that >> is appropriate for your package. It depends on what kind of source code >> your packages uses. > Concretely, url-fetch > > guix hash PACKAGE-VERSION-tar.gz > > or git-fetch (or other vcs): > > guix hash . > > > Maybe the question could be clarified. :-) > > > Cheers, > simon
Ah, I think I get it now: If I for example created a tag for the version of my package and creation of the tag caused the VCS host to create a tarball as release, I could go the url-fetch way and then I would use `guix hash` on the tarball, which is the release tarball, but if there is no release tarball addressable using a URL, I would use the git-fetch way, which means GNU Guix would have to verify the downloaded repository, so I calculate the hash using the other way. So it all depends on what I specify in my package description, about how GNU Guix is to retrieve my package. Regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl