guix-devel
[Top][All Lists]
Advanced

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

Re: modifying (rather than fully replacing) a build phases


From: Csepp
Subject: Re: modifying (rather than fully replacing) a build phases
Date: Thu, 29 Jun 2023 02:30:56 +0200

John Kehayias <john.kehayias@protonmail.com> writes:

> My question remains, but I've updated the patch in question to use
> #:make-flags (thanks to mirai for the idea), separating out these
> parameters from the build command and making this a much easier
> change.
>
> Still, we have examples of just copying some phase by hand to make
> adjustments, is there anything better we can/should do?
>
> On Tue, Jun 27, 2023 at 12:29 PM, John Kehayias wrote:
>
>> Hi Guixers,
>>
>> A question that is either relatively simple or else getting into the
>> weeds a bit, that I came across in my proposed patch
>> <https://issues.guix.gnu.org/64213> The general question is: how can I
>> modify a build phase without replacing it completely? More
>> specifically (as seen in the proposed patch) there is a build phase
>> consisting of just an "apply invoke" call where I want to remove one
>> of the arguments given. Is there a simple way to do this rather than
>> just manually copying and deleting that string?
>>
>> I would assume so, but I wasn't sure how to do it and couldn't quite
>> grep any examples. Some light exploring in the guix repl shows me that
>> package-arguments is a keyword list (not sure the proper terminology
>> in Guile) with #:phases a big gexp. Essentially I want to modify that
>> to remove a string. I suppose it is a question of manipulating a gexp
>> directly. (I'm sure macros can do all this but there doesn't seem to
>> be a need for that at this level, right?)
>>
>> Thanks in advance!
>> John

I think I've used assoc-ref to find the build phase I wanted and then
called it from something else.  It's not super pretty, but it works.



reply via email to

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