From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MBQjKrz2nGSZeAAASxT56A (envelope-from ) for ; Thu, 29 Jun 2023 05:13:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gJAaKrz2nGSAdwEA9RJhRA (envelope-from ) for ; Thu, 29 Jun 2023 05:13:00 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 571BA1405A for ; Thu, 29 Jun 2023 05:13:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEi5E-0005FU-3f; Wed, 28 Jun 2023 23:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEi5B-0005FF-LJ for guix-devel@gnu.org; Wed, 28 Jun 2023 23:12:33 -0400 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEi5A-00073a-2P for guix-devel@gnu.org; Wed, 28 Jun 2023 23:12:33 -0400 Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4Qs3R30sTJz9sDL; Thu, 29 Jun 2023 03:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1688008351; bh=KT7dp6m3lvlEE8eliUyWBBCW9vobZ5TCe1xwUY8WqWw=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=lrOTdhRCcZsa6mkW7zhZGCS/NeRb2tJX/DWc2D7k+XIgHFwKJY/0LRUh8uKV4XbWq 6kj1m1AS2lW8AiKbfm8ZpVMh+cV8NyM2HCGgqRmJyThGytnHEavn4uyLFBjoaDdSRe n8rmPMlKqc685DNfsNEkGmhawdeM58mVdcdw6foE= X-Riseup-User-ID: 05012E328B908F05D4BE5309872A6E4DCECF709FCBD2C24DDC0ABD9F57D94D27 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Qs3R22lCnzFpl6; Thu, 29 Jun 2023 03:12:30 +0000 (UTC) References: <875y788kne.fsf@protonmail.com> From: Csepp To: John Kehayias Cc: guix-devel@gnu.org Subject: Re: modifying (rather than fully replacing) a build phases Date: Thu, 29 Jun 2023 02:30:56 +0200 In-reply-to: <875y788kne.fsf@protonmail.com> Message-ID: <87leg3t10k.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688008380; a=rsa-sha256; cv=none; b=HOBplEjLfbJegGEDtLGEaqY9EhK3lfSTZmiZw9r3wPDvxBFzgu5Ie0sutz4zwod7/4q6mc bF3wA9apgeTIVysPjN2rtz61WkOK6xx1xV0W2zIa2WY9VsQhctWfhiaHbV4s+7CD8Z4Kbq qaJVVbLj4jX06xBnuPtgK1AG6MJfg6rqY7hxap8BHMI0s7gWroLfa3RkO9qRowqWjCcVqz nI8JrhGSlPcoVjOwbXr3BA58/RBE3MLkplm0zVmQ4RVtzN3BhVpnwPi0LZrVvkt+tay/QL yPIZxvEolC5Q5x5FFXBICxceLdvHDQ/VrMJsC3YMdBbFhCD0mAyd6PIkF8f+5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=lrOTdhRC; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688008380; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=q4kAgM/Fs0P3UtFCO7Gi0oTOMNNsR/BMWCvRx8o7Vx4=; b=fcK+7+iYtD/yQM/sGu02R1wT5o3zOULQQLacgqfuEWMitvhpN+1hK3bbXbCiuP1vAzuEnG k330mteI5rGPWNHoygmS1ClhwxzMlKMsvT7fsKMcNOJWUeqvGDW/BxffvuxbUMBJ6YhbxP L6VsTUeFtvXiFtPY4ulfoV4JvkklVN+BONhcOehGEd3iRRzL4VejAE0Sg8WD+ZQzbNvBJE lwJ0+Saqg1mDV1KBq7Y3XTIMrhVpySoxwkCepEjtb7XmPYsqiCzLFmjRgkVHULfkd1ZJSR Xmh6SbXGcEEKPcWhHVyWmmTRFgIbXiv6Ql0UNdClxWjK1p9c8Ops67cMYogD4Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=lrOTdhRC; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -6.61 X-Spam-Score: -6.61 X-Migadu-Queue-Id: 571BA1405A X-TUID: AmuoHUHpCR9Q John Kehayias 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 >> 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.