From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: bug#22970: guix edit mutt -- not working Date: Sat, 12 Mar 2016 11:13:06 +0300 Message-ID: <87pov015d9.fsf@gmail.com> References: <20160309232220.GA13286@protected.rcdrun.com> <20160309234433.GA28823@solar> <20160310193442.GA5630__27937.5219288797$1457638581$gmane$org@protected.rcdrun.com> <87mvq5nvco.fsf@gmail.com> <20160311112109.GA4815@protected.rcdrun.com> <20160311184837.GA28287@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeefO-0002Hv-8i for help-guix@gnu.org; Sat, 12 Mar 2016 03:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeefL-0005iD-2T for help-guix@gnu.org; Sat, 12 Mar 2016 03:12:54 -0500 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:35103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeefK-0005i6-Pm for help-guix@gnu.org; Sat, 12 Mar 2016 03:12:50 -0500 Received: by mail-lb0-x22e.google.com with SMTP id bc4so183099370lbc.2 for ; Sat, 12 Mar 2016 00:12:50 -0800 (PST) In-Reply-To: <20160311184837.GA28287@protected.rcdrun.com> (Jean Louis's message of "Fri, 11 Mar 2016 19:48:37 +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-bounces+gcggh-help-guix=m.gmane.org@gnu.org To: Jean Louis Cc: help-guix@gnu.org 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 option? 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 them. To add gdbm dependency, add the following line to the package definition: (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. -- Alex