Re: Newbie: How to edit a faulty package definition?

2023-06-26 Thread Skyler Ferris


> ==
>
>The reason is that I'm currently using `guix home reconfigure' and
>even though I use the `-L' flag, `guix home' gives higher priority to
>`emacs-subed', so the build process fails and `guix home' can't exit
>successfully due to that faulty package.
>

You can resolve the ambiguity using features available in guile itself. 
The easiest thing would be to give it a slightly different name, such as 
emacs-subed-customized, but you can still resolve it if you don't want 
to do that for some reason.

Since you're using the `-L` flag, I assume that you put the package 
definition in a file that defines a module. If not, see section 2.5.2 of 
the guile manual (1). Once it's in a module, you can either import the 
module with a prefix as described in section 6.18.2 (2) or you can use 
the `@` syntax to tell guile to pull the symbol out of that module 
directly; I don't see a full explanation of this in the manual right 
off, but it would look something like this: `(@ (gnu packages emacs-xzy) 
emacs-subed)`, except use the name of your module instead of the gnu module.

(1) 
https://www.gnu.org/software/guile/manual/html_node/Writing-new-Modules.html
(2) 
https://www.gnu.org/software/guile/manual/html_node/Using-Guile-Modules.html

Sincerely,
Skyler




Re: Newbie: How to edit a faulty package definition?

2023-06-25 Thread Hilton Chain
Hi Rodrigo,

On Sun, 25 Jun 2023 11:30:42 +0800,
Rodrigo Morales wrote:
...
>   | (define-module (my test-2)
...
>   | (define-public emacs-subed
>   |   (package
>   | (name "emacs-subed")
...
>   The main topic of this thread could have been: How to make "guix home"
>   give higher priority to a path specified through the `-L' flag? But I
>   decided not to ask for help on `guix home', because there are less
>   "guix home" users than Guix users, so I might need to wait
>   significantly more to get some help. I'd rather learn how to edit
>   package definitions and make `guix package -i' aware of that. I've
>   opened another thread on a question related to "guix edit" [here].

I have a solution but not about priorities.

The solution depends on how you add packages to your home environment.

If you are referencing them as variables, you can change the variable name of
your package, or directly referencing it with (@ (my test-2) emacs-subed).

If you are using the specification->package procedure, you can change the name
field of your package definition.