* bug#22970: guix edit mutt -- not working
@ 2016-03-09 23:22 Jean Louis
2016-03-09 23:44 ` Andreas Enge
[not found] ` <20160309234433.GA28823@solar>
0 siblings, 2 replies; 7+ messages in thread
From: Jean Louis @ 2016-03-09 23:22 UTC (permalink / raw)
To: 22970
Hello,
My understanding is that each user, shall be able to:
guix edit mutt
as example, change the options, and get such package, as I wanted to
add: --enable-hcache here:
`(#:configure-flags '("--enable-smtp"
"--enable-imap"
"--enable-pop"
"--enable-gpgme"
"--with-ssl"
"--with-sasl"
but I cannot "save" the file, as it is read only:
/gnu/store/632msbms2yaldfnlrb5lbnlnmn9yjisw-guix-0.9.0/share/guile/site/2.0/gnu/packages/mail.scm:
unmodified,
UNLOCKED, readonly: line 206 of 1007 [20%]
And I could not save the file in my home directory, and do:
guix package -i mutt -f mail.scm
I need help in understanding, rather than using mutt, as I want to
urgently run the GNU.
Jean Louis
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
2016-03-09 23:22 bug#22970: guix edit mutt -- not working Jean Louis
@ 2016-03-09 23:44 ` Andreas Enge
[not found] ` <20160309234433.GA28823@solar>
1 sibling, 0 replies; 7+ messages in thread
From: Andreas Enge @ 2016-03-09 23:44 UTC (permalink / raw)
To: Jean Louis; +Cc: 22970-done, help-guix
On Thu, Mar 10, 2016 at 12:22:20AM +0100, Jean Louis wrote:
> And I could not save the file in my home directory, and do:
> guix package -i mutt -f mail.scm
As mentioned on IRC, modify the file mail.scm by adding a line
mutt
at the end. Then
guix package -f mail.scm
does "install the package that the code within FILE evaluates to" as
explained by "guix package --help". mail.scm itself does not evaluate
to anything, it just contains a number of variable definitions. By adding
the line, it "returns" the value of the variable mutt, which is your
package definition.
Better yet, use GUIX_PACKAGE_PATH, for instance as follows:
export GUIX_PACKAGE_PATH=$HOME/guix
Then create the same file layout in that directory as in the source code:
mkdir -p $HOME/guix/gnu/packages
Copy mail.scm there, modify mutt, then
guix package -i mutt
will first look for your modified package.
As this is not a bug, it would have been better to post to help-guix@gnu.org;
let us continue the discussion there (if you are not yet subscribed, please
do so), and I am closing this bug.
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
[not found] ` <20160309234433.GA28823@solar>
@ 2016-03-10 19:34 ` Jean Louis
2016-03-11 10:48 ` Alex Kost
[not found] ` <87mvq5nvco.fsf@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Jean Louis @ 2016-03-10 19:34 UTC (permalink / raw)
To: help-guix; +Cc: 22970-done, Jean Louis
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.
On Thu, Mar 10, 2016 at 12:44:33AM +0100, Andreas Enge wrote:
> On Thu, Mar 10, 2016 at 12:22:20AM +0100, Jean Louis wrote:
> > And I could not save the file in my home directory, and do:
> > guix package -i mutt -f mail.scm
>
> As mentioned on IRC, modify the file mail.scm by adding a line
> mutt
> at the end. Then
> guix package -f mail.scm
> does "install the package that the code within FILE evaluates to" as
> explained by "guix package --help". mail.scm itself does not evaluate
> to anything, it just contains a number of variable definitions. By adding
> the line, it "returns" the value of the variable mutt, which is your
> package definition.
>
> Better yet, use GUIX_PACKAGE_PATH, for instance as follows:
> export GUIX_PACKAGE_PATH=$HOME/guix
> Then create the same file layout in that directory as in the source code:
> mkdir -p $HOME/guix/gnu/packages
> Copy mail.scm there, modify mutt, then
> guix package -i mutt
> will first look for your modified package.
>
> As this is not a bug, it would have been better to post to help-guix@gnu.org;
> let us continue the discussion there (if you are not yet subscribed, please
> do so), and I am closing this bug.
>
> Andreas
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
2016-03-10 19:34 ` Jean Louis
@ 2016-03-11 10:48 ` Alex Kost
[not found] ` <87mvq5nvco.fsf@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Alex Kost @ 2016-03-11 10:48 UTC (permalink / raw)
To: Jean Louis; +Cc: 22970-done, help-guix
[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]
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 ¹). 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: my-guix-packages.scm --]
[-- Type: text/x-scheme, Size: 505 bytes --]
(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)"))))
[-- Attachment #3: Type: text/plain, Size: 205 bytes --]
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] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
[not found] ` <87mvq5nvco.fsf@gmail.com>
@ 2016-03-11 11:21 ` Jean Louis
2016-03-13 10:47 ` Jean Louis
[not found] ` <20160313104703.GE3319@protected.rcdrun.com>
2 siblings, 0 replies; 7+ 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] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
[not found] ` <87mvq5nvco.fsf@gmail.com>
2016-03-11 11:21 ` Jean Louis
@ 2016-03-13 10:47 ` Jean Louis
[not found] ` <20160313104703.GE3319@protected.rcdrun.com>
2 siblings, 0 replies; 7+ messages in thread
From: Jean Louis @ 2016-03-13 10:47 UTC (permalink / raw)
To: Alex Kost; +Cc: 22970-done, help-guix, Jean Louis
Hello Alex,
I have followed your recommendation, and mutt is working modified.
However, now I get useless error messages. And I can imagine, if I have
modified 10 packages, that I would get 10x that much of error messages.
warning: collision encountered:
/gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/share/man/man1/mutt.1.gz
/gnu/store/vh7ghk1xlrn4crshqrdygp5573aipk44-mutt-1.5.24/share/man/man1/mutt.1.gz
warning: arbitrarily choosing
/gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/share/man/man5/muttrc.5.gz
warning: collision encountered:
/gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/bin/mutt
/gnu/store/vh7ghk1xlrn4crshqrdygp5573aipk44-mutt-1.5.24/bin/mutt
warning: arbitrarily choosing
/gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/bin/mutt
warning: collision encountered:
/gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/bin/flea
/gnu/store/vh7ghk1xlrn4crshqrdygp5573aipk44-mutt-1.5.24/bin/flea
Let me stop with copy and paste, because there are many more lines like
that.
Maybe it is design of guix package manager, maybe it is my fault.
I understood that I can change definitions for guix packages, and such
would be installed. There shall be no warnings like this.
I do intend to make about 5-10 packages for system I use, and I worry
about future warning messages, it will be like 3-4 screens, making guix
package manager not user-friendly. I would not see real errors.
On Fri, Mar 11, 2016 at 01:48:39PM +0300, Alex Kost wrote:
> 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 ¹). 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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22970: guix edit mutt -- not working
[not found] ` <20160313104703.GE3319@protected.rcdrun.com>
@ 2016-03-13 11:01 ` Efraim Flashner
0 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2016-03-13 11:01 UTC (permalink / raw)
To: Jean Louis; +Cc: 22970-done, Alex Kost, help-guix
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
On Sun, 13 Mar 2016 11:47:04 +0100
Jean Louis <guix@rcdrun.com> wrote:
> Hello Alex,
>
> I have followed your recommendation, and mutt is working modified.
> However, now I get useless error messages. And I can imagine, if I have
> modified 10 packages, that I would get 10x that much of error messages.
>
> warning: collision encountered:
> /gnu/store/xxzgai9khdfhk70p06vs6akrarzph9r2-my-mutt-1.5.24/bin/mutt
> /gnu/store/vh7ghk1xlrn4crshqrdygp5573aipk44-mutt-1.5.24/bin/mutt
>
Now that you have my-mutt installed you can remove mutt
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-13 11:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 23:22 bug#22970: guix edit mutt -- not working Jean Louis
2016-03-09 23:44 ` Andreas Enge
[not found] ` <20160309234433.GA28823@solar>
2016-03-10 19:34 ` Jean Louis
2016-03-11 10:48 ` Alex Kost
[not found] ` <87mvq5nvco.fsf@gmail.com>
2016-03-11 11:21 ` Jean Louis
2016-03-13 10:47 ` Jean Louis
[not found] ` <20160313104703.GE3319@protected.rcdrun.com>
2016-03-13 11:01 ` Efraim Flashner
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).