From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: bug#22970: guix edit mutt -- not working Date: Fri, 11 Mar 2016 13:48:39 +0300 Message-ID: <87mvq5nvco.fsf@gmail.com> References: <20160309232220.GA13286@protected.rcdrun.com> <20160309234433.GA28823@solar> <20160310193442.GA5630__27937.5219288797$1457638581$gmane$org@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeKcO-0005fy-SK for help-guix@gnu.org; Fri, 11 Mar 2016 05:48:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeKcL-0006jD-KP for help-guix@gnu.org; Fri, 11 Mar 2016 05:48:28 -0500 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:35537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeKcL-0006j3-7A for help-guix@gnu.org; Fri, 11 Mar 2016 05:48:25 -0500 Received: by mail-lb0-x234.google.com with SMTP id bc4so150053089lbc.2 for ; Fri, 11 Mar 2016 02:48:25 -0800 (PST) In-Reply-To: <20160310193442.GA5630__27937.5219288797$1457638581$gmane$org@protected.rcdrun.com> (Jean Louis's message of "Thu, 10 Mar 2016 20:34:42 +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: 22970-done@debbugs.gnu.org, help-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jean Louis (2016-03-10 22:34 +0300) wrote: > Hello Andreas, > > I have now 2 files in gnu/guix/packages/*.scm, for mutt and postgresql: > and now I get each time on running guix, following: > > guix package: warning: failed to load '(databases)': > ERROR: no code for module (databases) > guix package: warning: failed to load '(mutt)': > ERROR: no code for module (mutt) > > because 2 files are: databases.scm and mutt.scm > > I have already installed mutt, with changes, and it works. On the end of > file there is word "mutt". Similar for PostgreSQL, only it did not yet > compile. > > Now I get a feeling, if I have 20 files to change or adapt to my system, > I will get 20 warnings by each run of guix package manager. > > Somehow it does not feel right. > > It would be more logical to have GUIX_PACKAGE_PATH plus one separate > file where some modified or user related packages are listed, instead of > having the package name on the end of *.scm file. I agree, using GUIX_PACKAGE_PATH is such a nice way to keep your own packages. I don't understand why Andreas recommended to use "guix package -f". I think it is suitable to build some development "guix.scm" file (not related, but see =C2=B9). But for user packages, I think keeping them in GUIX_PACKAGE_PATH directories is a much better solution. I also don't recommend to use the same /gnu/packages/*.scm structure, as there may be problems with this. For example, you copied /gnu/packages/databases.scm to your GUIX_PACKAGE_PATH dir and modified some package in it. Then you have to follow the changes in this file made in Guix, and update your local databases.scm accordingly all the time. So if you want to keep all your packages in a single file, you can make "/my-guix-packages.scm", add to GUIX_PACKAGE_PATH, and that's it! This "my-guix-packages.scm" file will look like this: --=-=-= Content-Type: text/x-scheme Content-Disposition: inline; filename=my-guix-packages.scm (define-module (my-guix-packages) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (gnu packages mail)) (define-public my-mutt (package (inherit mutt) (name "my-mutt") (arguments (substitute-keyword-arguments (package-arguments mutt) ((#:configure-flags cf) `(cons "--enable-hcache" ,cf)))) (synopsis (string-append (package-synopsis mutt) " (configured with --enable-hcache)")))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable And all guix commands will find packages in this file, for example you can do: "guix package -i my-mutt". Try it! =C2=B9 http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00419.html --=20 Alex --=-=-=--