guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#65757] [PATCH] guix: packages: Support package/inherit by package-f


From: Maxim Cournoyer
Subject: [bug#65757] [PATCH] guix: packages: Support package/inherit by package-field-location.
Date: Wed, 06 Sep 2023 21:55:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> Hi Maxim,
>
> On Wed, 06 Sep 2023 at 16:41, Maxim Cournoyer <maxim.cournoyer@gmail.com> 
> wrote:
>
>> --8<---------------cut here---------------start------------->8---
>> modified   guix/packages.scm
>> @@ -762,7 +762,7 @@ (define (package-field-location package field)
>>                  (go-to-location port line column)
>>                  (match (read port)
>>                    ((or ('package inits ...)
>> -                       ('package/inherit parent inits ...))
>> +                       ('package/inherit _ inits ...))
>>                     (let ((field (assoc field inits)))
>>                       (match field
>>                         ((_ value)
>> --8<---------------cut here---------------end--------------->8---
>>
>> And it now works; yay!  Will install shortly.
>
> Oops!  Indeed, sorry for missing the obvious.  Thanks for the fix.
>
> Cheers,
> simon
>
> PS: For the record, the change you made is:
>
>  -                       ('package/inherit inits ...))
>  +                       ('package/inherit _ inits ...))
>
> because the one above would be equivalent :-) – if I understand enough
> Guile patterning matching.

The one with 'parent' was working as well, but because the binding was
never used, Guile was emitting a warning, silence by renaming 'parent'
to '_' :-).

-- 
Thanks,
Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]