unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: rdes <rdes@proton.me>
To: Dominic Martinez <dom@dominicm.dev>
Cc: help-guix@gnu.org
Subject: Re: adding custom package to guix home
Date: Sun, 26 Jun 2022 23:13:10 +0000	[thread overview]
Message-ID: <CTsf9JBGnM1_AUwqRDPyOe8PhCXVgrefmbxRkKVZ5jVnbz9EsWby6NsLWqEHefFATcCHPsfO61lJ4WOV_Jh_191b5PnHD6nGXHKXANwoPqA=@proton.me> (raw)
In-Reply-To: <87v8snb1xe.fsf@dominicm.dev>

Thank you Mr. Martinez,

I appreciate you taking the time to explain this to me.  Your recommendations resolved my issues.

- Ryan




Sent with Proton Mail secure email.

------- Original Message -------
On Sunday, June 26th, 2022 at 4:10 PM, Dominic Martinez <dom@dominicm.dev> wrote:


> rdes via help-guix@gnu.org writes:
>
> > Hello,
> >
> > I'm trying to add emacs-svg to my package list in my guix home configuration,
> > but I'm getting "no code for module (emacs-svg)" error when using use-module and
> > "guix home: error: emacs-svg: unknown package" error when I include the package
> > definition in the guix home configuration file.
> >
> > I've added my configuration files my snippets: https://gitlab.com/-/snippets/2360492.
>
>
> There's two separate problems here: trying to use 'emacs-svg' as a
> specification, and Guile module loading.
>
> `specification->package' turns a specification (what you type into 'guix
>
> install') into a package (the actual variable that contains the
> package). However, it only works on packages that are part of your Guix
> installation. Instead, you should directly add the variable you defined
> to the packages list:
>
> #+begin_src scheme
> (home-environment
> (packages
> (cons*
> emacs-svg
> (map specification->package...))))
>
> #+end_src
>
> As for why `#:use-module (emacs-svg)' didn't work, I'm assuming you didn't augment Guile's load path. You can augment the load path either through an environment variable, or for a specific Guix command via the command line: #+begin_src shell GUILE_LOAD_PATH=$GUILE_LOAD_PATH:path/to/module/dir guix ... # or guix -L path/to/module/dir ... #+end_src You also shouldn't put` emacs-svg' as the last line in your module. That
> pattern is useful when developing a package (e.g. with a 'guix.scm' file
> in your repo), but modules should not evaluate to a value.


      reply	other threads:[~2022-06-26 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 19:12 adding custom package to guix home rdes via
2022-06-26 20:10 ` Dominic Martinez
2022-06-26 23:13   ` rdes [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='CTsf9JBGnM1_AUwqRDPyOe8PhCXVgrefmbxRkKVZ5jVnbz9EsWby6NsLWqEHefFATcCHPsfO61lJ4WOV_Jh_191b5PnHD6nGXHKXANwoPqA=@proton.me' \
    --to=rdes@proton.me \
    --cc=dom@dominicm.dev \
    --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.
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).