all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Jean Louis <guix@rcdrun.com>
Cc: 22970-done@debbugs.gnu.org, help-guix@gnu.org
Subject: bug#22970: guix edit mutt -- not working
Date: Fri, 11 Mar 2016 13:48:39 +0300	[thread overview]
Message-ID: <87mvq5nvco.fsf__13909.6741950654$1457693363$gmane$org@gmail.com> (raw)
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")

[-- 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

  parent reply	other threads:[~2016-03-11 10:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 23:22 bug#22970: guix edit mutt -- not working Jean Louis
2016-03-09 23:44 ` Andreas Enge
2016-03-10 19:34   ` Jean Louis
2016-03-11 10:48     ` Alex Kost
2016-03-11 11:21       ` Jean Louis
2016-03-11 11:21       ` Jean Louis
2016-03-11 18:48         ` Jean Louis
2016-03-12  8:13           ` Alex Kost
2016-03-12  9:35             ` Jean Louis
2016-03-13 10:47       ` Jean Louis
2016-03-13 11:01         ` Efraim Flashner
2016-03-13 11:01         ` Efraim Flashner
2016-03-13 10:47       ` Jean Louis
2016-03-11 10:48     ` Alex Kost [this message]
2016-03-10 19:34   ` Jean Louis
2016-03-09 23:44 ` Andreas Enge
2016-03-09 23:45 ` bug#22970: closed (guix edit mutt -- not working) GNU bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87mvq5nvco.fsf__13909.6741950654$1457693363$gmane$org@gmail.com' \
    --to=alezost@gmail.com \
    --cc=22970-done@debbugs.gnu.org \
    --cc=guix@rcdrun.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.