[Top][All Lists]

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

Re: Checksum error on manual package install

From: Julien Lepiller
Subject: Re: Checksum error on manual package install
Date: Tue, 02 Jul 2019 21:31:22 +0200
User-agent: K-9 Mail for Android

Le 2 juillet 2019 13:08:01 GMT+02:00, Lorem Ipsum <address@hidden> a écrit :
>I am trying to install a non-packaged piece of software, [[
>][nomacs]].  It
>seems that through the paradigm of Guix, this is to be done with ~guix
>package~ rather than with ~make~ etc.  Or, put differently, to install
>an application which is not in the package repos, I need to package it
>myself.  Am I correct in my understanding?
>I have read through "[[
>6.2 Defining Packages]]", as well as the
>blog post "[[
>packaging tutorial for Guix]]", and followed along at home.
>I was successful in packaging and installing "my-hello.scm".  It seems
>to me that packaging ~nomacs~ should be as simple as replacing the
>relevant pieces within the "my-hello.scm" template.
>#+begin_src scheme :file my-nomacs.scm
>(use-modules (guix packages)
>         (guix download)
>         (guix build-system gnu)
>         (guix licenses))
>   (name "nomacs")
>   (version "3.12")
>   (source (origin
>        (method url-fetch)
>        (uri (string-append "";
>                ".tar.gz"))
>        (sha256
>         (base32
>   (build-system gnu-build-system)
>   (synopsis "Open source image viewer")
>   (description
>    "nomacs is a free, open source image viewer, which supports
>multiple platforms. You can use it for viewing all common image
>formats including RAW and psd images.")
>   (home-page "";)
>   (license gpl3+))
>However, when I try to install, I get an error about invalid base32:
>#+begin_src sh
>$ guix package --install-from-file=my-nomacs.scm
>guix package: error: exception thrown: #<condition
>&invalid-base32-character [character: #\e string:
>Here is how I obtained that hash:
>#+begin_src sh
>$ wget
>--2019-07-02 06:36:39--
>Resolving (
>Connecting to (||:443... connected.
>HTTP request sent, awaiting response... 302 Found
>--2019-07-02 06:36:40--
>Resolving (
>Connecting to
>HTTP request sent, awaiting response... 200 OK
>Length: unspecified [application/x-gzip]
>Saving to: ‘3.12.tar.gz.1’
>3.12.tar.gz.1           [    <=>             ]   1.66M  2.54MB/s    in
>2019-07-02 06:36:41 (2.54 MB/s) - ‘3.12.tar.gz.1’ saved [1736648]
>$ sha256sum 3.12.tar.gz
>This is where I'm stuck.  I know that the hash needs to be base32 and
>that the hash returned by ~sha256sum~ is not that.  I would think this
>wouldn't matter since the Guile script calls ~base32~.
>I'm unsure how to proceed.  Any advice would be appreciated!
>Thank you,


Nice work! You should use guix download to get the right hash, like so: "guix 
download 3.12.tar.gz". You can also put the hash of another package, see it 
fail and it will give you the hash it got instead.

There are other good practices you didn't follow, but they are not required to 
get your package to work: github tarballs are auto-generated and can change 
from time to time, so it's best to use git-fetch instead, since it will always 
give you the same content. You should also use (file-name …) so the store item 
for the source gets a meaningful name. There are already a lot of examples of 
that in guix sources.

Good luck for your packaging effort!

reply via email to

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