Subject: Re: bug#65757: [PATCH] guix: packages: Support package/inherit by package-field-location.

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 06 Sep 2023 21:55:59 -0400

Hi,

Simon Tournier <[email-masked]> writes:

> Hi Maxim,
>
> On Wed, 06 Sep 2023 at 16:41, Maxim Cournoyer <[email-masked]> 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