* Re: bug#22970: guix edit mutt -- not working
[not found] ` <87mvq5nvco.fsf@gmail.com>
@ 2016-03-11 11:21 ` Jean Louis
2016-03-11 18:48 ` Jean Louis
0 siblings, 1 reply; 2+ messages in thread
From: Jean Louis @ 2016-03-11 11:21 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel, 22970-done, help-guix
Hello Alex,
Thank you much. That looks like a solution that is valuable, and I would
like to see that in future documentation.
The info documentation and guix package --help now provide the option to
read the file and evaluate from file, and I guess that this solution you
provided is better for future:
- people can learn Guile, scheme and programming
- every user can modify the package.scm according to the needs
I will copy this to guix-devel
Louis
On Fri, Mar 11, 2016 at 01:48:39PM +0300, Alex Kost 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 ¹). 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
> "<some-dir>/my-guix-packages.scm", add <some-dir> to GUIX_PACKAGE_PATH,
> and that's it! This "my-guix-packages.scm" file will look like this:
>
> (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)"))))
>
> And all guix commands will find packages in this file, for example you
> can do: "guix package -i my-mutt". Try it!
>
> ¹ http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00419.html
>
> --
> Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug#22970: guix edit mutt -- not working
2016-03-11 11:21 ` bug#22970: guix edit mutt -- not working Jean Louis
@ 2016-03-11 18:48 ` Jean Louis
0 siblings, 0 replies; 2+ messages in thread
From: Jean Louis @ 2016-03-11 18:48 UTC (permalink / raw)
To: Alex Kost, guix-devel, help-guix
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.
I guess you forgot the dependency gdbm, where to put it?
(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)"))))
On Fri, Mar 11, 2016 at 12:21:09PM +0100, Jean Louis wrote:
> Hello Alex,
>
> Thank you much. That looks like a solution that is valuable, and I would
> like to see that in future documentation.
>
> The info documentation and guix package --help now provide the option to
> read the file and evaluate from file, and I guess that this solution you
> provided is better for future:
>
> - people can learn Guile, scheme and programming
> - every user can modify the package.scm according to the needs
>
> I will copy this to guix-devel
>
> Louis
>
> On Fri, Mar 11, 2016 at 01:48:39PM +0300, Alex Kost 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 ¹). 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
> > "<some-dir>/my-guix-packages.scm", add <some-dir> to GUIX_PACKAGE_PATH,
> > and that's it! This "my-guix-packages.scm" file will look like this:
> >
>
> > (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)"))))
>
> >
> > And all guix commands will find packages in this file, for example you
> > can do: "guix package -i my-mutt". Try it!
> >
> > ¹ http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00419.html
> >
> > --
> > Alex
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-11 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20160309232220.GA13286@protected.rcdrun.com>
[not found] ` <20160309234433.GA28823@solar>
[not found] ` <20160310193442.GA5630__27937.5219288797$1457638581$gmane$org@protected.rcdrun.com>
[not found] ` <87mvq5nvco.fsf@gmail.com>
2016-03-11 11:21 ` bug#22970: guix edit mutt -- not working Jean Louis
2016-03-11 18:48 ` Jean Louis
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).