[Top][All Lists]

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

Re: bug#22970: guix edit mutt -- not working

From: Alex Kost
Subject: Re: bug#22970: guix edit mutt -- not working
Date: Sat, 12 Mar 2016 11:13:06 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Jean Louis (2016-03-11 21:48 +0300) wrote:

> Hello Alex,
> I got your mutt file, for my-guix-packages, but now I see I
> need to learn Guile commands, I will do this somewhat later
> when I have working system. Please help me until then, as
> your style to make a modified package is excellent for me.

It is not my style :-) Package inheriting is a great feature of Guix,
it's just not documented (though "inherit" word can be met in the
manual several times).

> I guess you forgot the dependency gdbm, where to put it?

Sorry about that, but actually I didn't forget about it because I didn't
know it is needed (I've never used mutt, and I know nothing about it or
gdbm).  Do you mean this dependency is needed because of --enable-hcache

If so, then it can be added by adding gdbm to the inputs of my-mutt
package (see below).  Also (my-guix-packages) module need to use (gnu
packages databases), because gdbm package comes from this module.

I hope the following comments clarify how my-mutt package is made:

>  (define-module (my-guix-packages)
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix utils)

Don't forget to add this line here:

     #:use-module (gnu packages databases)

>    #:use-module (gnu packages mail))
>  (define-public my-mutt
>    (package
>      (inherit mutt)

Inheriting means: those package fields that are not specified, will be
taken from mutt package.  For example, the package name is changed (to
"my-mutt"), but the version is not, so it will be inherited.  This means
when the version of mutt package will be updated, the version of my-mutt
package will automatically be updated too.

>      (name "my-mutt")
>      (arguments
>       (substitute-keyword-arguments (package-arguments mutt)
>         ((#:configure-flags cf)
>          `(cons "--enable-hcache" ,cf))))

This means: take mutt's arguments and do some substitutions there.  In
particular, we modify configure-flags by adding "--enable-hcache" to

To add gdbm dependency, add the following line to the package

       (inputs (cons `("gdbm" ,gdbm) (package-inputs mutt)))

>      (synopsis (string-append (package-synopsis mutt)
>                               " (configured with --enable-hcache)"))))

Modifying synopsis is not needed, it is just what you see in the output
of "guix package --show=my-mutt" command.


reply via email to

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